Daq Assist and Graphing

A very simple problem...
Very new to LabView, and I am struggling with wiring up my Daq Assistant in order to graph data from a load cell. I've connected my load cell to the Daq and want to measure force readings over a span of time/when I press stop. When I run my program it only graphs a finite number of readings and then erases the graph to copy new readings on top. I put my graph outside of the while loop so that it would graph one reading at a time as they were read but it's not working. If my wiring isn't what's wrong, I have a feeling that my time settings for the Daq Assist are not right (and I don't know how to set those either.) I don't understand the description/effects of Rate and Samples to Read.
Thanks for your help.
Solved!
Go to Solution.
Attachments:
Learning Load Test.vi ‏61 KB

AFLR wrote:
A very simple problem...
Very new to LabView, and I am struggling with wiring up my Daq Assistant in order to graph data from a load cell. I've connected my load cell to the Daq and want to measure force readings over a span of time/when I press stop. When I run my program it only graphs a finite number of readings and then erases the graph to copy new readings on top. I put my graph outside of the while loop so that it would graph one reading at a time as they were read but it's not working. If my wiring isn't what's wrong, I have a feeling that my time settings for the Daq Assist are not right (and I don't know how to set those either.) I don't understand the description/effects of Rate and Samples to Read.
Thanks for your help.
Hi AFLR,
I think settings are fine, you have set DAQ to read 100 samples at the rate of 100samples/second, so you'll get 100 samples every second.
Now in order to retain the previous data in the Graph (which is not the nature of Graph), you may need to preserve it by writing extra code.
If you already know about:
1. Shift registers and
2. Components of Waveform
You can easily implement this requirement, find the attached VI for your reference.
I am not allergic to Kudos, in fact I love Kudos.
 Make your LabVIEW experience more CONVENIENT.
Attachments:
Learning Load Test_Modified.vi ‏79 KB

Similar Messages

  • How to properly read data from one DAQ-assistant and write simultaneously with another DAQ-assistant (which is inside a loop)

    Hello.
    I'm a newbie working on my Master's thesis conserning a project that is based on old G-code made by another newbie so bear with me.
    I need to create a sequance of output controls. For this I'm using a for loop that eventually creates two triangular ramps during a period of 90 seconds. I've confirmed that this function works properly by measuring the actual output of the DAQ-decice (NI USB 6353).
    The problem is the following: During this controll-cycle I need to simultanously collect data from the same DAQ-device. At this point there is only one DAQ-assistant output-block in the main loop of the program and all the signals are derived from it to where they are needed.There is a case-structure (the bottom case structure in the picture) that contains the functions needed to collect the data during the test cycle. However these two actions, outputting data and inputting data, are not synchronized in any way which may be the reason why I get the 200279 error or alternatively the 200284 error during the test cycle. I've tried changing the sample rate, buffer size and the timeout time as adviced but nothing seems to help.
    What would be the simplest way to solve this problem?
    Help is greatly appreciated!
    Attachments:
    problem.jpg ‏206 KB

    Thanks for quick reply.
    However, I did try it (see the picture) but I still have a problem: I only get 100 samples / channel during the test sequence (all from the first seconds of the sequence) in total even though I've set the data aqcuiring DAQ-assistant as "continous" and "samples to read = 95k" and rate is 1000Hz.
    Edit.
    And lastly, I have trouble adding this "extra" DAQ-assistant to the vi. because I get an error about a resource (The 6353) being reserved, even though I connected a false constant to the "STOP" -input of the main DAQ-assistant.
    Attachments:
    is_this_what_you_meant.jpg ‏212 KB

  • Tare function DAQ assist and restart function for the vi program

    Hi!
    I have a program that aquiers a signal from the DAQ assist. I have searched here on the forum and on the web, but I can't find a way to implement a tare function. The signal is from a loadcell and therby it would be good if Icould tare the signal to value zero. In the DAQ assist I can calibrate it manually, but i would like to wire this function to a button. 
    Also I have another problem that shouldn't be hard to solve, but I'm struggling with it. I want a resert function in my labview code so that i can restart the program from the begginging. I have used a case structure with normal and restart enum constant, and wierd them via a tunnel. But it dosn't seems to work. Instead of resetting the program it only stops it 
    I have attached my code below.
    Best Regards Maurlind
    Solved!
    Go to Solution.
    Attachments:
    Tare function and restart.vi ‏365 KB

    I solved my problem with the tare function, i used a case structure and shift register to store values in it. se picture below.
    I haven't found a way to restart my VI yet. I tried to implement something from the community , see this link: https://decibel.ni.com/content/docs/DOC-4747
    But that doesn't work for my VI and i don't know why. Could someone explain why doesn't work ?
    My goal is to restart my whole VI with a press of a button.
    Best Regards Maurlind
    Attachments:
    tare function.png ‏25 KB
    restart vi.vi ‏488 KB

  • Instrument I/O Assistant and Graphing

    Does anyone know how to use data taken from an Instrument I/O Assistant Input and put it into the y values of a graph??  I'm having issues with this because it returns values like "v 0" and "v 256" but I need just the number value to get a graph to work.  Any advice would be very much appreciated.  Thanks in advance!
    Solved!
    Go to Solution.

    Hi Rach_77,
    In order to get rid of the "v ", you can use the String Subset Function and set the offset to 2.  This will take away the first two values and just give you the number.  From there, you will just have to convert the value to whatever type you would like.  I hope this helps!
    Kim W.
    Applications Engineer
    National Instruments

  • Relay module and DAQ Assistant

    Hi everyone!
    I'm a Labview beginner and currently dealing with a priori easy business. Recently I got a USB Relay Module to be incorporated in an alarm system. Let's say if one gets a certain value bigger than other, the relay should close and activate a siren (see example attached). For this I've used the DAQ assistant and configured one of the module output channel. By using a simple boolean switch, I can easily close and open the relay. However, if I use a case structure, an error is obtained, as the DAQ Assistant for one output can be only used once. I mean, if the relay is closed and I'd like to get back the original situation, i.e. opened relay, what should I do?
    Schematically:
    -if A>B, then closed relay
    -if A<B, then opened relay
    Sorry for the messy explanation, but I think you get the point.
    Thanks in advance 
    Solved!
    Go to Solution.
    Attachments:
    alarm test.vi ‏44 KB

    I just got it. The problem was that in the main vi, not in the example I attached, the same output via DAQ Assistant was configured for two different case structures. Obviously the relay module was going completely mad, since I had two independent pairs of TRUE and FALSE working at the same time. If I get, for instance, TRUE for one case structure and FALSE for the other, the switch doesn't know what to do. Hope now it's clear...

  • NI-4351 and DAQ-assistant

    Hi,
    I have tried to aquirre data using the DAQ-assistant and a NI-4351 (for PCI)
    DAQ-card. However, the assistant doesn't recognize or cannot find the
    device, eventhough it works perfect in the MAX test panel. Is th NI-4351
    card not compatible with the assisatant?
    Lennart

    Hi Lennart-
    No, the NI-4351 is not compatible with the DAQ Assistant. In LabVIEW, go to Help >> Find Examples, this will open the NI Example Finder. Double-click on Hardware Input and Output >> Traditional DAQ >> Analog Input >> General.
    In this folder you will find several example VIs that are written for this card and should help you get started. The names of these VIs start with "NI 435X".
    Be sure you see PCI-4351 or PXI-4351 in the list of "devices that can run this example," which is the box in the lower right corner of the example finder.
    Hope this helps!
    Thanks
    Tori

  • NI-DAQmx task works in MAX or DAQ Assistant test panel but not in LabVIEW

    I am attempting to read a single AI channel from a PCI-6024E card via an SCB-68. I have created a NI-DAQmx Analog Input Voltage Task in MAX for this channel, sampling in contiuous aquisition mode at 100 kHz, 10000 samples at a time, with RSE terminal config. If I use the Test feature from MAX, the channel acquires data as expected.
    In LabVIEW, I call this task using an DAQmx Task Name Constant. If I right-click this constant and select "Edit Task", the Daq Assistant opens and I can use the Test feature from the DAQ Assistant to see that the data is still being acquired as expected.
    However, when I try to programmatically read this channel in LabVIEW using the VI "DAQmx Read (Analog Wfm 1Chan NSamp).vi", the VI returns a constant DC value of 500 mV, which I know is incorrect (I can monitor the signal across the two terminals in the SCB-68 with a DMM to know that the signal coming in varies as expected, and as I read using the test panels). This erroneous reading occurs even if I make a new VI, drop the task name constant on the diagram, right-click the task name constant and select "Generate Code - Example" and let LabVIEW create its own acquisition loop (which is very similar to what I already set up, using the "DAQmx Read" VI).
    Any ideas why the Test Panels work correctly but the LabVIEW code does not?

    Hello bentnail,
    I'm not sure why the test panels are readin the value correcly but the LabVIEW code does not, but there are a couple of things we can try.
    1) What happens if you just use the DAQ Assistant and place it on the block diagram? Does it read out the correct values?
    2) Try running a shipping example that comes with LabVIEW. "Acq&Graph Voltage-Int Clk.vi" should work well.
    3) What kind of signal are you expecting to read (peak to peak voltage, freqeuncy, etc.)?
    Thanks,
    E.Lee
    Eric
    DE For Life!

  • Sample clock of DAQ assistant

    I am using DAQ assistant to generate output voltage and another DAQ assistant to measure input voltage. I am to sepecify teh clock type for the two DAQs. I want the same clock type for both the DAQs so that the data from both DAqs are synchronized, that is run with the same clock. I m not using any external clock and want it software timing. I want to know if it is okay to select internal clock type for the output voltage DAQ assistant and then select external clock type for the input voltage DAQ assistant and select the clock source as the analog output sample clock?
    OR if i select the clock type as internal for both the DAQ assistants will the data be synchronized?

    Hi Amber,
    Analog Input is not retriggerable,
    meaning that once you stop the task you have to restart the entire task
    (including the analog output). But if you want to just stop displaying the data
    on the input channel, simply encase the Measurement
    output in a case structure with a Boolean control that you can click to update
    the graph or not.
    If that doesn’t work for what you’re
    trying to do, please give more details as to your overall application so the
    community can help answer your specific questions.
    Mark E.
    Precision DC Product Support Engineer
    National Instruments
    Digital Multimeters (DMMs) and LCR Meters
    Programmable Power Supplies and Source Measure Units
    Attachments:
    Not update voltage.png ‏5 KB

  • Input of DAQ assistant does not initialize soon enough

    Dear all,
    We are trying to generate an analog voltage output with the NI 9263 and then read that as an analog input with the NI 9215 as part of an academic exercise. Both of these are on board the NI cDAQ-9174 (compact DAQ). An analog waveform is generated within Labview (either a sine, square, or constant), and that signal is fed into the DAQ assistant to make an analog output. 
    From there, wires connect the 9263 output into the 9215 input. A second DAQ assistant is used to acquire that input voltage from the 9215. 
    The problem occurs when the waveform generated voltage and voltage input are printed on a waveform graph. The input signal for the sine and square waves occurs before the waveform generation signal (i.e., the input is phase shifted to the left instead of to the right, as we would expect due to latency).
    We believe the problem occurs because the waveform is being output before the input has had a chance to initialize and start recording measurements. 
    Is there a way to initialize the DAQ assistant and start taking measurements before the output is generated? Or is there a way to determine the absolute time of each so that we can plot them in absolute time?
    Thank you for any help you can give.
    Attachments:
    Basic inout4square.vi ‏412 KB

    I tried cleaning up the program as best I could. I'm sure you can tell I am new with LabView. Thanks for taking a look even though it was so messy.
    The problem we are having now is that the input data lags the output data by anywhere from 30-50 ms, which seems like far too large a delay. This is when I turn the Waveform Graph to "Ignore Time Stamp". Because the generated output voltage is graphed from the waveform generator, it seems to take a while for it to progress through the program and through the hardware, thus the input voltage graph lags.
    When I turn the Waveform Graph to not "Ignore Time Stamp," the signal from the waveform generator occurs in the year 1903. I've tried searching on how to change this to the current time, but I can't seem to find a way to do that, despite plenty of other people wondering about this. Is there a way to do this so we can know the time at which the generated waveform signal is actually sent to the output DAQ assistant?
    Attachments:
    basic.vi ‏149 KB
    blockdiagram.PNG ‏28 KB
    delay.PNG ‏24 KB

  • New project using Daq Assistant or not ?

    Hi everybody,
    I need to create a software to do some realtime acquisition & analysis.
    I trained myself a little bit on c# lessons to get use to this programming language; I’m also discovering Measurement Studio & Visual Studio. (I’ve background in C++).
    My software will have 2 modes :
    Continuous acquisition, signal plotting + signal processing & plotting (fft, 1/3 octave band filter)
    Triggered acquisition, signal plotting + signal processing & plotting (fft, , 1/3 octave band filter)
    I have examples in my National Instruments directory which don't use daq Assistant and code is different from generated files with daq Component.
    If I use Daq Assistant ( http://www.ni.com/tutorial/4652/en/ )
    I know that the code to create channel is stored in DaqTask.cs
    Plotting :
    NationalInstruments.AnalogWaveform<double>[] acquiredData = daqTaskComponent1.Read();
    waveformGraph1.PlotWaveforms(acquiredData);
    When I look to examples, like "MStudioVS2010\DotNET\Examples\DAQmxWithUI\SpectrumAnalyzer\cs "
    all code to create channel is generated in Mainform.cs, there is no Daq Assistant (http://www.ni.com/tutorial/5409/en/ )
    and there is a slight difference between acquired type :
    private AnalogWaveform<double> data = new AnalogWaveform<double>(1000);
    data = reader.EndReadWaveform(ar);
    acquiredDataWaveformGraph.PlotWaveform(data);
    Questions :
    What is the difference between AnalogWaveform<double> and AnalogWaveform<double>[] ? why it's not the same type ? I need to do some signal processing with this signal, so what type should I use for my application  ?
    I didn't succeed to configure my 2 modes in daq Assistant (continuous and triggered acquisition) is it possible or should I create 2 Items in my solution, one for continuous acquisition and on for triggered acquisition ?
    Kind regards,

    Check out the downloads section of iLounge.com. There are a handful or two of applications that will help you transfer songs from the iPod to the computer.
    Another option is to network the two computers together and transfer the iTunes folder to the new Mac. All you need is an ethernet cable and to turn on file sharing in the Sharing preference panel. Depending on how old your "older" Mac is, you might need a crossover ethernet cable.
    A third option is to hook up the two computers using a Firewire cable. On the older Mac make sure it is shut down, hook the two computers up, turn on the older Mac while holding down the "T" key. On the new Mac you should see the old Mac's hard drive show up. Just find the iTunes music folder and copy it over. You could also use the Migration Assistant which will be in the Utilities folder of the new Mac.
    Hope this helps.

  • How to select signals from the output of a DAQ assistant

    Hi! 
    I am a new user of Labview 8.5 and I am working with a USB-6210. I have two different instruments connected to the same USB device, half of the channels are being used for pressure transducers where I only need to reed and save the data, while the other half are associated to TCD detectors where I need to perform some analysis to the signal to obtain and save the data. I am in the first step of building the block diagram, After I define each of the signals which its corresponding channel using the DAQ assistant, I need to select and separate the signals coming from the pressure transducers from those coming from the TCD detectors, before I can continue drawing the block diagram. I am trying to use the Select Signal function but I am not sure how to do this. Can anyone please let me know at least in which manual can I find a good explanation? I have been reading the Getting Started and the User Manual for LabView but they have not been very useful so far.
    Thanks!
    Solved!
    Go to Solution.

    Wire the Select Signals express VI to your DAQ Assistant and run the VI once (this allows the signal names to propegate).  Then when you open the Select Signals configuration you'll be able to pick out the channels you want by name instead of just "Signal 1" etc.
    It sounds like you'll probably want two Select Signal Express VIs, one for the TCD detectors and one for the pressure transducers.  Something like this:
    If you right click on the VI and select Help or click on the Help button within the configuration dialog you will bring up the LabVIEW help page for this (or any other) VI.  Are you looking for some other information that isn't documented in the help file?
    Hope this helps,
    Simon

  • Error message from labview when trying to set up the DAQ assistant

    I recieve a message from labview when I try to set up the DAQ assistant and select a channel to use. The error I get states "An exception occured within the external code called by a Call Library Node. This might have corrupted LabView's memory. Save any work to a new location and restart labview". Labview then freezes. I have reset the DAQ device in trying to slove this but I still get the same message. How do I solve this?? thanks - mars2006

    Hi Mars-
    It sounds like your NI-DAQ installation may have become corrupted. I would suggest uninstalling and reinstalling the DAQmx 7.4 driver to correct this problem and ensure that you're up to date. This download is available here: NI-DAQ 7.4
    If the problem persists you may want to uninstall and reinstall LabVIEW and then NI-DAQ in that order. The error message will usually give an indication as to which VI the error occurred in. Please let us know which VI is failing if you're unable to avoid the error with these suggestions.
    Have a good day-
    Tom W
    National Instruments

  • How can I programmatically change the voltage range settings in a DAQ Assistant

    Hi,
    First post here.  
    I need to be able to change the voltage range properties of a daqmx DAQ Assistant based on user input.  My hardware, an SCXI-1102C does not allow changing this property on a running task, so I'd like to either set the analog input voltage range before the DAQ Assistant activates, or pause the DAQ Assistant immediately after it starts, set the values and then resume.
    I don't know how to edit the task ahead of time because the DAQ assistant creates the task when it runs, and there is no task before that.
    In the attached picture, I have a conditional section, set to run only if the while loop iteration is 0.  I take the task from the Daq assistant, send it to a stop task vi, set the property, and then send the task on to the start task vi. I can watch it run with the debug light on, and everything seems to work correctly, but on the second (and all the other) iteration of the loop, I read out AI.Max and it seems like the DAQ Assistant has re set it back to 5V.  Can anyone see what is going wrong here?
    BTW, this is continuous acquisition and the code does not produce error messages when it runs.
    I did come across a similar question that someone posted here back in 2006, but his question was specifically aimed at a Labview API (VB, I think), and not an actual G solution.
    Attached are the actual vi in question and a png image of the block diagram.
    Thanks! 
    Ruby K
    Solved!
    Go to Solution.
    Attachments:
    Labview_question.PNG ‏14 KB
    Sample_AIV.vi ‏91 KB

    First, if you want to start getting beyond the basics with DAQ, you are going to have to stop using the DAQ assistant and do it with lower level DAQmx VI's.  There are hundreds of examples in the example finder.  You can even right click on the DAQ assistant and select open front panel.  That will create a subVI that you can open and see what is going on behind the scenes.  Do it.  I think you'll find the DAQ task is being recreated on each (though I'm not 100% of how the settings are established or maintained in each section of that subVI).
    The second problem is you have a bit of a race condition on iteration 0.  Those two DAQ property nodes are running at the same time.  So when you read the AI.Max, it may be happening before or after the AI.Max is set in your case structure.
    Third, make sure you wire up your error wires.

  • How to achieve data from more than 1 DAQ-assistant?

    When running my LabVIEW program using the data coming from 2 simulation sources, no problem occurs and data is correct.
    When using the data coming from 2 DAQ-assistants (real data), an error occurs, telling the following:
    "ERROR 50103 occured at DAQmx Read (Analog 1D Wfm NChan NSamp).vi, reason: The specified resource is reserved. The operation could not be completed as specified"
    Does anyone know what exactly is wrong and how to solve this problem?
    Nowhere I found a solution for this problem and I have been trying numerous things to change in the program, but the same problem keeps occuring.
    Could anyone please help me?
    I need to solve this to be able to perform tests for my graduation project.
    Tha
    nk you very much in advance,
    Yours Sincerely,
    Karel Rycek

    The problem is you are trying to access the AI channels at the same time. When you setup the first DAQ assistant it reserves the AI section of the board. When you then try and use the second DAQ Assistant you get the error because it is trying to access a reserved section. If you had 2 different boards this wouldn't be a problem. That is probably overkill though. What you can do is read multiple channels in the 1st DAQ assistant and then in your program split the data off if you need to do different calculations.

  • Labview ignores all but 1 Daq Assistant, how can I avoid this?

    When I am putting together my block diagram, I use the DAQ Assistant to orchestrate everything.  Then when I go to create another DAQ Assistant instance, LabVIEW seems to ignore the first one.  It appears as though I can only use one DAQ Assistant at a time in my VIs, is this the case?  I am a bit of a novice, is there an easy way to avoid this, or change the orginal DAQ Assistant into some other form so I can use another DAQ Assistant for developing another part of my VI?
    I have looked long and hard for a good explanation of the difference between Tasks and Virtual Channels and while I have found efforts at explaining it, I do not understand.  I see that I can convert my DAQ Assistant into a task, but then I have a task output which does not help me (I need a data output for my VI).
    I am sure this is obvious to someone that has done it a million times, but I just can't find an answer wading through all of the knowledge base information or the LabVIEW help.
    Thanks a bunch!
    ~milqman

    Hello milq,
    That following tutorial that Novatron linked you earlier is an awesome resource for becoming familiar with programming with the NI-DAQmx.
    Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications
    An important point to take away from this tutorial is that you can either create a DAQmx task using the wizard-style interfaces provided by the DAQ Assistant and within Measurement & Automation Explorer (MAX), or you can programmatically create and configure your DAQ Task in your LabVIEW code using the DAQmx Create Virtual Channel VI, DAQmx Timing VI, etc.  When you create a new DAQmx Task using the wizard-style interface, you are configuring all of the settings for your task manually.  When you use that DAQmx Task in LabVIEW (with a DAQmx Task Control or Constant), you are referencing all of those configuration options you've manually set.  To actually perform a read or write operation based on those settings, you need to wire the DAQmx Task into the 'task in' input of a DAQmx Read or DAQmx Write VI. 
    So for your analog input operation, you can wire the task directly into a DAQmx Read VI.  In the DAQmx Read VI, you'll want to select the type of task your reading from in the drop down box (Analog), if your reading from a single or multiple channels (1 Chan or N Chan), and if taking just one or multiple measurements with each call to the DAQmx Read VI (1 Samp or N Samp)
    For your digital output operation, you'll want to configure a separate digital output task, and wire it directly to a DAQmx Write VI.  Again, select the type of task your writing to (Digital), if your writing to a single or multiple channels, and if you want to perform a single write or multiple writes.
    To help with getting started with DAQmx programming in LabVIEW, I would highly recommend taking a look at the DAQmx example located in the LabVIEW Example Finder (Help > Find Examples).  A difference you'll note in these examples is that all the task configurations that you have been making with the wizard-style DAQ Assistant are done programmatically with the DAQmx Create Channel and DAQmx Timing VI.  I hope this helps and good luck!
    Travis G.
    Applications Engineering
    National Instruments
    www.ni.com/support
    Message Edited by Travis G. on 06-21-2006 05:23 PM
    Attachments:
    AnalogInDigitalOut.Jpg ‏21 KB

Maybe you are looking for

  • New bug in Calendar Alerts - adding eight hours to first alert when syncing to iPhone

    Since the latest update to iOS, when I sync calendar events to the iPhone, not only do the first and second alert reverse themselves, but the first alert resets itself to eight or nine hours after the alert time I had set on my MacBook Calendars. Any

  • Connecting two G4s

    Hi; I've been offered to "take care" of a friend's G4 (same model as mine), and I would like to connect them, first of all for filesharing, but - if possible - it would be great if they could share the internet connection, and even better if they cou

  • How can one Delete a Template in Pages

    Can any one advise me how to delete Templates in Pages on my MacBook Pro?

  • Check box on samrtforms

    Hi guys , I want a check box to be printed on the smartforms . Please any one can let me know the way to print check box on smartforms . Regards, Vijay .

  • Logic Express 9 Uprgrade: MAJOR MISTAKE!

    Hey everyone, I feel really dumb, but I accidentally bought the Logic Express 9 upgrade instead of Logic Express 9. I didn't realize this until I had opened it and tried to register the disc. I do not have and previous version of Logic, all I have is