Create UDT and COP

Bob O

Member
Join Date
May 2003
Location
Posts
1,873
I have used RSLogix5000 in the past to make small code changes but now I need to go deeper.
I have a 1794-IE8 over DeviceNet that has all been configured with the help of another programmer.
My first two AI are coming in on Local:2:I.Data[102] DINT and I need to split this.
What I did was create a UDT called Burner_Analog_In with 8 members Named Burner_Analog_In_0……..7 all with data type INT.
I then used the COP from Local:2:I.Data[102] to Destination Burner_Analog_In length 4. I did have to create a new tag called Burner_Analog_In and give it data type INT once I did my COP so I am not sure if this is all correct.
Clear as mud?[FONT=&quot]
[/FONT]
[FONT=&quot]Any and all help is appreciated[/FONT]
[FONT=&quot]
[/FONT]
 
I would change your UDT name to "Burner_analog_In_type", then make your tag Burner_Analog_In of data type Burner_analog_In_type. The COP may not work, so you may have to make COP or MOV instructions to fill in each element of Burner_Analog_In from the card.

Is this what you are trying to accomplish?
 
I think that sounds right. I have 2 points of AI at [102] and 2 on [103] and so on for [104] and [105].
I just need to split [102] into the two AI points so I can use it in the code.
 
1. Once you have created the UDT you have created a description of a new variable type. NOW you must create a tag of that type (ie Burner_Analog_In). You could call it the same name but that would be very confusing. NOW you have a tag which has the properties as described in your UDT. Lets call this tag B_A_I. B-A-I will have the 8 members Named Burner_Analog_In_0……..7 as you described. Go to the tag monitor and open up the tag to verify.

2. Next - your COP command should have as a target this newly created tag. The command should have a length of 1. The length of a COP command is in terms of the target data type. The following now happens:

Local:2:I.Data[102] -> BAI.Burner_Analog_In.0 (which should contain the Least Significant integer of Data[102]) and BAI.Burner_Analog_In.1 (which should contain the Most Significant Integer of Data [102]

Local:2:I.Data[103] -> BAI.Burner_Analog_In.2 (which should contain the Least Significant integer of Data[103]) and BAI.Burner_Analog_In.3 (which should contain the Most Significant Integer of Data [103]

Local:2:I.Data[104] -> BAI.Burner_Analog_In.4 (which should contain the Least Significant integer of Data[104]) and BAI.Burner_Analog_In.5 (which should contain the Most Significant Integer of Data [104]

Local:2:I.Data[105] -> BAI.Burner_Analog_In.6 (which should contain the Least Significant integer of Data[105]) and BAI.Burner_Analog_In.7 (which should contain the Most Significant Integer of Data [105]
 
Last edited:
Thanks to all that replied. With your help I managed to fumble through it.
I need to do some more reading.

Thanks Again
 

Similar Topics

I want to create an AOI to take modbus data and put it together as needed. The data is going to be coming from an RTA gateway and will be 32...
Replies
4
Views
3,570
Hello, I've been trying to learn this a while now and still have not found out how this works. I have an Omron CJ2M PLC and an ABB ACS 355 VFD...
Replies
1
Views
243
Hello, I have to deal with iFix again and am looking at the most efficient way to create alarms to display in iFix, i.e. not creating an...
Replies
0
Views
155
Good morning to all, I have the following issue, I installed everything of intouch including the patch, it is the 2023 version. The...
Replies
0
Views
330
So, I finally got versioin 27 installed on my Windows 10 VM. However, now I can't upload a project from my lab controller. I have the above error...
Replies
0
Views
1,129
Back
Top Bottom