Stumped... I need a "PLC was just downloaded bit"

mamotts

Member
Join Date
Jun 2012
Location
SC
Posts
6
This one is stumping me, it might not even be possible. I have machines running PLC 5's and machines running ControlLogix processors. When a program is downloaded on backshifts, the tech must remember to update values in the PLC by doing a "download parameters from Level 2 server", otherwise the values in the PLC are out of date (just depends on the last time the program was uploaded and a new backup saved). Problem is, they don't always remember. If I could latch a fault, that would only unlatch after the messaging with level 2 completes, that would be great. I can handle the code for that, I just need a status bit that says "this is the first plc scan after a download". I don't want to just use the first pass bit, the machines are powered down and back up often for maintenance. I've seen a download bit in PLC 5 status file but couldn't get it to work. Not sure if I could use the clock times either. I'll be very impressed by the person who can figure this out. I know I could manually set an unused bit in the program when I upload it to save a backup, and have it "unlatched" by the first pass bit. It would only be set again when the backup was downloaded again... but its too many machines for me to continually do this. Any ideas?
 
Is it just recipe type data that's downloaded from level 2? We use a similar structure and it's always a production job to ensure that their recipe is the proper one for the product to be built. This is easy to do by showing a recipe number and a timestamp for the last time the data was updated in the PLC (we can record the last time the HMI button was pressed)...

Don't know if that helps, but figured it'd be worth a shot
 
Yes it is recipe data mostly that I'm worried about, but I have some other small applications that could use this "bit" also. We, too, expect production to do a quality control check after such an intervention. But I also expect the tech to download current recipe data. Unfortunately, they're all human. I have a little more faith in the PLC. We don't have to download programs often on backshifts so it is easy to forget this step.
 
This one is stumping me, it might not even be possible. I have machines running PLC 5's and machines running ControlLogix processors. When a program is downloaded on backshifts, the tech must remember to update values in the PLC by doing a "download parameters from Level 2 server", otherwise the values in the PLC are out of date (just depends on the last time the program was uploaded and a new backup saved). Problem is, they don't always remember. If I could latch a fault, that would only unlatch after the messaging with level 2 completes, that would be great. I can handle the code for that, I just need a status bit that says "this is the first plc scan after a download". I don't want to just use the first pass bit, the machines are powered down and back up often for maintenance. I've seen a download bit in PLC 5 status file but couldn't get it to work. Not sure if I could use the clock times either. I'll be very impressed by the person who can figure this out. I know I could manually set an unused bit in the program when I upload it to save a backup, and have it "unlatched" by the first pass bit. It would only be set again when the backup was downloaded again... but its too many machines for me to continually do this. Any ideas?

yes, make a spreadsheet that someone has to check off the steps needed and sign that all actions were performed. if they cant follow the procedure fire them.
 
I like Diat150's idea except you might get lonely before too long. Can you use the C-Logix to monitor the PLC5 for a message status error B000?
 
Perhaps something could be done with the program checksum. I don't recall if it's available to the user program.
 
yes, make a spreadsheet that someone has to check off the steps needed and sign that all actions were performed. if they cant follow the procedure fire them.

I was looking for something a little more advanced. We have such setup procedures, none that require a signature though. They wouldn't be fired in such a situation anyway. Management would just ask me if I could do something about it... which I am, trying to be proactive and find a permanent solution to an uncommon problem.
 
Perhaps the downloaded programs can contain "null" recipe data, and the PLC detects it as such, inhibiting any processes to be run.

The recipe data from level 2 would then be absolutely necessary for production to restart.

You could even do some automation on it, the PLC could set a bit on detection of "null" recipe data that level 2 monitors, and the recipe and other data gets downloaded automatically.
 
I like Daba's Null Recipe data the best. Just make sure you choose safe values that won't cause waste or unexpected behavior. it should just sit there demanding data be downloaded first...this makes standing alone difficult in those (hopefully rare) situations when level is unavailable and a machine gets downloaded, but this doesn't prevent the tech from going online, saving values, then downloading...(hours, days, weeks?)...later.

