Bulk data storage on Compact Logix

NevisGroup

Member
Join Date
Jan 2014
Location
Wisconsin
Posts
78
Hello All:
I am looking at a project that will require a pretty big gob of data to be stored on a CompactLogix Processor.
What I will end up with is a two dim array of dints. It will be 8 by X. where X may be large >1,000,000.

Fortunately I will be just walking down the list from start to end(read punch tape), so I can work with it in chunks. That is bring in the first 1000 sets and start walking though them. Once I get a ways down the list I will start back filling with new data, or just read another chunk in to a different array and flip flop. What ever, that part is easy.

The data will be created on a PC and downloaded into the PLC. It would probably work the same way. Download a chunk, squirrel it way, download another chunk,.....

I can feed data to the PLC on demand from the PC but the client really wants the PLC to function without the PC attached.

So the question is: is there a way to store bulk data off to the SD-card and read it back in in a timely manner? From my first pass at this it does not look like you can use the SD card that way. But hey...I have missed the obvious before....
 
You can read/write data to the SD card. There is a sample that comes with Logix5k when you install it. It's usually in C:/RSLogix5000/Projects/Samples/ENU/"Version"/Rockwell Automation. It's called CF_Read_Write.acd. Prepare to have your mind blown!

I used it before as a test but the logic is pretty complicated. Whether or not you would want to use it in real life would probably depend on whether you expect the data structure to change later and how often these reads/writes would occur. CF cards have limited reads/writes.

Say you wanted to write data to the CF card. You would have to write logic to parse the data into this array of ~500 SINT's. When you read it, you would have to have logic to take that data from the SINT's and assemble it back into your data structure in the PLC. So if you ever change the data structure, you would need to modify this logic to parse and assemble it properly.
 
Yeah, that was kind of my thought. I ended up reducing the logic required significantly, but it was still wasn't something I wanted to give a customer.

My logic to parse was a bit complex because we were attempting to store a pretty large UDT, so you had to write some logic to parse each piece.

As I look through it now, I could have documented my portion better too! It was just a test though...
 
This may end up in the two birds with one artillery shell catagory. I have had a few customers ask for some long term data storage as well as this project. I am thinking about a small 'black box' that snaps on the din rail next to the processor. I am thinking a raspberry pi could be shoved into a box for $100 and sold for $500.

Anybody see a market for something like that out side of my three uses?
 
.... Say you wanted to write data to the CF card. You would have to write logic to parse the data into this array of ~500 SINT's. When you read it, you would have to have logic to take that data from the SINT's and assemble it back into your data structure in the PLC.....

COP, or CPS, will quite happily "paint" UDT structures into SINT, INT, or DINT arrays, without the need for data extraction logic.

All you will effectively be doing is storing data bytes onto the CF or SD card, and COP/CPS will "paint" them back into the UDT if needed.

edit - I "assessed" the sample code many years ago - sounds like a good challenge to make AOI's out of it, unless that has already been done.....
 
Well daba funny you should bring this up. When I originally did this, I used a bunch of BTD's to break up a DINT into 4 SINT's. Then it hits me, I could use a COP to handle the DINT to 4 SINT's. My logic has been reduced!

Fast forward to today: I realize how the COP command works, but maybe not the power of it at the time. Today is the first time I had looked at the logic in a few years. Here you come along and point out that my 30 rungs of logic can be turned into 1. Funny how that happens.

I have been humbled today.... the logic to actually do the write still sucks!
 
Last edited:
This may end up in the two birds with one artillery shell catagory. I have had a few customers ask for some long term data storage as well as this project. I am thinking about a small 'black box' that snaps on the din rail next to the processor. I am thinking a raspberry pi could be shoved into a box for $100 and sold for $500.

Anybody see a market for something like that out side of my three uses?

I have a Pi at home and I've been trying to figure out how TuxPLC works on my main Linux box at home in hopes to attempt to try it out on the Pi. I was thinking that it might be a neat way to gather data. People will probably say that it's not industrial enough, I still like the idea.
 

Similar Topics

How can i make use of Blocks TAB in Bulk Data genaration Ex: I have created a Derived template from strategi, i need to create instance...
Replies
0
Views
1,313
Hello everyone! I've got something I'm trying to figure out and I'm possibly overthinking it. I've got a 25,000 gallon bulk chemical tank with an...
Replies
12
Views
2,179
Hey Everyone, Does anyone know of a way to bulk edit tags in an AOI in Stuido5000? I see a way to export the AOI tags to an excel file, but no...
Replies
16
Views
6,078
Looking for a sensor to sense the presence of fertilizers of varying dielectrics held in storage bins. Have tried capacitance sensors with limited...
Replies
15
Views
6,350
Anyone have any experience integrating these bulk weighers to another control system?? I have a Red Lion HMI and a Schneider M580 PLC, the IND...
Replies
6
Views
3,125
Back
Top Bottom