rslogix structured text- add on instruction - variable declaration

italo2008

Member
Join Date
Feb 2009
Location
Padova
Posts
95
I've created an add-on instruction in rslogix 5000 (in structured text) but I can't test it and I need to know if it is correct..

in a rung of the main routine I call my add on instruction giving some controller tags as input parameters to he funtion. In the add on instruction can I modify these tags if I have declared them as InputOutput variables? Or I must define them as Local variables?

If I've decleared them as InputOutput variables, what happens if the function modify one of them? (I hope that the controller tag wich has been given as input parameter to the function will be modified... isn't it?)
 
If you have declared them to be InputOutput variables and you modify them in the AOI then the original Controller Scoped tags are also modified. If you want to modify the values internally but not modify the original tags then use local AOI variables.

If you wish you can export the AOI to an L5X file and post it - we'll be happy to take a look at it for you.
 

Similar Topics

Hello, I please need your help why I cannot get the return parameter from the RET instruction to go into the return parameter in the JSR return...
Replies
6
Views
2,820
Hi I'm working on a project in structured text in RSLogix 5k. When I verify my program it shows the errors and warnings in the buttom of my...
Replies
12
Views
5,408
Hello All, Please how can i edit a structured text program in rslogix 5000. Thanks
Replies
5
Views
5,305
I don't use structured text too much, but wanted to loop some items, so i thought i should try it. Got a hang up. What i am trying to do is to...
Replies
2
Views
4,731
Hi. could someone give me an example about TONR instruction in structured text? I need to build a sort of "clock" wich set a bit at each...
Replies
3
Views
8,710
Back
Top Bottom