Control Logix instruction

shanmu_gam

Member
Join Date
Mar 2007
Location
*******
Posts
22
Hii there,

I use Control logix PLC.Is there any instruction which will find out how many number of elements filled in an array.My array is 2 dimensional and 500 in length.I want to monitor the array always from 0 to 500 and get the count of the filled numbers except 0.Could any one suggest me on this or is there is any way to find out this?.Thanks
 
Last edited:
If your program controls the filling of the elements then the easiest is keep track while filling/emptying each individual item. But if something remote from your program does it then I see no easy way other than wandering through the entire array and counting.
 
For/Next loop.

If you have the structured text extensions then that can be implemented easiest in ST. Otherwise use JMP/LBL to construct the loop in ladder.
 
Last edited:
Do not know if I completly understand what you are wanting to do, but if this is an array you want to load and unload in order then you should look at the FIFO Load and Unload Instructions (First In First Out) or the equivalent LIFO (Last In First Out). That has a empty bit you can monitor. Although if you do not prevent it you could actually load a zero into the array which it would count.

Other wise write a small add-in instruction in structured text and use that. Create a loop as Bernie suggested and monitor the array.

You may be able to be very inventive and use diagnostic bit compare instruction and figure out which words are non-zero. I would also do this in structured text and create a custom add-in.

Darren
 
Would 0 not be a valid number? How would you know the difference between an "intentional" 0 and a "blank/unused" 0?
 
Im very much scared to use the loop instruction,coz i guess its going to increase my scan time.Since this is a 2 dimensional array and need to be monitored all the time from 1 thru 500.So thinking to keep track the filling/emptying with a counter and monitor the counter all the time unless if i dont find anything new.Thanks
 

Similar Topics

In studio 5000, is there a way to write a force mask into a rung? Long story short, I would like to create a test routine for a FAT test. In...
Replies
7
Views
1,260
Dear all, i am using compact logix l18er and control logix l63 i want to use message instruction in between this to i am not getting proper...
Replies
6
Views
3,802
Hello there, I'm working on adding a historian, of sorts, to a PLC project where I'd like the data that is being stored to be reset on a certain...
Replies
15
Views
4,138
Hello, I am using the DCS instruction for a simple emergency stop detection. Actually I set the "cold start type" to automatic. This means when...
Replies
3
Views
2,479
I'm wanting to build a FOR loop array in RSLOGIX 500. Control Logix has the FOR command that works swell. Is there anything in the 500 comparable...
Replies
7
Views
3,029
Back
Top Bottom