TheWaterboy
Lifetime Supporting Member + Moderator
UL bit goes High at the 33rd bit as expected, but pattern keeps going on. I don't see where you used the UL bit in your example but certainly that is a key.
Interesting. At what point does .UL go high? When the bit reaches the 34th position? Or when it shifts out the end of the second DINT?
EDIT: Based on instruction reference manual, .UL is set by the bit unloading from the point specified by your length, and remaining bits in the array are 'invalid'.
Hol' on there, Baba Louie!Well shoot, that's not gonna work for me then.
This works, Just clear the second array. Seems obvious now. ...
This works, Just clear the second array. Seems obvious now.
Using a counter would just be extra, I don't see the need, the Length appears to do the job for now. You disagree?
In your example the rung would evaluate true once every 1.196 sec
While I would expect the full scan time of the ladder would be typically be about 150 ms or so depending on the size and complexity of the program.
The BSL would never execute every scam of the ladder code. ...
source_bit storage_bit
-----] [-----+------------------------( )------------+---
| |
| storage_bit rising_edge_bit |
+-----]/[----------------( )------------+
force_rising_edge storage_bit
-----------] [------------------------(U)------