Home
Product Catalog
News
Contact Us

News 

News

How to set IP address of NTP server through user program in s7-1500 CPU?

Publish Date 2020-12-05
How to set IP address of NTP server through user program in s7-1500 CPU?“T_ The "config" instruction is used for program control configuration of s7-1500 CPU integrated PROFINET interface or CP / cm interface.

Use "t"_ The "config" command can change the Ethernet address and PROFINET device name from the user program.



Using s7-1500 CPU v1.8 and higher, and step 7 V13 Sp1 upd4 and later, you can use "t" in the user program_ The "config" command changes the IP address of the NTP server for the daily synchronization time.



Previously valid configuration data will be overridden.



You can use "t"_ The "config" command makes the following changes:



IP protocol settings

IP address

Subnet mask

Router address

PROFINET settings

PROFINET device name assignment

Clock synchronization settings

Assign IP addresses to clock synchronized NTP servers (s7-1500 only)

The corresponding configuration options can be found under IP protocol and PROFINET in the Ethernet address dialog box, or NTP mode in the clock synchronization dialog box. This is displayed in devices & Networks under PROFINET interface properties in device view and network view.



Necessary conditions for changing IP address of NTP server

To use "t"_ The "configure" command must be specified in the hardware configuration to assign IP address parameters and device names through user programs.



To do this, you need to open the properties of the PROFINET interface in the device view. In order to pass the "t"_ To change the IP address of the NTP server, you need to activate the option "start synchronization time through NTP server" in the "clock synchronization" dialog box, and then you need to specify the IP address at the NTP server.

Configuration data must be stored in the system data type and in the "conf"_ Data "parameter. In system data type if_ CONF_ NTP stores the IP address of NTP clock synchronization.

“T_ Input parameters of "config" command

Table 01 shows "t"_ Input parameters of the "config" command.




parameter

data type

describe

Req bool when req = 1, the instruction is called and starts running.

INTERFACE HW_ Interface hardware identification

The hardware identification is displayed in the interface properties in the device view and in the system constants of PLC variables.

CONF_ The pointer to the data variant advanced structure contains the system data type if_ CONF_ HEADER, IF_ CONF_ V4 and if_ CONF_ NOS (see conf_ Data parameter).

Table 01






Home  |  Product Catalog  |  News  |  Contact Us  |  Sitemap  |  Mobile Version
  简体版     繁體版     English

Powered by DIYTrade.com  Build your FREE website !