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

OK. You guys helped me out a bunch with my first Siemens question. I found a bunch of issues with integrity checking the PLC programs I was...
Replies
3
Views
125
Hi, I have a 1214 on ip 192.168.0.100. This is connected to other modules through a switch on same network. I need to connect this to a company...
Replies
1
Views
97
Hello. I appreciate the insights here and the willingness to share. I've got a lot of Rockwell experience, but my Siemens experience is...
Replies
6
Views
135
Kindly, has anyone tried to control Lenze servomotors with Siemens S120 drives ? Any special hints ? Have some concerns for the resolver and servo...
Replies
5
Views
182
Hi everyone, I want to upload the program from my CPU317TF-2 DP to my PC via connecting to CP 343-1 Advanced since it has LAN ports and the CPU...
Replies
1
Views
123
Back
Top Bottom