Siemens and Initialization when Entering a Function Block

Join Date
Apr 2002
Location
Burlington, Ontario
Posts
186
Ladies & Gentlemen,

Im still in the process of startng to learn Siemens PLC's, so please bear with me...


What Im trying to do is to initialize some parameters in a function block, based on an initialization request. If im setting and resetting bits on the request no problem. But how would you reset a registar to zero?

Example: (inside FB)



Network 1:

A #Initialize_Request
FP #Initialize_OS
= #Initialize

Network 2:

A #Initialize
= #Test_Bit



The above code works as I expect. If there is an initialize request, the "#Test_bit" is on for one scan. No problem.

Instread of toggling a test bit, how would I reset some values to zero?? This is what I have tried..I know it is wrong because the value I am writing to is passed back out of the function and it is always zero. Eg.. the oneshot isnt requesting the transfer of 0.00 to "out". It is constantly tranfering.



Network 1:

A #Initialize_Request
FP #Initialize_OS
= #Initialize

Network 2:

A #Initialize
A(
L 0.00
T Out
)



I hope someone can lead me into the right direction. I know what I want to do, but just dont know how to do it in the Siemens PLC.
Damn differences in PLC..o_O

Thanks,

Andrew Evenson
 
A #Initialize_Request
FP #Initialize_OS
JCN H001
L 0
T out
H001: Nop 0

Should do the trick. The plc then jumps over the code when rlo is zero. And in this case rlo is only one for one scan when Initialize is set to one
 
Just remember that, not all operations are RLO dependant. This means that you cannot use bits alone to do functions like add, transfer etc. You must use other ways of blocking the code under these circumstances such as the jump statement shown by Bratt.

Cheers
 

Similar Topics

Good morning fellow sea captains and wizards, I am being asked to do the above and obtain 4 values from each slave, I know about the MRX and MWX...
Replies
26
Views
307
Hi everyone, I am an omron plc tec , lately I came across a siemens s7 200 cn plc . Can someone help me regarding the software required and...
Replies
26
Views
470
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
117
Hi, I have PLC S7-1200 and switch XC-208 and Iam trying to implement this SNMP library: SIOS I am not sure, what I am doing wrong, but there is...
Replies
3
Views
122
Hi all, i am the new controls guy at the plant and i have inherited a pc from the previous controls guy with Siemens tia portal version 16 and 17...
Replies
20
Views
786
Back
Top Bottom