MicroLogix...reboot PLC from the HMI?

I am wondering when the FirstScan bit is set by the program if it causes the PLC to do a Pre-Scan before the first scan that resets the bits, timers, counters, etc.

No it doesn't, you can't force a PreScan.

And the FirstScan does not reset timers, turn off bits etc., that is what the PreScan does except Counters, they are retentive, so are Retentive Timer On's

The FirstScan is a totally normal scan of the logic, it is just informing you that it is the first scan of the user program, so that you can action some initialisation of your own.

You could easily make your own "first scan" bit, and not mess about with the PLCs "FirstScan" status bit (to be honest I don't know why it isn't Read-Only). As the first rung of file 2 just put a ONS driving your "first scan" or "initialisation" bit, logically OR it with your HMI "Re-Initialise" button and you'd be good to go. I would also unlatch the HMI button input, effectively one-shotting it, because that will surely be ON for multiple scans of the logic, which would make it a "First Few Scans" bit. And then what would happen if the HMI went down at that moment just after the operator had hit the "Re_Start" button ? You definitely want to one-shot HMI button commands like that, for many reasons.
 
Last edited:
Daba,

I really didn't think it would force a Pre-Scan. Also, when I first saw this string, I didn't think it would be possible to write to the FirstScan bit - I thought it would be read only as you said it should be.

BTW, when I said the Pre-Scan reset 'counters' I meant the Counter/DN and Counter/EN bits, not the accumulator value. But maybe it doesn't reset those bits either?
 
Daba,

I really didn't think it would force a Pre-Scan. Also, when I first saw this string, I didn't think it would be possible to write to the FirstScan bit - I thought it would be read only as you said it should be.

BTW, when I said the Pre-Scan reset 'counters' I meant the Counter/DN and Counter/EN bits, not the accumulator value. But maybe it doesn't reset those bits either?

If you look at the help on any instruction (highlight the instruction and hit F1) it tells you exactly what the prescan does for that instruction.

For instance, (and I won't cheat and look before typing this), it does not reset a counter enable, it sets it. If it reset it, on the first scan if the rung were true it would see a "false to true" transition, and count incorrectly. The counter DN is set when the counter instruction executes (either true or false), if the ACC is >= PRE.

Prescan also sets the storage bits for ONS instructions, so they don't fire on the first scan.
 

Similar Topics

I have just had a couple of collegues who are trying to commission some new equipment onsite, report that when they try to connect their Redlion...
Replies
5
Views
4,645
I've set the channel 0 communications port (this is a two port unit) to 9600 baud to accomodate a display panel connected to that port. On ever...
Replies
1
Views
1,866
I have been working on this for a while now and I can't seem to get it. I was finally able to view the 1500 on the PanelView under the serial...
Replies
1
Views
76
I'm using a SLC typed write from the ControlLogix5572 to the MicroLogix 1400, with path: 2, (MicroLogix IP). The ControlLogix equipment has a...
Replies
0
Views
86
"Hello! Good day! Excuse me, I have a question regarding the 1761-NET-ENI. RSLinx has already detected it but it's not connecting to the PLC...
Replies
4
Views
124
Back
Top Bottom