Francis

Join Date
Jan 2012
Location
Harrow
Posts
11
how to transfer data array in Compactlogix 1769 35E. I have an array of 10. These are made as user defined data. It has 3 elements. That is , say Schedeule(0) has RunNo as INT, Prod_Code as INT and Mixes as INT. I have upto Schedule(9). I want to transfer the data from Schedule(8) to Schedule(9) and then Schedule(7) to Schedule(8) and so on..
Can somebody help me as I am trying this for the first time.

Thank you in advance
 
If you can re-arrange your data so that you can shift the values down not up the array, it all becomes very easy with the COP instruction.

COP
Source Schedule[1]
Dest Schedule[0]
Length 9

This shifts..
1 to 0
2 to 1
3 to 2
n to n-1

If you try it the other way - attempting to shift the array upwards...
0 to 1
1 to 2
2 to 3
n to n+1

...what you end up with is the array filled with the same value that started in [0].

If you really must shift the data upwards, then create a buffer array, you'll now need 2 COP instructions...

COP
Source Schedule[0]
Dest Buffer[0]
Length 10
COP
Source Buffer[0]
Dest Schedule[1]
Length 9

HTH
 
Hi That worked beautifully. I have one more issue: I am trying to use FSC ( File Search and Compare) but can't get it correct. It keep giving me tat it found the match at the very first position.
My array has 10 elements and each element has 3 members. Array is called Mixes. So it is Mixes(0) to Mixes(9). In each array I have members called RunNo, Prod_Code and Mixes. When the operators fill up the schedule they may fill up to 5 or 7 or 3, which I may not know.
What I want to know is to fine the fist programmed batch. That is the first batch without any zero value in the mixes. I thought I could use FSC.
Could you help me
Thanks
 
I deleted that last post, because I think it will work. Please wait while I try it out.

Yes - it works, show me your FSC and I will tell you what is wrong with it.

It is probable that you are not "indexing" the array elements. This is how I did it, and it does work....

Mixes Tag.jpg Mixes Code.jpg
 
Last edited:
Hi;
Thanks for all the help so far. My project is coming out nicely and I thought I will be sailing until I fall into a trap again.
I have 5 batter tanks to deal with. So I created a add-on Instructions with all the necessary parameters. Wrote some logic for that within the Add-On instructions logic. All worked well until I started using timers and counters.
Very simple logic to time the Fermentation time. Time_passed in an output in DINT. When I switch on the Lo_level, it should start giving out the value in Time_Passed, but nothing happens.
When I copy paste the exact logic outside elsewhere it works fine. Any Ideas??
 
I'm not an expert, but if you're calling the AOI multiple times, you probably need to do something to preserve the timer data from each call. In the S7 world, you would use an instance DB for each call, with the timer addresses in the DB. Not sure how to do it in CLogix.
 
I just managed to figure it out. After building the main structure and crating the instance in the routine/ programme Tans, Every time I do minor changes in the codes or in the parameters including changing the data type or input/output type, I will to delete the old Tag and re-create a fresh Tag from Add ON. Then it works. What a waste of time!!. I am using version 17. Hope the higher version will have better solution for this.

Thanks for replying me anyway.
 
Back
Top Bottom