To download NI software, including the products shown below, visit ni.com/downloads.
It is a implementation of IRIG106 Chapter 10 UDP stream accordingly with the following documentation:
Ref1: IRIG 106-07 CHAPTER 10 PROGRAMMING HANDBOOK
Ref2: CHAPTER 10 Digital Recording Standard
Ref3: CHAPTER 11 Recorder Data Packet Format Standard
Overall Packet Structure (Ref3 page 10)
There are a variety of data types supported (check Ref3 page 14). In this sample project was implemented Analog Data Format 1 (packet header value = 0x21), segmented and non-segmented stream, and Time Data Format 1 (packet header value = 0x11).
Analog Packet Non Segmented Module
Dequeue data from the channel data fifo, encode and enqueue in the data packet queue.
Analog Packet Segmented Module
Dequeue data from the channel data fifo, segment, encode and enqueue in the data packet queue.
Time Packet Module
Dequeue timestamp value from its fifo, encode and enqueue in the time packet queue.
These packets require a Real Time Counter for the time packet and a Relative Time Counter (48bits 10MHz) for every packet header (check Ref3 page 17).
Relative Time Counter Module
Associate 2 cRIO counters for the 48Bits RelativeTC and allocate a 3rd counter as 1ms pulse generator exported to cRIO Trigger Line 5 to sample the 48Bits RelativeTC and the Real Time Counter. Enqueue RelativeTC values according with the packets time required.
Real Time Counter Module
Sample cRIO timestamp in FPGA (every cRIO Trigger Line 5 pulse) for minimum Jitter and enqueue in the RealTC fifo.
First packet to stream must be the Time Packet (Ref2 page31) and a minimum frequency of 1Hz. The udp time packet not necessarily every exactly 1Hz because UDP is not deterministic, but the Relative and Real TC values should be precise corresponding 1 second increments, for example the RelativeTC (48bits 10MHz) value: 0, 10000000, 20000000, 30000000, etc.
Thus, before stream all UDP packets a UDP sequencer was created to sequence all packets accordingly.
UDP Module
UDP sequencer engine prioritizes time packets and ensures that segmented packets are not interrupted by another packet.
UDP engine stream all packets thru UDP multicast mode.
Included in the Sample Project are:
OBS: notice that packets header nomenclature follows the Ref1 document.
Description-Separate-2
How-Separate-2
Additional-Separate-2
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.