UDTs, Structured Text & IO Aliasing

ohnedich6

Member
Join Date
Jun 2014
Location
Midlands SC
Posts
67
Hello All,

Figured I would join the forum after looking for some information on the web and under the search function of this site. I figured i would join to try and get the communities thoughts/opinions/knowledge with what I'm trying to determine is an acceptable way to program:

I have created a UDT in ControlLogix 5000 Rev. 20 that i have named Pump.
Pump contains the following pieces of data:
Auto -> BOOL
Man -> BOOL
Fault -> BOOL
Ready -> BOOL
Running -> BOOL
Speed -> REAL

I have created a tag (Controller or Program, atm i'm just testing things out) called PMP_1 which is a data type Pump. The BOOL data types in the UDT of Pump are actual hardwired inputs to a DI card (1734-IB8 for this program) that i will need to reference, and the REAL is an AI card (1734-IE8C).

What i'm trying to figure out is if it is a good practice to "alias" the parameters of PMP_1 using structured test in the following way:

PMP_1.Auto := AENTR:1:I.0;
PMP_1.Man := AENTR:1:I.1;
ETC...

Or should i just created program tags and alias them the normal way?
PMP_1_Auto alias to AENTR:1:I.0
PMP_1_Man alias to AENTR:1:I.1
ETC...

If this has been discussed i apologizes and could someone point me in the right direction. Thank you for your help.

Regards,
Nathan
 
Hello All,
Or should i just created program tags and alias them the normal way?
PMP_1_Auto alias to AENTR:1:I.0
PMP_1_Man alias to AENTR:1:I.1
ETC...

The software will not allow you to alias the "normal way". You will need to map the IO to the members, like you described using ST.

One thing to note, which you seemed to do, is to keep the data types contiguous, expecially BOOL. If you were to move one of the BOOL after the REAL, you will notice that it will take another 4 bytes of memory.

My two pennies.

James
 
James,

Thanks for that. I wasn't 100% sure if mapping the IO via ST is a common practice or if it's something that should be avoided all together.

On a side note, would it be beneficial to have a TIMER in my Pump UDT as let's say a minimum run timer or should i just keep that as a tag outside of the UDT?

-Nathan
 
James,

Thanks for that. I wasn't 100% sure if mapping the IO via ST is a common practice or if it's something that should be avoided all together.

On a side note, would it be beneficial to have a TIMER in my Pump UDT as let's say a minimum run timer or should i just keep that as a tag outside of the UDT?

-Nathan
I would add in the UDT, if it were me.

For me, I would map using ladder, not ST. That's just because most of my customers are not well schooled in ST and would hate me for it. But, that's your call.

James
 

Similar Topics

I'm trying to do my first ever structured text routine and failing miserably. Just to make things interesting, it's also my first foray into UDTs...
Replies
4
Views
3,048
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...
Replies
4
Views
389
I'm a bit confused about how symbols and UDTs work... As far as I know, in offline mode FB gets symbols from the UDT declared in the "state"...
Replies
4
Views
422
Hello all, I am beginning my travels in designing a system with compact guardlogix controller and a planelview plus 7 standard HMI. I have 3...
Replies
20
Views
2,024
Hi everyone, I'm looking for a sample program that has some UDTs defined in it for the MicroLogix platform. To create them, you need to have the...
Replies
6
Views
2,246
Back
Top Bottom