Hi
Can someone help me code a rising edge in ST (R_trig) I always get an error no matter what i code.
tx
Hi
Can someone help me code a rising edge in ST (R_trig) I always get an error no matter what i code.
tx
[code]// 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;[/code]