Siemens SIMOTION Function Manual page 53

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

Advertisement

System functions
As of SIMOTION Kernel version V4.4, the following functions should be used in new projects:
● _getPnIpConfig (as of Kernel V4.4)
● _setPnIpConfig (as of Kernel V4.4)
Up to SIMOTION Kernel version V4.3, the following functions should be used:
● _getIpConfig
● _setIpConfig
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).
Note
The factory settings of the IP configurations (e.g. default IP address) vary from one
SIMOTION device to the next. Please check the relevant value in the Commissioning and
Hardware Installation Manual or in the Operating Instructions of the respective SIMOTION
device.
Examples
The following examples demonstrate the setting of an IP address.
Example with _getPnIpConfig and _setPnIpConfig (as of V4.4, asynchronous call)
// Program bgr assigned to the BackgroundTask
INTERFACE
Basic Functions for Modular Machines
Function Manual, 04/2014
You can use this function to determine the IP configuration of an Ethernet interface which
you can specify via the logical diagnostics address of the port.
You can use this function to set the IP configuration of an Ethernet interface which you can
specify via the logical diagnostics address of the port.
You can use this function to determine the IP configuration of an Ethernet interface; you
can specify the interface by inputting the corresponding enumeration value (IE_01, IE_02).
You can use this function to set the IP configuration of an Ethernet interface; you can specify
the interface by inputting the corresponding enumeration value (IE_01, IE_02).
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 := 16380;
X130_PORT_1_LOG_ADDRESS
END_VAR
TYPE
pnIpConfigStruct
result_getIpConfig : StructRetPnIpConfig;
Setting the communication addresses via the user program
: DINT := 16377;
: DINT := 16376;
: DINT := 16375;
: DINT := 16373;
: DINT := 16379;
: STRUCT
4.4 Setting the IP address (on Ethernet)
53

Advertisement

Table of Contents
loading

Table of Contents