LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital output at a different voltage?

Solved!
Go to solution

Dear all,

 

I finally finished my data acquistion program for the lab, which does multi-channel voltage AI acuisition along with timed digital outputs to control gas valves. My post-doc has asked for an additional feature, however, which is to be able to have analog output... Turns out what he really intends to do with the feature is to have digital outputs, but at a different voltage setting (he never intends on sending information more than high or low in a single experiment).

Now, the program is set up to execute digital output right now, it would be quite a bit of work to change it into an AO. Is it possible to simply change settings somewhere to have the highs of DO at a different voltage? I am hoping that this is the case since a 10 dollar Arduino board can do either 5V or 3.3V.  Our DAQ card is the NI PCIe-6353. I looked through the data sheet and didn't find anything.

 

Thanks.

 

p.s. I suggested using additional circuitry to adjust the voltages for a given experiment. The post-doc mentioned that it was possible but inconvinient. 😕

0 Kudos
Message 1 of 4
(5,587 Views)
Solution
Accepted by topic author RaymondLo

@RaymondLo wrote:

 

 

p.s. I suggested using additional circuitry to adjust the voltages for a given experiment. The post-doc mentioned that it was possible but inconvinient. 😕


 

Well, that's just too bad for the post-doc.  Perhaps he should give you better requirements next time 🙂

 

OK without being snarky, there isn't a way to change the digital output voltage.  When you are talking DIO cards the purpose really is to communicate just high or low and have a set voltage. The only other option would be to use the 4 AO ports on the card and programmatically treat them like DO.

Message 2 of 4
(5,575 Views)

Well, he did say that he wanted me to add AO way back when, but I guess I was surprised to find out what he really wants is scalable DO.

 

Right now, the DO is done with 1D Boolean Array 1Channel1Sample mode. When it's time to open up valve 1, for instance, I write TFFFFFFF to the DO channel and valve 1 is opened for as long as I don't write a false on DO1. Can I use the exact same logic with 1D Double Array 4Channel1Sample Analog Output? Then, it's a very easy change. All I need is to switch the bool array to a double array.

 

Here is what I have in mind. This the subVI that will do the [Boolean] to [Double] conversion for me.

 

DO to AO pic.png

Thanks.

 

 

0 Kudos
Message 3 of 4
(5,566 Views)

@RaymondLo wrote:

Well, he did say that he wanted me to add AO way back when, but I guess I was surprised to find out what he really wants is scalable DO.

 

Right now, the DO is done with 1D Boolean Array 1Channel1Sample mode. When it's time to open up valve 1, for instance, I write TFFFFFFF to the DO channel and valve 1 is opened for as long as I don't write a false on DO1. Can I use the exact same logic with 1D Double Array 4Channel1Sample Analog Output? Then, it's a very easy change. All I need is to switch the bool array to a double array.

 

Here is what I have in mind. This the subVI that will do the [Boolean] to [Double] conversion for me.

 

DO to AO pic.png

Thanks.

 

 


If it was me, I would use an action engine and some simple wrappers around it to make the code pretty (and more easily scalable later), but what you have shown there should work just fine.  You may want to add a coerce on the "High Voltage" input just to make sure you never send too high (or low) of a voltage out.

0 Kudos
Message 4 of 4
(5,550 Views)