SysSem and SysFile warnings and errors

moshtaraq
2020-03-26
2020-04-03
1 2 > >> (Page 1 of 2)
  • moshtaraq

    moshtaraq - 2020-03-26

    Hi,

    I'm not a programmer by far, I'm an engineering student and I've programmed in twincat before but not codesys.

    I'm working on a Topcon OPUS A3 display. I'm following a tutorial provided by that company. Visualizations work fine and I can program everything no problem until I tried setting up the CAN communication. I'm getting two warnings of what seem like version problems and a bunch of errors. The previous library errors I've been able to fix by downloading missing libraries but I have no idea how to fix this.

    codesys V3.5 SP15 patch 1
    Pack provided by Topcon: 3.5.14.7 (maybe this is the problem?)

    Thanks in advance

     
  • sgronchi

    sgronchi - 2020-03-26

    Hi, Topcon does not support 3.5.15 yet. They're releasing the .15 runtime in fall. For now you must use .14 IDE.

     
  • moshtaraq

    moshtaraq - 2020-03-26

    I installed 14 and the libraries are OK but the other errors persist. Is there a descent tutorial for CAN? The one I use is a couple of versions outdated.

     
  • sgronchi

    sgronchi - 2020-03-26

    The last I have is for 3.5.11, but it works straight for 3.5.14 if you update the main device to the last target. Nothing has changed on Topcon side.
    Can you show exactly which errors Codesys raises? [not the shortened version, and also the page on CANopen slave where the error occurs]

     

    Last edit: sgronchi 2020-03-26
  • moshtaraq

    moshtaraq - 2020-03-27

    I think I found the problem: the bytes were declared in the global variable list. I changed every use (visualistation and PLC_PRG) to GVL.XXXX and now it compiles fine. This differs from the tutorial I am following, there is no need to but the GVL before it...

     
  • moshtaraq

    moshtaraq - 2020-03-27

    Nevermind, it isn't fixed. I get a message on the CANopen_Device mappings tab: The bus is not running.
    I followed the tutorial to the letter and this doesn't happen there. How can I get that bus running?

     
  • sgronchi

    sgronchi - 2020-03-27

    Is the bus wired correctly? Resistors, H/L not switched, and so on?
    Try to add a Driver/CANL2Config0 (for first CAN port) or CANL2Config1 (for second CAN port) and set CANbus parameters inside it.

     
  • moshtaraq

    moshtaraq - 2020-03-27

    How do I add a driver? I see on the canbus parameters: bus state = -1 = no driver.
    Remember I'm not a programmer so a tutorial or something would help.

     
  • sgronchi

    sgronchi - 2020-03-27

    See the "Driver" node, that in your project has a child node "Keyboard"? Right click on it and select "Add device", then add CANL2Config0 or CANL2Config1 as mentioned above and set up device parameters according to your network.

     
  • moshtaraq

    moshtaraq - 2020-03-27

    I added the driver and set the baud rate. All the other parameters are a mystery to me and the 'bus is not running' message persists. Is there really no documentation on how to do this? I feel like wasting your time with my lack of knowledge...

     
  • sgronchi

    sgronchi - 2020-03-27

    For standard CAN bus device (and CANopen configuration) there is Codesys help (good although not the best) and a bit more documentation (especially libraries) on https://help.codesys.com .
    For Topcon Codesys Target there is a .chm in the BSP that should be integrated into Codesys help (last node, Add-ons) when you install Target files, though it is an autogenerated reference manual. They have a collection of example projects that your distributor could give you, and also a training presentation.
    Usually CAN bus works out of the box, so does CANopen, and it is not required to mess with CANL2ConfigX (though sometimes it helps ironing out some startup issues). Could you post your project?
    Also, what BSP version are you running? You can see it by logging in via SSH and issuing

    uname -a
    
     
  • sgronchi

    sgronchi - 2020-03-27

    BSP (board support package) is the collection of files you can find under Customer Files\Device\OPUS_A3 in the file you downloaded from their site and that you should load on the display through the service procedure (Manuals\Software\OPUS_devices_update_manual_V1.10.pdf)

    The .chm I am referring to is Manuals\Software\TargetDataStorage_3.5.14.7.chm . If it seems empty, is because Windows by default blocks .chm viewing. Just right click on it, choose Properties and near OK/Cancel buttons check "Disable block" or something like that, then press OK.

    SSH is a way to have a remote command prompt (think DOS, but way better). You can download PuTTY or TeraTerm and then put the display IP address and connect (username and password in the manuals). You can also use the serial port.

    On Monday I will try your project on a real display and then let you know. Anyway, you should ask your distributor, is their job to help you (not us because you'll already have called me by now ;-) )

     
  • moshtaraq

    moshtaraq - 2020-03-27

    Our distributor won't answer our calls or e-mails and Topcon did not seem to eager to help honestly. Thanks for trying it on monday!

     
  • sgronchi

    sgronchi - 2020-03-27

    Usually people of Opus support team (in Geisenheim) are nice and answer very fast. Strange.
    Your distributor, on the other hand, does not seem professional. Tech support for products we distribute is my second job (my first is programming them) and I won't ever leave an email unanswered.

     
  • moshtaraq

    moshtaraq - 2020-03-27

    We are a group of engineering students working on a sponsor-funded project: Uantwerp Solar Boat Team. We had a sponsor agreement with a company for the display in the past but they won't respond anymore, not even when I asked for a quote to buy a new one for our new boat we're building. Maybe I contacted the wrong people from topcon?

     
  • sgronchi

    sgronchi - 2020-03-27

    Support email address is in the manuals (not writing there, not willing spam bots to have it easy).
    Have you got one PLC programmer in your team, or at least a good programmer? He/she should be able to assist you.

     
  • moshtaraq

    moshtaraq - 2020-03-27

    We have no plc-programmers, we all had the same education. I probably one of the best programmers of our team but we never had to install or alter our software, just programming.

     
  • sgronchi

    sgronchi - 2020-03-30

    Your code is fine. If you correctly terminate the bus the CANbus device diagnostic will go away, and sending the NMT start or calling CANopen_device.SwitchToOp() will start the CANopen slave.

     
  • moshtaraq

    moshtaraq - 2020-03-30

    Is that with or without the CAN2LCONFIG files present? Thanks for testing! I'm kinda stranded for the moment cause I can't access our hardware at the university due to the lockdown. I'll improvise something with what I have :).

     
  • sgronchi

    sgronchi - 2020-03-30

    As I said, you do not need it in most cases. I just tried it without and it works, just connect terminators and a probe to acknowledge messages (diagnostics about bus not running are due to noone acknowledging CANopen bootup message). CANL2ConfigX is needed if you want to exchange messages not related to a CAN fieldbus, but seldom is needed to force FlexCAN configuration.

     
  • moshtaraq

    moshtaraq - 2020-03-30

    What acknowledge message do I need to send for it to boot up correctly? Where can I find this info?

     
  • sgronchi

    sgronchi - 2020-03-30

    It is not an acknowledge message, but a message acknowledge.
    https://www.kvaser.com/about-can/the-can-protocol/can-messages-13/
    See the ACK slot in the message frame? The sender writes 1 (recessive bit), if any node has correctly received the message it writes 0 (dominant bit). If the sender reads 1, noone has received a valid message (could be corrupted), so it retransmits the message for a hundred times and then concludes there is an error (faulty controller, bus disconnected, ...)

     
  • moshtaraq

    moshtaraq - 2020-03-31

    I've read the following message when the display boots:
    ID: 701, Data: 10
    In the tutorial it says to send the following to put the display in operational mode:
    ID: 000, data 01 00
    Now the error is gone and I recieve a bunch of messages on ID 181 which seems to be what is configured. Thanks for the help!

     

    Last edit: moshtaraq 2020-03-31
  • moshtaraq

    moshtaraq - 2020-03-31

    Looks like I cheered to soon....
    I get warnings:
    C0373 'Application.GVL.TPDO_byte_12' is not a valid assignement target (byte_34,56 and 78 also)
    And an error from EMCY service: PDO not processed due to length error (PDO receiving CANopen device detected a mismatch of the PDO length)
    I sent 4 bytes on ID 201 and the PDO has 4 bytes so I don't get it...

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.