LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need clarification of tasks vs global virtual channels

Have been working in LV for a number of years and I do know some of the details of when to use one or the other but am having to update a pretty old system to new computer / new LV version and instead of just copying over the MAX config info, want to examine the configuration to see if I can make it any more efficient.

 

To that end, can someone point me to a good resource explaining in detail the purpose, likenesses and differences between a DAQmx Task and a DAQmx Virtual Channel ?  when you should one over the other ?   when you should not use one for something ?

 

Did some searching but I guess not in the correct place as I came up kinda empty.

 

Thanks.....

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 1 of 7
(4,776 Views)

Hey dacad,

I found some resources on the difference between the two. DAQmx Task and Virtual Channel.

A task is a collection of Virtual channels according to the Task resource. 

"

A NI-DAQmx task is a collection of virtual channels, timing and triggering information, and other properties regarding the acquisition or generation.

Each NI-DAQmx task can only include channels of the same type.

" - from the DAQmx Task link

I hope this helps

Paolo F.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 7
(4,747 Views)

The short answer is that you require both, as a Task is a collection of Virtual channels.

One benefit of this arrangement is that you can create the task by the logical group, as inputsignals, and gather up several inputs regardless of where they're phycially connected.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 7
(4,731 Views)

@Yamaeda wrote:

The short answer is that you require both, as a Task is a collection of Virtual channels.

One benefit of this arrangement is that you can create the task by the logical group, as inputsignals, and gather up several inputs regardless of where they're phycially connected.

/Y


That would mean the inputs can be from multiple DAQ's ?

So that would consolidate some qty of like-formated signals for simplifying the transfer.  Any other benefits ?  Other than that, I'm not seeing anything but then I don't do a lot of massive signal collecting either.

 

For a couple of legacy projects I inherited, there were a couple tasks that included just 2 or 3 channels but they had to be split back out into the individual signals as needed in the code for each one respectively so really didn't accomplish much there.

 

I had never put a lot of thought into it before but am trying to get better educated.  Company is being cheap about letting me get some training

 

Thanks

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 4 of 7
(4,728 Views)

Yes it can be multiple DAQs and you can also combine different kind of input signals. This example that ships with LabVIEW shows that.

 

C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\DAQmx\Synchronization\Analog Input - Voltage and Thermocouple in a Single Task.vi

 

 


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 5 of 7
(4,720 Views)

@dacad wrote:

@Yamaeda wrote:

The short answer is that you require both, as a Task is a collection of Virtual channels.

One benefit of this arrangement is that you can create the task by the logical group, as inputsignals, and gather up several inputs regardless of where they're phycially connected.

/Y


That would mean the inputs can be from multiple DAQ's ?

So that would consolidate some qty of like-formated signals for simplifying the transfer.  Any other benefits ?  Other than that, I'm not seeing anything but then I don't do a lot of massive signal collecting either.

 

For a couple of legacy projects I inherited, there were a couple tasks that included just 2 or 3 channels but they had to be split back out into the individual signals as needed in the code for each one respectively so really didn't accomplish much there.

 

I had never put a lot of thought into it before but am trying to get better educated.  Company is being cheap about letting me get some training

 

Thanks


Yes, as already mentioned they can be from different daqs. When you read signal, you can choose if you want to read out one or several signals, and if you want them as array(s) or an array of waveforms. Another feature is that you can add or remove virtual channels to/from a task dynamically. A typical use case could be to sample 10 sensors at 1kHz, analyze the array 10 times/sec, loop through the 10 waveforms' 100 last samples and see if some requirement is met to proceed/stop.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(4,705 Views)
. When you read signal, you can choose if you want to read out one or several signals,

/Y



This in particular is something I had thought was a limitation. I thought you could only read all the signals and have to sort them out through the code by indexing the array of signals.  What other method is there??

 

?????

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 7 of 7
(4,684 Views)