LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple channel n-samples using daqexpress

Hello I am trying to acquire 5 channels of data using daqexpress. I tried setting up API but I cannot set the read node to collet n-channels with n-samples. If I set it up for floating point just get the last data point, I wasn’t really trying to run in a wave form but if I need to I will. Thank you in advance as of now i am just using a 9205 to acquire the data.

0 Kudos
Message 1 of 10
(2,128 Views)
  1. Do NOT use the Dreaded DAQ Assistant (or DDA, what I think you mean by "daqexpress").
  2. Read this:  https://www.ni.com/en/support/documentation/supplemental/06/learn-10-functions-in-ni-daqmx-and-handl...   Ignore the first section on the DDA.
  3. Take your 9205, plug it in to whatever it plugs into, connect it to your PC, and open MAX.  [You do know about MAX, don't you?  The Measurment and Automation eXplorer?].  Find your Device.  Open a Test Panel, configure 5 channels, set it up for Continuous Sampling and some sampling parameters (maybe 1000 samples at 1 kHz?).  Try it out.
  4. When you get settings that work for what you want to do, go ahead and create a Task (read "Learn 10 Functions", the early sections, again).
  5. Now create a 3-4 Function routine.  Start Task wired to DAQmx Read wired to Stop Task, with Error In and Error Out at the ends of the Error Line.  Create a Constant at the Task Input of the Start Task function.  Right-click the Task Constant, click the little Triangle, and select the Task you just created in MAX.  Connect the Task Out terminals to the next Task In Terminal.
  6. Put a While Loop around just the DAQmx Read function.  Use Shift Registers for the Task and Error wires.  Create a Stop Control and wire it to the While Stop terminal.
  7. Configure the DAQmx Read.  You should be able to select Analog Voltage Input, Multiple Channels, Multiple Samples, Array of Waveforms.
  8. Create Waveform Chart on Front Panel.  Put Chart Indicator on Block Diagram inside While Loop, wire to Data Out from DAQmx Read.  [If I get one of these steps wrong, read "Learn 10 Functions", the first few sections, again].
  9. Run the routine, watch the Chart.  Play with this until it works and you understand it.

Bob Schor

 

0 Kudos
Message 2 of 10
(2,081 Views)

@BOB, maybe the OP is genuinely trying to use DAQ Express 

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 3 of 10
(2,063 Views)

Oops!  I confess when I see the words "DAQ" and "Express" in proximity, I don't think about "DAQExpress" (which I've never used, I must confess, nor know much about), but of the Express VI called the "DAQ Assistant" (I tend to add the modifier "Dreaded" in front of the name).

 

My apologies for my rant.  However, you might find that it is almost as quick and easy to simply create the DAQmx Task you need (I didn't mention this, but I tend to create my Tasks in LabVIEW Project (open Project, right-click "My Computer", select "New", "NI-DAQmx Task", find your (connected) device, define Channels, sampling rate, etc.

 

One detail I forgot to mention in the simple "Acquire Data" 3 or 4 DAQmx Function routine -- you need to tell the Read how many Samples to take.  Depending on how you configure the Task, you may already have this number as a Property of the Task.  If you look at the Example "Voltage -- Continuous Input", you'll see that one way to do this is to use the DAQmx Timing function into which you wire the # of Samples, with a branch going to the # of Samples input on the DAQmx Read function inside the Acquire loop.  [Don't let this Example frighten you -- it has "all the Bells and Whistles" attached, most of which you won't use, and don't need to see at this point].

 

Bob Schor

Message 4 of 10
(2,040 Views)

Hello Bob,

 

I appreciate your reply's. I know what you mean about the DAQ assist. the person at working that is showing me how to program in labview has already reamed me for trying to use them. straight APIs are the way to go. 

 

