S5 Function Block

leigh01

Member
Join Date
Feb 2007
Location
Boronia
Posts
5
Hi There
Can anyone help me work out how this function block may work.
(attached pdf)
It is controlling a stepper motor and the stepper reqires the output "ERRE to be on, I cannot work out the code contained within it to actually make this
 
When you're dealing with Siemens, especially Step5, it sometimes helps if you can speak German!

Unfortunately, I don't know Step5, but until somebody comes along who does, here are some pointers.

The NW Title is Grundstellung, this is the initial or home state.
HM(1) is the abbreviation for Hilfsmerker, which is a scratch flag.

I thought I could sort this out from S7 knowledge, but got stuck with the RB instruction. It appears to be some sort of Clear (Reset) instruction.

If you can clear up exactly what the RB command does and, in particular, if you can post a copy with the complete comments, then I'm pretty sure I can sort this out for you.
 
Inputs are all bits (BOOL) except for ZEIT which is a Timer and WERT which is in S5 time format .

The first section

Code:
A =STAR
A =ENDS
AN =HM1
S =LAEU
S =STOP
S =HM1

so if star and ends are both on and hm1 is off, the latch laeu, stop and hm1.


The second section

Code:
A =HM1
A =STOP
LW =WERT
SE =ZEIT

A ZEIT
S =MANU

If hm1 and stop are both on, start extended timer zeit for length of time wert.

On completion of time, latch manu

The third section

Code:
 AN =ENDS
S =ERRE
RB = MANU

A =ERRE
AN =STAR
RB =HM1
RB =LAEU
RB =STOP
RB =ERRE

AN =RESE
RB =MANU
RB = HM1
If ends is off, latch erre and unlatch manu

If erre is on and star is off, then unlatch hm1, laeu, stop and erre.

If rese is off, reset both manu and hm1.
 
Hi Peter
thanks for the answer on this, I still cannot get the block to operate as I see it should.
I have "ends" off and "rese" on from the code it should set "erre" on is that correct.
With this as it is I have no outputs operating
 

Similar Topics

Hi, I have attached herewith one image which our programmer has been used in S7 1500 PLC. Now we need to use the same instructions in S7 1200 PLC...
Replies
4
Views
120
Please see attached file. I need this program in Function Block form but I am totally lost on this. Any help would be appreciated. Thanks!
Replies
8
Views
295
Hi! I am using a TM200CE40T PLC from Schneider to write data over Modbus. I have used Memory words (%MW) before using the Write variable...
Replies
1
Views
534
Hi folks. New to the forum, but been working with PLCs for several years now. Would like some advice on whether you would keep this logic, or...
Replies
9
Views
1,067
Hi Yes, I'm stuck again. Trying to define a Function Block. What I've put in there so far has been a straight copy/paste from the code (and that...
Replies
22
Views
2,887
Back
Top Bottom