Operating hardware
4.3 IO routing
CP 1604 / CP 1616
70
Operating Instructions, 02/2017, C70000-G8976-C218-08
The same CP is also configured as an IO device of an IO controller for the control level. This
IO device is assigned transfer modules in the configuration that represent the routed data.
Note
The program for this IO device on the PC station can be any IO device user program. It must
simply run through the full initialization phase according to the IO Base user program.
Note
You do not need to worry about the transfer modules in your C user program because they
are managed by the system itself.
Sample C programs for an IO device user program ("dev_easy") are available on the
SIMATIC NET software product CD.
Data exchange
The data exchange between the input and output data of the IO controller for the process
level and input and output data of the IO controller for the control level is established
automatically by the IO router.
Input data is transferred only module-oriented.
If you also use the function for writing outputs bit-oriented, the data from the process
controller user program is "mixed" with the data of the IO controller for the control level
according to the configuration; see Section "Examples of reading and writing (Page 70)".
Note on the IO Base user programming interface
To support IO router functions, there are also two diagnostics services available
(PNIO_CTRL_DIAG_CONFIG_IOROUTER_PRESENT,
PNIO_CTRL_DIAG_CONFIG_OUTPUT_SLICE_LIST). Using these services, all output areas
that can be written by the process controller user program can be identified.
These functions are only available for the process controller.
4.3.4
Examples of reading and writing
Introduction
A PC station contains an IO controller user program known as the IO controller for the
process level that controls its IO devices via a CP 1616/CP 1604.
Outside the PC station, there is an external IO controller known as the IO controller for the
control level that can write and read input/output bits of the IO controller for the process level
via the IO router.
Process data is exchanged using the IO router functions.