page 78
6.10.Functions for CANopen I/O modules from
ifm electronic
A control solution for an application very often consists of a
central plc and one or several decentralised input/output
modules. In such applications the central plc is at the same time
the network master (see section 6.9). To enable the user a
simple design of such applications the functions described
below can be used.
If the user wants to use the complete CANopen
functionality he will have to refer to the functions described
in the chapters before in which case the functions
described below become obsolete.
COP_MSTR_BOOTUP and COP_MSTR_MAIN were
intentionally written in the language ST. So they can be
extended or modified, if this is desired (source code
NMT_MSTR.PRO).
The other functions are specially used for the configuration and
evaluation of the I/O modules from ifm electronic. With the
function SLAVE_8_CONFIG the programmer can directly set
the node configuration of the inputs and outputs via the
application software or read it from a selected node.
With the function SLAVE_8_WORK the input and output data
(digital and analog) are exchanged (read and write) by means of
the cyclical call via a defined flag area. These flag addresses
enable a direct access to the process data in the application.
The flag addresses are organized as follows:
Address Bit address Meaning
%MW1010 1st slave, 1st connection, analog I/O data
%MX1010.0 1st slave, 1st connection, digital I/O data
%MW1011 1st slave, 2nd connection, analog I/O data
%MX1011.0 1st slave, 2nd connection, digital I/O data
%MW1012 1st slave, 3rd connection, analog I/O data
%MX1012.0 1st slave, 3rd connection, digital I/O data
: : :
%MW1017 1st slave, 8th connection, analog I/O data
%MX1017.0 1st slave, 8th connection, digital I/O data
%MW1020 2nd slave, 1st connection, analog I/O data
%MX1020.0 2nd slave, 1st connection, digital I/O data
%MW1021 2nd slave, 2nd connection, analog I/O data
%MX1021.0 2nd slave, 2nd connection, digital I/O data
: : :
%MW1327 32nd slave, 8th connection, analog I/O data
%MX1327.0 32nd slave, 8th connection, digital I/O data