2. 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
3. Endigit
• Founded in 2011
• National Instruments Silver Alliance Partner
• 5 Certified LabVIEW Architects
• 1 Certified LabVIEW Embedded Developer
• 2 National Instruments Certified Professional Instructors
4. 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
5. Products
IP 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
6. 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
7. 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)
8. 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/
9. 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
11. 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
12. 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)