Skip to content

R_trig in St

edited February 2022 in PLCnext Engineer
Hi

Can someone help me code a rising edge in ST (R_trig) I always get an error no matter what i code.

tx

Comments

  • // R_TRIG1 is a function block instance of type R_TRIG
    // MyBoolean and RisingEdge are both local variables of type BOOL
    R_TRIG1(CLK := MyBoolean, Q => RisingEdge);
    
    // Or, alternatively, using a local variable (MyOldBoolean) instead of a Function Block:
    RisingEdge := MyBoolean AND NOT MyOldBoolean;
    MyOldBoolean := MyBoolean;
    
Sign In or Register to comment.