16.4.3 FC/SFC 194 - DP_EXCH - Data exchange with CP342S
With the FC/SFC 194 you can exchange data between your CPU and a PROFIBUS DP
master, which is connected via SPEED-Bus. Normally each PROFIBUS DP master
embeds its I/O area into the peripheral area of the CPU. Here you can address a
periphery range of 0 ... 2047 via the hardware configuration. Since this limits the max-
imum number of PROFIBUS DP master modules at the SPEED-Bus, there is the possi-
bility to deactivate the mapping at the appropriate DP master and to activate instead the
access via handling blocks. Here you can write data from the CPU in a defined area of
the DP master and read data from a defined area of the DP master.
Parameters
Parameter Declaration Data type Functionality depending on MODE
LADR IN WORD Base address of the DP master module on the SPEED-Bus
MODE IN WORD Modus (0 = read / 1 = write)
LEN IN WORD Length of the data area in the DP master
OFFSET IN DWORD Begin of the data area in the DP master
RETVAL OUT WORD Return value (0 = OK)
DATA IN OUT ANY Pointer to the data area of the CPU
Logical base address of the module.
Den FC/SFC 194 may be called with the following modes:
n 0000 = Transfer data from the DP master to the CPU.
n 0001 = Transfer data from the CPU to the DP master.
Here the length of the data area in the DP master is defined.
Here the beginning of the data area in the DP master is defined. Please consider that the
area defined via OFFSET and LEN does not exceed the area defined of the DP master
by the hardware configuration.
In addition to the module-specific error codes listed here, as return value there are also
general error codes possible for FC/SFCs .
Ä
Chap. 4.2 ‘General and Specific Error Infor-
mation RET_VAL’ page 66
RETVAL Description
0000h No error
8001h LADR could not be assigned to a DP master at the SPEED-Bus.
8002h The value of the parameter MODE is out of range.
8003h The value of the parameter LEN is 0.
8004h The value of the parameter LEN is greater than the data area defined at DATA.
8005h The area defined by OFFSET and LEN is out of the range 0 …2047.
Description
LADR
MODE
LEN
OFFSET
RETVAL (Return value)
VIPA SPEED7
System Blocks
System Functions > FC/SFC 194 - DP_EXCH - Data exchange with CP342S
HB00 | OPL_SP7 | Operation list | en | 18-30 926