Studio 5000- Int to fill 16 bit tags (simple)

AutomationTechBrian

Lifetime Supporting Member
Join Date
Jul 2013
Location
St. Cloud, MN
Posts
669
I have such a simple question...

In Studio 5000, 13 Ints are coming in and going out thru Ethernet I/P, to and from an ABB drive. There is a UDT being used to assign tags to each of the bits in the first Int, within an Add-On instruction. .....But the problem is, I'd like to move values into that full Int and not mess around with single bits.

I don't know how to do it, and I'm feeling a little embarrassed... but it's late at night and its worth it to me to ask the question.

To start the drive, I could MOV a value like "1151" in that first int... but what is the best practice for making that happen? All I have are bit addresses defined.
 
If you export then examine the UDT you will see that there is a hidden INT and the bits are defined as parts of it. In some cases you can modify the INT to be visible, change the INT's tag along with the but references and reimport it. But doing so may limit your ability to edit the UDT from within the program.


But as far as best practices, it would probably be better for future understanding to deal with the bits one at a time.
 
I've been thinking about this since last night....

I'm doing a test program with a demo drive before writing the actual program. So... I just decided to create an INT called Control, and tied the bits to the Drive bits one at a time on separate rungs... which is the only way I know how. I'll play with that on the demo drive to get a better feel for how the drive responds to the different bits being closed. I have to work out things like how to have an E-stop physically wired to the drive and see how it affects the control word coming through the Fieldbus.

Bernie... that makes sense. I'll look at that. ....I'm still getting used to the mechanics of Studio 5000. I'm much better than a week ago!
 
It might be easier to skip the UDT, and simply use the AOI's data structure as your drive definitions.

This makes coding super simple.
If you have your INT as in Input parameter to the AOI (with the VIS and REQ boxed checked), Call it FROM_ABB, say.

Next, create a Local-Scoped Int tag, call it STATUS.

Now create each Named bit as an Output (or Input) tag that is an Alias to STATUS. Ex: READY = STATUS.0, RUNNING = STATUS.1, etc.

The (first rung) logic in your AOI will simply be MOV (FROM_ABB, STATUS).

Now each bit has the correct name in the AOI, and are usable in the rest of the code as AOIName.READY, and so forth.

IMO, cleaner than having a UDT as an InOut parameter for the AOI, with the duplication of information (in the AOI and in the UDT).
 

Similar Topics

Howdy, I am currently struggling with an array of values that I want to re-arrange in a programmatic way. My program is a mix of ladder and STX...
Replies
6
Views
366
Hello, this is my first post after being a long time creeper on this forum. I am experiencing a fatal error any time I attempt to print to PDF...
Replies
2
Views
357
Hi All, I'm using Studio 5000 ver 30 to modify existing logic that has PID, and I want to be able to use an external/remote source as a setpoint...
Replies
3
Views
607
Just something I think about when choosing data types in Studio 5000. It seems logical, but I've never looked deeply into the question. When...
Replies
12
Views
1,308
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...
Replies
11
Views
2,163
Back
Top Bottom