Programmable Logic Controllers
Pico Controllers
PicoGFX Memory Functions
Block Transfer for Pico GFX

Symbol in the function
block diagram
The data blocks are transferred from the source address specified at the I1 input to the destination address specified at the I2 input. You can start a transfer with or without an offset. The NO input is used to specify the size of the data block (number of elements) in bytes. A constant value at the inputs I1 or I2 is taken as the offset to the marker byte MB01. Example: A value 0 at input I1 means that the source data block for the transfer starts at MB01. A value “10” at I2 means that the destination data block for the transfer starts at MB11.
Transfer without offset
If you enter marker operands (MB.., MW.., MD.., 1MB..#, 1MW..#, 1MD..#) as parameters at the inputs I1 or I2, their absolute address is used. Entering I1=MB10, I2=MB90 and NO=4 will copy the content of marker bytes MB10 to MB14 to the range from MB90 to MB94. In this way it is also possible to copy a data block from the local marker range (MBxx) to a data block in the remote marker range (1MBxx#).
# Only with a Pico GFX device with an active COM connection
Transfer with offset
If you enter one of the operands listed below, such as a constant, a ..QV function block output or one of the analog inputs at inputs I1 or I2, its value is processed as an offset to marker MB01.
Parameter errors
Incorrect parameters are indicated whilst the program is running via the E1 - E3 error outputs. Parameter errors of this kind occur, for example, if the number of elements exceed the source or destination range, or when, due to an offset error, the source and destination range are outside of the available marker range.
Note: A transfer function block always copies or initializes marker bytes and never marker words or double words. This transfer behavior does not depend on the entries at I1 and I2 ( source address and destination address). The example below shows how to copy a marker double word, e.g. from MD 12 to MD 96.
Copy mode, mode = CPY
In Copy mode, the function block copies the complete data range of the size specified by NO from the source range to the destination range. You specify the start of the source range and the destination range via I1 (source address) and I2 (destination address).
Example 1 (Transfer without offset):
Copying a marker data block (4 bytes) with direct marker range definition
| I1 | MB 23 |
| I2 | MB30 |
| NO | NU 4 |
Example 2 (Transfer without offset):
Copying a marker data block (8 bytes) using marker double words with direct marker range definition.
| I1 | MB12 |
| I2 | MB89 |
| NO | NU 8 |
Example 3 (Transfer with offset):
Copying a marker data block (4 bytes) with a fixed offset definition for the marker ranges. The content of the marker bytes MB15 to MB18 are to be copied with a fixed offset of 64 bytes.
| I1 | MB15 |
| I2 | MB64 |
| NO | NU 4 |
Example 4 (Transfer with offset):
Copying a marker data block (2 bytes) with a variable offset definition for the marker ranges. The content of the marker bytes MB14 + MB15 are to be copied with a variable offset that is defined via the output QV of counter relay C3.
| I1 | MB14 |
| I2 | C 3 |
| NO | NU 2 |
Initialization mode, mode = INI
In Initialization mode, the function block transfers a byte value stored in the source address to a destination range. The destination range starts at the destination address.
Example 1 (Transfer without offset):
Initialization of a marker data block (4 bytes) with direct marker range definition. The content of the marker bytes MB27 to MB32 are to be overwritten with the content of MB23.
| I1 | MB 23 |
| I2 | MB27 |
| NO | NU 6 |
The Function Block and its Parameters
| Description | Note | |
|---|---|---|
| Function block inputs (DWord) | ||
| I1 | Source range | First marker address (MB, MW or MD) of the source range or offset to marker byte MB01 with the definition of one of the operands stated below. |
| I2 | Destination range | First marker address (MB, MW or MD) of the source range or offset to marker byte MB01 with the definition of one of the operands stated below. |
| NO | Number of elements to be initialized or copied. | INI mode: 1...+383 bytes CPY mode: 1...+192 bytes |
| Function block output | ||
| -- | -- | -- |
| Contact (bit output) | ||
| E1 | Error output Status 1 if the number of elements exceeds the source or destination range. | The range limits are checked regardless of the edge change at the EN Boolean input. No data blocks are initialized or copied in the event of an error. |
| E2 | Error output Status 1 if the source and destination range overlap. | The range limits are checked regardless of the edge change at the EN Boolean input. No data blocks are initialized or copied in the event of an error. |
| E3 | Error output Status 1 if source and destination range are outside of the available marker range (offset error). | The range limits are checked regardless of the edge change at the EN Boolean input. No data blocks are initialized or copied in the event of an error. |
| Coil function (bit input) | ||
| T_ | Trigger coil, Transfer of the source address specified at I1 to the destination address specified at input I2 on a rising edge. | |
| Operating mode | ||
| INI | Initialize | Initializes the destination range with a byte value that is stored at the source address. The length of the source range is fixed at one byte. Enter the length of the destination range at NO. |
| CPY | Copy | Copies a data block from a source to a destination range. Enter the size of the data block to be copied at NO. |
| Parameter set | ||
| Call enabled | Function block parameters can be viewed on the device. | |
| Simulation | ||
| Possible |
Memory Requirement
The Transfer function block requires 48 bytes of memory plus 4 bytes for each function block input that is configured with an NU constant.
