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'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
248
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
128
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
118
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
242
Is there a simple way (VBA or macro language) to acknowledge ONLY the most recent alarm? I upgraded recently all the way from RSVIEW 32 7.60 to...
Replies
4
Views
644
Back
Top Bottom