Configuring CompactRIO to Synchronize Clocks with NTP Servers
-
Upload
bryan-heslop -
Category
Engineering
-
view
430 -
download
20
Transcript of Configuring CompactRIO to Synchronize Clocks with NTP Servers
Configuring CompactRIO to Synchronize Clocks
with NTP ServersBryan Heslop
Business Development ManagerSystems Engineer
Endigit
Agenda• Introduction to Endigit• What is NTP?• Easy cRIO NTP Config – Internet connection required• Less easy cRO NTP Config – No Internet on cRIO• Looking at NTP time information• Checking NTP time settings in LabVIEW
Endigit• Founded in 2011• National Instruments Silver Alliance Partner• 5 Certified LabVIEW Architects• 1 Certified LabVIEW Embedded Developer• 2 National Instruments Certified Professional Instructors
What Endigit offers
Services• LabVIEW Development• Data Acquisition Systems• Automated Test Consulting• Industrial and Embedded
Control• Vision Systems
Industries• Aerospace and Defense• Medical• Industrial Control• Consumer Electronics• Oil and Gas
ProductsIP Blaster is a utility for quickly and easily setting a static IP address on a Windows system.
Endigit BACnet LabVIEW API
SquareBattle is a game written in LabVIEW where you create your own team of squares to compete against other peoples teams in an arena.
Endigit EMC Test Suite
What is NTP?• NTP is a protocol designed to synchronize the clocks of computers
over a network to a common timebase (usually UTC).• There is a daemon that can run on Unix/Linux operating systems.
Image Source: https://www.endruntechnologies.com/pdf/NTP-Intro.pdf
Easy CompactRIO NTP Configuration• NI Real-time Linux CompactRIOs have configuration for the NTP
daemon installed.• cRIO-906x, cRIO-903x devices
• Connect cRIO to the Internet• Run command: opkg install ntp ntp-tickadj ntp-util ntpdate• Run opkg update
• Edit /etc/ntp.conf file• Enter command vi /etc/ntp.conf• Add IP address for desired time server (default config file has official ntp
servers already)
What if I can’t connect my cRIO to the Internet?• Download files from ni.com on PC and copy them over to cRIO• libevent• libperl• ntp• ntp-tickadj• ntp-utils• Perl• ntpdate
• http://download.ni.com/ni-linux-rt/feeds/2016/arm/ipk/cortexa9-vfpv3/• http://download.ni.com/ni-linux-rt/feeds/2016/x64/ipk/core2-64/
No Internet manual install• Manually install each package in correct order of dependencies• opkg install libevent• opkg install ntp-tickadj• opkg install ntp• opkg install libperl• opkg install perl• opkg install ntp-utils• opkg install ntpdate
Edit /etc/ntp.conf• vi /etc/ntp.conf• Add your server• Server <ipaddress>
NTP commands and information• /etc/init.d/ntpd• daemon that runs to sync with server• /etc/init.d/ntpd stop• /etc/init.d/ntpd start
• ntpdate -s <server>• Forces a synch to the server time
• ntpq -p• Gets list of peers and shows status
What does all that stuff mean?• remote and refid: remote NTP server, and its NTP server• st: stratum of server• t: type of server (local, unicast, multicast, or broadcast)• poll: how frequently to query server (in seconds)• when: how long since last poll (in seconds)• reach: octal bitmask of success or failure of last 8 queries (left-shifted);
• 377 = 11111111 = all recent queries were successful • 257 = 10101111 = 4 most recent were successful, 5 and 7 failed
• delay: network round trip time (in milliseconds)• offset: difference between local clock and remote clock (in milliseconds)• jitter: difference of successive time values from server (high jitter could be due to an
unstable clock or, more likely, poor network performance)
Can I get this information in LabVIEW?
Endigit contact information• Bryan Heslop – [email protected]• 801-787-3111• www.endigit.com• Blog.endigit.com