Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Rückgabewert pszStdOut

wayne
2018-07-15
2018-07-29
  • wayne - 2018-07-15

    Hallihallo,

    ich versuche den Rückgabewert eines Python-Programms zu bekommen.
    Das test.py funktioniert soweit und liefert ein "Hallo Welt".
    Leider bekomme ich bei dem ultraschallsensor.py keine Rückgabe,
    obwohl auf der Kommandozeile ein Wert kommt.

    In CODESYSControl_User.cfg ist eingetragen:
    [SysProcess]
    Command=AllowAll

    pi@rpi-gartenbewaesserung:~ $ python /usr/bin/ultraschallsensor.py
    35.0580453873
    

    Was mache ich noch falsch?

    Danke und Grüße,
    wayne

    IMG: ultraschallsensor.PNG

    IMG: test.PNG

     
  • akneer - 2018-07-28

    hi,

    lass das run mal testweise auf true.

    hatte es auch schon mal, dass das auszuführende programm zu lange dauerte um es abzurufen.

    du bist ja in dieser anweisung quasi nur ein umlauf drin.

     
  • wayne - 2018-07-29

    Hallo akneer,

    war ne gute Idee. Halt aber leider nicht geholfen.

    Selbst wenn das python-Skript 5s aktiv ist, kommt nix zurück:

    IMG: timer

     

Log in to post a comment.