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

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
1
Views
32
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
90
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
15
Views
451
Hi all, I have some difficulties with programming a NAT config in my Scalance SC636-2C When programming the NAT-table i'm not able to reach my...
Replies
4
Views
130
Hi, Yesterday, I was at a customer site. I made one little change. Changed a dummy bool output to an actual output. I didn't add any tags, or...
Replies
15
Views
299
Back
Top Bottom