First Scan in Logix 5000

dbh6

Lifetime Supporting Member
Join Date
Jan 2013
Location
Central, NJ
Posts
552
Ok so this sounds really simple but its not working as i expect it. Their is a system variable called S:FS in logix that you can use as a bit which when the PLC is first powered up and enters its first scan that bit goes true only for the first scan. I wrote some logic such that when that bit was true, to initialize some parameters nothing complicated. Problem is it did not initialize my values i even wrote some logic to capture the transition of the pulse if it went from false to true, still nothing. I ended up writing my own logic to act as a first scan to get around that.

If anyone knows why I'm having this issue please let me know thanks.
 
You're calling the routine with a JSR correct?

What kind of a program? Or is it an equipment phase? If an equipment phase the S:FS may not work as you want it to because you can set the initial state which occurs in the same 1st scan.
 
@ Paully im not calling the routine because the logic is in the Mainroutine which i think by default executes first. I'm also not using equipment phases.
 
@ Paully im not calling the routine because the logic is in the Mainroutine which i think by default executes first. I'm also not using equipment phases.

The routine that is assigned as the "Main Routine" for a Program is the only routine that the processor executes. Any other routines are executed by using JSR or FOR instructions. (One special case, you can assign a routine as a Fault Routine, which only gets executed if the processor detects a Program Fault).

What firmware revision is your project? In early versions, when you create a new Program, and create the "Main Routine" for that program, it doesn't automatically assign that routine as the MainRoutine, you have to do it yourself.

If you can post your program, (zip it first, forum rule), an answer will come back very quickly.
 
Be aware that every task has its own S:FS bit. The bit is true the first scan when the task executes. If you had an event triggered task that gets triggered the first time a week after the processor is placed in run, then s:fs will be true for the first scan in the programs under that task.
 
Be aware that every task has its own S:FS bit. The bit is true the first scan when the task executes. If you had an event triggered task that gets triggered the first time a week after the processor is placed in run, then s:fs will be true for the first scan in the programs under that task.

Actually there is a separate S:FS bit for each Program, not each Task.

I have just tested this by writing an SSV to un-inhibit an inhibited Program. In the inhibited program XIC S:FS, OTL TestBit...

TestBit was turned on when the Program was un-inhibited.
 

Similar Topics

Hi, can anyone explain me what is the difference in Logix Designer FBD between instruction first scan and instruction first run? I understand...
Replies
0
Views
2,563
Got into a bit of a debate the other day, and wanted to get some gurus' opinion/expertise on the subject. When duration of an output's ON (or...
Replies
9
Views
10,773
Does anyone have some guidance on setting the Last Scan of Active Steps setting in the SFC Execution tab of Logix5000 controllers? I'm reading...
Replies
0
Views
2,781
Hi,All I can't express my opinion well in English. You can't understanding, I am very worried about my write. I'm communtcation between AB EWEB...
Replies
3
Views
6,705
Hi! I have a Control Logix L55 v16 here with no more than 100 I/O, DeviceNet, Ethernet and DHRIO with no MSGs yet, only 10 ladder routines with...
Replies
7
Views
5,934
Back
Top Bottom