LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx sampling and displaying


@Bob_Schor wrote:

Do you understand Sampling Theory?  If you are interesting in signals in the 0-10Hz range, why are you sampling at 50KHz?  Please use standard abbreviations -- I can "guess" that 50ksps = 50KHz, but 1MS, to me, means 1 Mega-second, which makes no sense.

 

Bob Schor


http://www.ni.com/sv-se/support/model.usb-6008.html
NI uses kS/s for their devices, so writing ksps isn't far fetched. I'd even go so far as saying it's more correct than Hz.

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 17
(105 Views)

@GerdW wrote:

Otherwise "KHz" is unknown to me: With SI units you should use a small "k" to denote "kilo".

Why do you think "mega seconds" with "MS": this clearly is "MegaSiemens", the reciprocal of µOhm…

(Just some Sunday evening joking about SI units used by US people not used to metric system. Smiley Very Happy)


KHz would be KelvinHertz ... whatever that would symbolize, some temperature dependant frequency?

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 12 of 17
(104 Views)

Sorry for the delay. Finals time has come and is almost gone. Here is the VI. It is basically 2 example VIs and some stuff I added for the Thorlabs stuff.

 

Thank you all for helping out and for all of the productive advice... well mostly Smiley LOL

0 Kudos
Message 13 of 17
(89 Views)

Have you "played with your Device" using MAX?  You can set up a Test Panel to define the (multiple) Channels you want to sample, set the Range, set the Sampling parameters, then Start the Task.  You can also "define a Task" that is saved in MAX, and has all of these saved in the Task Constant.  So you can simplify the DAQmx code by wiring a Task Constant to "Start Task", click the down-triangle and select the Task you just created in MAX.  Alternatively (the method I prefer), you can use a LabVIEW Project and define the Task in the Project ("New", "Task").

 

If you set up to sample 5 channels, and you want to process all of them, you can use a For Loop and process each Waveform.  If possible, it is much easier (and more compact) to get rid of all Express VIs.  Note that the first two Scale operations are "multiply by 2", and the other three are "Do Nothing" (multiply by 1).

 

Using sub-VIs, you can make your entire routine fit on a single (laptop) screen.  Much easier to look at, and try to understand.

 

Bob Schor

Message 14 of 17
(81 Views)

Yeah, the size of it has become annoying. I will definitely look into that. I have not tried Max, but when I did, it seemed like it was just DAQ Assistant. Is that correct? I used it before, but opted for this to try to get more out of it. But since they are doing the same thing, using assistant would be much cleaner. I will look into both of those options to clean it up. 

 

The scales were there before I finalized it so the scale by 1 was just adummy. I am not sure if I need to sale it yet, but will definitely get rid of it if I do end up not using it, thank you.

 

Thanks again! I just started in a new lab, so my reply is late. Sorry about that.

0 Kudos
Message 15 of 17
(67 Views)

DO NOT USE the Dreaded DAQ Assistant.  Do not use its Evil Twin, the Dynamic Data Wire.  Read this NI White Paper which explains Tasks, creating them in MAX (you can also create them in the LabVIEW Project Explorer), and how to use DAQmx functions.

 

Bob Schor

Message 16 of 17
(61 Views)

Thanks again! I didn't think you meant use the assistant but that is all I found while quickly exploring max. So, thanks for the link. I'll be sure to take a look at it! 

0 Kudos
Message 17 of 17
(54 Views)