LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NIDAQmx I/O Controls functions

Hi,

I don't understand how the function NIDAQmx_GetDeviceCtrlAttribute() and NIDAQmx_SetDeviceCtrlAttribute() work with NIDAQmx_IOCtrl_Target attribute.

The help says it is the target name, so I think these two functions should simulate the selection of a board from the NIDAQmx Device Control (Custom Controls >> NI-DAQmx IO Controls >> Device) and should return the selected device.

But they don't work in this way.

  • The Get() function always returns an empty string (but a simple GetCtrlAttribute() returns the selected device)
  • The Set() function fails with "error -10006 Cannot read from target. Check target and connection."

See attached example that shows what I mean.

 

What does exactly mean the NIDAQmx_IOCtrl_Target attribute?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 2
(2,836 Views)

Dear all,

 

NIDAQmx_IOCtrl_Target is a sort of description field, set only with the proper NIDAQmx_SetDeviceCtrlAttribute(). Without setting manually this property, the value returned by NIDAQmx_GetDeviceCtrlAttribute() is always an empty string.

 

Regards,

Andrea R.

0 Kudos
Message 2 of 2
(2,777 Views)