Andrew Evenson
Member
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)
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.
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..
Thanks,
Andrew Evenson
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..
Thanks,
Andrew Evenson