Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

TableShift

  • Last UpdatedJul 18, 2023
  • 1 minute read

Shifts table items in a table by a number of positions. You can shift the table left or right. Items shifted off the end of the table are lost. Items within a table that are not replaced by other items (that have moved) are set to 0.

Note: This function only supports arrays declared in Cicode and not variable tag arrays.

Syntax

TableShift(Table, Size, Count)

Table:

The table to shift, an array of real numbers. Must be a Real type variable.

Size:

The maximum number of items in the table.

Count:

The number of positions to shift the table items. A negative Count moves items to the right and a positive Count moves items to the left.

Return Value

0 (zero) if successful, otherwise an error code is returned.

TableMath, TableLookup

Example

REAL Levels[5]=10,15,50,100,200;

TableShift(Levels,5,2);

/* Shifts the table items by 2 positions to the left, that is

Levels[0]=50

Levels[1]=100

Levels[2]=200

Levels[3]=0

Levels[4]=0 */

See Also

Table (Array) Functions

In This Topic
TitleResults for “How to create a CRG?”Also Available in