Viewing a 32 dim. array and evaluating in an instruction

Rob S.

Member
Join Date
Sep 2008
Location
Maryland
Posts
739
I hope I can explain this right. I have a fuel system that has a fuel cleaning system . I have a calendar with multistate buttons in the background. The 2 states on each button is 0 and the date such as 27th of that month.I have a tag for each month of the year, with 32 dim array. So if the operator selects Tuesday
the 27th , number 27 in the array will be compared to my wall clock ( time.day)
when the 27th is equal to the actual day ( 27th ) a cleaning cycle will start. My question is , right now when it is looking at the "27th" , it could be April 27th , May 27th , etc. What I would like to do is have a Greater Than instruction looking at , let's say , the tag "May" and look at all 32 DINT off the array.

Greater Than
Source A May May has an active date
?????????? -------------------------------------( )--------
Source B. 0

If any dates have a value in Tag "May" , be looking to compare the day , knowing the 27th is now May.

How can I compare a entire Tag with a 32 Dim , without breaking it down to each DINT , such as 1,2,3,4. ?

Hope I didn't confuse you too much. Thanks so much.
 
I'm not 100% sure what you want to do but I don't think that is important.

You don't have a 32-dimension array. You have a single dimension array with 32 elements. But I'm not sure you need an array at all. I think you really just need two tags. One that indicates your selected month and the other that indicates your selected day. When both are equal to the plc time, trigger a cleaning cycle.

You get into arrays if you want to support multiple queued cleaning cycles. The most flexible and likely easiest to understand is to have a 2-dimension array with the major dimension being the month and the minor dimension being the day. The tag would be something like CleanArray[13,32]. It would probably be a BOOL array just so you could use the elements directly n logic instructions. I'm not sure how your calendar is laid out on the HMI but you may need an intermediate element to load the array. The idea would be that the buttons on the HMI simply toggle an array element between 0 and 1. To access any given array element the instruction address would be:
CleanArray[Month, Day] where Month and Day are values from the PLC DateTime object accessed using a GSV. If the value is a 1, trigger a clean cycle and set it to 0, unless you want to trigger a clean at the same time next year.

Keith
 
Thanks Kieth ,

That is good stuff and I will study that. About the month, that is my problem, I don't know which month , that is why I want to look at those 32 elements at once , and compare to 0 , and if greater I then know that I have a cleaning cycle coming up on a date. i will look over your idea , and see how it ties in with what I have .

Thanks,
 

Similar Topics

I got my PanelView Plus 7 working with a Micrologix 1500. How would I connect my laptop to the PanelView to view the ladder logic while operating...
Replies
6
Views
71
Looking for some assistance. I am very familiar with Yaskawa VFDs, but not so much with AB VFDs. I am working on some hardwired AB PowerFlex 700...
Replies
2
Views
128
Hello all, First time poster, long time viewer of these forums. Could not find my solution on here. We have had issues with a Comm Fail on an...
Replies
2
Views
381
When I added device Powerflex 525 to my project,The ( current tag) was not populated .How can I retrieve this data ? Thanks Jeff
Replies
3
Views
555
Hey all, looking for some opinions/recommendations for Modbus server viewing software. Have a PLC that we're reading directly from the modbus...
Replies
13
Views
1,901
Back
Top Bottom