S7 Structure -cont'd

ged

Member
Join Date
Jun 2010
Location
Sydney
Posts
18
Hello,
Is there any way to clear the contents of a structure with one instruction? If I have a structure of say several bools or several ints, I cannot move a zero to the stucture (addressing the symbolic name), rather I have to clear each element individually. Seems a bit laborious this way. You can do it with Rockwell Software.
Thanks if anyone has ideas.
 
There are SFC20 BLKMOV and SFC21 FILL.
BLKMOV copies an entire chunk of memory, so if you have an entire block, or a memory area (with zeroes) the same size of the block to clear, you can use that.
FILL copies repeatedly a smaller memory area into a bigger memory area.

If you have SCL, it takes just a few lines to write code to loop through a larger memory area and write zeroes.
 
Ok thanks for the solution. I want to reset any shutdown alarms that may be latched in a data structure. I will try it out tomorrow.
 

Similar Topics

I'm working with a project that contains some routines in ST but mostly in ladder. Am I correct in assuming this 'rung': DB1001DO._01AV55_OPEN :=...
Replies
4
Views
114
When adding an IFM AL1322 IO-Link Master Module to a 1756-EN2T Ethernet Card on a 1756-L82E Controller, The Input and Output data file does not...
Replies
0
Views
105
I have quite a large number of recipes in CASE form that I'm writing in structured text. I'm hoping to keep things clean and efficient when...
Replies
13
Views
1,488
Hey all, So I've had some experience with C++ style programming and I'm trying to figure out the best way to declare an array of numbers for each...
Replies
15
Views
1,545
Hello All, I am relatively new at this, so I apologize if my questions are unclear. Either way, I am using an FAL To copy a value from an...
Replies
12
Views
1,439
Back
Top Bottom