SysProcessExecuteCommand2 and CANopen Device

kuegerls
2024-06-20
2024-06-24
  • kuegerls - 2024-06-20

    Hello,

    CODESYS Control is running on my RevPi, and my system communicates over a CANbus with a master using the ConnectCan module (Slave - CANopen Device). The communication works perfectly fine so far. However, as soon as I call a Python script with "SysProcessExecuteCommand2" that creates a CSV file and executes without errors, the master does not adopt any changes to the Transmission Process Data Objects (TPDOs). I don't quite understand what one has to do with the other, and perhaps someone can help me with this.

    Here is my script call:
    SysProcess.SysProcessExecuteCommand2(pszCommand:='python /home/pi/test.py',
    pszStdOut:=sCMDOutput,
    udiStdOutLen:= SIZEOF(sCMDOutput),
    pResult := ADR(eResult));

    Thank you in advance!

    Best regards,
    Stefan

     
  • eschwellinger

    eschwellinger - 2024-06-20

    please call sysproccess in an own task with low prio

     

    Last edit: eschwellinger 2024-06-20
  • kuegerls - 2024-06-21

    I am now executing the process in a separate task with lower priority, but unfortunately, the connection to the master is still interrupted.

     
  • eschwellinger

    eschwellinger - 2024-06-21

    which runtime version is it? 4.11.0.0?

     
  • kuegerls - 2024-06-24

    4.10.0.0

     
  • kuegerls - 2024-06-24

    4.10.0.0

     
  • kuegerls - 2024-06-24

    I have now conducted some tests. The problem occurs when the Python script establishes an OPCUA connection, even if I only establish the connection without reading or writing any data.
    Is there another way to exchange data between Python and CODESYS without having to put in a lot of effort?

     

Log in to post a comment.