clementcbc
Member
Hi,
I'm new to this PLC game.
Using RsLogix 5000
I'm trying to write a addon instruction that will write the result string to a destination SINT array of unfixed size.
So I've basically got.
MyAddon is the name, with following tags:
ResultArr, SINT[100], LocalTag.
DestArr, SINT, InOut param.
The user would pass element [0] of an array to it.
|--MyAddon------------|
|DestArr = SomeArray[0]|
|-----------------------|
(SomeArray will be SINT[x]. I don't want to force the user to use a specific sized array)
Inside my Addon, I use COP to copy my ResultArr into DestArray.
However, only the first SINT is copied.
I.e. SomeArray[0] will be correct (ResultArr[0]), but SomeArray[1..x] are all blank.
Does anyone have know how to make it work properly?
Thanks!
I'm new to this PLC game.
Using RsLogix 5000
I'm trying to write a addon instruction that will write the result string to a destination SINT array of unfixed size.
So I've basically got.
MyAddon is the name, with following tags:
ResultArr, SINT[100], LocalTag.
DestArr, SINT, InOut param.
The user would pass element [0] of an array to it.
|--MyAddon------------|
|DestArr = SomeArray[0]|
|-----------------------|
(SomeArray will be SINT[x]. I don't want to force the user to use a specific sized array)
Inside my Addon, I use COP to copy my ResultArr into DestArray.
However, only the first SINT is copied.
I.e. SomeArray[0] will be correct (ResultArr[0]), but SomeArray[1..x] are all blank.
Does anyone have know how to make it work properly?
Thanks!