Clearing data S7 erasing many words

Daynada

Member
Join Date
Nov 2005
Location
Wisconsin
Posts
28
I want to clear out a chunk of data. Will this code work and is there an easier way? I have to do this 8 times for different areas (each with a different clear bit) but all from the same DB. By the way, I'm not sure if it matters, but I'm looking to clear out 32 bytes of data but it isn't all necessarily double words even though it is shown that way below. Thanks much!


A DB47.DBX 608.6
L L#0
T DB47.DBD 192
T DB47.DBD 196
T DB47.DBD 200
T DB47.DBD 204
T DB47.DBD 208
T DB47.DBD 212
T DB47.DBD 216
T DB47.DBD 220

 
Your code will clear the data all the time - when you need to use logic you must use jumps to skip the instructions you do not want to execute.
e.g. the following will only clear DBD220 if DBX608.6 is true
Code:
[FONT=courier]A DB47.DBX 608.6
jcn skip
 L L#0 
 T DB47.DBD220
skip: nop 0
[/FONT]

 
Last edited:

Similar Topics

Hey guys, I'm still pretty new to PLC's in general. For a program on RSLogix 500 with a micro1400 and pvp400, we are currently logging data for...
Replies
9
Views
2,801
I am currently working in RSLogix 5000. I have a large data structure with the following general structure: UDT[0] Dataset1 Min Max Avg Data[90]...
Replies
14
Views
4,361
so im trying to figure out a way around a little dilemma here with an RFID reader. I have older logic from another setup that works with all of...
Replies
8
Views
2,874
RSlogix5000 - Here is what I would like to accomplish and what I am running into. Currently this is a scanner ASCII gateway to PLC set up. A)...
Replies
9
Views
3,969
All- Greetings, and happy Thursday. I've got a bit of a question regarding Data Blocks in Step7. I apologize ahead of time if it is obtuse to...
Replies
4
Views
2,367
Back
Top Bottom