The C Series module interface is part of a technology called the NI Scan Engine that was introduced with LabVIEW Real-Time 8.6 and CompactRIO. This component is responsible for synchronizing I/O data for the C Series modules, such that the I/O updates of the EtherCAT RIO seamlessly match the master’s cycle time.
The cycle time for the deterministic network consists of the total time for the master controller’s Program Scan and I/O Scan. The Program Scan includes the time for the LabVIEW program to process (both time-critical and normal tasks), any routine housekeeping and packet transfers with DMA and memory tables. The I/O Scan involves the time needed for the EtherCAT packet to pass through the entire slave network, downstream and back upstream.
Figure 3. Timing Diagram for Master and Slave Cycle Time
The cycle time for the EtherCAT RIO slave device consists of the total time for the Slave Update and I/O Scan. The Slave Update is the time the slave uses for DMA transfers, processing data, and updating its I/O. Since the I/O Scan is synchronized for the master and slave, the Slave Update runs at the same time as the master’s Program Scan. Therefore, the minimum cycle time is limited by either the Slave Update or Program Scan, depending on which takes longer.
||= Program Scan (memory transfer and data processing) + I/O Scan (data transfer)
|= Slave Update (data updating and processing) + I/O Scan (data transfer)
The Program Scan time may increase with the number of slaves on the network, because the master controller has more data to process. However, the Slave Update time does not increase, because slaves update their I/O at the same time in parallel. Therefore, the more slaves that are on the network, the more likely the master Program Scan becomes the bottleneck. If your application involves high I/O channel count, consider using a high-performance processor for the master. For a detailed look at the effects of different controllers on the Program Scan rates, see the Benchmarks for the NI 9144 EtherCAT Slave Chassis white paper.
The EtherCAT RIO expansion chassis has the advantage of not only module-to-module synchronization, but also slave-to-slave synchronization. The master controller does this by synchronizing all slave devices with the same time using distributed clocks. As soon as the I/O Scan is complete and the EtherCAT packet has been transferred, the EtherCAT IP fires the Sync0 signal to notify the slave that new data is available.
Figure 4. Timing Diagram for Slave Updates
The master controller also uses Sync0 to line up “Virtual Points,” exact points in time for all the slave chassis to update their I/O. Because the NI Scan Engine applies to single-point data, the Output Virtual Point is optimized to get the fastest update for output modules, and the Input Virtual Point is optimized to provide the most recent sample from input modules. With this paradigm in place, very low jitter occurs between the updates for any individual channel, which is ideal for control applications. For modules with multiplexed I/O, the inputs have a consistent amount of delay each cycle, such that the channel 0 read always has the same delta from the next channel 0 read. Additionally, simultaneous sampling modules have I/O channel updates at the exact same time for all identical modules used, and the phase offset is minimal even if using different modules. Assuming that each slave samples at the same two Virtual Points during the Slave Update, the outputs and inputs for all EtherCAT RIO slaves on the network have synchronized start times.
Browse EtherCAT RIO products
See applications, technical resources, and more for EtherCAT RIO