The program i am making is for a "quick" Dev program in Daqexpress. Daqexpress allows you make your own labview VIs (minus the fancy stuff invoke nodes, event structures, property nodes to control front panel) and its nice for quick little Acquistions. I'm running into the issue that the program is not collecting the 50 samples I'm asking for. I get the last value. I'm guessing my issue is that the read node won't allow me to do n-samples. I can make it work collecting waveforms but i was trying to play games with the time. let me see if I can set this up another way. i might just set it up though the daqexpress front panel (which is basically DAQmx)

 

Thank you for the help Bob!

0 Kudos
Message 5 of 10
(2,024 Views)

Hi jcantu,

 


@jcantu wrote:

Daqexpress allows you make your own labview VIs (minus the fancy stuff invoke nodes, event structures, property nodes to control front panel) and its nice for quick little Acquistions. I'm running into the issue that the program is not collecting the 50 samples I'm asking for. I get the last value.


No, DAQExpress does not create "LabVIEW VIs" - instead it looks like the "end of life" (aka dead) LabVIEW-NXG variant, which is not compatible with (classic) LabVIEW…

 

When you want a "quick little acquisition" then you may use the testpanels within MAX. You can create DAQmx channels/task in MAX and you can use them later on in LabVIEW using the "straight" DAQmx API!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(2,006 Views)

Hi GerdW ,

 

My apologies Daqexpess does not make Labview VI's. It does however have while loops that act like Labview, a graphical representation that looks like Labview, and weirdly enough its made by the same people as Labview. i realize it's not the exact same thing but when you're just learning how to program it helps ease you into that very abstract world. Eventually i plan on doing all my coding in Labview but for now DaqExpress is just a means to an end.

 

-Joel

0 Kudos
Message 7 of 10
(1,982 Views)

Joel,

     Do you know if you are using LabVIEW, or if, instead, you are using LabVIEW-NXG?  When you open the program, I believe it will indicate which one you are running.  LabVIEW NXG ("Next Generation") was an attempt to create a "next generation" of LabVIEW, but was abandoned by National Instruments about a year ago, as it was missing a significant number of needed "features" and never really "caught on" with LabVIEW users.

     If you are, in fact, using NXG, you should consider switching to LabVIEW.  As I recall (but am not 100% certain this is correct), when LabVIEW NXG was offered, you also received a license for "classical" LabVIEW.  If you need help "swapping" LabVIEW for LabVIEW NXG, I'm sure someone on this Forum can guide you through the steps.  I'd offer to help, but I have very little NXG experience -- I did install it once (on a VM, I think), but quickly abandoned it (and "uninstalled" it simply by deleting the VM).

 

Bob Schor

0 Kudos
Message 8 of 10
(1,951 Views)

Hello Bob,

 

for the above problem i was running DaqExpress. it is basically DAQMX but with more bells and whistles. in DaqExpress you can either set up task and run them or make labview(Type) VIs.it defiantly is lacking some of the customizable features of labview and i am starting to find other draw backs (like the issue above). It is super nice how fast you can whip something together in DaqExpress so for this it works. while we are using Daqexpress to gather baseline data im working on the actual exacutable in labview. so far everyone doesnt seem to know about DaqExpress which is fine but i didnt think i get so much " JUst use LaB ViEW"

0 Kudos
Message 9 of 10
(1,937 Views)

Thanks for "forcing" me to ask the $0.64 question, "What is DAQExpress?".  Well, it turns out to be an interesting, possibly "improved" version of the Dreaded DAQ Assistant (DDA), introduced about a decade earlier.  When I first learned LabVIEW, there was "Traditional DAQ", which was "not pretty".  Then came DAQmx, and the DDA.  It took me a couple of months to learn enough to avoid the DDA, and a little later, I stumbled upon the "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications", and (all of a sudden) DAQmx "became easy".  

 

I confess I have no experience with DAQExpress.  I find it "interesting" that it is "free if you have an NI account", but otherwise you need to pay for a license (in addition, of course, to the cost of your LabVIEW license).  I'll continue to suggest that learning the basics of DAQmx ("Learn 10 Functions") is the most sensible approach to using LabVIEW to control DAQ hardware.

 

Bob Schor

0 Kudos
Message 10 of 10
(1,922 Views)