LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set voltage ranges individually for 4 DAQ channels

I’m new to LabVIEW, and I’m changing an old program that does a data acquisition involving multiple physical channels.  The channels appear on the block diagram as a single wire, and currently, the maximum and minimum voltage range is between +/- 10 V, the same for each channel.  However, we need one of these channels to have a separate voltage range from the others.  Specifically, the first three should have a voltage range between +/- 10 V, and the last should have a range between +/- 1.25 V.  The physical channels are already configured from another program, so I don’t want to change anything that will change these configurations.  The physical channels enter a “DAQmx Create Virtual Channel” VI, where the max and min values are set to 10 and -10.  The "Create Virtual Chanel" VI already has some type of I/O going into the "task in" port, so I'm not sure if I'm able to change the task going into the VI either.  The two ways I was thinking of changing the program are:

 

1) Split the channel into multiple wires so I can access each physical channel individually and set the voltage range for each channel separately, or

 

2) Keep the 4 channels in the same wire, but set the maximum and minimum voltages to different values for each channel as the wire enters the “Create Virtual Channel” VI,

 

but I’m not sure how to do either one of these.  Does anyone have any suggestions?

 

TL;DR: How do I set voltage ranges individually for 4 channels without changing any other configurations?

0 Kudos
Message 1 of 4
(2,526 Views)

Just a bit more information: First, (to my knowledge) the wire doesn't necessarily hold 4 channels.  It can hold up to 4 channels, and the number of channels being held is specified by the user in the Front Panel.  But I think it usually will hold 4 channels.

 

 

Second, I tried to split the channel into multiple wires using the "Split Signal" block, but when I attached the channel wire to the block, I received an error saying,

 

"You have connected two terminals of different types.  The type of the source is DAQmx Physical Channel.  The type of the sink is Dynamic Data."

 

Does anyone know of a way to use the "Split Signal" block or of any other way to split DAQ channels?

0 Kudos
Message 2 of 4
(2,489 Views)

This is usually set up at the beginning with DAQmx Create Channel.  For multiple channels you put a for loop around and feed it arrays of channel info.  If you want to change a property on the fly you can do that with a property node.

 

However it's hard to help based on your text.  Why not post your code and explain what you want different?

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 3 of 4
(2,481 Views)

Sorry the text was confusing.  Hopefully it'll make more sense when looking at the block diagram.  There are a few packages you need to download to get everything to show up properly, so I added a screenshot of the diagram too.

 

In the diagram, I tried using a case structure to control the voltage range based on which DAQ channel was present in the wire, but since the wire can contain multiple channels, I'm not sure if that would work.  The 1.25 and -1.25 shown on the diagram would be the range if the fourth channel were being used, and 10 and -10 would be the range if one of the other three channels were being used.

 

Let me know if you need me to explain anything else!

0 Kudos
Message 4 of 4
(2,446 Views)