File Copying - File Size Issue SLC 5/04

soop7667

Member
Join Date
Sep 2003
Location
Naples, FL USA
Posts
99
I am storing Data in a SLC 5/04 with a few Lines of Logic. I'm using the MSG Instruction to Gather the Data from Two Other SLC's On a DH+. Then using Indexed Addressing to Write each Machine's Cycles Into Several Contiguous Integer Files- One Word of Data Per Machine Each Minute. I have mapped out the Memory so there is One Section for Each Machine (N10:0 - N15:159)Machine #1, and (N20:0 - N15:159)Machine #2. All intensions in doing this is to have a Buffer to store the cycle count per minute data instead of using Excel with VBA. My Excel Proggie, like all of the others, if turned off will obviously not logg any data - so I figured they can shut off My Excel but they can't shut off my PLC - Anyhow....On to the point - I've been pondering when and how to extract this data from the PLC at the end of a production run. Once 24 Hours has been Logged I HAVE to get the data out or it just sits there and doesn't record any new Data. We run 24/7 with two 1 hour periods of downtime -Production day ends at 3am with the machines final cycle counts. I can extract the data automatically with Excel in the event the Cycle Counter is reset, but the program has to be on to be able to do this automatically - or even manually for that matter.

I'm thinking ...Right now I'm storing 2880 Words of Data - I have 32K of Memory and about 15 rungs of logic. Can I Move all of this Data from N10:0-N15:159 Into say - N30:0-N45:159? and the Same for the other machines Cycle Data? This would be storing a total of 5760 Words of Data. This way I will have 24 hours to turn on My Excel Program once the production day ends. The Cycle Count being reset to zero would be my trigger to Move the data - I can have the logic turn on a bit for each machine once it's Cycle Data has been moved to the new Files - Then Have Excel look for that bit and if its true Execute the Code which will "Grab" the values out of the N Files. From there I would POKE a value of 1 into my "Clear Cycle Data" Bit (Pre-existing)and the data would be cleared. In the meantime The next days Cycle counts would already be started and I'd have a much better chance of not loosing any data.
 
Yes, you can move all the data from N10:x to N30:x provided the processor has enough memory. The L541 has 16k of word memory available, allowing 2k for your program you'll still have 14k to store your data. I didn't view your logic, this info is based upon your question only.
 
I think you have enough memory to store 48 hours worth if required, I would guess each days data is around 6-7k, which would be only 15k at the most for two days. Leaving 17k available.

Give it a shot and see how much memory you have left, you can then add an additional days storage if you have room. That way if you're not there on Saturday, you can extract data on Monday.


Ken
 
Well I guess I wasn't thinking there - In the file previously attached I'm CLRing the Data with a loop and indexed addressing. I could replace the CLR with MOV and Use Indexed addressing for both the Source and the Destination of the MOV. Does that work? I want the Data from N10:0 to go into N30:0; N10:1 into N30:1. My Index Pointer would already point to the same word element In each Seperate File. I'm think I'm gonna try That.
 
Replace your rung #4 with these three rungs.
1--- XIC T4:1/DN MOV C5:0.ACC S:24
2--- EQU C5:0.ACC S:24 MOV #N10:0 #N30:0
3--- EQU #N10:0 0 MOV N7:41 #N10:0
Then repeat for other source.
 
Rather than move all this data around, why not set up a bit which toggles every twenty-four hours? When the bit is zero, data is stored into the N20-N30 series. When it's one, store into N40-N50 series.
 
What is it with you guys and looping?

Just as the FLL will fill the data faster than a loop (because only one instruction has to be executed, instead of 10), the COP instruction will move up to 128 words of data in one shot.

Again, you'll need 16 COP instructions to handle this, due to the 128 word limitation, but it should also be 20x faster (and easier for the next guy to understand) than a loop.
 

Similar Topics

Hi all. Suffering from brain fade here. I've just done a search and replace of approx. 400 addresses (4 complete data files) in RSLogix500 V7...
Replies
3
Views
4,525
I have a Micrologix 1500. I need to copy a bits from a floating point file into a bit file. I have tried using the COP and the MOV command, but...
Replies
33
Views
21,451
Hi everyone, I'm a last year student at the university in Ghent, and for my thesis i need to write a TwinCAT program that writes data to a .daq...
Replies
0
Views
20
Did anyone please help me with gsd file of krones heating module(make Siemens)
Replies
0
Views
30
Did anyone please help me with gsd file of krones heating module(make Siemens)
Replies
0
Views
35
Back
Top Bottom