Well
hi everyone. Today we're going to be looking at the productivity 2000 PLC array functions part two
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 a raise for motion control recipe management, sequencing, indirect addressing, math, etcetera
The productivity 2000 series PLC uses raise that our program using the productivity suite software
Last time we defined an array and used it in an indirect addressing program
its sequence bits in an output card indirectly
In the second part, we will be looking at the following instructions, erase statistics S T A
This will perform operations such as summing averaging minimum value and median value on an array
Copy array C P A copy a block of one or two dimensional arrays into a destination array
fill array F L A copies a value to a block of array elements
shift a rotator A S R A
can currently shift or rotate values in array
Let's get started with a productivity 2000 series PLC. A race part two
detailed information contained in the video can be found in A CC automation dot C A A link has been put in description below
If you have not watched the other videos yet will be links in description below. That will start you at video
one of the links to the rest of videos in the series as well
for activity of race statistics S T A
this instruction will perform statistical operations such as summing averaging men value and medium value on an array
We will use a structure with this instruction S T A array
If we did not, then we would have to specify an address for all of the parameters required. For the instruction
we will use the array called sequence. From last time we will sum the elements in the array
min max average and median are also available as part of the race statistics and structure
Our takes can be defined
set the end column to the initial value of three and a start column to the initial value of one
Our introduction will then add or some the elements of the one dimensional array starting at one and ending at three
No all arrays will start with one
switch to is used to execute the array statistics. Instruction
hooray sequence has the elements 01 and three added together. This will produce the output four in the output parameter
If we change our end element to four
the resulting sum would be 11 0 plus one plus three plus seven
productivity copy array C P A. This instruction will copy a block of one or 2 dimensional raise into the destination array
We have added two arrays call up the tag database by hitting the icon under the right program in the application tools or from the
main menu edit tag database
When the tag database window appears, select add tags to the bottom left of the window to add tags
Our two arrays are called source array and destination array for D E S T
They are both 16 bit unsigned two dimensional raise with two rows and two columns
Our sorcery contains the values of 12, 3 and four
We will use a structure with this instruction called C P A array
The source array will be source array and the destination array will be B E S T array
Ensure that the copy value is selected
Notice that we can also select clear source and copy binary
When switch three is enabled, our copy is executed, you will see the source array is copied to the destination array
productivity fill array F L A. This instruction will copy of value to a block of array elements
We'll use the structure named F L A array
The array that we will fill will be the destination array that we have created above
Define the following tags for instruction start row one
Start, column one and row two and column two
Input zero. This will fill the elements in our array with the value of zero
When switch four is energized, the array will be filled with the input value based on the starting and ending locations we specified
In our example, we have zeroed the destination array that we copied from. The previous example
Productivity shift, rotate array S R A
This instruction will concurrently shift or rotate values in array. We have created a one dimensional array called S F T array
This array is an integer, 16 bit unsigned one D array
We have 128 columns or elements to shift or rotate
The first few elements of the array are set to 1, 1, 2
2, 3, 3, 44, etc
The structure name will be STR array and the one dimensional will be S T F array
select the rotate array elements left and ensure that the one shot is selected
This means that the instruction will execute only on the transition from off to on
Switch five will execute the shift, rotate array instruction on the leading Edge one shot
We are rotating the elements left. So the elements all get shifted and the element in the first element gets moved or rotated to the
last element
If we change the column elements to eight and rotate, you can see this in operation
If you enjoyed this video, please hit the like button below. If you have any questions about the video
please give a comment. Below and I'll do her best to answer it if you want more information about us or you want it for
E books on numbering systems are robust data locking. Please click on the link in description below to get it
A new video has put every Monday. So make sure you hit the subscribe button. So you have more videos like this in the future
Remember to click the bell beside your subscription to actually receive those notifications
Thanks so much for watching. I'll see you next time
Stay safe