MATLAB: Can I change settings in the xPC driver for the NI-PCI-6704 to modify the update time

Simulink Real-Time

I recently purchased an NI-PCI-6704 I/O board using the xPC Target Interactive Hardware Selection Guide. According to the D/A Latency value cited in the selection guide, the board should have a 5.8 microsecond latency associated with using one channel (5+0.8N is shown in the guide). After testing this board, I notice that even though values can be pulled from the board at quicker sample rates, the values are not refreshed quicker than every 1.8 milliseconds. When sampling quicker than 1.8 milliseconds, the values are pulled from a track-and-hold circuit, which essentially gives you the same values until the board is updated.
This phenomenon can been seen in the "undersamples.pdf" file attached. The first subplot shows the required supply voltage signal, and the actual voltage being supplied by the board. You can see from the figure that not only does the board not refresh for 0.0018 seconds, but when it does refresh, the value is not current. After further investigation, it seems that the supplied voltage lags the desired voltage by 0.0018 seconds, as shown in the "undersamples5.pdf" file. So, when the D/A board does refresh, it is refreshing with a 0.0018 second old signal value. Is there anything in the xPC driver for the board that would allow me to change the update time?

Best Answer

The NI-PCI-6704 is described in the NI literature as a 'Static update' analog output board. The board has a state machine that runs at the mentioned 1.8 millisecond rate. We have no way of changing that update rate. The latency time is just the software time needed to write the registers and move on to the next block in the model.