10.17 ADVANCED DATA HANDLING
10.17.1 Multiple Data Value Functions
We can also deal with large `chunks' of memory at once. These will not be covered, but are available in texts. Some functions include,
These functions are similar to single value functions, but they also include some matrix operations. For a PLC-5 a matrix, or block of memory is also known as an array.
FAL(control,length,mode,destination,expression) - will perform basic math operations to multiple values.
These functions are done on a PLC-5 using file commands. Typical operations include
Examples of these functions are shown below.
a useful function not implemented on PLC-5 processors is a memory exchange.
10.17.2 Block Transfer Functions
Certain PLC cards only have a single address (eg. O:001 or I:001) but multiple data values need to be read or written to it. To do this the block transfer functions are used.
These will be used in the labs for analog input/output cards.
These functions will take more than a single scan, and so once activated they will require a delay until they finish.
To use the write functions we set up a block of memory, the function shows this starting at N9:0, and it is 10 words long (this is determined by the special purpose card). The block transfer function also needs a control block of memory, this is BT10:1
To read values we use a similar method. In the example below 9 values will be read from the card and be placed in memory locations from N9:4 to N9:11.