configuring compactrio to synchronize clocks with ntp servers
TRANSCRIPT
![Page 1: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/1.jpg)
Configuring CompactRIO to Synchronize Clocks
with NTP ServersBryan Heslop
Business Development ManagerSystems Engineer
Endigit
![Page 2: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/2.jpg)
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
![Page 3: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/3.jpg)
Endigit• Founded in 2011• National Instruments Silver Alliance Partner• 5 Certified LabVIEW Architects• 1 Certified LabVIEW Embedded Developer• 2 National Instruments Certified Professional Instructors
![Page 4: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/4.jpg)
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
![Page 5: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/5.jpg)
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
![Page 6: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/6.jpg)
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
![Page 7: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/7.jpg)
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)
![Page 8: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/8.jpg)
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/
![Page 9: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/9.jpg)
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
![Page 10: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/10.jpg)
Edit /etc/ntp.conf• vi /etc/ntp.conf• Add your server• Server <ipaddress>
![Page 11: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/11.jpg)
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
![Page 12: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/12.jpg)
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)
![Page 13: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/13.jpg)
Can I get this information in LabVIEW?
![Page 14: Configuring CompactRIO to Synchronize Clocks with NTP Servers](https://reader031.vdocuments.mx/reader031/viewer/2022020708/58ef353a1a28ab47118b45ab/html5/thumbnails/14.jpg)
Endigit contact information• Bryan Heslop – [email protected]• 801-787-3111• www.endigit.com• Blog.endigit.com