Channel configuration by means of dpv1 services – BECKHOFF FM33xx User Manual

Page 29

Advertising
background image

I/O configuration

24

FM33xx


Channel configuration by means of DPV1 services

Channel configuration over
the fieldbus

The channels of the TC-Plug module can be activated or deactivated over
the fieldbus by means of the DPV1 Services. Once the configuration was
changed, the vendor settings can only be set back with the configuration
software KS2000. The module holds the new configuration settings after
TwinCAT restart and after the Power-Off of the TC-Plug module. You can
call the DPV1-Services from the PLC by means of the ADSWRITE function
block. The ADSWRITE function block can be found in the PLC library
PlcSystem.Lib. The Ads parameters have following values:

If you use CP5412A2 as master:
NETID = NetId of the TwinCAT System;
PORT = Port number from the TC-Plug -> Ads tab in the TwinCAT System
Manager;
IDXGRP = 0x0;
IDXOFFS = 0x1;
LEN = 1 until max. 16 Byte configuration data;
SRCADDR =Pointer to the data buffer with the configuration data;

If you use FC310x as Master:
NETID = NetId of the FC310x card in the TwinCAT System Manager;
PORT = 0x1000 + Station number of the TC-Plug module;
IDXGRP = 0x0;
IDXOFFS = 0x1;
LEN = 1 until max. 16 Byte configuration data;
SRCADDR =Address of the data buffer with the configuration data;

Maximal 4 channels can be switched on or off by the means of one byte in
the configuration data. Every channel uses 2 bits of configuration data
which tells if its activated or not. The channel is deactivated if one of the
two bits is 1 and activated if both bits are zero. The thermo outputs are set
to zero during the change of the TC-Plug configuration.

Example:
We want to change the configuration for the first 4 channels of the TC-Plug
module. From the PLC we write one byte of configuration data ( 10000001
binary ) to the TC-Plug module. After that the channels 1 and 4 are
deactivated and channels 2 and 3 are activated. The configuration of all
other channels stays unchanged.
Remark: channel no. 1 is the very first TC channel connected to Pin 1 .

Advertising