Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2167

Updating digital channel with task running

$
0
0

Hi all,

 

I am trying to control a system digitally through PXIe-6368. This is done by writing digital control bits to digital port. The digital control bits need to be periodically re-calculated with DAQmx program. Thus, the control bits change with time, and have to be updated. To write these updated values to the digital port, I have to first stop the digital output task. Therefore, the system is in an undefined state between digital updates. Is it possible to update the values without stopping the task?

Importantly, the control bits are clocked at 600 kHz.

In essence this is a digital feedback system, but every time I change the digital control, the system has to be put in undefined state.

 

Pseudocode:

while ( run control):
        calculate_control_bits();
        DAQmxStopTask( taskHandleDigO)  #would like to remove this
        DAQmxWriteDigitalU32( taskHandleDigO, dataAllChans.size,
                            0, 10.0, DAQmx_Val_GroupByChannel,
                            dataAllChans, byref(wrtRstSrlO), None)
        print("B")
        DAQmxStartTask( taskHandleDigO) #would like to remove this

Viewing all articles
Browse latest Browse all 2167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>