Studio 5000 copy bool variables

taylor1982

Member
Join Date
Aug 2011
Location
Bavaria
Posts
78
Hi,

I have a maybe simple question but I don´t know a solution so far..

I have a UDT which contains a lot of BOOL variables. Now i want to copy a few of these BOOL variables to another UDT. How this can be done in Studio5000? The COP instruction don´t work for BOOL.

Thanks for your help!
 
You just have to do them one at a time with XIC/OTE in ladder, or the assignment operator := in structured text.
 
You just have to do them one at a time with XIC/OTE in ladder, or the assignment operator := in structured text.

Sure this is possible. But this are more than 200 bits and handle them in XIC/OTE is quite a lot of work.
Is there no possiblitiy to copy them with an instruction?
 
You could do it in excel & paste in...
Or an Add-On instruction.

But perhaps, your structures need looking at to suit what you are trying to do.?
I'm not sure if you can alias a UDT attribute, but that would still involve a lot of work as well,
 
BOOLs are BOOLs and they just don't behave like INTs or DINTs. Blame the IEC 61131-3 committee.

You might be able to copy the whole UDT to a DINT array, then copy just those sub-elements the contain the BOOL elements into the new UDT. But that's going to require very careful examination of the UDT structure and will malfunction if somebody changes the structure of either UDT in the future.

Doing large numbers of XIC/OTE or assignment operators is tedious, but it's manageable. You could wrap up the code inside an AOI or just call a subroutine at an appropriate time instead of dropping a big chunk of code inside your automation code.

I recently did a project with 90 identical actuators, so I had many programs that relied on brute force code to do the same thing again and again.

One tool that saved me huge amounts of time was Notepad++, a text editor with a lot of very good search/replace and automation tools.

I was able to copy-paste one rung from RSLogix 5000 into NP++, then duplicate it 90 times, increment the array number using the Column Editor feature, then paste it back into RSLogix 5000 as Neutral Text and create 90 new rungs, all while online in RUN mode.

Sure, it was brute force, but once I got the hang of it I could do 90 similar rungs in a minute or two with no errors or typos.
 
Hi,

I have a maybe simple question but I don´t know a solution so far..

I have a UDT which contains a lot of BOOL variables. Now i want to copy a few of these BOOL variables to another UDT. How this can be done in Studio5000? The COP instruction don´t work for BOOL.

Thanks for your help!

One thing you could do is create a nested UDT of the BOOL tags you need to update in the destination, and use that same UDT in the source.

Then a COP will work.
 

Similar Topics

I know this is something that is done all the time... I think I've used it before communicating with a VFD. But right now it's not making sense...
Replies
5
Views
1,785
Hello Guys, I have just upgraded an older machine from a old processor to a new studio 5000 processor (1756-L83ES). For some reason when I am...
Replies
4
Views
3,639
Hello. I used to do this all the time in older versions of RSLogix 5000. I could copy and paste from my UDT to excel, make changes, and then copy...
Replies
5
Views
5,199
Question about COP and UDT's in Studio 5000. I have a UDT structure with various data types that is reporting (according to the properties tab in...
Replies
5
Views
2,501
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
53
Back
Top Bottom