Simatic S7 question

arocon

Member
Join Date
Oct 2006
Location
Dubai
Posts
171
In FB Block there are parameters : IN, OUT, IN-OUT,STAT,TEMP; I understand IN- INPUT, OUT- OUTPUT but others are I could not understand ; Can anybody explain ?



Similarly in FC Block there are parameters: IN,OUT,IN-OUT,TEMO,RET_VAL; I understand IN- INPUT but others I did not understand & what is the difference OUT & RET_VAL.



In OB block what is use of TEMP parameter ?

arocon
 
IN - Input parameter, updated on entering the block
OUT - Output parameter, updated on leaving the block
IN-OUT - updated on entering and leaving the block
TEMP - Scratch flag,it has no memory and could be in any state, so you have to condition it before use.
STAT - In FB's only, internal memory for the FB, data stored in the instance DB
RET-VAL - I've never used this, I believe is you reset this on leaving then the RLO becomes false, i.e in ladder if a coil is after the block it will be off.

FC's - If you want to guarantee that data sent in via the parameters is in a state known to you and then you want to modify it, then use an IN-OUT. Although simple addresses are updated comples ones are not, so to be sure I would always use an IN-OUT.

FB's - not sure why they included IN-OUT as everything is remembered by the IDB.

Why use TEMP's in OB's, why not?? Also in OB's there are already a number of TEMP's which carry info, like OB1 holds data like scantime etc, diagnostic OB's carry data regarding the error's that called it, etc etc
 
PeterW said:
IN - Input parameter, updated on entering the block
OUT - Output parameter, updated on leaving the block
IN-OUT - updated on entering and leaving the block
TEMP - Scratch flag,it has no memory and could be in any state, so you have to condition it before use.
STAT - In FB's only, internal memory for the FB, data stored in the instance DB
RET-VAL - I've never used this, I believe is you reset this on leaving then the RLO becomes false, i.e in ladder if a coil is after the block it will be off.

FC's - If you want to guarantee that data sent in via the parameters is in a state known to you and then you want to modify it, then use an IN-OUT. Although simple addresses are updated comples ones are not, so to be sure I would always use an IN-OUT.

FB's - not sure why they included IN-OUT as everything is remembered by the IDB.

Why use TEMP's in OB's, why not?? Also in OB's there are already a number of TEMP's which carry info, like OB1 holds data like scantime etc, diagnostic OB's carry data regarding the error's that called it, etc etc

RETVAL is a return value - OUTPUT

The ENO is conditioned by a SAVE instruction and is the status of the RLO just before the SAVE. If the ENO is not set, the rest of the calling rung will not execute.
 

Similar Topics

HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
82
Hi, first post here so sorry for it being a noob question but what can I do .. I need help (and of course I need it yesterday :banghead: ) The...
Replies
11
Views
5,906
Hey all. I've got a query for you. Does it require more of the processor of a PLC to generate the time value everytime a timer is called upon...
Replies
8
Views
1,418
Could anyone tell me when Network 9 will be enable ? or when value of OUTV will change ? Thank you
Replies
1
Views
1,803
In one network SFC20(BLkMOV) is used to transfer 8 byte data from P#DB500.DBX8.0(SRC BLK) to P#DB20.DBX4.0(DST BLK). I would like to change...
Replies
2
Views
4,272
Back
Top Bottom