You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old May 10th, 2011, 03:17 AM   #1
mosama
Member
Egypt

mosama is offline
 
mosama's Avatar
 
Join Date: May 2009
Location: Egypt
Posts: 182
Step7 Detecting Positive Edge In SCL

Dear all,

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

Thank you
  Reply With Quote
Old May 10th, 2011, 04:03 AM   #2
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is online now
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 14,614
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
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old May 10th, 2011, 08:53 AM   #3
mosama
Member
Egypt

mosama is offline
 
mosama's Avatar
 
Join Date: May 2009
Location: Egypt
Posts: 182
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.
  Reply With Quote
Old May 10th, 2011, 09:13 AM   #4
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is online now
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 14,614
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.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old May 10th, 2011, 09:31 AM   #5
TurpoUrpo
Lifetime Supporting Member
Finland

TurpoUrpo is offline
 
Join Date: May 2008
Location: Switzerland
Posts: 1,499
Quote:
Originally Posted by JesperMP View Post
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.
  Reply With Quote
Old May 11th, 2011, 02:55 AM   #6
mosama
Member
Egypt

mosama is offline
 
mosama's Avatar
 
Join Date: May 2009
Location: Egypt
Posts: 182
Quote:
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.
  Reply With Quote
Old May 11th, 2011, 03:49 AM   #7
GeoffC
Member
Australia

GeoffC is offline
 
GeoffC's Avatar
 
Join Date: Aug 2006
Location: Newcastle
Posts: 683
For UnityPro
Quote:
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

Quote:
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
  Reply With Quote
Old May 11th, 2011, 04:02 AM   #8
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is online now
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 14,614
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).
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old May 11th, 2011, 04:25 AM   #9
mosama
Member
Egypt

mosama is offline
 
mosama's Avatar
 
Join Date: May 2009
Location: Egypt
Posts: 182
Quote:
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

Quote:
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 by mosama; May 11th, 2011 at 04:32 AM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Monitoring multi-instance FB in Step7 SCL RollingPin LIVE PLC Questions And Answers 5 December 6th, 2009 12:55 AM
String copy in Step7 SCL by SFC20 problems Coralreef LIVE PLC Questions And Answers 5 June 18th, 2009 08:23 AM
Positive edge triggers JOLTRON LIVE PLC Questions And Answers 21 August 4th, 2008 01:09 PM
Positive edge detection in SCL (S7) Lesa LIVE PLC Questions And Answers 17 October 5th, 2006 08:22 PM
Simple explanation of positive edge? Rembrant LIVE PLC Questions And Answers 3 July 15th, 2003 10:07 AM


All times are GMT -5. The time now is 09:11 AM.


.