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,..).