AB Compact Logix Boolean Array not showing full array size in UDT

Software: Ignition Version 8.1
Module: Vision
Project: CompactLogix PLC Arrays inside an Ignition UDT

I have the arrays shown below inside an Ignition UDT definition that looks something like this:

  1. A1_Rack.Part_ID_Array[224] type STRING
  2. A1_Rack.PickTime_Array[224] type DINT
  3. A1_Rack.PlaceTime_Array[224] type DINT
  4. A1_Rack.Pockets_Disabled_Array[224] type BOOL
  5. A1_Rack.Pockets_Array[224] type BOOL

Can you please explain the issues I'm having when I instantiate these five arrays? When I browse to the tags Items 1,2,3 shows all 224 elements while 4 and 5 (of type Booleans) only shows 6 elements

Bool arrays in CLX are actually DINTS behind the scenes. 7 DINTS x 32bits = 224 bits.

1 Like

Logix BOOL arrays are actually packed into DWORD arrays with nothing visible to external connections to indicate they’re actually a BOOL array.

1 Like

How do I access Individual elements?

You can access bits by adding .# to the tag path where # is the index of the bit in that DWORD, so anything from 0-31.
For example, item A1_Rack.Pockets_Array[122] in CLX would be ns=1;s=[PLC]Program:Mazak_Racks.A1_Rack.Pockets_Array[3].26

You can also create an Ignition UDT to individualize the bits into individual tags…that's what I do with 32 bit DiNTs for alarm bits. Just create a UDT type with a string root parameter, then individual bits that are {root}.0 to {root}.31. Makes it easier to define alarms, bindings, etc

That sounds very interesting Robert. Are you able to show a screenshot showing the steps involved?

Unfortunately, traveling at the moment. There should be some examples if you search the forums. Otherwise, I can probably get you something tomorrow.

1 Like

tags.json (2.2 KB)

UDT tags.json (9.5 KB)

Attached is an UDT example and a tag example using that UDT.

For your case, if you want specific array.y tags, expand the UDT to add an INDEX parameter, and change the elements to include the [INDEX] to your CLX tag.

1 Like