Rslogix 5000 v20 array in ADD-on instr.?

Kasperv79

Member
Join Date
Mar 2012
Location
Copenhagen
Posts
48
Hey guys.

I cannot figure out how to use a FFL function inside a aoi..

The control structure seems not to working..

I testet the code outside a aoi and i Works as i should.

Any comment on that?
 
If you can post your code we can take a look, place it in a .zip file and upload it.

I did this about a month ago, had some problems because with an array inside an AOI (aoi_ARRAY[x])which the FFL loaded values too needed to have another array tag outside the AOI to serve as a reference (ref_ARRAY[x]) this is due to the Nature of the InOut parameter type required to be used for an array.

When you assign the reference array in the AOI instruction call you just use the ARRAY tag name only, no need for brackets.

Ref_ARRAY --> aoi_ARRAY not Ref_ARRAY[0] --> aoi_ARRAY[0]

You aren't assigning a length parameter like a COP instruction.

Of course, the ref_ARRAY size should be the same as the aoi_ARRAY size. Also be sure to put a lot of logic in the AOI to verify array size, FFL .POS, last thing you want is to fault your processor because your array size was off and the FFL is trying to reference an invalid array element.

FFL/FFU logic and be problematic if you aren't used to them at first, be sure it's bullet-proof before you place it into an AOI and use it within a production environment.
 
If you can post your code we can take a look, place it in a .zip file and upload it.

I did this about a month ago, had some problems because with an array inside an AOI (aoi_ARRAY[x])which the FFL loaded values too needed to have another array tag outside the AOI to serve as a reference (ref_ARRAY[x]) this is due to the Nature of the InOut parameter type required to be used for an array.

When you assign the reference array in the AOI instruction call you just use the ARRAY tag name only, no need for brackets.

Ref_ARRAY --> aoi_ARRAY not Ref_ARRAY[0] --> aoi_ARRAY[0]

You aren't assigning a length parameter like a COP instruction.

Of course, the ref_ARRAY size should be the same as the aoi_ARRAY size. Also be sure to put a lot of logic in the AOI to verify array size, FFL .POS, last thing you want is to fault your processor because your array size was off and the FFL is trying to reference an invalid array element.

FFL/FFU logic and be problematic if you aren't used to them at first, be sure it's bullet-proof before you place it into an AOI and use it within a production environment.

Thanks for the reply.
Regarding The FFL Logic isnt that just to use the data structure "control" when i write a name in The FFL control Field and Rights clic > ADD New tag, Them it suggest The type "control " isnt it The Way to do it?
And set this structure as local?

Br
Kasper
 

Similar Topics

Hello All, A program was downloaded to a CompactLogix PLC by a colleague. When I attempt to open the program I get a message: Failed to open...
Replies
13
Views
3,278
Ive recently been having trouble with the stability of my connection when online with a plc, The software intermittently freezes (cogwheel...
Replies
4
Views
2,047
I have a subroutine that gets called to copy a UDT In an array to a tag. This subroutine will be called around once per minute and has been...
Replies
4
Views
2,106
I've googled and searched for this error but can't see it anywhere. When I try to open this program I get the following. Error 0x8004201d...
Replies
12
Views
3,917
Hello, I am trying to export some add on instructions & sub routines and import them into a program that is in Rslogix 5000 v20. The program...
Replies
3
Views
1,717
Back
Top Bottom