Studio 5000: Modular MOV of Data between UDTs.

AutomationTechBrian

Lifetime Supporting Member
Join Date
Jul 2013
Location
St. Cloud, MN
Posts
669
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

Hi Everyone. Not posted on here for a long time, but I am hoping someone can help me. I am doing a differential pressure calculation in a L27ERM...
Replies
15
Views
208
Hi, how do I convert 2x Integer registers to a Real? The two integers are from Modbus registers that contain a floating point value, I need to...
Replies
2
Views
116
What is the best way to extract the hour and minute from the register that comes from Yaskawa VFD. In studio 5000 I have a register saved as INT...
Replies
3
Views
119
I have an Allen Bradley temperature switch that I am trying to use in studio 5000. I am getting the message "Unable to interpret the IODD file"...
Replies
0
Views
72
Hi all. I want to ask what may seem a stupid question, as I have a project to send live data to a Yeacode line printer which will print meterage...
Replies
10
Views
195
Back
Top Bottom