Descriptions within an INT (Studio 5000)

jlmcguire3

Member
Join Date
Dec 2021
Location
Texas
Posts
10
Is it possible to have custom descriptions for each bool within my Int of Bools?

I am placing an INT of bools within my UDT, and I cannot seem to update the description of each individual BOOL within the INT.
I can change the description individually when I access a specific tag of type UDT. But I want the UDT definition to contain these individual bool descriptions.

Thank you.
 
You can, just have to do it through the browser. find it in the controller/program tagslist, expand the tag, expand the int, there should be the indivial bits presented, you can edit each one's description there.
 
You can, just have to do it through the browser. find it in the controller/program tagslist, expand the tag, expand the int, there should be the indivial bits presented, you can edit each one's description there.

That's what he said he could do and is not what he wants to do -- unless I am misreading he wants to have a default description for the bits within the udt as a whole, not just any individual tag.

I believe you can do this via a bit overlay. There's a couple old threads on the topic, but I don't have time to dig them up right now.

iirc you'll have to access your udt in an L5K file and edit it there, and you won't be able to edit the udt within Logix after doing it.
 
Yeah I don't see where this is possible for the UDT definition. It does not let you expand the "atomic" data types. I could expand a timer and give the done bit a description. But SINT, INT, and DINT I cannot.

OG
 
That's what he said he could do and is not what he wants to do -- unless I am misreading he wants to have a default description for the bits within the udt as a whole, not just any individual tag.

I believe you can do this via a bit overlay. There's a couple old threads on the topic, but I don't have time to dig them up right now.

iirc you'll have to access your udt in an L5K file and edit it there, and you won't be able to edit the udt within Logix after doing it.

Yes plvlce, you are onto it.

I am finding that I cannot add descriptions to the definition UDT.
Wondering if I could create a 16 "bit" UDT of bools and use that UDT as my "INT" within my master UDT to map in the bool descriptions I want..
Does anyone see an issue with that?
 
And even for the timer in the UDT, I can expand to see the status bits, but it does not give me the ability to add a description.

I exported the UDT and played around with the L5X file, but I couldn't get anything I did there to import.

OG
 
You can do this with AOI's, but (surprisingly) as others have said, it doesn't appear that you can do this with UDT's.

If it were really important you could always create your data type as an AOI instead of a UDT. An AOI is really just a UDT with code bolted on, but there's no reason you have to actually use that code. You could have the AOI logic empty save for a single NOP, and never call it, and you'd for all intents and purposes have a UDT with bit-level commenting. It's a bit of a hack, but it would work. If I did it I'd be sure to put a rung comment in the AOI logic explaining why there's no logic and why I'm doing it this way.

Of course if I were in this situation I'd also be asking some questions about why I need to do this, and if there's a better way of achieving the same end, but that's not what you asked for!
 
Yeah I don't see where this is possible for the UDT definition. It does not let you expand the "atomic" data types. I could expand a timer and give the done bit a description. But SINT, INT, and DINT I cannot.

OG

You can… in a way.

Export the UDT as an .L5X, open to edit, create a DINT overlay of BITs 0-31, mark visibility to be true, and comment away. Members of an overlay can’t reliably be re-commented in Studio 5K, but you can always export, edit, re-import, overwrite.
 
You can do this with AOI's, but (surprisingly) as others have said, it doesn't appear that you can do this with UDT's.

If it were really important you could always create your data type as an AOI instead of a UDT. An AOI is really just a UDT with code bolted on, but there's no reason you have to actually use that code. You could have the AOI logic empty save for a single NOP, and never call it, and you'd for all intents and purposes have a UDT with bit-level commenting. It's a bit of a hack, but it would work. If I did it I'd be sure to put a rung comment in the AOI logic explaining why there's no logic and why I'm doing it this way.

It’s even simpler than that. It’s pure code.

The AOI mechanism creates and manages a 1:1 UDT composed of an AOI’s defined parameters + EnableIn/Out + local members + some non-visible execution words/flags (prescan/postscan, math overflow, etc).

The “add-on defined type” in the tree is the result “backing tag” definition.

The compiled AOI logic is a single C-style function that accepts as its argument a pointer-to-struct of the backing type. Hence why you have to instantiate at least one of these backing tags to use an AOI. It goes to explain how the AOI performs, instruction-per-instruction, better than the PLC’s calling code and why editing an AOI online isn’t possible: it’s a raw binary living some place in memory.

The AOI definition probably resides as an instance of an undocumented CIP class, going to explain how you can upload and view the the original “running” code on the processor, just not recompile online.

When you read local members of an AOI using an HMI, you’ve just been looking at the non-visible members of the “backing” UDT that’s been sitting in the tag database all along.

Each In/Out parameter of an AOI is just realized as a pointer-to-type within the same backing tag. The AOI mechanism expands or contracts the called C-function signature, depending on whether the params passes are “required” in Logix (In/Outs implicitly, atomics by user). The pointer(s) to the parameters already come along for the ride in the AOI “instance” param in the AOI call, Logix just happens to enforce that they also point to an actual piece of data by expanding the signature.
 
Last edited:
I’m actually curious now whether you can make bit overlays and fields of the add-on-defined type by exporting the AOI definition to an L5X, making the edits to a local DINT for example, then reimporting.

Coupled with parameter aliasing, you could have an interesting mechanism in bitsets emerge.

I do this with local UDTs of an AOI already: entire incoming PF525 status words are one-line assigned to overlayed DINTs in the UDT resulting in a mass status update for dozens of unrelated bools at once.

No need to unpack bit-by-bit.
 
Last edited:
Yes plvlce, you are onto it.

I am finding that I cannot add descriptions to the definition UDT.
Wondering if I could create a 16 "bit" UDT of bools and use that UDT as my "INT" within my master UDT to map in the bool descriptions I want..
Does anyone see an issue with that?

Yes: don’t do it.

It wastes memory and you’ll suffer the work required to do this: INT -> UDT -> INT, entirely bool-by-bool. The code to do so is also slow and wastes memory.

Anyone looking at your work will suffer trying to figure out what it does and what you were thinking in trying it.
 
Last edited:

Similar Topics

Hi. I came into a problem that was buried in my memory. I had a list of modifications to do on 2 RSLogix programs. So I tapped in the IP...
Replies
7
Views
1,089
Hi All, On my site, the standard template for storing recipes in the PLC is to create a tag called PartRecipe which is an 2D array - for example...
Replies
4
Views
1,475
Hey guys, Frustrating issue here. I have one particular PC with Proficy 8 installed that no matter what I try, I cannot get the variable...
Replies
6
Views
1,439
How does everyone handle getting the program from another automation company to work on RSLogix 500 programs. Do you just have to sit down and try...
Replies
7
Views
2,262
Has anyone experienced the following issue on RSLogix5000 (currently on V16) I have a PLC program that has been running on a site for a number...
Replies
5
Views
1,607
Back
Top Bottom