RsLogix5000 controller re-start

AlexDarsigny

Member
Join Date
Jun 2015
Location
Montreal
Posts
19
Hi,

I've been looking in the KB but I don't have the proper keyword to find it so I'm going to explain what I mean by re-starting the controller.

I'm using a L7 CPU and I'm testing program initialization logic (S:FS first scan bit). The only way I found to properly re-start the controller and have S:FS set on first scan is to go offline and do a full download. But it takes a while each time and I don't need to download since no logic are changed. I only want to re-start my program from the first scan.

Is there an option to stop the controller, re-initialize it and start it after from the first scan? Other than a power cycle obviously.

Thank you.
 
Set the CPU key to Remote-Run Mode (if not already there) and then use the Online software to switch the controller to Program Mode and then back to Remote Run.
S:FS will be true for one scan upon recommencing of the Remote Run mode.
 
About program init., I have another question. How can I differentiate a PLC power cycle and a full download ?

As my definition, a full download is achieved when
- I'm offline on RsLogix and perform or full download
- I transfer CPU mode from Program to Remote-Run

Upon a full download I want to initialize my tags
Upon a power cycle, I do not want to initialize my tags.

From what I understand, upon a full download (as described) or a power cycle, S:FS is set on first scan.

Is there another internal bit that would tell me that the PLC just performed a power cycle?
 
It's a little complicated, but teaches you a bit about the controller's operating system. Also do a search here on the Forum for Ron Beaufort's ad-hoc lectures about how pre-scan works, if you like.

There is a "Power Up Handler" in the Logix OS that only executes on power-up. It essentially faults the controller with a specific power-up fault code, and then you reset that specific fault and take whatever other actions you wish in the Power-Up Program.

It's described well in the fault handling programming guide:

http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm014_-en-p.pdf

It can be as simple as "reset the power up fault and set a BOOL tag for PowerUp_First_Scan".
 
I chose the simple way by setting a tag in the Power-Up Handler and I have my power-up detection. I didn't know that the program could not start by itself after a power cycle though...

But I implemented the auto-acknowledge routine from the document and my program is now able to recover by itself after a power cycle.

I recall having a different behaviour with redundant CPU. It seems that I didn't have major fault after power cycle and the program was back running in normal operation without any extra code to clear any fault.

Anyway, thanks for the insights!
 
I have a last question. I get how to use GSV to know if the controller is in Program Mode but there's no SSV to switch into Remote-Run like we do online in the software.

Is there a known way to to switch controller operating mode programmatically?
 
Last edited:

Similar Topics

Error: Invalid attribute value. Error: Object can not perform service in its current mode/state. Error: Failed to download tags. I get these...
Replies
2
Views
3,819
Motion control by RSLogix5000,Compactlogix 5370 L3 Controller & 2097-V31PR2-LM Drive Hello! I would like to study the Motion control by using...
Replies
0
Views
4,228
After I open a project in RSLogix5000, how do I verify the project with the program resides in the Contrologix controller ?? Other PLC software...
Replies
6
Views
3,943
Hi all I am writing a program for a Control Logix and have a fundamental question regarding the variable type to use for Control Logix. Now...
Replies
21
Views
9,907
Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
89
Back
Top Bottom