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

Hi need help why this “failure 5 emergency stop “ appears at every startup in the morning ? Have to shut off main switch at least 10 times on...
Replies
19
Views
208
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
73
Hi everyone hope you'll well. Is it possible for me to download a Crack version of tia portal v13..sorry to say this but the software is very...
Replies
5
Views
171
I have established an online connection to a machine using an S314 processor. I am using an mpi connector and simatic manager. The online...
Replies
8
Views
151
Hi everyone, i have a Siemens S7-300 Cpu 314C-2 DP with several cards of i/o and servos my laptop has TIA version 16 and 17 loaded and...
Replies
4
Views
150
Back
Top Bottom