Time Setting Function (Sntp) - Mitsubishi Electric MELSEC Q Series User Manual

Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

12.1.3

Time setting function (SNTP)

By using VxWorks standard API function in the user program, the time information can be obtained from the time
information server (SNTP server) connected on the LAN.
(1) Considerations
(a) VN (Version Number) in the SNTP request
For Q24DHCCPU-V/-VG that comes first five digits "17091" or lower of serial No., the VN (Version Number) in
the SNTP request is Version 1.
For Q24DHCCPU-V/-VG that comes first five digits "17092" or higher of serial No., the VN (Version Number) in
the SNTP request can be changed to Version 1 (default setting) or Version 4.
For changing the VN (Version Number), use the following functions in Setting/monitoring tools for the C
Controller module.
Project view  "Parameter"  "CCPU Parameter"  <<I/O assignment settings>>  "Switch
Settings"
If the settings of the user Ethernet port are changed, the settings of the system Ethernet port will also be
changed. (Page 202, Section 12.2.1)
Set the b2 of the "Switch3" in the slot connected with the C Controller module to "ON". (Doing this to the other
CPU slots, the setting is ignored.)
b15
b14
• When the b2 is ON
Set the VN (Version Number) in the request to Version 4 and then send to the SNTP server. If the
destination SNTP server is not compatible with the Version 4, it will fail in time inquiry.
• When the b2 is OFF
Set the VN (Version Number) in the request to Version 1 and then send to the SNTP server.
Start the SNTP daemon by using the following procedure to obtain the time information from the SNTP server that uses the
user Ethernet port (CH1, CH2). Change the local time using the user program as per the requirement since OS time is UTC
(Coordinated Universal Time).
For details, refer to the manual of Wind River.
● SNTP daemon startup procedure
• ipcom_sysvar_set("ipsntp.client.primary.addr","primary SNTP server address",1);
• ipcom_sysvar_set("ipsntp.client.backup.addr","backup SNTP server address",1);
• ipcom_ipd_start("ipsntp");
b13
b12
b11
b10
b9
b8
CHAPTER 12 FUNCTIONS ACCESSED VIA ETHERNET PORTS
Q24DHC-LS
Q24DHC-V
Q24DHC-VG
b7
b6
b5
b4
b3
b2
ON
Q26DHC-LS
Q12DC-V
b1
b0
199
12

Advertisement

Table of Contents
loading

Table of Contents