Sign in to follow this  
Followers 0
mr_electrician

Retaining counter values between downloads

9 posts in this topic

Hi there, I have a program I wrote and employs a few counters for part fail/pass total and so on. How do I set up the plc so that regardless of how many downloads I perform the counter values remain unchanged. I guess I need to no how to make sure certain bits remain in a certain state as well between downloads. I am using a micro 1400. Edited by mr_electrician

Share this post


Link to post
Share on other sites
Rockwell has always made data tables part of the download process; it's just the way A-B controllers work. There is no way to make a data table "download protected" because the user program, including data tables, is erased as part of the download process. Some other controllers, notably some Siemens platforms, take a more complex object oriented approach and allow "partial downloads" of routines or data. This is often a subject of the "ease of use" vs. "sophisticated functionality" divide between RA and Siemens. Because the MicroLogix 1400 supports online editing, you do have the option to make your changes during runtime, one at a time. You will have to load these values out of the controller and store them in a file, then load them back in. There's a "Tag Upload/Download Tool" that RA includes with RSLogix 5000 that you might use; it's not perfect but it does give you a way to upload/store/download tag or data table values that you want to copy from program-to-program.

Share this post


Link to post
Share on other sites
Yes reloading the values is what I have been doing. I was hoping there was a better way. Thanks for the fast reply!!!

Share this post


Link to post
Share on other sites
What about on line changes? They are not always a good idea but might be appropriate. In some of my programs I have use first scan bit to load a starting value from integer table S:1/55 move N7:0 to C5:0.ACC Can you message to and from another plc and pass value back and forth? I've done that but it is cumbersome. tom

Share this post


Link to post
Share on other sites
Had a similiar situation several {almost 10} years ago now where we wanted to keep the latest and greatest recipe operating information even though we were downloading new operating code with an SLC 5/04. What I wound up making was an Excel Spreadsheet using DDE to Store the pertinent data to Excel just before download and then restore after download while still in program mode. The Excel examples I posted in the mrplc download area for AB PLC Clock sync to excel and so forth were tkaing from that project. I've not used the tag tool Ken mentions don't know if it or a custom excel app like I wrote would be more efficient.

Share this post


Link to post
Share on other sites
Bob I think I have a copy that was what you used on the 7.5" south. I may have the one that was used on the north Radyne. If I have them can I post them?

Share this post


Link to post
Share on other sites
Previous posts are way off base. The Micrologix 1400 specifically has a feature to do just what you are asking for. This is all new stuff even to me. Rockwell has been very busy lately adding a bunch of nice new features such as finally supporting Modbus/TCP and DNP3 (even if they won't support their own IO protocols!), and even outright generic Ethernet sockets (so you can theoretically support ANY Ethernet protocol, even Ethernet/IP), and they pretty much completely revamped the PID instruction including a TRUE feed forward word (BIAS doesn't work as expected), eliminating the PLC/5 "external PID controller" stuff, and adding a bunch of other niceties. There's also a whole slew of options to give you lots of manual control over scanning and communicating. And they've provided a way to do E-mail (SMTP). A lot of these features are so nice that I wish Rockwell would add them to the big brother lineup (ControlLogix/CompactLogix) platform as well. None of them are particularly code-intensive, just takes time to do it. It's called download data file protect feature. See page 48 in the reference manual. It applies to the entire file, all at once. You can't control individual elements, but each data file can be different. Right-click on the data file you want to protect and select "properties". In the bottom-left hand corner, you'll see "Memory module/download". Check this box. If you use this feature, watch for bit S:36/10. This is the "protected files lost" bit. If something happens and your protected files get lost, this bit gets set. If you are using one of the other Micrologix controllers that doesn't support this feature, there is yet another way. Use the RCP instruction to save/load recipes out onto the flash memory. Just ignore the fact that it's called a "recipe" and treat it as generic data storage and you'll be OK. Since it is flash memory, I don't recommend constantly flashing it (usually limited to about 100,000 writes but some newer memories can go for many more) but under user control or "once in a while" shouldn't be a problem. Edited by paulengr
1 person likes this

Share this post


Link to post
Share on other sites
This sounds interesting. I will try it out but I wonder if I have to upload the current values first as these consistantly change. Too bad the panelview could not do the counting logic and store it whithin itself, but then again if your changing it often then your back to the same delema.

Share this post


Link to post
Share on other sites
No, you don't have to "upload often". When you download, the values in the protected files don't get overwritten. Simple as that. If the processor is blanked or otherwise wiped out in some way so that the detection algorithm indicates that something is amiss, then it will download and overwrite, but only in that instance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0