Edge trigging in ST or SCL

xzen

Lifetime Supporting Member
Join Date
Jun 2006
Location
Oslo
Posts
97
What is your best practice for edge trigging in structured text language?

Code:
#condition := (Value1 > 0 OR NOT Tag1) AND Tag2;
IF #condition_positive_edge THEN
    some_code();
END_IF;
 
Jesper's post 9 years ago, same as Manglemenders If condition on ST.


Dont think there is a one-shot block for SCL.
But it is trivial to code.

signal_oneshot_ON := signal_input AND NOT signal_mem ; // generate the ON oneshot
signal_oneshot_OFF := NOT signal_input AND signal_mem ; // generate the OFF oneshot
signal_mem := signal_input ; store the status of the input
 
Not sure if it's in all ST packages but in CoDeSys (at least in v3.5) you can set a bit for a positive or negative edge trigger. The 'P' indicates positive edge, for Negative edge it would be an 'N'

attachment.php


Trigger.png
 

Similar Topics

I have a FX3U clone that I am failing to get a simple Structured Text example working on and would really appreciate some help. I created a...
Replies
30
Views
909
I'm trying to build my Classic Step 7 programming skills this weekend. I get stuck on little things that are not covered in YouTube tutorials. I'm...
Replies
7
Views
306
Hello, I have been tasked with adding some analog signals for display and alarm setup in some old Schneider Electric HMIGTO HMI-panels. I have...
Replies
4
Views
163
Good afternoon everyone, could someone guide me on how to program a falling edge in a wave micro control using CWDesigner? It is to reset a...
Replies
2
Views
127
Can anyone share a way to make a button on the HMI that hits the "Ack Page" in an Alarm and Event Summary Window? or better yet - a plc tag...
Replies
5
Views
263
Back
Top Bottom