Reading USB-6008/DAQmx sampling

I use LabVIEW Student Edition 2009 with an acquisition of data USB-6008 on a Windows 7 computer.  I must confess that I am rather self-taught in LabVIEW and may lack in fundamentals.

I wrote a code to move motor back with a sine wave with the 'Signal to simulate"VI and VI"DAQmx Write. "  I think that this part of the code is OK but its probably sloppy.

The part that that concerns me is the "DAQmx Read" part - I use this to get a feedback of the motor position on an analog scale 0 - 5V via the port of AI1.  I also use this DAQmx Read to get another feedback voltage from a force sensor that feels the force in a piece of material set by the engine.  I want the information to all-terrain such as graphs or tables with the last 30 seconds, and then a value of information, but that's all I want to see since this cycle repeats for hours.  I also need to process this information - if the strength of the material gets high, I need to stretch less etc.  So far, everything is working fine, but now I want to use the "peak detector" VI for expressly that the "peak" of the sine wave is part of a certain range of strength and the '' Valley '' falls into a second range of force and clearly since I read this information as a single integer/sample there is no 'memory' of the last seconds in the form of a table of examples past or a waveform or something like that I can't detect the peaks.

So my question is - should be sampling this information differently to temporarily store information (such as a waveform or something?) or should I use individual samples to build a continuous array for the last 30 seconds?  In other words, what is the best way to read this information in a way that will make it easy to detect the peaks on the final seconds, but not to store hours of endlessly repeated information?  I also want the release of LabVIEW and feedback from the system graphics to match so that the signal sent to the engine for the same positional signal back to LabVIEW from the engine.  I should add that I do not know if the system works in real time or on a little late, but nothing like over delay of 30 seconds.

I have attached a code that I use to calibrate my system - is not the same as I mentioned earlier, but things 'DAQ read' are the same and you get the idea with the rest of it.  I can also reach more detailed code if it would help.

Yet once again, I'm sorry for my skills of coding bush-league and thanks for any help!

-Chris

If you always use a waveform chart to display your data and your happy with length of time of the chart, you can use the 'Historical data' property node for recover your data from 'short term' gathered.  From there, you take the data and make a type of waveform data using the 'build' primitive waveform.

Tags: NI Software

