RSLogix AOI Optional Inputs

MMCC

Member
Join Date
Mar 2022
Location
Here
Posts
3
Hi,

Is there a way to know if an optional input is used? I am programming an AOI for customers. There are 2 inputs A and B. Input B is optional. If it is not set it should be set to A internally. If it is set then then value set must be used.

Is there a way to know that B was set? It could be any value so there is no way to use a dummy default.

Thanks!
Mark
 
The application is an electric actuator is moving between 2 positions. The two moves could have separate speeds, accelerations, decelerations and torques. The AOI should use the move1 parameters if no move2 parameters are set. I am not sure how the NEQ A B would help.
 
B can probably be any POSITIVE value. At the end of the AOI after you have used B then MOV -999 B and at the start of the AOI check EQU B -999 OTE B_Is_Unused.



If that bit is off use B, if on MOV A B and use the A value in B until it is changed to -999. If -999 is a valid value you can go all the way down to -1.2 Billion for a DINT.


EDIT: I thought you just wanted to know if the 2 values were different, so I set a BOOL.
 
Thanks I_Automation,

I will take a closer look at your suggestions (as well as jridge). Point is there is no clear method indicating how the user has used it and I have to work around what is available.

Thanks
Mark
 
Sure there is.

a) You can add another parameter to indicate which of the two are to be used. Same method could be used to select one of very many input parameters passed as an array (constant InOut).
b) Only ever pass 'A' or 'B' or ... or 'X' or 'Y' or 'Z', depending on what's happening in the calling code.

One downside to sanitizing a pass-by-ref parameter set as you're doing (B := A, if...) is that the calling code has no idea if (much less why) it changed.
 
Last edited:

Similar Topics

Hi. I'll say it again, I worked mostly with Unity Pro for the last 12 years and I'm trying to convert our FBD standard to Rockwell Logix...
Replies
13
Views
1,510
There is a requirement to convert some projects back to Rslogix 5k , I want to check if I can convert version 30 AOIs to version 20 AOIs. Thanks
Replies
2
Views
1,050
Hi All, I'm working on an AOI that needs a ONS incorporated into the logic. Every time I run the instruction the ONS gets stuck on even when the...
Replies
6
Views
3,241
I've looked and quite a few posts were older so I'm starting this one.... I created my first AOI but it appears to not be functioning correctly...
Replies
9
Views
2,832
Hello!! I am trying to create a AOI to perform lead lag pumping operations based on run time. I do have 8 pumps out of which 6 are duty and 2...
Replies
6
Views
2,664
Back
Top Bottom