Productivity 2000 PLC Array Functions Part 1

An array is a storage area for common data type tags. They usually have some relationship with each other and must be manipulated as a group. We can use arrays for motion control, recipe management, sequencing (indirect addressing), math, etc. The Productivity 2000 Series PLC uses arrays programmed using the Productivity Suite Software.
Productivity 2000 PLC Array Functions Part 1

Previously in this Productivity 2000 series PLC, we have discussed the following:
P2000 Hardware FeaturesVideo
Productivity Suite Software InstallVideo
Communication (System Configuration)Video
First ProgramVideo
Debug ModeVideo
PLC Program DocumentationVideo
PLC CPU DisplayVideo
PLC Online ProgrammingVideo
PLC Tag DatabaseVideo
Ladder Logic ContactsVideo
Ladder Logic OutputsVideo
Productivity 2000 PLC Ladder Logic MathVideo
Data Handling Instructions
Part 1Video
Part 2Video

What are Arrays?

Arrays are like spreadsheets.
Spreadsheet Rows and Columns
The spreadsheet is made up of columns and rows. The coordinates of columns and rows address individual cells. The information in the cell can be any variable type we want. In our example, the highlighted cell is C3.

Addressing Arrays in the Productivity Series PLC

Productivity 2000 PLC Array Functions Part 1

Indirect addressing (pointers) in the Productivity Series PLC

We use arrays to handle indirect addressing in the productivity series PLC. A tag name can be specified as the index of the Array.
Widget Progress (Pointer) – a 1D array
Widget Progress (Pointer_Row), (Pointer_Column) – 2D array

Creating an Array

Call up the tag database. Main menu | Edit | Tag Database. You can also access this under the Application Tools menu in the Write Program folder.
Productivity 2000 PLC Array Functions Part 1
Select the Add Tags button at the bottom of the Tag Database window.
Productivity 2000 PLC Array Functions Part 1
We can now assign the following:
Tag Name: Sequence
Data Type: 1D Array
Integer, 16 Bit Unsigned, 1D Array
Columns: 30
Hit Add to make the tag in our database. Select close to stop adding to our tag database.
Productivity 2000 PLC Array Functions Part 1
Select Integers to view the integers in our program. You will now see the array Sequence in the list. Sequence (1) to Sequence (30) will now be available for our program. We can then fill the sequence array with a series of initial values.

Creating a sequenced event using a 1D array

We will now create a sequenced pattern on our output card using a 1D array. The pattern will be the same as we programmed for our Sequence Array above.
Productivity 2000 PLC Array Functions Part 1
Let’s add another tag called Pointer. This will be used to select the value in our Array. This pointer tag will be the index pointer for our sequencer. It will have the initial value of 1 and be an integer, 16 Bit Unsigned.
P2000 Ladder Logic Program
When Switch 1 is on, our input sequencer value is transferred to the digital output bits.
The Pointer is used as an index for the sequencer. Every other second, we will use the math instruction to increment the pointer value by one. We constantly compare the Pointer to a value of 30. Once the Pointer is greater than 30, a value of 1 is moved back into the Pointer. This will reset our sequencer.
P2000 Ladder Logic Program
When switching one transition from on to off, the Pointer gets reset by moving the value of 1 into its location.

You can see that using arrays with index pointers can be very powerful. Another simple sequencer that you can program would be a traffic light. This can quickly be done by using the same program above and changing the array information to correspond to the light sequence.

Download the PLC program here.

Watch the video below to see the array sequencer we created running on our Productivity 2000 Series PLC.

Productivity 2000 Series PLC from Automation Direct
Overview Link (Additional Information on the Unit)
Configuration (Configure and purchase a system – BOM)
User Manual and Inserts (Installation and Setup Guides)
Productivity Suite Overview (Features of the fully functional free software package for the Productivity Family of PLC (PAC) controllers)
Productivity Suite Programming Software (Free Download Link)
This software contains all the instructions and helps files for the Productivity Series.

Watch on YouTube: Productivity 2000 PLC Array Functions Part 1

If you have any questions or need further information, please get in touch with me.
Thank you,

If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLCs are not challenging to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, decimals, Hexadecimal, ASCII, and Floating points.

To get this free article, subscribe to my free email newsletter.

Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available for free download. The link is included when you subscribe to ACC Automation.

Leave a Comment