This might be a good job for the DH+ global status word. Set it as an alarm value on all local HMI devices, and write a macro to set it to a non-alarm value (other than zero) from your level two software. You just need a driver that can write to the system value from your level two. Any devices on that DH+ segment would also be able to read the Global Status word from their peers...this could become interlocking (don't let machine X discharge into machine Y with questionable settings in machine Y).

On Machine Y you might find a spare SSV value ... that is outside the box though, just make a global tag and treat like a Global Status Word or a Produced tag.

Still, if they upload and save, how can you detect that they didn't merge pieces of stale data before downloading their edits, or miss a critical adjustment while offline?

You need a checksum of only the recipe data...or supervisory or even peer PLCs checking recipe values.

Now I am leaning more toward a bit that gets set evey 1st_Scan which forces communication to take place with Level 2, and Level 2 can do the comparison of recipe data before "giving the word go"...

Thinking upstream, why not insist on only doing online edits...on the Logix machines, schedule a housekeeping download periodically or after heavy editing to clean up the files.

Final EDIT: To distinguish between modes externally, you may be able to decode the PLC mode...switch them to RUN mode...if Level ever detects REM PROG or PROG mode, MSG Write to the offending controller a value that is examined on first scan. The doesn't prove a download occurred and may not apply to the PLC-5 the same way is does with a SLC...matter of fact I am pretty sure it does not. My SLC fault code example for the Crimnson 3.0 decodes all the states of the keyswitch from a SLC. Put them in Run mode, make them do a download automatically, by examining that user defined error information address before entering run mode...this should only take a couple of seconds tops, right?

Pop up a warning that clears and is logged...you could log the duration and mode changes too...They can't change squat with the Key in RUN...and if they must be left in REMOTE for practical reasons, you can detect REM PROG too.

So, a couple of rungs in a peer PLC might be (pseudocode):
Read the other PLCs' Controller Mode Status periodically, every few seconds...stagger messages...trap errors...or poll that CPU mode from Level II.

If that status is NEQ Run_Mode and that status is NEQ Remote_Run_Mode, raise a red flag, and to get fancy, note the time, note the new mode.

Once that PLC Mode has been detecting Not_Running, write to the user defined location in that PLC a value requesting download from LEVEL II. Continue to perform this step until the area of user defined data stating that the level II download succeeded is okay.

If you don't continuously write to the memory location, you may miss the time between download and REM RUN or RUN mode...This should take at least a couple of seconds I would think...never tried to race my test SLC against my G306.
 
Last edited:
http://forums.mrplc.com/index.php?app=downloads&showfile=980
The data tag Status.SLC_Mode is formated to decode the necesarry bits in the status work (see complex code boolean And expression).
Then on the tag format, it is multistate with those bits decoded using ranged states.
I think the bit pattern is different in a PLC-5, and for Controllogix, I think there's a system global tag for run/rem run mode.
 
I know I could manually set an unused bit in the program when I upload it to save a backup, and have it "unlatched" by the first pass bit. It would only be set again when the backup was downloaded again...
That bit would get unlatched when power cycled for maintenance as well... :(

(I am wondering why re-downloading the current recipe after a maintenance power cycle is a bad thing?... :unsure:)

Along those same lines though... Choose an unused bit in the program, and have that get SET when the recipe is downloaded. It's OFF in the offline program, so it will only get turned off when a program is downloaded. Power cycling will not turn off the bit. Of course, if anyone UPLOADS the data tables while the bit is ON, that bit will now be ON in the offline copy... o_O

I just looked at the PLC5 quick reference guide, and noticed that S:1/5 is labeled 'processor in download mode'. Can you monitor that bit remotely?... :confused:

Lots of ingenious guys here... Someone will come up with a solution... :site:

🍻

-Eric
 
Originally Posted by mamotts
I know I could manually set an unused bit in the program when I upload it to save a backup, and have it "unlatched" by the first pass bit. It would only be set again when the backup was downloaded again...
What I was describing there would have the same function as the bit you suggested to be turned on after a succesful download... my wording just wasn't too thorough. I just dont want to continually have to set this bit everytime I upload, which is often and on dozens of machines. Sorry if I sound lazy, I will do that if necessary. I too saw the "PLC in download mode" in the plc5 status file, but couldn't get it to work. I assumed there was some timer, checksum, or some system value that I could look at to tell me that "this is the first time this things running after a download". I am appreciating all the replies thus far...
 
That bit would get unlatched when power cycled for maintenance as well... :(

(I am wondering why re-downloading the current recipe after a maintenance power cycle is a bad thing?... :unsure:)

Along those same lines though... Choose an unused bit in the program, and have that get SET when the recipe is downloaded. It's OFF in the offline program, so it will only get turned off when a program is downloaded. Power cycling will not turn off the bit. Of course, if anyone UPLOADS the data tables while the bit is ON, that bit will now be ON in the offline copy... o_O
ROF, RTFM.
I just looked at the PLC5 quick reference guide, and noticed that S:1/5 is labeled 'processor in download mode'. Can you monitor that bit remotely?... :confused:

Lots of ingenious guys here... Someone will come up with a solution... :site:

🍻

-Eric

Originally Posted by mamotts
I know I could manually set an unused bit in the program when I upload it to save a backup, and have it "unlatched" by the first pass bit. It would only be set again when the backup was downloaded again...
What I was describing there would have the same function as the bit you suggested to be turned on after a succesful download... my wording just wasn't too thorough. I just dont want to continually have to set this bit everytime I upload, which is often and on dozens of machines. Sorry if I sound lazy, I will do that if necessary. I too saw the "PLC in download mode" in the plc5 status file, but couldn't get it to work. I assumed there was some timer, checksum, or some system value that I could look at to tell me that "this is the first time this things running after a download". I am appreciating all the replies thus far...

External monitoring of a bit could be dedicated in the PLC 5 and Eric identified, after all my hard work, building an analog fantasy bit level report by exception mode. Downloads are plenty slow enough to poll every second or two at a low level if necessary, and then write to whatever triggers

Nice!
🍻
 
Still need to test if bit S:1/5 actually does what its name implies, i.e. turn on when a program is downloading. Also have to see if a similar thing is available on the CLX platform... :confused:

I have neither of these PLCs laying around to try this out on.

🍻

-Eric
 

Similar Topics

Anybody have any info on the address prefix "B" used on the DL06 units? I am working with 4 Direct Logic DL06 units (D0-06AR) connected to each...
Replies
2
Views
1,757
Anybody have any info on the addressing prefix "B" used on the DL06 units? I am working with 4 Direct Logic DL06 units (D0-06AR) connected to...
Replies
3
Views
1,666
i have a hwk question that i cant get fixed right. attached is the jpeg of what i have done soo far and question is attached as well any help is...
Replies
14
Views
2,291
Hello: I have a micro820 plc with a Spectrum Controls 2080sc-IF4 analong module and a Prosoft 800 SMS module. I have 3 4-20ma pressure sensors...
Replies
1
Views
1,220
Good Morning Everybody, I'm using RSLogix500 and programming a Micrologix 1100. I define all my outputs using B3 data file and reference those...
Replies
5
Views
1,923
Back
Top Bottom