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

Cannot get Standard 3.5.9.0 R_TRIG functions to work on RaspberryPi3B 1.3.0.0

ctgarvey
2016-10-14
2016-10-16
  • ctgarvey - 2016-10-14

    Hi Folks,
    probably newbie mistake, but i just cannot get some functions from the standard library 3.5.9.0 (system) to work in structured text. THe Function blocks receive the input but dont execute the output, and now i am beginning to think that logic behind these standard library functions is not executing .

    Specifically Im trying to use both rising edge and falling edge functions to set latch a helper flag. Even it the edge is only high for 1 scan, i should be able to catch the Q output of the function.

    Anyone got any ideas why this standard library function does not appear to be executing? Aside from referencing this standard library in the library manager, is there anything else i have to do to get access to these functions? It worries me that this standard library doesnt have a '+' next to its name. THeres also mention of a 'standard64' library in the placeholder section. I dont know if that is relevant. Any help appreciated.

    IMG: CodeSys2.PNG

    IMG: CodeSys1.PNG

     
  • eschwellinger

    eschwellinger - 2016-10-15

    Hi,
    You need to call the fb instance by:
    TestRisingEdge ();
    This is the missing part.
    BR
    Edwin

     
  • ctgarvey - 2016-10-16

    Thank You, much obliged!! Im coming from C# & python background and there appears to be a couple of subtle differences pertaining mostly to instantiation and the use of a constructor . Ive posted some sample code outlining working functions / function blocks in structured text on the pi. Hopefully it will help some other newbies.
    Thanks again!

    IMG: CodeSample3.png

    IMG: CodeSample2.png

    IMG: CodeSample1.png

     

Log in to post a comment.