S:fs

JoeM1

Member
Join Date
Jul 2015
Location
Tucson
Posts
71
I need bit or value to change every time a subroutine is scanned.
ControlLogix environment.
Will S:FS get me there or is that reserved for the first scan after powerup?

Thanks
 
I need bit or value to change every time a subroutine is scanned.
ControlLogix environment.
Will S:FS get me there or is that reserved for the first scan after powerup?

S:FS is first scan

Is your subroutine called each scan?

Th easiest thing I can think of is to add 1 to an integer each time your subroutine is called. Bit 0 will turn on, off, on, off. If you don't have logic to deal with 32767 rolling over to -32768, you will get a minor fault (underflow)

Will that work for you?
 
I usually use the wallclock time for this, the subroutine just copies the value on the first rung to a holding variable.
 
Ken's


bit1 bit1
--|/|---------( )---




works for me too if you just want a bit to change every scan of the subroutine
 
Last edited:
Back
Top Bottom