Similar Questions

  • USB 6008 DI sampling frequency

    Hello

    I would like samples N to a digital input on 6008 channel. In the port of GOT it, it is possible to put samples/channel and sampling frequency, but I couldn't find a way to do the same for the channel of DI.

    If I use MAX to read the N samples on request, I can increase or decrease the number of sampels to read but rates of mutation has no effect.

    using the:

    DAQmxErrChk (DAQmxCfgSampClkTiming (g_TaskHandle, "", samplesPerSecond, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan));

    also gives me error.

    I don't know who do :-(

    Concerning

    RB

    Hi RB,.

    Digital I/o on the box USB-6008 are "static", meaning that they are controlled by the software. There is no sample clock to set the time a sample is read/written. Your software provides synchronization for DIO.

    Measuring mode 'Samples on request' refers to avoiding.

    Hardware timing (a sample clock) is available on most of the products OR providing DIO. As a low-cost product, the USB-6008 housing does not hardware timing for DIO.

    Best regards, Topp

  • How can I improve the rate of acquisition with daqmx and usb-6008?

    Hello

    I am trying to acquire data of analog voltage with a USB-6008. I'm under Labview 8.5 student on an HP laptop with a 1.33 Ghz cpu and 736MB RAM, apparently. I tried using the Daq assistant and the low-level Daqmx functions. My best results come with a task set in MAX for my analog input, and using the function 'Daqmx read' the 'unique double 1 d sample' value in a while loop. I insert the values returned in a table which built in the while loop, and then when I'm done, I check the number of samples in the table. In the test VI attached, I also use the time to Get before and after all loop. The best sampling rate I made using this method, is around 40samples/second. I have attached a VI below that illustrates this concept. In my actual application, the data acquisition code runs at a time while loop with 1ms, parallel to other code that controls the device I'm collecting data of. The sampling rate is roughly the same for my test below VI and my application program.

    The 6008 datasheet gives the sampling frequency maximum 10 kHz. I'd be happy with 2 to 2.5 kHz, or as soon as possible; I'm sure that I can achieve a little more than 40 Hz. My first idea was tied to the hardware, but the 6008 cannot make acquisitions NI hardware.

    My question is: How can I implement a faster sampling of analog voltages to a USB-6008 in LAbview? If I can't do it, is there another way I can taste the data more quickly?

    Thank you

    -SK-

    To the best of my knowledge, the USB-6008 can do timed equipment acquisition. Don't forget that this is a multiplexed device, so if you add 8 channels so the maximum you can set is 10 k/8

    If you are new to LabVIEW, I suggest that you try this sample program first

    \examples\DAQmx\Analog In\Measure voltage. llb\Acq & Graph tension-Int Clk.vi

    Amit

  • Reading NI USB 6008 of executable

    Hi all

    I tried to find a solution in existing topics, but unfortunately could not find a suitable solution.

    I use a USB-6008 read a voltage on ai0. When I run the VI with the USB device connected to my development pc it works very well (DAQ assistant was used to read the value on ai0). After making an executable on my development pc also works. However, when I move the executable file on the computer on which I want to use it does not read voltage. If I start NI Max, I noticed that the computer is able to read the value, so physically everything should be good. To me, it seems that some link/link is missing from the software. Anyone know what may be missing/defective in my executable?

    OR DAQmx is installed on the computer on which it is to run.

    Is the device and channel named in the same way on desktop deployment as was the development of your PC?  Display the MAX on each PC and compare.

  • I can read two-channel USB-6008 using THE Signal Express?

    Hello world!!

    Is possible to read the two analog inputs at the same time?

    Example: Using Signal Express, I need to read the (channel 0) analog input and analog input (channel 1) at the same time.

    I try this but, the signal on purpose gives me an error message saying that I can't read several channels at the same time using the USB-6008.

    Is this true?

    Thank you

    Ivo João

    André,

    Grato definition of pela.

    SUA ajuda muito util faith.

    SDS,

    Ivo João

  • Cannot read the digital channels as physical on USB 6008

    Hello world

    Sorry for maybe a stupid question, but I'm stuck and can not find the solution.

    I can't read my outputs digital my USB-6008 as physical channels but only as global chains. Is this normal? What can I do to work around this problem?

    Thank you, any help is very appreciated.

  • During playback from the USB-6008 on the OID entry, he reads the top floating. How to configure to read low when it is anything but 5V

    I have a USB-6008, I read an entry on the OID.

    I want this 1 report when the line has a present 5v and 0 for something else.

    When I don't have anything on the lines.  It reads 1

    How configure it to read 0 when nothing is connected?

    Also how I re this in c#

    Thank you

    Hello ashitakaLax,

    The USB-6008 housing has an internal pull-up resistance to 5V (according to page 22 of the User Guide and specifications) that pulls the line to 5V when nothing is connected.

    In order to change this, you can add an external resistance of menu drop down to make the output to the earth when it is disconnected, if your device should get power to fuel the high line.

    Kind regards

  • NEITHER USB 6008 tension problem reading

    Hello

    I am trying to program a USB-6008 on a mac. When I connect to the input to analog 5V output I get a reading of 3.67volts, while on an osscilascope, I read a 5volts voltage. Is this normal? Need to load resistors? Also, I get the same effect with the release of tensions for the analog output.

    Hi Zepp2,

    Thanks for your post. The pins are you connect together on your device? Depending on the type of connection you have the wiring may not be quite right.

    I found a few documents online which hopefully should help you:

    Field of connection for analog signals: http://zone.ni.com/devzone/cda/tut/p/id/3344

    USB-6008/6009 Getting incorrect voltage reading: http://digital.ni.com/public.nsf/allkb/95CC0CB11D7DF3D18625712E000C4ABD?OpenDocument

    Input analog USB-6008/6009 reads about - 1.4V Offset: http://digital.ni.com/public.nsf/websearch/E687933C5694AB00862570BD00593CA3?OpenDocument

    Please let me know if one of them will help out you.

    Kind regards

  • USB 6008 weird analog voltage reading

    Hello

    I use the USB-6008 to measure a voltage of a Lithium battery, 3.66V.

    the battery come with a blocking diode (in series with the battery) of 1N5820, who have a fall of voltage drop of 0, 1V.

    battery with diodes in series (this is the way in which the battery is shipped with)

    -measure with DDM yield 3.66V without you connect to usb6008

    -measure with DDM yield connected to usb6008 (putting OUT VOLTAGE USB6008) 3.59V

    -able with USB-6008 performance 3.59V connected to usb6008

    battery with diode removed

    -measure with DDM yield 3.66V without you connect to usb6008

    -measure with DDM yield connected to usb6008 (putting OUT VOLTAGE USB6008) 3.66V

    -able with USB-6008 performance 3.66V connected to usb6008

    Thus, it seems that the problem is in the led in the series.  This is why the battery voltage has fallen to 0.07V? the series diode will hurt the USB-6008?

    Maybe people who know the circuits inside the USB-6008 can give me an answer.

    Thanks in advance.

    Hi learnerd,.

    The fall that you see is falling forward in the diode.  As an entry class device, the USB-6008 case has a relatively low input impedance (144kOhm) and thus draws a little current of the device.  Looking at the datasheet of the 1N5820 (http://www.onsemi.com/pub_link/Collateral/1N5820-D.PDF), Figure 7 shows that at 25 ° C, a draw of 50mA will cause a fall front of 200mV.  While the figure does not extend the curve below 50mA, extrapolating the given curve would indicate that a drop of 70mV would cause only a few current microamperes.

    A DMM will have a much greater input impedance (GOhms instead of kohm) and won't draw enough current to influence the measure, that's why you wouldn't see the decline with only the DMM.

    The diode will not harm the USB-6008 somehow.

    Good luck with your application,

    The f

  • Rate analog output USB-6008

    Hello

    I just started using an NI USB-6008 box. At this point, I don't need to fill all the specific tasks other than learning to use the device. I used a fair bit of LabVIEW but never with this kind of material, and I would like to help to understand it please.

    In particular, I have attached a VI in which I try to get an analog signal through the USB-6008 and read again (also with the USB-6008 - I wired the pins together). However, I do not understand what is happening when I run this VI. I expect the output a sine signal of 10 Hz for 1 second, 0.1 seconds record and see 1 full cycle of the sine wave. In practice, I read about 10 cycles and constant tension then. Presummably, this means that either the reading continues for more than 0.1 second, otherwise the output signal is more than 10 Hz.

    I also tried to use the related calendar DAQmx screws with the output pin to try to adjust the output rate (samples/s) but everything that I've tried return errors. I also tried to open some examples NOR, but these errors returned as well and I still just try things on mine.

    Did I miss something obvious here, but any help would be appreciated!

    Edit: I had to update this post & attached VI I had made mistakes. The default values on the front panel show what I see after the execution of the VI.

    Orbital Hi,

    As far as I know, you will need to use the DAQmx Read and VIs write in loops and functions of synchronization to determine data rates you want.

    I also did a quick search and found a white paper which you may find useful: http://www.ni.com/white-paper/9541/en/

    Kind regards

  • How can I get digital signals (interface UART) with a microcontroller with NI USB-6008?

    I have acauired a few analog signals by A/D (3 channels). I put each scanned data on 3 digital output with a microcontroller. I want to see if it is possible to import these digital outputs 3 to a PC via a USB-6008? It's like the connection of the output to the digital input of the USB-6008 and import the 3 channels simultaneously to LabView? Do I need to use some other hardware like USB-8451 and connect the clock of the MCU to USB-8451?

    Saraydin,

    The digital I/o on the USB-6008 is a software program only, so unless your signals are rather slow, it probably will not work for you.  In general, the procedure would be to connect each signal to one of the digital lines on the map and then set up a digital entry into LabVIEW task to read the three channels.  If you use a device that has clocked by the digital i/o hardware, you then your input clock signal and use it as the sample for the task clock.  Here is a list of USB devices supporting DIO clocked by the hardware.  Also, there is an example that comes with LabVIEW, which shows how to do this.  You can get to it in LabVIEW by going to help > find examples.  When the example Finder window opens, navigate to hardware input and output > DAQmx > digital measures > Cont read dig Chan-Ext Clk.vi.

    The 8451 is specifically for I2C and SPI, and would be great if you try to make one of these protocols, but otherwise I would recommend the devices in the list I linked above.

    -Christina

  • Beyond the limits of voltage on USB 6008?

    I use a USB-6008 to measure analog differential in the range of 3 to 5.3 V. I chose this range, because outside this range, I'm not interested in what the tension is, knowing that his "on the rail", but to aid resolution of the ADC in this range.

    So for a signal of ~0.05 supply V, I expected to read 3V, telling me that the voltage is lower than 3V, but again it returns 0.05v?

    As it was unexpected for me, could someone please explain what can / should I expect of my USB6008 of the responsed to the signals that are the limits? Is there an effect of "rollover"? Should you return the value to the limit? Depends on how far the limit is?

    Thanks for your help!

    Entry level do not think that way. You specify the range is that you wait for the signal and the DAQmx driver will set the most appropriate range that the device supports. The actual ranges are indicated in the guide. In your case, because you specify a max of 5.3, the device would be defined the +/-10 volts range.

  • Pt100 (USB-6008) configuration problems

    Hello

    I'm using the hardware DAQ USB-6008 (I know that's not accurate and all) and I use the Pt100 (QAP2010, click for plug technique).

    I connected it like this.

    Now in LabVIEW, these are the only options (DAQmx new task-> acquire->-> RTD temperature signals).

    If I choose for custom settings, I get these options (I don't know what variables that is).

    I use a small greenhouse where I need to measure the temperature and humidity and control environment (by using a fan to cool the cartridges to greenhouse and heat to heat).

    My goal is to read the temperature using a graph on the front panel.

    Can someone help me how configure/choose the right options? If you need more information I'll provide them as soon as possible!

    A quick search for RTD class B shows the precision and the coefficient. As Fan Ravens stressed resistance according to the temperature is plotted in the data sheet.  To control the temperature in greenhouse, a simple calculation of the slope of this graph is not good enough.

    Note that the USB-6008 case limited an active player on the outputs analog and it controls only the voltage. So you will need at least one external resistor and possibly and external power to excite the RTD.  These options that you have linked is not applicable to the USB-6008, which is a very simple device. You should perhaps simply to measure the voltage and calculate first resistance, then the temperature.

    Lynn

  • Lack of external input clocked with USB 6008

    I'm a little confused on how to extract digital data without an external clock.  I guess that there is a way to do it, or this device would not do any digital input advertising, but I don't understand exactly how that would work.  Apparently, my only option is ' we demand. "

    I take data frames occurring about every 1 ms with a frequency of 950 kHz clock.  I have this completed with a more sophisticated Board using a clock from the data source.  We now want to translate this to the USB-6008, so we can use the 6008 OEM like a daughterboard for our data source.

    Avoiding him depends on the software you use, the pc, the os, etc. Whenever you want to do a reading of a line, you do a Read DAQmx. Absolutely no correlation with a time given because windows is not even close to deterministic. You may have readings in the low khz range.

  • USB-6008 LABVIEW 8.2. SINGLE CHANNEL WITH DBL INPUT VOLTAGE OUTPUT COMPARISON

    I AM WRITING A PROGRAM THAT USES A SIMPLE USB-6008 ANALOG INPUT CHANNEL. I WANT TO READ CONTINUOUSLY THE VOLTAGE FOR 60 SECONDS. I WANT TO COMPARE A TENSION FOR THE PREVIOUS OF THIS SAME CHANNEL VOLTAGE, MAINLY FOR THE PERIOD OF TIME MAX VOLTAGE GIVEN, THEN GET A FINAL VOLTAGE READING. THE OUTPUT OF THE VI IS A DBL. I WANT ONLY TWO TENSIONS OF EXPORT TO EXCEL. TO SAVE TIME, I KNOW HOW TO EXPORT. CAN SOMEONE HELP ME WITH THIS ONE.

    VI needs an register shift related to the Max & Min function. The current value would be the entrance is and the entrance of x is the left shift register. The max value gets wired for the shift register to the right. Don't forget to initialize it. The output of the shift register is the max you would write and the value of the DAQmx Read out of the loop of wire will give you the last reading.

    Your waiting for 45 seconds makes no sense since you said that you wanted to read continuously. You also said that you wanted to read 60 seconds and all this logic is missing. A simple function of time elapsed, it's all you need.

Maybe you are looking for

  • iCloud Drive - save the storage space on Mac

    is it possible to save space on my iMac with iCloud drive? For example, if I wanted to save all my pictures on iCloud drive but do not waste space on my mac hard drive, is this possible? I can have not only in cloud storage and not my Mac? I see no p

  • Re: Satellite A300 (PSAG4A - 02600M) is always freezing

    I got a laptop A300 to fix and the problem is that the laptop froze when making a virus with Trend Micro antivirus software scan. The owner said that the laptop would freeze when it came to some extent and that the bluetooth stack has been involved -

  • Add at the beginning of the file by replacing the old content

    Hello My file size should limit to 20 MB, after crosess 20 MB file I have to write my data at the beginning of the file. Here, I have replace the oldest data from the beginning without affecting all the other data of the file and this process should

  • Vista in Windows Update error 80240016

    OK for some time now, I have not been able to get updates, it fails every time, Ive tried to stop and from updates in the back and it does not work,

  • Load my Clip + overseas?

    We will make a trip to Europe soon, so I wanted to be sure that I'll be able to load my Clip + there. He would have no problem charging the player via the USB port of a foreign computer, would there?