RSLogix500 - How to Clear Data File?

Grendizer

Member
Join Date
Apr 2012
Location
Toronto
Posts
88
Hey all,

I have:
30 Float Data File each containing 256 elements. I want to clear the values of all the 30 Data Files, how can I accomplish this?

This is in RSLogix500

Thanks,
 
I would make another Float file of 256 elements of 0 then just COP it to the files you want to clear. You can do this one rung at a time or if you want to get fancier, use indexed address.
 
Thanks for the reply.

1766-L32BXBA
MicroLogix 1400, 12 digital fast 24V dc inputs, 8 digital 24V dc inputs, 6 relay outputs, 3 fast 24V dc outputs, 3 normal 24V dc outputs, 4 Analog (12 bits) inputs, 2 Analog (12 bits) outputs, 24V dc power
 
I would make another Float file of 256 elements of 0 then just COP it to the files you want to clear. You can do this one rung at a time or if you want to get fancier, use indexed address.

Nice! That would work.

One question thou, if I create indexed address, how do I cycle through all of them? Use a counter or something?
 
Another way is to use the FLL command with a source of 0 (constant).

In either case you can only copy or fill file up to 128 "words" at a time. Since a float is two "words" this means four instructions per file in 64 element blocks.

If the files are consecutive, try something like my example. This will zero out all 256 elements in 30 consecutive files taking place over 30 PLC scans. If you need them all done in one scan, then a LBL and conditional JMP could be added in:

erase files RSLogix500.jpg
 
Last edited:
Another way is to use the FLL command with a source of 0 (constant).

In either case you can only copy or fill file up to 128 "words" at a time. Since a float is two "words" this means four instructions per file in 64 element blocks.

If the files are consecutive, try something like my example. This will zero out all 256 elements in 30 consecutive files taking place over 30 PLC scans. If you need them all done in one scan, then a LBL and conditional JMP could be added in:


Thanks for your solution, I will look into it now..
 
Thank you @OkiePC

Your solution is beautiful. I took your concept and modified it a bit. Also used JUMP-LBL (even thou I hate doing this).

You're awesome!
 

Similar Topics

Hey All, I have a table like the following example: B21:0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 B21:1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 How can I clear the...
Replies
10
Views
2,858
So here's my situation, I have been tasked with modifying the logic to mimic a button press in the PLC. I have two identical machines however one...
Replies
6
Views
541
Hello, I'm new to programming. I'm using RSLogix500 to modify an existing program for a SLC500. My plan was to use one of the existing inputs...
Replies
26
Views
1,991
So i have an allen bradley rack (2080-LC50-24QWB), i have it connected through ethernet. I dont have an offline program so im trying to upload...
Replies
6
Views
683
Hi Everyone, I am supporting a system which runs on a SLC 500 (1747-L532). A fault has developed whereby the output state of some digital outputs...
Replies
10
Views
1,002
Back
Top Bottom