S:FS Bit in RSLogix 5000

fifty60

Member
Join Date
May 2017
Location
Kentucky
Posts
12
If i have an S:FS bit in a Routine that is constantly called from the main routine, will this bit only be active on the first scan of the main routine, the first time the sub routine is called, or everytime the subroutine is called?

If the call to the subroutine is not proceeded by any logic in the Main routine, so that it is called continually, is the sub routine called over and over, or is it only called once and then continually scanned?
 
The Logix system S:FS system BOOL tag will be true for only one scan, the first one following a CPU power cycle or a transition from Program Mode to Run/Remote Run Mode.

It doesn't matter how many times it is called within the user program; it will be true only one scan; the "First" one.
 
Each task has an S:FS instance. So if you have a continuous task then in that task it will be true right after powering up. If you have a periodic task with it in it then it will be true when the task runs the first time after powering up, which for long periods might be a while. If you have an event task it will be true the first time that task executes, which could conceivably be days or even weeks after the power up depending on what event executes the task.
 
So if the S:FS is in a subroutine, and the subroutine is called from a JSR in the main routine on the first scan, then the subroutine is called on the first scan so an S:FS in the subroutine would be effective 1 time on startup.

I am a little confused with synchronous and non synchronous, etc. For example, does the plc register the JSR on the first scan, and then jump to the subroutine on the second scan?
 
So if the S:FS is in a subroutine, and the subroutine is called from a JSR in the main routine on the first scan, then the subroutine is called on the first scan so an S:FS in the subroutine would be effective 1 time on startup.

Each PROGRAM has it's own S:FS bit, not TASK as has been suggested. Each Program's S:FS bit is set for the first scan of that program.

Usually, all Programs within a Task are executed according to the Program Schedule in the Task Properties, so all the S:FS bits for all Programs are synonymous, but it is possible to disable/enable programs, either manually, or under program control.

If you execute a subroutine with a S:FS bit from the MainRoutne, you don't need any S:FS bits in that subroutine, it will only get called once, and once only, when the processor goes into RUN mode.

If you introduce any delay (with a timer for intialisation, perhaps), then try and call the subroutine, the S:FS bit will have long gone off, so the JSR will fail.

I am a little confused with synchronous and non synchronous, etc. For example, does the plc register the JSR on the first scan, and then jump to the subroutine on the second scan?

Synchronous and Non-Synchronous has nothing to do with the S:FS bit. Usually the terms are applied to the method of I/O update. In nearly all previous A-B controllers, I/O updating took place at the beginning and end of logic scan, respectively (Synchronous). In Logix5000 systems the I/O is updated on a scheduled basis, during the logic scan, during a period called the "System Overhead Time-Slice" (Asynchronous). In certain cases, asynchronous I/O can be problematic, and most people buffer the I/O with mapping routines, that re-synchronises the data seen by the logic to the application scan.
 
Last edited:
Resurrecting this thread a bit, to ask about S:FS with Dual Redundant Contrologix. Does S:FS get reset with a failover? I know the scan cycle and tags of A & B chassis are synchronized, so assume that S:FS is too, and only trigger if both chassis are off, and one is switched on and is PRIM.
 
Resurrecting this thread a bit, to ask about S:FS with Dual Redundant Contrologix. Does S:FS get reset with a failover? I know the scan cycle and tags of A & B chassis are synchronized, so assume that S:FS is too, and only trigger if both chassis are off, and one is switched on and is PRIM.

I am not fully conversant with the redundancy scenario, but my gut feeling is that a failover to the redundant controller should not, and must not, re-trigger a "first scan" status. This would go against all of the principles behind a redundancy system.

I do not have the hardware to test this, so unless others can chip in, it might be worth firing the question to RA Tech Support for clarification ...
 

Similar Topics

Hi, I'm just looking for a simple way to make a button in excel (via VBA I presume) to toggle a bit in RSLogix 5000. I just got FactoyTalkLinx...
Replies
9
Views
488
If any of you wizards can help in this I would be ever more grateful. We have this device that generates 9 second pulses coming into a DI module...
Replies
31
Views
3,461
How can I achieve the same functionality in Studio 5000? Image 001.png for the old RSLogix500 program Image 002.png for conversion to Studio...
Replies
6
Views
2,480
Hello, I'm using Compact Logix L33 in RSLogix 5000. I'm trying to message over modbus register that is 16bit UINT. In Rslogix 5000 do I message...
Replies
3
Views
1,464
Hi there, I am accustomed to working with Logix 500 but have a program modification I need to do on a CompactLogix.... I created a timer...no...
Replies
7
Views
2,393
Back
Top Bottom