Productivity 1000 PLC Array Functions Part 1

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

Previously in this Productivity 1000 series PLC, we have discussed:
System HardwareVideo
Installing the SoftwareVideo
Establishing CommunicationVideo
First ProgramVideo
Documenting the ProgramVideo
Monitoring and Testing the ProgramVideo
Online Editing and Debug ModeVideo
Numbering Systems and Tag DatabaseVideo
Contact and Coil InstructionsVideo
Timer InstructionsVideo
Counter InstructionsVideo
Math InstructionsVideo
Data Handling Instructions Part 1Video
Data Handling Instructions Part 2Video

What are Arrays?

Arrays are like excel spreadsheets.
Productivity 1000 Series PLC Array Functions Part 1
The excel spreadsheet is made up of columns and rows. Individual cells are addressed by the coordinates of columns and rows. In our example the highlighted cell is C3. The information that is in the cell can be any variable type that we want.

Addressing Arrays in the Productivity Series PLC

Productivity 1000 Series 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.
Example:
Widget Progress (Pointer) – a 1D array
Widget Progress (Pointer_Row), (Pointer_Column)

Creating an Array

Call up the tag database. Main menu | Edit | Tag Database. You can also get to this under the Application Tools menu located under the Write Program folder.
Productivity 1000 Series PLC Array Functions Part 1
Select the Add Tags button at the bottom of the Tag Database window.
Productivity 1000 Series 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 1000 Series 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 in 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 what we programmed for our Sequence Array above.
P1000 P2000 P3000 Ladder Logic Sample Program Code
Let’s add another tag called Pointer. This will be used to select the value in our array. It will have the initial value of 1 and be an integer, 16 Bit Unsigned. This pointer tag will be the index pointer for our sequencer.
P1000 P2000 P3000 Ladder Logic Sample Program Code
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 always compare the pointer to a value of 30. Once the pointer is greater than 30 a value of 1 is then moved back into the pointer. This will reset our sequencer.
P1000 P2000 P3000 Ladder Logic Sample Program Code
When switch 1 transitions 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 easily be done by using the same program above and change the array information to correspond to the light sequence.

Download the PLC program here.

Watch the video below to see the array sequencer that we created in action running on our Productivity 1000 Series PLC.

Productivity 1000 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 Programming Software (Free Download Link)
This software contains all of the instruction sets and help files for the Productivity Series.

Next time we will continue to look at the array functions in the Productivity 1000 Series PLC. This will include the following array instructions:
Array Statistics
Copy Array
Fill Array
Shift / Rotate Array

Watch on YouTube : Productivity 1000 Series PLC Array Functions Part 1

If you have any questions or need further information please contact me.
Thank you,
Garry



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

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 as a free download. The link is included when you subscribe to ACC Automation.


Leave a Comment