Wheres the beef or Pointers

We are not having much luck with local companies upgrading. Tried to give me a box full of old AB parts to re-purpose in an upgrade rig. Dial up modem... can you use this? No., and it goes on...
 
So go back to your original example of two rungs.

My example was the essentially the same as your first rung. In that example you were using a pointer to vary where in a data file you would be copying data from and then writing those three values to a specific three destinations.

Now, I didn't actually look closely at your second example. That example has you changing which data file you are writing to based on your pointer. So instead of varying where in a file you were looking, you are varying which file.

The Logix5000 arrays only allow you to vary where in the array. You cannot vary which array. So in your latest post, you are getting an error because it does not understand your source since you have two variables specified. So you cannot do that.

OG
 
Asterof,
You did not mention how many data files you have to indirectly reference, but what about using a two dimensional array?
 
Did I get hi Jacked

Sorry about that, but not a hijack at all, just commenting on local experience with people is all.

Quite frankly, the PLC5 or SLC conversions to Logix, I would just use the old program for reference and write new out of the gate. So many things have changed over the years, and why would you do that now?
 
First of all, I assume the tag ST is a string array. If that isn't the case, that is where we have to start.

Second, assuming ST is a string array, it needs to be a two-dimensional array. In your PLC5 program you must have multiple string files. This would be your "major" index. The string in any given string file would be determined by your "minor" index.

Assume you currently have 10 string files with 50 strings each. The string array tag would be defined as ST[10,50] when it is created. Assume the indexes into the arrays are created as "File" and "Element", both DINT data types. File would be allowed to go from 0-9, Element would be allowed to go from 0-49. So if File = 4 and Element = 11 then ST[File, Element] would return ST[4, 11], or, from the PLC5 equivalent, the eleventh element from the fourth file.

Again assuming you have created a two-dimensional string array, your first instruction source would be ST[File, 0]. It looks like the destination is a fixed file location so this will be an array of strings also. I just don't know if it is single or double dimension at this point. I know for sure it is at least a single dimension array, though.

The second case is like the first except you are moving the contents of a sting into an integer array. The same rules apply. Again, I don't know if the integer array needs to be single or double dimension but I do know it is an array of integers.

Another thing I noticed is the way you are referencing array element levels. Both indexes are placed in a single set of brackets with a comma between them. This is unlike the PLC5 where file and element numbers are separated by a colon.

Hope this helps.
Keith
 
Last edited:

Similar Topics

Its starting to dawn on me in aint about the hardware anymore. Is PLC programming a last bastion of sorts for programmers? I say that because...
Replies
37
Views
9,511
All trying to detect ground beef in an auger/incline screw. have tried ultrasonic sensors but it seems i cannot get a stable signal, possibly due...
Replies
28
Views
7,129
Hello, I've just came out of a call where a program that was modified two weeks ago threw the processor into fault. The program has been done...
Replies
9
Views
3,462
I'm trying to get a 5069-L306er to talk to a Automation Direct ProSence Controller by using RA's AOI for modbus client but its stuck not getting a...
Replies
9
Views
1,876
The last time I did anything with Wonderware was just after the dot com bust. Boy, I feel old. Anyway, it looks like I will get the chance to...
Replies
3
Views
1,508
Back
Top Bottom