Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-6552 for I2C using WriteNamedWaveformWDT checking Data States L_H, C++

Hi All,

 

I am using a PXI-6552 in C++ to write an I2C master. Using multiple C examples from HSDIO folder, I have been able to successfully address my I2C Device and can see the device sending an ACK on an o-scope.

 

I wrote a simple waveform that sends the Memory Slave Device Address to the DUT using 'niHSDIO_WriteNamedWaveformWDT'. I also set the supported data states to use 'NIHSDIO_VAL_STATES_0_1_Z_L_H_X'. In the waveform where I expect the ACK, I am checking for 'L', and I have checkErr for the Write waveform, but it is completing without error, even if I check for an 'H' or remove the DUT, so as far as I can tell the function 'niHSDIO_WriteNamedWaveformWDT' does not handle the error. So where does that PASS/FAIL actually get stored, or am I even actually checking the data state?

0 Kudos
Message 1 of 2
(611 Views)

You have to read back the hardware compare sample errors and match the sample number with the waveform you generated.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 2
(585 Views)