LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create multiple physical channels using DAQmx?

Hi, I am new to Labview.

Can anyone please help me on how to create multiple physical channels? I am following the LabVIEW examples in the NI example finder but they are only for acquiring signals from one channel.

Actually, I am using the channels of an SCXI 1520 to measure voltage signals. And one more thing, in the NI Example Finder, they are sample codes there for setting the filter in SCXI 114x.

Will this example work with an SCXI 1520, too?

Thanks!
0 Kudos
Message 1 of 9
(11,926 Views)
There are many ways to read multiple channels in LabVIEW. First, if you look at that example that lets you set the filter setting on the 114x and you click on the 'Physical Channel Listbox' then click 'Browse' you can see that you can select multiple channels. After you select the channels and hit 'Ok' it will build a multiple channel string. This is one way to read multiple channels.

Next, you can create a 'Task' in Measurement and Automation Explorer(MAX). When you create this task select all the channels that you need to read then back in LabVIEW simply select a 'DAQmx Task Name Constant' Select the task you just created and wire that to an Input of your first DAQ VI. If you do this you do not need to have a 'DAQmx Create Physical Channel' VI or create
Task because it is already created in MAX.

When looking at example VIs you can tell if a multi-channel read is acceptable by looking at the 'DAQmx Read' and if it says NChan that means it will do a multichannel read. There are tons of example programs that will display the multichannel read capabilities.


This example may not work for the 1520 because the properties that are set could possibly be specific to the 142x. When using the 1520 though it is very likely that the properties will be very similar if not exact. You will simply put a DAQmx Channel property node on your block diagram and then look for the Lowpass filter settings properties that will most likely be in the same location. Now another way todo this without using a property node would be in MAX when you create a task set the filter settings from the Device tab in the task configure window.

Let me know if you need anymore help with reguards to this issue! Have a great day!

Allan S.
National Instrument
s
Applications Engineering
0 Kudos
Message 2 of 9
(11,924 Views)
I have a similar problem.  I can create a task in MAX with all the channels I am (currently) interested, and set the aquisition rate that I (currently) need.  The problem is, down the road, I might just want to tweak the rate, or look at some new channel.  I'd just assume not have to go back into MAX and create a whole new task, or call up the DAQ Assistant (just because I want to change the aquisition rate from 1 kHz to 10 kHz for example).  When you have a bunch of channels, this can be very time consuming.  I've seen the Create Task vi, but it still seems like you have to input 1 physical channel or 1 task.  I've tried playing with the property node of the task too, but the option to Write (instead of Read) is greyed out. 

I have historically used NI Scope, which lets you pick a device and pick which channels you want, then I have complete control over vertical and horizontal values (basically, this is what I'm going for).  I've tried using NI-Scope for my current setup, but it has a problem recognizing my device (PXI-6133, which I've renamed in MAX as '2', so I should be able to specify DAQ::2 (?)).  Any suggestions?  Thanks a lot,

Laura

0 Kudos
Message 3 of 9
(11,393 Views)

Have you looked at any of the shipping examples for DAQmx? Most (if not all) have front panel controls for channels and sample rate. One of the simplest is Cont Acq&Graph Voltage-Int Clk.

Also, you can't use NI-Scope with anything other than NI's scope boards. The DAQ boards operate a bit differently.

Message 4 of 9
(11,388 Views)
Doh! That's exactly what I was using, but I didn't notice that you could select 'Browse' under the Physical Channel control, and then use the Ctrl button to select multiple channels.  Thanks.

Message Edited by l1k on 03-13-2007 11:06 AM

0 Kudos
Message 5 of 9
(11,381 Views)

Hi, I'm using the "Parallax Standard Servo Control DAQmx" example VI in order to control the position angle of a servo. I'm also using a DAQ 6009 to generate the pulse in the servo.

 

I have already created a task from the MAX which includes a digital channel at port 0 line 0.

 

The problem is that when I try to run the VI, an error comes because I'm not able to select any channel from the Physical Channel control. As soon as I select Browse there are no items in the list...

 

I tried to wire the DAQmx Global Channel I created to the Physical Channel terminal of the "Parallax Standard Servo DAQmx" node but they are incompatible.

 

I would like to know how I can create a physical channel correctly in order to try the servo.

 

Thanks in advance.

0 Kudos
Message 6 of 9
(10,255 Views)

That is not a standard example but I'm guessing that it uses a counter channel and of course your device does not have a counter. The digital I/O is strictly software timed so you may not be able to adequately control the servo.

0 Kudos
Message 7 of 9
(10,245 Views)

I think the example is a part of the robotics toolkit...

 

It doesn't include a counter. It says physical channel in the controller.

 

I attach the VI of this example. Maybe you can help me. Thanks

0 Kudos
Message 8 of 9
(10,235 Views)

When I right click on the physical channel control and look at I/O Name Filtering, it says Counter Output. I can also select physical channels because my DAQ device does have a counter. I don't have any of those subVIs but you can look at the block diagrams to review and see whether in fact they are using a DAQmx counter channel. If they are, you will have some work cut out for you since you do not have a counter. The 6009 can sort of generate a PWM signal with a static digital line if you are able to put up with considerable jitter.

0 Kudos
Message 9 of 9
(10,228 Views)