Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Read ADC value (DDK function 480) modal errors

Hi,

 

based on documentation provided, I created Linux library for NI motion controllers. I am having troubles reading ADC values. Documentation says it is function 480, which should return 2 bytes containing ADC value. However, I got the following from the logs:

 

wrote 0351 (849)
mcs 001e csr 0000
wrote 01e0 (480)
mcs 001e csr 0008
wrote ff0a (65290)
mcs 001e csr 0008
wait ends csr 0041                                         

 

where wrote is printed when library is writing to memory mapped PCI registers, mcs and csr are MCS and CSR values. The error reported by function 2 is 81, which I cannot find in documentation. Other reading function works fine (read of current axis position,..).

 

There is how the error is read out:

 

wrote 0300 (768)
mcs 001e csr 0040
wrote 0002 (2)
mcs 001e csr 0048
wrote ff0a (65290)
mcs 001e csr 0048
wait ends csr 0003                                         
reading error
readData 0500 (1280)
readData 0002 (2)
readData 01e0 (480)
readData 0051 (81)
readData 0094 (148)

I suspect that 480 is not the correct code for flex_read_adc16_rtn function. Can somebody at least confirm 480 is the function, or explain what does error 81 (-70081) means?

 

Thanks in advance

 

Petr Kubánek

Institute of Physics, Czech Republic

0 Kudos
Message 1 of 1
(5,893 Views)