RSLogix 5000 Creating Arrays

Secpcb

Member
Join Date
Jan 2015
Location
Detroit, Michigan
Posts
136
I only have one machine here with a ControlLogix PLC. It uses firmware 20.04 and I have RSLogix 5000 Full Edition.

I am experienced with RSLogix 5, RSLogix 500, Siemens and Mitsubishi, and the few updates I have done so far have been easy to figure out. However, now I have to add some arrays.

I need to add 2 DINT arrays, 19 and 25 DINTs, and 5 bit arrays, all 25 bits.

I have searched the forum, gone through the help section, and looked through the programming manuals, but all I can find is go to Data Types/User Defined and create an array.

When I do that it asks for a name, description and members, but nowhere does it have an entry or checkmark for it to be an array, or how long the array is to be.

Can someone guide me through making a 19 DINT array called VibNumBad?

I know how to address and use array entries that already exist, but something on the create just isn't clicking with me yet.
 
Last edited:
Create a new tag called VibNumBad. Default will be DINT but next to the work DINT press the grey box and enter 19 in Dim0
 
For the arrays of 25 bits, the only way I know is to create a user defined data type. Right click on User-Defined under Data Types and choose New Data Type. Give it a name and then enter the names you want under Members and select Data Type to BOOL. Repeat 24 times.
 
Create a new tag called VibNumBad. Default will be DINT but next to the work DINT press the grey box and enter 19 in Dim0

Alternatively, to the <EDIT TAGS> tab of the Controller Tags. At the bottom of the list, type VibNumBad in the Name column, and change the Data Type from "DINT" to "DINT[19]".

If doing this online, it's often better to set the data type first, and then type in the name. Sometimes a little fat fingering has one leaving the editing line, and thus the tag gets created with the wrong data type. Then you have to delete it and do it again. But if you already have code using the tag, then you have to delete it too, since the new tag is now "in use" and thus can't be deleted online.


For an array of 25 bits, you might consider just using a single DINT. The individual bits can be referenced as MyBool.[x]. This is often preferable to creating a bool tag array ("MyBool" BOOL[25], referenced as "MyBool[x]". As a DINT, you can manage all the bits in the word, just like you might be used to with SLC / PLC5 notation of N7:0.x.
 
Last edited:
Not sure about RSLogix but in Studio 5000 you can create a BOOL type array (no need for UDT) however the allowed dimensions is only multiplication of 32.
 
One thing I noticed is that all the BOOL arrays defaulted to BOOL[64], tried a bigger number as a test and it went to BOOL[128]. The DINT arrays are the number I specified.

Must not waste partial words of memory
 
Bob O,

Thanks. It's easy now - I never saw anywhere about the gray box and Dim0.


The gray box is only available when you're in the Edit Tags tab of the Controller Tags window, if you look at the bottom left of the window, you'll see Monitor Tags and Edit Tags. Once you're in the Edit Tags tab, if you look at the DATA TYPE column, it should say the data type with a clickable gray box/button with 3 dots (for example, DINT |...|) in it, which allows you to change the data type and the properties of that data type. You can also just change the size of the array by editing it in the cell.



EDIT: Added a screenshot for clarity, you have to be clicked on the Data Type cell for the button to show up.

Capture.PNG
 
Last edited:
Create a tag call BOOL as example with data type DINT. You will then get
BOOL.0
BOOL.1
BOOL.2
.
.
BOOL.31
Yes you will waste 26-31 but is the memory that tight?
 
Bob O,

No memory problem, it was just something I observed.

Mylespetro,

The Controller Tags database is empty - all the tags in the PLC are program tags.
 
Bob O,

No memory problem, it was just something I observed.

Mylespetro,

The Controller Tags database is empty - all the tags in the PLC are program tags.


Sorry, missed that. The process should still be the same for program tags as far as I know.
 

Similar Topics

Hi guys I have been working at the same company for 10years , and I would like to try and make the engineers job easier in the fault finding plc...
Replies
1
Views
1,455
In function block programming I am wanting to be able to select from 4 different flow meter tags to point to an equation depending on the mix tank...
Replies
1
Views
2,813
Hi Guys, I am trying to create a triangle (Sawtooth) pulse in RSlogix 5000 using counters/timers and anything else. I'm not sure what the ladder...
Replies
43
Views
16,992
I was just wondering if someone might be able to help. I am trying to create a new Structured Text routine in RSLogix 5000. However when I go to...
Replies
3
Views
4,000
Back
Top Bottom