logix 5000 stl - calling AOI from AOI

italo2008

Member
Join Date
Feb 2009
Location
Padova
Posts
95
Hi all

I'm trying to call an AddOn Instruction from another AOI. The AOI (wich name is Swap_Bytes) that must be called has only an Input INT parameter and a Output INT Parameter. It swaps the 2 bytes of the input variable and save the result in the Output variable

in the calling AOI I tried many syntaxes, but I'm not able to make it works:

Code:
Swap_Bytes(St_Status_W0,St_Status_Word_Array[0]);

Swap_Bytes(Swap_Bytes,St_Status_W0,St_Status_Word_Array[0]); 
(this is what manuals suggests, but debugger tell me "undefined tag:Swap_Bytes")

St_Status_Word_Array[0]:=Swap_Bytes(St_Status_W0);

the two parameters that I use calling the AOI are INT variables...

any suggestion?

thank you
 
solved...

the problem was that the variable Swap_Bytes must be declared in the local tag of tha calling AOI, not in the Program Tags


thank you anyway
 

Similar Topics

I haven't used used timers and STL together, so thought I'd try them on my next project! I have the following code example: So basically I was...
Replies
5
Views
3,148
Hi, has anyone come across any good documentation on SFC and STL as used in RSLogix 5000 Version 11 pro. I have just loaded my new version and...
Replies
2
Views
5,911
I recently did a program conversion from logix 500 to studio 5000 and when machine runs it depends on two ton instructions to keep the machine in...
Replies
17
Views
558
Hello, I am trying to read a barcode scanner input using a cognex dataman 280 barcode reader, store it another string, the compare with another...
Replies
1
Views
103
Back
Top Bottom