Step7 Detecting Positive Edge In SCL

mosama

Member
Join Date
May 2009
Location
Egypt
Posts
182
Dear all,

What is the name of the function used for positive edge detection in Step7 SCL ??

Thank you
 
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
 
Thanks Jesper.

I don't what is your opinions, but from my experience with Unity Pro (Schneider Electric) and Step7 (SIEMENS) I think Unity Pro is better.
 
Unfortunately, I have no experience with Unity Pro.
STEP7 is coming in a completely new version (v11) which includes a much-improved SCL.

Apart from that, Siemens SCL should be equivalent to Structured Text in IEC61131-3. Dont know if there is a oneshot standard function in IEC ST.
 
Unfortunately, I have no experience with Unity Pro.
STEP7 is coming in a completely new version (v11) which includes a much-improved SCL.

Apart from that, Siemens SCL should be equivalent to Structured Text in IEC61131-3. Dont know if there is a oneshot standard function in IEC ST.

The editor is LOT better. Have not tested debug yet. But there is actually working autocompletion.
 
Apart from that, Siemens SCL should be equivalent to Structured Text in IEC61131-3. Dont know if there is a oneshot standard function in IEC ST.

Yes in Structured Text there is "RE" (rising edge) instruction, but it only works with EBOOL data type.

Also Unity Pro Structured Text editor doesn't need compilation in order to see the errors. The errors appears while you are programming by drawing a red line under the error.

I think SCL have the advantage of defining variables from the source code, and this not found in Unity Pro Structured Text.
 
For UnityPro
I think SCL have the advantage of defining variables from the source code, and this not found in Unity Pro Structured Text.
Yes there is - type your new variable put the cursor over it and right click and create variable

Yes in Structured Text there is "RE" (rising edge) instruction, but it only works with EBOOL data type.
For rising edge use R_Trig and F_Trig for falling edge and you can then use it with Bool or Ebool
 
Like I said, I dont know Unity Pro.
But, I think that what mosama and GeoffC calls "defining variables" are two different things.
In S7 SCL (and the other languages) you create UDTs, DBs, FCs and FBs wherein you have variable declarations.
In Unity Pro ST, you can create a global variable via a shortcut function without leaving the editor (at least thats what I figure out from GeoffC's input).
 
Yes there is - type your new variable put the cursor over it and right click and create variable
I mean that in Step7 you may declare variables directly from the code like this:

VAR X1, X2, X3:BOOL; END_VAR

But you can't do this in Unity Pro

For rising edge use R_Trig and F_Trig for falling edge and you can then use it with Bool or Ebool
Yes but these instructions needs two parameters: ClockInput & Output, but "RE" and "FE" only needs one parameter and works only with EBOOL data type.

My regards
 
Last edited:

Similar Topics

Hey again guys, Having all kinds of issues this week. Is there a way to detect when an integer value changes? I need to set a BOOL every time...
Replies
8
Views
8,145
Hi all, I am programming with Step 7, v 5.2, servicepack 1. I have created an FB, with (amongst others) a BLOCK_DB for an input. Within the...
Replies
2
Views
5,086
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
128
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
141
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
127
Back
Top Bottom