Replicate a ControlLogix string array as a table in a DB

I’ll apologize in advance for my naiveté, this seems like it should be trivial to do, but I had to take a really long way around to achieve the proper result. I have a STRING array with 17 elements in a ControlLogix processor. I would like to have a table with 2 fields, an index and a string where for each record the index is the element number of the ControlLogix array and the string is the data from the ControlLogix array.

I would think that a Block transaction group would be just the ticket, but I couldn’t figure out how to make it work. A string array in a ControlLogix processor is a bit tricky to work with because each element has two parts - a DINT that represents the length of the string and an 82 element array of SINTs that holds the ASCII codes for the characters in the string. Ignition has no problem just reading the string.

I’m lucky that there are only 17 elements in the array because the way I got around the issue was to create 17 standard transaction groups. Each group only has a single item, a single element in the array, and I used a custom update/select criteria where the record whose index is the same as the array element number is update. I had to do each one of those “by hand”.

Is there a better way to do this? Had there been 100 elements in the array, this would not have been nearly so feasible.

Well, block groups were the answer. Since the documentation is woefully inadequate, it took a lot of trial and error, and there’s a couple of behaviors I still can’t explain, but I’ve got results I can use.

Has there been any change to this in the past?
I have been looking around, and found most answers are to treat each String Element as an Array of Bytes, and concate them to a locally existing Element of String Array.
Is there a formal method of getting an Array of Strings from an AB PLC without having to use such “brutal” methods?

As you can see, this isn’t a very popular topic having no responses in 7 years.

This seems to work now using more recent stuff.

I am using Ignition 7.9.16 and I am talking to a ControlLogix L75 version 30 processor, so it uses the “new” Logix driver.

So this:

Produces this:

And my data shows up in my database.

1 Like