Posted 21 Aug 2014 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
Posted 21 Aug 2014 (edited) 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 21 Aug 2014 by b_carlton Share this post Link to post Share on other sites
Posted 21 Aug 2014 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