Using AOIs, UDT and aliasing with LD5k

testsubject

Member
Join Date
Feb 2004
Location
Chicago, Il
Posts
836
I am wondering if this possible.

I am trying to automate some of the processes we use by putting them into nested AOI.

In the past, we would use aliasing to link Input/Outputs to internal variables for use in the program.

I created a UDT that includes these variables but am now I am unable to alias them.

Am I missing something?

For example:

I created a UDT called "VFD" with In1, In2, In3 as BOOLs.
I then created an AOI called "SubR" which includes "Param" as an InOut VFD Datatype.
I then created a Controller tag Routine1 with a data type of SubR.

I thought that I would be able to alias

Routine1.Param.In1 to I:1.1
Routine1.Param.In2 to I:1.2
Routine1.Param.In3 to I:1.3

but cannot.

I do not see "Param" in the dropdown for the Controller tag that I created; Only EnableIn and EnableOut.

Any clues as to where I went wrong?

I was hoping to use data types to do some subsection "wrapping" like

SubR1, SubR2, SubR3 are parameters of "Section" UDT and the system would include Section1, Section2, and Section3 with data type 'Section."
 
To my knowledge, you can't provide an alias for members of UDTs. You can provide an alias for the whole the whole datatype though. You also won't be able to browse to InOut parameters in your list of controller tags. Only Input and Output parameters are visible there, if I recall.

Maybe instead of using aliasing, you could set it up a little differently. For example, your VFD UDT could have a DINT (or whatever your input module's data type is), and you could move your input DINT to your UDT DINT. Might look something like this:

Local:1:I.Data (DINT) move to MyVFDTag.In (DINT) on every scan.

Now MyVFDTag.In.1 will equal Local:1:I.Data.1, etc.

Not sure if this is what you are looking for or if it will work for what you are trying to do. I just rarely use aliasing. My personal preference is to copy physical address data to my controller tags programmatically.
 
Thanks for the reply.

I was thinking along that path but was wondering if the aliasing could do it instead.
I will end up with a routine that will need approximately 20 separate parameters.
This means if I use this routine 10 times, I need to set up 200 moves upstream in the program to link to.

Unfortunately, moving DINTs won't help me with everything: for example, I:1.1 would go to Input1 in Routine1, I:1.2 would go to Input1 in Routine2, I:1.3 would go to Input1 in Routine3 , etc.

That is why I was hoping aliasing would work.

Oh well....
 
You CAN "alias" members of a UDT within the UDT. The method is called "bit overlay". A search on that term will probably yield a better explanation, but here goes my quick attempt:

Create all the tags in the UDT that you want -- bits, words, etc. Do not create any instances of the UDT. It might be best to create a new project, just for this UDT.

Export the ENTIRE PROJECT as an .L5K file.

Open the .L5K file in a text editor (Notepad, or equiv).

You'll find that certain bits are part of some bogus "XXXXXX" tag, and that XXXXX tag has the property of "Hidden".

Edit the reference so be part of some other structure that you created before -- for example, "OFF" as bit 0 of a DINT "STATUS"; "ON as bit 1 of "STATUS", etc.

When you're done, open the .L5K project in Logix/Studio.

Good Luck.
 

Similar Topics

Hello everyone, I'm working on a project that involves controlling an array of nozzles within a CNC environment, where the nozzles travel along a...
Replies
5
Views
128
Hi, I was noticing that Profibus connectors have 2 ports on them that can house 2 separate cables. Can I use 2 cables with Profibus signals...
Replies
4
Views
132
Hi, Seeking consultation on an implementation matter, and have a question about Modicon Compact 984 communication through RS485: Three Modicon...
Replies
4
Views
105
Dear all, I don't know why setup of password became challenging and weird. After setting up the password and try to upload the ladder from the plc...
Replies
3
Views
93
Dear All, I need a sample PLC program to count the output pulse of a mass flow meter so that a specific amount of mass (for example 100gm)can be...
Replies
2
Views
82
Back
Top Bottom