Hello, I am currently working on cleaning up PLC programs in L8 systems that were originally designed for SLC500 Projects. I am creating Tags using User-Defined Types (UDTs) with multiple tiers of tags. However, I am facing issues when attempting to map these tags within an Analog Input/Output (AIO) module, as I am unable to use UDT type tags as Input/Output. Additionally, I cannot use Block Transfer Direct (BTD) instructions or Copy (COP) instructions for the same reason. I came across a suggestion to use eXamine If Closed (XIC) to Output Enable (OTE) mappings within the AIO, but I am struggling to see how this would work for my situation since I cannot create an Output within the AIO that aligns with my UDT. Has anyone come up with a solution for this issue? I am trying to avoid adding numerous rungs of logic with XIC to OTE instructions to simplify troubleshooting for our Maintenance Technicians when working with the PLC system.
Could you provide more details on your intentions with the InOut parameter? Is the AOI it is associated with possibly self-referential? What specific issues are you encountering with BTD/COP?
UDTs can only be utilized for InOut parameters or internal tags, not for Inputs or Outputs.
When working with AOIs in PLC programming, it is important to note that all values passed in or out are "pass by value," meaning they are copied. However, using InOut tags allows for pass by reference. To operate on a User-Defined Type (UDT) as a whole, consider converting it into an AOI. Begin by transforming each value of the UDT into an AOI input parameter, ensuring it functions in the same manner. Next, establish Cmd_XXX input bits to carry out operations on the data effectively. Mastering these concepts is crucial for efficient PLC programming.
When working with Add-On Instructions (AOIs) in PLC programming, it is important to understand the concept of "pass by value" for values being passed in or out, which means they are copied. However, InOut tags function as pass by reference. If you need to manipulate a User-Defined Type (UDT) as a whole, consider converting your UDT into an AOI. Begin by transforming each value of the UDT into an AOI input parameter, maintaining the behavior. Afterwards, establish different Cmd_XXX input bits to carry out operations on the data. It is also possible to designate certain tags as "Local" to the AOI, allowing them to be visible on the Human-Machine Interface (HMI) despite not being accessible outside the AOI in the PLC. Ensure that their External Access is set to "Read/Write" or at least "Read", as Local tags are set to "None" by default. Since these tags are not browsable, manual entry of the full tag name is required when linking the data in the HMI. This approach is beneficial for integrating non-basic data types like Strings in the AOI for the HMI, eliminating the need to utilize In/Out tags to expose them to the main program.
Answer: - No, UDT type tags cannot be directly used as Input/Output within AIO modules in Studio 5000.
Answer: - One suggestion is to use eXamine If Closed (XIC) to Output Enable (OTE) mappings within the AIO modules.
Answer: - To simplify troubleshooting, you can avoid adding numerous rungs of logic with XIC to OTE instructions by exploring other solutions or workarounds for mapping UDT tags effectively within AIO modules.