LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to set analog output channel of usb-6218 to HiZ

I'm generating an arbitrary waveform on one of the output channels of the NI USB-6218 device. When the generation is done I would like to set the channel impedance to a HiZ state.
 
This is the code i'm trying to use:
            float64 resistancevariable;
            DAQmxSetChanAttribute (*pTaskHandle, "", DAQmx_AO_IdleOutputBehavior, DAQmx_Val_HighImpedance);
            DAQmxGetChanAttribute (*pTaskHandle, "", DAQmx_AO_IdleOutputBehavior, &resistancevariable,0);
 
I'm trying to see with the "DAQmxGetChanAttribute" -command to see what that high impedant value is (with the variable  "resistancevariable") but it doesn't work.
Even with the command line:
         DAQmxSetChanAttribute (*pTaskHandle, "", DAQmx_AO_OutputImpedance, 50.0)
I cannot change the value into the variable "resistancevariable".
 
Why does it not work and what can I do about it?
 
p.s. The command DAQmxSetChanAttribute (*pTaskHandle, "", DAQmx_AO_IdleOutputBehavior, DAQmx_Val_ZeroVolts) DOES work, but for HiZ it doesnt?
0 Kudos
Message 1 of 4
(3,536 Views)
Hi,

I found this post on the forum that handles sort of the same problem you have. But in short it's not really possible to change the output impedance of
an Analog output in software. You will have to use a relay for that and control it with a digital output. Only digital outputs can be set to high impedance or tristate as it is called.

Just take a look at this post and see if it explains enough, keep me informed when you have enough information please.

http://forums.ni.com/ni/board/message?board.id=250&message.id=29429&requireLogin=False
Kind Regards,

Joris Donders
National Instruments
EMEIA GTM Lead for Semiconductor
www.ni.com/semiconductor
0 Kudos
Message 2 of 4
(3,497 Views)

Joris,

the relay idea you had in mind already crossed my mind too. I just hoped there would have been an easier way to set the analog output at HiZ.

Thanks anyway for the confirmation!

Jürgen

 

0 Kudos
Message 3 of 4
(3,491 Views)
Hi,

well i know you would like to have had an easier solution 🙂 thats why i took me sometime to reply. I wanted to make sure that there was no other solution. I concider this problem solved and am going to close the service request in our database.

Good luck with your CVI program and your USB 6218.

Kind Regards,

Joris Donders
National Instruments
EMEIA GTM Lead for Semiconductor
www.ni.com/semiconductor
0 Kudos
Message 4 of 4
(3,488 Views)