Pointers L5K

sruda

Member
Join Date
Jun 2015
Location
BC, Canada
Posts
5
I am trying to use a DINT in an array as a Pointer to a different array:

Pointers DINT[10]
Array1 STRING[10, 10]
String1 STRING

COP
Source Array1[Pointers[0], Pointers[1]]
Dest String1
Length 1

If I make the pointer an individual tag (Not in an ARRAY) it works fine but will not compile as above?
I get:
Error: Rung 0, COP, Operand 0: Invalid array subscript specifier.

Is this possible?
 
unfortunately array elements cannot be used as the pointer, a base tag has to be used. It just cant handle the double brackets. You can keep your pointers in an array, you just have to MOV them to a base tag before using them. You can make your base tag similar like Pointers_0
 
You can also use an alias to shed the array subscript.
Aliasing each member of the array lets you access the data as array elements or as individual tags. No copying required.
 

Similar Topics

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,448
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,857
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,466
Hi guys, Some pointers needed: Having PC with WIN7 pro X64 and Amsamotion clone of 6ES7 972-0CB20-0XA0 cable and need to backup VIPA cpu...
Replies
14
Views
3,089
Is there any form of Reference Type or Pointer Type like Codesys has? I am aware that you can nut a tag in the index of an array reference. but...
Replies
7
Views
1,834
Back
Top Bottom