Studio 5000: Modular MOV of Data between UDTs.

AutomationTechBrian

Lifetime Supporting Member
Join Date
Jul 2013
Location
St. Cloud, MN
Posts
670
I've used AOI and User Defined Data Types, but I haven't created one yet.

I have a lot of repetitive MOV commands to take a select number of values from a large Add-On-Defined data type and move them into a much smaller UDT to send to the HMI.

For Example: (abbreviated)
"HeatCool_Zone1" is a huge block of data (times 42 zones)

I want to select only:
HeatCool_Zone1.PV
HeatCool_Zone1.SP
HeatCool_Zone1.Auto
HeatCool_Zone1.Manual

And Move the values into a UDT:
HMI_HeatCool_Zone1

So the HMI will have tags available:
HMI_HeatCool_Zone1.PV
HMI_HeatCool_Zone1.SP
HMI_HeatCool_Zone1.Auto
HMI_HeatCool_Zone1.Manual

I don't know how to define the MOV parameters so I only have to enter the source and destination once for the defined AOI.

So the (source).TC value is moved into the (destination).TC value, and I'm able to define the source and destination once per AOI block. Does that make sense? Any thoughts? (Feel free to critique or add thoughts.)
 
Are the values you want to move in both the source and destination the same length and in the same order? If so you could use a COP. But the CLX platform doesn't support true pointer operation, at least at the user level.

You could make an AOI with both the large and small UDTs as IN/OUT instances. That passes the AOI a pointer to the two target UDTs and will in effect allow you to do what you want. You just enter the source and target UDTs once at the instruction.

Keith
 
Might reccomend doing a JSR with parameters for this instead of the AOI. Pass in the base tags for the source and destination on the main routine and call a new subroutine. Inside this subroutine add the parameter calls and it is simple to map the element values as needed. As soon as the AOI is used it will be locked in stone without a download change and for simple mapping logic it might make it challenging for service and disable the ability to map another element if needed.
 
JSR with parameters... interesting. I remember seeing something like that somewhere, but I'd have to learn about it first.

Thinking about this on my drive home tonight, I think I might look for a solution using Structured Text, in one routine. I'll create the individual UDTs for each of the 42 zones, then use Excel to automate writing the commands to MOV all the values where they go. I can see using CONCATENATE in an Excel spreadsheet to put it together.

If it works, I'll post a screen print to help the next person.
 

Similar Topics

Hello everyone, I'm new here, I hope someone can help me. I've been trying to install EDS files to my Studio 5000 with the EDS tool installer but...
Replies
3
Views
86
Hi Everyone, I am facing an issue while installing the STUDIO 5000 in my windows 10 PC. During installation I am getting an error that " Error...
Replies
4
Views
166
I am connecting to a remote device. When attempting to upload I receive an error that states: Error: Auto_Functions: The Import was aborted due...
Replies
3
Views
175
I recently did a program conversion from logix 500 to studio 5000 and when machine runs it depends on two ton instructions to keep the machine in...
Replies
17
Views
542
Back
Top Bottom