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

Raspberry_Pi_Camera.Still Methode in Codesys

CanBohr
2018-01-24
2018-01-25
  • CanBohr - 2018-01-24

    Hallo ans Forum, hello to the forum (english see at the second half of the text),

    ich verzweifle gerade an der Raspberry_Pi_Camera.Still Methode in Codesys.

    Ich rufe diese Methode auf mit:
    '-a "20180124_102427" -md 7 -w 640 -h 480 -n -v -o /home/pi/Ordner/20180124_102427_Bild.jpg'

    Leider wird dabei der Dateiname nach der "24" in der Uhrzeit abgeschnitten. Offensichtlich kann die Methode nur eine begrenzte Zeichenzahl übernehmen.

    Wenn ich den Befehl im Pi direkt eingebe, funnktioniert er einwandfrei. Es muß also an der Methode im Codesys liegen.

    Gibt es dafür eine Lösung?

    Ich habe auch schon mit -a 12 und -a 8 und -a 4 experimentiert, leider wird dabei das Datum in amerikanischer Schreibweise ausgegeben, was nicht erwünscht ist.

    Außerdem bekomme ich in Codesys bei Verwendung von $27 oder bei $' nicht nur das Hochkomma, sondern auch das Dollarzeichen in den String. Wie bekomme ich nur das Hochkomma mitten in den String.

    Über Hilfe würde ich mich freuen.
    Gruß,
    Xav

    For the ones who prefer English:
    I am a bit desperate with the Raspberry_Pi_Camera.Still Method in Codesys.

    If I call this method with:
    '-a "20180124_102427" -md 7 -w 640 -h 480 -n -v -o /home/pi/Ordner/20180124_102427_Bild.jpg'

    The string will be cut after 24 in the time sequence. Obviously this method can only handle a certain number of characters in Codesys.

    If I put the command directly into the console of the Pi, all is like it should be.
    So the problem has to be related to the Method in Codesys.

    Any hints?

    I also have tried -a 12, -a 8 and-a 4 but then I get the american way to write date "mm/dd/yyyy" which I don't want to have.

    Additionally I have a problem by using $27 or $' in strings, for the Raspberry_Pi_Camera.still method the Dollar sign seems to be a problem as I get the error code 2 without any picture stored. So how can I get the ' sign into the method for getting a picture. A conversion from Wstring to String doesn't work either.

    I would appreciate to get some help or hints.

    Cheers,
    Xav

     
  • eschwellinger

    eschwellinger - 2018-01-25

    Hi,
    this is a bug, which need to be fixed.
    Ugly Workaround would be to call it by SysProcess....Command2
    BR
    Edwin

     
  • CanBohr - 2018-01-25

    Thank you for your instant reaction.
    Any Idea when the bug might be fixed?
    I am trying with the workaraound but its really ugly.

    Cheers,
    Xav

     

Log in to post a comment.