Sign in to follow this  
Followers 0
adavis

How to make this into functional AOI?

3 posts in this topic

I've got one rung set up using a UDT and simple logic. The purpose of this rung is to write a string to a tag, which will be sent to the HMI later. Since RSLogix 5000 refuses to allow my AOIs to export any string value, or string tags, I can not figure out how to utilize add-on instructions to easily replicate this logic. Any ideas on how to make this work?

Share this post


Link to post
Share on other sites
The string tag must be a In/Out type variable as far as the AOI is concerned. It seems the string is part of a UDT so the UDT must have been declared as an In/Out variable. The string/UDT itself exists outside the AOI but can be modified by it. Your argumets 'Both', 'None', 'Pendant' and 'Controller' must be strings which exist outside of the AOI and also are declared as In/Out variables themselves. The Length argument in the COPy instructions would just be 1 (as in 'copy one string'.) Edited by b_carlton

Share this post


Link to post
Share on other sites
There is another way - set your String tag up as a local parameter, not an input/output. A PV can read local parameters from inside an AOI, even if they don't show up in the tag browser. You just have to type them into FTView Studio manually. Once you've added them as parameters, go to your AOI properties, select the string parameters, and set external access to either Read Only or Read & Write (just not None). However, there might be an even simpler way of doing what you're trying to do. I'm assuming that you want to display this string on a robot popup to indicate which device is tripped. Instead of doing the logic in the PLC and transferring a String, you can get the PV to do the thinking. Just set up a string display and then instead of linking it to the String tag, copy this expression in: If ({[PLC1]Robot1_Estops.TP} == 1) AND ({[PLC1]Robot1_Estops.Controller} == 0) Then "Controller" Else If ({[PLC1]Robot1_Estops.TP} == 1) AND ({[PLC1]Robot1_Estops.Controller} == 0) Then "Pendant" Else If ({[PLC1]Robot1_Estops.TP} == 0) AND ({[PLC1]Robot1_Estops.Controller} == 0) Then "None" Else "Both" Note that the "rungs" are in reverse order to your PLC. This is because in a PLC, the if there are multiple valid rungs, the last valid one will overwrite any previous rungs. But in the PV expression, once it finds the first valid expression, it stops looking and uses that one. In this application there will never be more than one valid rung, so not a practical issue, but it's just good to remember. Obviously you will have to replace [PLC1] with the correct shortcut and make sure the rest of the syntax points to those tags correctly. And change the text in quotations to whatever you want to display. Hope that helps!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0