eBook: Integration and Automation of Manufacturing Systems
   



TOC PREV NEXT

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,

- move/copy memory blocks
- add/subtract/multiply/divide/and/or/eor/not/etc blocks of memory

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.

The basic functions are,

FAL(control,length,mode,destination,expression) - will perform basic math operations to multiple values.
FSC(control,length,mode,expression) - will do a comparison to multiple values
COP(start value,destination,length) - copies a block of values
FLL(value,destination,length) - copies a single value to a block of memory

These functions are done on a PLC-5 using file commands. Typical operations include

file to file - copy an array of memory from one location to another.
element to file - one value is copied to a block of memory
file to element - can convert between data types
file add - add arrays
file subtract - subtract arrays
file multiply - multiply arrays
file divide - divide an array by a value
convert to/from BCD
AND/OR/XOR/NOT - perform binary functions.

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.



TOC PREV NEXT

Search for More:

Custom Search