LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx tristate digital lines

Solved!
Go to solution

I am using a PXIe-6509 and LabVIEW 2020 to output digital signals. According to the electrical tech who wired the machine, I need to turn OFF the digital output (DO) and then configure the line as a digital in (DI) to change the impedance so that the output does not "float". For those lines that need to be able to operate as DO and as DI, I need to know how to use tasks that accomplish the change from DO to DI. Also, I want to be able to "read" the value of each line to obtain the current state of the "output". Since the PXIe-6509 is capable of configuring each line, I would like to use a task for each tristateable line. I do not have very stringent timing requirements. I have some questions:

 

1) Do I need to maintain a set of tasks for each tristateable DO, or can I create a task on the fly change the line to DO, output the new value, change the task so that the line is DI (only if the new value is OFF), and then close the task?

 

2) Can I read the state of each "output" without caring whether it has been configured as DI or DO?

0 Kudos
Message 1 of 3
(1,061 Views)

It would sound to me that you are mixing up some terms here. If you have a bidirectional IO pin and switch it to be an input it IS going into high impedance mode and that IS usually called floating. Most circuitry contains some weak pull up or pull down resistor to make the pin not truely float but that is usually an impedance path of many kilo Ohms or more. So only good to avoid the signal to truly float, nothing more.

 

When you read back such a digital pin you either read the "high impedance default value" (what is caused by that pull up or pull down resistor) or the digital signal that is connected to the pin if there is one.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(1,026 Views)
Solution
Accepted by topic author Hamilton_Woods

I discovered that DAQmx has a channel node property for digital outputs called Tristate that allows the tristate mode to be changed between off and on (false and true). After the value of the Tristate property is changed, the change has to be committed using DAQmx Control Task.vi (on the DAQmx Task Config/Control tab). When Tristate is on, the output is high impedance. This gave me what I need.

0 Kudos
Message 3 of 3
(995 Views)