Siemens SIMOTION Function Manual page 48

Motion control basic functions for modular machines
Hide thumbs Also See for SIMOTION:
Table of Contents

Advertisement

Setting the communication addresses via the user program
4.3 Setting the device name (NameOfStation) of an IO device on PROFINET IO
● _getActiveNameOfStation
● _setNameOfStation
● _activateNameOfStation
The syntax of these system functions is described in detail in the "System Functions/Variables
Devices" List Manual (reference list) and in the online help (see index).
Examples
The following examples demonstrate the reading and setting of the device name.
Example with _getPnPortNeighbour, _getPnNameOfStation, _setPnNameOfStation (as of V4.4,
asynchronous call)
// Program bgrName is assigned to a cyclic task.
// (e.g. BackgroundTask)
INTERFACE
48
You can use this function to determine the active device name (NameOfStation) of a
PROFINET IO interface on the SIMOTION device.
If the PROFINET IO interface has not yet been assigned a device name (NameOfStation)
which is unique within the project, a character string containing the device type and the
MAC address hexadecimal numbers will be returned,
e.g. SIMOTION‑D‑08‑00‑06‑73‑6C‑E6.
As of SIMOTION Kernel version V4.4, the _getPnNameOfStation function should be used
in new projects:
You can use this function to set a new device name (NameOfStation) for a PROFINET IO
interface on the SIMOTION device.
As of SIMOTION Kernel version V4.4, the _setPnNameOfStation function should be used
in new projects:
You can use this function to activate the device name (NameOfStation) of a PROFINET IO
interface on the SIMOTION device.
As of SIMOTION Kernel version V4.4, this function is integrated in _setPnNameOfStation.
VAR_GLOBAL CONSTANT
// D4x5-2 diagnostics address X150 -----------
X150_INTERFACE_LOG_ADDRESS : DINT := 16378;
X150_PORT_1_LOG_ADDRESS
X150_PORT_2_LOG_ADDRESS
X150_PORT_3_LOG_ADDRESS
// D4x5-2 diagnostics address X127 -----------
X127_INTERFACE_LOG_ADDRESS : DINT := 16374;
X127_PORT_1_LOG_ADDRESS
// D4x5-2 diagnostics address X130 -----------
X130_INTERFACE_LOG_ADDRESS : DINT := 16389;
X130_PORT_1_LOG_ADDRESS
END_VAR
TYPE
bgrPortNeighbourStruct
ioId
logAddressPort
requestMode
commandId
nextCommand
startAgain
retPortNeighbour
: DINT := 16377;
: DINT := 16376;
: DINT := 16375;
: DINT := 16373;
: DINT := 16379;
: STRUCT
: EnumIoIdType;
: DINT;
: EnumReqSysFunctMode;
: commandIdType;
: enumNextCommandMode;
: BOOL;
: StructRetDeviceNameOfStation;
Basic Functions for Modular Machines
Function Manual, 04/2014

Advertisement

Table of Contents
loading

Table of Contents