Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5361

SSI RS422: read finite digital samples off of rising edge for digital pulses

$
0
0

I have to read data from an instrument that uses SSI RS422 communication. I must pulse the clock line N finite number of pulses (at any update rate) and on the rising edge of each pulse take a digital sample eventually compressing into a N size word. Pulsing is fine but I can't get my timing right for the read. Is there a way to trigger off the rising edge of that pulse? I have verified I do get reasonable data via a logic analyzer on an oscilliscope, so it's defintely my read approach.

 

I am using a PXI-6289 and pulsing via ctr 0 out. 

 

Here is my configuration for the task

 

DAQmxErrChk (DAQmxCreateTask("",&readTaskHandle));
DAQmxErrChk (DAQmxCreateDIChan(readTaskHandle, "/PXI1Slot15/port0/line0", "", DAQmx_Val_ChanPerLine));
DAQmxErrChk (DAQmxSetTimingAttribute (readTaskHandle, DAQmx_SampClk_Rate, freq));

 

 

Here is the timer callback

DAQmxStartTask(taskHandle);
DAQmxStartTask(readTaskHandle);
DAQmxReadDigitalU32 (readTaskHandle, DAQmx_Val_Auto, 10.0,
		DAQmx_Val_GroupByChannel, data, num_samps, &samps_per_chan, 0);
DAQmxWaitUntilTaskDone (taskHandle, 0.001);
DAQmxStopTask(taskHandle);
DAQmxStopTask(readTaskHandle);

 


Viewing all articles
Browse latest Browse all 5361

Trending Articles



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