First Scan (B3:5/6) in MicroLogix 1400

mehrdad

Member
Join Date
Nov 2013
Location
canada
Posts
18
I am trying to execute a logic on every first scan in MicroLogix 1400.
I tried to use S:1/15 which is the default first scan bit in rslogix500, but seems like this only gets set on the very first scan basically after downloading to the PLC.
it doesn't get set on the first scan after power cycling the PLC.
is there any other solution?

thanks
 
Last edited:
S:1/15 is the default "first pass" bit ...

how did you come up the B3:5/6 address that you're using? ...

my GUESS is that some previous programmer is using the B3:5/6 as a "home brew" arrangement ...
 
Last edited:
sorry I meant S:1/15, I just copied a wrong variable
am I right about S:1/15 getting executed on the very first scan only and not after power cycling the PLC?

thanks
 
the S:1/15 bit will have a status of ONE every time the processor has a "Go To Run" event ...

this will occur (A) when you switch from Program mode - to Run mode ...

it will also occur (B) whenever the processor "sees" a power cycle ...

NOTE: this next part is going deeper than you probably need to go ...

the processor's power supply has a "hold up" time of about one or two seconds ... when the power to the plant has a failure, the processor will KEEP RIGHT ON SCANNING during this brief (but significant) "hold up" time ...

why this can be important:

suppose that you have a 120VAC field input device which is in the ON condition ... since current is flowing through the input circuit, the input bit/box has a status of ONE while the system is powered up and running normally ... (a STOP button which is field-wired as a Normally-Closed input is a common example) ...

but ... suppose that the 120VAC input source "flickers" off for just a fraction of a second (or at least something LESS than the processor's "hold up" time) ...

here's the kicker:

the processor will make quite a few passes through the ladders before it shuts down ... during those last passes, there will be no current flowing through the field input device - and the processor will "think" that the input has been "actuated" ...

it's a common MISconception that using the S:1/15 bit will "fix" this problem ... it won't ALWAYS work as expected - IF (big IF) the power to the processor is quickly restored - DURING the "hold up" time period ...

so ...

to answer your specific question:

am I right about S:1/15 getting executed on the very first scan only and not after power cycling the PLC?

the simple "text book" answer to your question is "no, you are incorrect" ... specifically, S:1/15 will have a status of ONE both

(A) "on the very first scan" – AND –
(B) "after a power cycle" ...

BUT – technically ...

if the "power cycle" happens to be LESS THAN the processor's "hold up" time, then the S:1/15 bit will NOT have a status of ONE – even after a "power cycle" ...

this effect can contribute to some nightmarish possibilities when troubleshooting certain types of systems which intermittently "act weird" after a power flicker ...
 
Last edited:
thanks Ron
I think what you explained is the reason my logic doesn't work.
I tried to power cycle my PLCs using the breaker, and sometime logic gets executed on the first scan and sometime it doesn't.
what I'm trying to do is:
I have PLC 1 & HMI 1 and PLC2 & HMI2. each PLC is controlling an individual equipment, but there are couple of common variables (modifiable from HMIs) that I am sharing between PLCs that can be modified from each HMI in case the other HMI has failed.
there is auto\manual mode selectable from each HMI.
so I have programmed it in a way that if I select manual mode on HMI1 then both gen 1 and gen 2 go into manual mode and vice versa.
this works fine.
but the problem is, I have a logic that on the first scan checks status of the variable in the other PLC. so for example if PLC2 was failed for any reason and has been reseted, then on the first scan it checks PLC1 and if PLC1 is in auto mode, it puts PLC2 in auto mode too.
but this part doesn't look like being fool proof and doesn't work every time.
 
Last edited:
I'm not 100% sure that I'm following everything that you're saying in your last post – but (based on what you've said so far) I don't think that the "power flicker" effect that I described is contributing to your problem ...

the only time that you really need to worry about the specific "flicker" effect that I mentioned is IF (big IF) the power to the processor is only OFF for less than a second or two ...

I didn't mean to make this more complicated than it needed to be – but you asked a question which has a "simple" answer – but it also has a DIFFERENT answer when you dig deeper into the processor's operation ...

good luck with your project ... offline for tonight ...
 
I have a logic that on the first scan checks status of the variable in the other PLC. so for example if PLC2 was failed for any reason and has been reseted, then on the first scan it checks PLC1 and if PLC1 is in auto mode, it puts PLC2 in auto mode too.
but this part doesn't look like being fool proof and doesn't work every time.

Are you capturing the First Scan occurrence and keeping your MSG logic and Mode checking logic active long enough to get a response from the other PLC? (I am assuming you are using a message or something to check the other PLC).

What you are doing should be possible. There is probably some other oversight in the logic aside from the first scan bit itself.

Paul
 

Similar Topics

Hello everyone, I have a Micrologix 1400 controller that connects to panelview 7 HMI. There is a boolean bit array where various HMI alarm status...
Replies
17
Views
3,531
I am pretty sure this has been asked before, but I am unable to find it any where. I have a first scan bit I am using to home 2 steppers on power...
Replies
8
Views
2,453
Hello everyone, I was wondering if there is a "new scan cycle" bit for an AB micrologix. I know of the first scan bit. What I'm trying to do...
Replies
4
Views
2,218
Greetings all, I'm trying to track down an issue with a Micrologix 1100 that randomly drops off the network. I have swapped Ethernet cables, the...
Replies
17
Views
7,533
Hi there, For my piece of mind: In the processor status of my Micrologix online I am getting a reading of 23 in S:22. This is a reading of...
Replies
5
Views
3,575
Back
Top Bottom