Waveform chart slow to read samples AIs when sending AOs

Hi all,
I am using labview to sample AI signals and send AO signals sampling at 4k with 400 samples to read... The AOs are triggered using buttons on the frontal (E-stim or M-Stim).. When the E-stim button is pushed it will generate a square-wave signal with the freq and pulse characteristics as selected on frontal panel (default is 1 pulse at 50Hz)... These are pulses are used to control a muscle stimulator... So the idea is to be able to send whatever signal I want and have the stimulator deliver that same stimulus to the muscle (e.g. 10 pulses at 50Hz, or 5 pulses at 100Hz, etc etc).. To check the timing of this, I connected the AO to the "trigger in" on the stimulator and the "trigger out" on the stimulator to an AI channel... The pulses are coming through from the stimulator as expected...
However, when I send the AO pulses labview seems to "freeze" or "suspend" until all output pulses are sent... This is very apparent with a high number of pulses (e.g. 10 pulses at 50Hz)... That is, the waveform chart freezes/stops scrolling until all AO signals are sent, then the chart updates all the pulses in one hit and continuous displaying data; rathe than have each pulse displayed individually...Why concern is that AI during the AO phase may be losted ot not sampled properly...
Can anyone provide me with an explanation for this behaviour? I am using a LV2010SP1 and a USB-6218 BNC multifuction DAQ.
Thanks!
Jack
Attachments:
TMS2.vi ‏304 KB
TMS2.vi ‏304 KB

Hello Jack, 
Reviewed the code.
Remember The way labview executes code, Labview executes code by flow of information meaning that it is going to wait untill the neccesary items are ready before executing the next part of the code.
For example If we want to make a simple add function for "x" and "y" labview is going to wait untill both inputs are ready for operation before operating and outputing  "z" as a result.
It does it the same way everytime. I took the time and rearranged the code so we can understand it better, The execution happens from left to right, from top to bottom.
If we refer to the image, the arrows show us the flow of information of the VI, The DAQ assitant, the filtering of the signal and the Triggering is done before you actually output data through device1 analog output.
The code is expected to work that way cause it waits untill done acquiring with the DAQ asistant to start generating an output.
I can think of different options,
-You can modify this VI so that the output takes place regardless of the input data
-Having two different vis where you can set the read and write at different rates, using a functional global variable.
-Using a producer/consumer architecture.
This is an example that I think might be useful.
Using Producer/Consumer Architecture for DAQmx Read and Write to File
Hope this was helpful,
Luis Martinez.
Applications Engineer.
National Instruments.
Attachments:
Flow.JPG ‏146 KB

Similar Messages

  • Waveform charts slowed down control system while loop

    Hi
    In my application, I have control system which i acquire data, process and output the result. I placed some waveform charts in the while loop where i acquire data, process and output. This made while loop to miss data points( late). Is this because waveform charts store data as time passes?

    Waveform charts store data in a history buffer of configurable size. You can change it to a smaller number.
    What is the size of the history buffer?
    How many charts are you updating in your loop?
    What else is happening in your loop?
    How are you updating them (wire, local variable, value property, etc).
    How fast is your loop rate?
    Are your plots simple (thin lines) or fancy (e.g. large dots and thick lines)?
    Is autoscaling on or off?
    Are the charts set to "synchronous display" by accident?
    How many traces are on your chart?
    What is your LabVIEW version?
    What is your OS?
    Do you have overlapping elements on the front panel?
    Could you attach a simplified version of your code so we have a better idea what you're actually doing?
    LabVIEW Champion . Do more with less code and in less time .

  • Weblogic 8.1 SP 6 throws Read channel closed when sending SOAP message

    Hi,
    I am using Weblogic8.1 SP6 & Axis1 to send SOAP message through RPC call using SSL. This is working intermittently.
    I use WLSSLAdapter to set up the SSL, and some properties I set:
    System.setProperty("javax.xml.soap.MessageFactory", "weblogic.webservice.core.soap.MessageFactoryImpl");
    System.setProperty("javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    System.setProperty("weblogic.webservice.verbose", "true");
    In case of error, the server throws this:
    java.io.IOException: Read channel closed
    at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
    at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Sourc
    e)
    at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown S
    ource)
    at com.certicom.tls.record.ReadHandler.read(Unknown Source)
    at com.certicom.tls.record.ReadHandler.read(Unknown Source)
    at com.certicom.tls.record.ReadHandler.read(Unknown Source)
    at com.certicom.tls.interfaceimpl.TLSConnectionImpl.closeWriteHandler(Unknown S
    ource)
    at com.certicom.tls.interfaceimpl.TLSConnectionImpl.close(Unknown Source)
    at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
    at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Sourc
    e)
    at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown S
    ource)
    at com.certicom.tls.record.WriteHandler.write(Unknown Source)
    at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
    AT java.io.FilterOutputStream.write(FilterOutputStream.java:80)
    at weblogic.webservice.binding.soap.HttpClientBinding.writeToStream(HttpClientB
    inding.java:430)
    at weblogic.webservice.binding.soap.HttpClientBinding.send(HttpClientBinding.ja
    va:219)
    at weblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHandler.j
    ava:37)
    at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.jav
    a:143)
    at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:231)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:471)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:566)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:419)
    Before sending message, application will first retrieve WSDL from the target. This is always success.
    I need to know how to fix this problem.
    Any help is appreciated. Thanks.
    Alvin

    Hi,
    Even I am facing the same issue could any body help me out to solve this issue.

  • Waveform chart X-Axis reverses itself when upper limit is edited in Absolute Time - problem may be linked to Timestamp Control?

    I've seen this problem for some time now, and it still exists in the Silver toolset Waveform Chart in LV 2012.  If the chart is in strip mode, and you edit the upper limit value to a point in the future, the X-Axis will invert (higher values/ later time to the left), to the limit of the Chart History length.  This happens whether the chart is active (logging data on a compiled executable) or even when in design mode, though it's more consistent when there's data in the chart.  It's not history length related as far as I can tell, as I set the length to 7 days of sampling @ 1-second intervals (605K), and it happens when I try to set the end time to an hour in the future with only a few minutes of data collected - suddenly the right Absolute Time becomes the time my last sample point was collected, while the left Absolute Time becomes nearly 7 days in the future (so neither end point is what I was setting it to).
    It's nice that the chart gives the option of editing the limits, but as such, it's important that they work as you would expect them to.
    Also - until this is addressed, is there a way to lock it against editing?  Until a fix is made, my workaround is to put a transparent button over the range start & end points, and a transparent flat rectangle above all other mid-range points, and pop-up a data entry form with a Timestamp control to allow editing.  Unfortunately, this doesn't work as I would expect, as typing "11 AM" in the Timestamp control over a prior value of say "10:05:34.232 AM" ends up becoming "11:05:34.232 AM" instead.  ???  Another error - or is this by design?  If it's by design, is there an option to make it behave as I would prefer (11 AM = 11:00:00.000 AM), as Excel behaves with timestamps?  I can't help but suspect this may be linked to the chart axis issue.
    Also - I just built a simplified chart modeled somewhat on my current project, and could not get this to recur.  BUT... had the strangest thing happen:  My sample data was generated using the Trig functions for Sine and Cosine, and at one point my waveforms distorted on the display, so I'm attaching that here plus the simplified chart project.
    Last - my system is LV 2012 on Win7 Pro-x64.
    Thanks!
    Erik
    Attachments:
    Chart data distorted.png ‏45 KB
    Waveform Chart Flaw.zip ‏17 KB

    I am not so sure that this is a bug, and I have not been able to reproduce this behavior that you are describing. 
    But you can lock it from editing by right-clicking on the graph and go to Properties>>Appearance>>Enabled State --> Disabled
    Also, word of advice for the future: You will get more replies from the community with shorter posts and keeping it to one question per post. Summarize what the issue is, and put the detailed documentation and instructions to reproduce in the actual VI. 
    Huntington W
    National Instruments
    Applications Engineer
    ***Don't forget to give Kudos and Accepted as Solution where it is deserved***

  • Slow response LV7.0 and waveform charts

    I have noticed a couple of issues with a waveform chart (when actually plotting a waveform).
    1. Sometimes when I right-click on the chart to format a axes it may take up to 5 minutes to display the window with the chart format controls. During this time task manager says the application is not responding.
    2. When plotting anything with size (I am trying to plot 5 minutes of data at 512 samples/sec) the program slows to a crawl. If I plot a double data (take the Y data from the waveform) it works great. Why is there so much overhead with a waveform chart? Anyway to fix this?
    3. Unrelated to a waveform chart but related to item 1. Sometimes when I try to save my VI (~470 kb) it goes into limbo and may take minutes
    . Again the task manager says it is "not responding". This seems to be a theme with LV 7.0. Has anyone else run into this problem?

    > 1. Sometimes when I right-click on the chart to format a axes it may
    > take up to 5 minutes to display the window with the chart format
    > controls. During this time task manager says the application is not
    > responding.
    >
    > 2. When plotting anything with size (I am trying to plot 5 minutes of
    > data at 512 samples/sec) the program slows to a crawl. If I plot a
    > double data (take the Y data from the waveform) it works great. Why
    > is there so much overhead with a waveform chart? Anyway to fix this?
    >
    > 3. Unrelated to a waveform chart but related to item 1. Sometimes
    > when I try to save my VI (~470 kb) it goes into limbo and may take
    > minutes. Again the task manager says it is "not responding". This
    > seems to be a theme with LV 7.0. Has
    anyone else run into this
    > problem?
    Without looking at the waveform chart, it is hard to say. Things like
    autoscale will slow teh chart down a bit as it then needs to traverse
    more data looking for min/max. And when the scales do need to change a
    bit, all the data needs to be replotted, not just the new stuff.
    Other things that slow down a chart are to make its background
    transparent, and to make it overlapped. Finally, full screen updates on
    a big monitor mean lots of data needs to be moved around to draw lines
    and rectangles, and that either comes down to the CPU or video card.
    If you have more questions, or a VI to look at, post again.
    Greg McKaskle

  • Why does AI Read(Async​hronous).v​i cause the waveform chart to not display any history ?

    I trying to create a strip chart for 16 channels that will require displaying 10-20 minutes of data.It also starts a separate vi to set gains and offsets while displaying the data. Using AI Read.vi uses 100% of the CPU so the second vi does not run. But using AI Read (async).vi allows the second vi to run, but causes the waveform chart to not display the history? I'm using LabView version 6.0.2.

    Hi Waynes World,
    I have a couple of questions that may help us solve this issue...
    1) If you are modifying one of our example programs, which one did you start with?
    2) What kind of analog input are you doing? Buffered? Finite or continuous?
    3) Have you tried increasing the buffer size of the strip chart? This will allow the chart to store more data in it.
    4) When you use the Async VI, and when you are using the other, can you describe how the strip chart is showing the data... does the data in the chart keep growing and growing... or does it clear itself and start over when the pine reaches the end?
    I think this issue is rooted in how the buffer is being used with the two different AI Reads and how it returns data to the chart.
    On a side note, have you considered upgrading to a newer version of LabVIEW? Our latest versions of LabVIEW come with many new features and it is signifigantly easier to use.

  • Is it possible to read scalled data in 2D Waveform (DBL) at 2M Hz Sampling rate?

    I am using PXI Real time for my acquisition.
    NI PXIe-6368
    Simultaneous X Series Data Acquisition.
    It is supporing 2MHz sampling rate; When I am reading unscaled data, there is no problem.
    But when I am reading scaled data, I am getting,
    execution get stop or 'Run Out of memory' error.
    Can you please help me on this?
    I am not able to share the code, right now. I will try to share in personal.
    Thank you,
    Yogesh Redemptor
    Regards,
    Yogesh Redemptor

    Hi Allan,
    If you provided some numbers, we may be able to nail this issue for you. Without them I will just guess.
    The error codes you reported indicate that the app is not keeping up with the incoming data. If you are sampling 4 channels at 50kS/s then the hardware is transfering 200 kS/s into its on board FIFO. Page 344 of the NI catalog indicates that the FIFO can hold 2048 samples before it over-flows. The -10846 error indicates that these over-flows are occuring. To prevent this, the app must completely empty the FIFO more frequently. Doing the math this works out to one empty operation every 10ms maximum.
    This is a rather demanding rate. This only addresses the -10846. The -10845 error is troubling. The hardware you are working with may not do the j
    ob.
    Suggestions:
    1) make sure your app is reading at least this often.
    2) slow down you Acq rate (I know, not an option)
    3) DO NOT TRUST ME! Call NI and talk to their hardware support group and ask them;
    a) "Can I do continuous acq from X channels at Y rate using a DAQCard 6024E?"
    b)If yes, "Could you point me at an example?"
    c)If no, "Can I get credit on this device toward a purchase of a device that can?"
    I hope this get you started.
    Reply to this answer if you have further inquiries,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Read from Measurement File to XY on Waveform Chart

    Something pretty simple that is giving me a hell of a time right now.
    I've got a .lvm here that has been saved from a DAQ and has one column of numbers starting from 0.0000 - 27.0000 in very small steps. The next column is amplitudes of the signal at the given time. Now, from this LVM file I'm starting a new vi and I want to read those values as X and Y and get them onto a waveform chart. As of right now I've tried hooking up "Read From Measurement File" and tried "Build Table" but that won't want to plug into a chart. Plugging the file directly into a chart causes two very different lines to show up but is no where close to what I'm looking for.
    Any tips as to how to complete this?
    Solved!
    Go to Solution.

    Tasty,
    More often than not I find Express VIs to be more trouble than they're worth. Here's an example of reading tab delimited data in from an .txt and plotting Y values versus X values on a graph. Hope it helps.
    Andrew
    Andrew
    Attachments:
    ReadData.vi ‏14 KB
    data.txt ‏1 KB

  • Using Waveform Chart, inconsistent results when setting X range and delta X properties

    I have isolated my problem to a simple vi consisting of only a waveform chart (attached). I am using LV 5.1.1. I have used an attribute node to set x minimum to 0, x maximum to 10, delta x to be entered by the user, and have turned autoscaling off.
    When I plot 2 random points, x maximum is inconsistent, and doesn't stay at 10 when the vi is run several times in a row. Specifically, the first time the vi is run (after delta x is changed), x maximum changes. Then, the second time it is run, the max typically goes back to 10. However, when run several times in a row, x max will fluctuate. Specifically, I tried entering a delta x of 8. Mostly, the min is 0, max is 10,
    and the line between the 2 random points plots from 0 to 8 along the x axis (good). However, every once in a while, the x max will go to 8.
    This behavior is very strange, and will not allow me to program my actual application correctly until I fully understand what is happening. I would assume since Waveform Chart has these attributes to set, I can still using the Waveform Chart, and don't have to completely restructure my program to use another display.
    Attachments:
    deltaX2.vi ‏28 KB

    That is the expected behavior, it is only that you don't assign the properties in the right order. If you set the XScale.Multipler before min and max all is how you expect it. When you set the multiplier, min and max are automatically changed to reflect the scale changes thus overwriting your previous settings.
    LabVIEW, C'est LabVIEW

  • Reading coordinates in waveform chart graph

    hello!
    i have a problem using the labview, and i hope someone could help me.
    so, i have a project for a class, and for that project, i have to read the coordinates on the waveform chart.
    in vissim, there is a simple command, if you click the right mouse button on plot, you have an option "read coordinates".
    basically, i didnt found that or similar option in labview.
    if someone knows how to read the coordinates accurately , i'd appreciate if you would help.
    thanks

    Mouse down event wire click location to Map XY To Coordinates.... ?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Horizontal scrollbar of waveform chart in tab page resets to end when tab page switched

    I've got a VI in LV 2012 with a chart in one of two pages of a tab control.  Whether compiled to an executable or not, when the waveform chart contains data that is no longer being updated and the x-axis range doesn't show the last point of data, the horizontal scroll bar auto-adjusts to show that last point if you switch pages (back to the chart) on the tab control.  I've tried turning off Autoscaling but that doesn't stop the effect. 
    Additional issues: 
    On some of these attempts at reproducing this, the X-Axis will even change scaling, zooming in on the data.
    When data is pushed left by this bug to allow displaying the furthest data point, if the leftmost area of the chart was blank before the data was pushed left, the data pushed left into the formerly blank area will not be displayed.  This happened only when the X-Axis was manually autoscaled prior to pushing the data off the right edge of the chart, and only if the x-axis scale was not changed.  If the tab pages are again switched at this point away and back to the chart, the data re-appears.
    The chart is a stacked plot if that makes a difference,  Also, the tab control is not linked to any event handlers.
    Also, the scrollbar works fine if you scroll such that the rightmost data points are on the chart along with blank area to the right, whether there is more data off the left edge of the chart or not.
    Last, the Y-Axis of each stacked plot is unaffected by any of this.
    I hope this isn't a duplicate - I didn't find it in the forums.
    Thanks,
    Erik
    Attachments:
    Flaw Demo.vi ‏120 KB

    Alex,
    Thanks for the quick response on this.  Again, the charts are awesome except for these minor fiddling details.  Sorry about the terminology confusion - I didn't find anything in the Help system naming the legend buttons, and unfortunately I can't edit the prior post.  When I said "AutoScale LocK" I meant "Scale Lock", and "AutoScale Once" I meant "Autoscale".
    Here are the issues, hopefully clarified:
    1.  If any chart elements have Scale Lock set, pressing the AutoScale button for any plot causes these other plots to autoscale as well.  Note these are not plots with multiple Y scales, they're stacked plots with separate y-scales for each plot.  Changing the "Advanced->Auto Adjust Scales" parameter had no effect on this issue.
    2.  If none of the chart elements have Scale Lock set in the scale legend, pressing the Autoscale button for the X-Axis has no effect if the x-axis was previously set to show all the data history but then panned such that some data falls of either side of the chart.
         This may have been confusing, so here's a breakdown of the steps to re-produce the problem using the VI I previously attached.
    a.  AutoScale all elements of the chart, and turn off Scale Lock on all elements
    b.  Move the data to the right in the chart, so the left half of the chart area has no data (e.g., set the X-Axis range to -5 to 6 seconds)
    c.  Press the X-Axis AutoScale button.  The X-Axis range will not change from where it was in (b).
    3.  The Y-Axis will also auto-scale when returning to the Chart tab if Scale Lock is enabled for the plot with the fix for the x-axis scale in place (restoring the Xscale.Range parameters from a local variable).  If the fix is not performed, this doesn't happen.
    4.  Pressing the Scale Lock button on one of the plots causes the X-Axis scale to be lost IF there is data past the maximum displayed X-Axis range.  It looks like it set the X-Axis to the same problem range as before the fix was in place.  I don't know how to build an event case for this, except for possibly "Mousedown?".
    One more:
    5.  Enabling Scale Lock on any plot auto-scales any other plot that has Scale Lock enabled (assuming the user changed the Y-Axis range from the previously auto-scalled range).  Obviously this is linked to #1 above, but worth noting.
    Thanks again, Alex!
    Erik

  • Why does Waveform Chart Initalized by Property nodes behave erratically when hidden such as by the Tab Control?

    I am using wave form Chart on a tab control. The problem is that the chart works fine when it is showing. I can stop the data and reset the chart history successfully. The Fun begins when I go to say Page 2 of Tab control ( The wave form Chart is on Page 1). If I now try to initilize my chart with offset, multiplier, min and max rage values - The chart assumes values on the X scale which are arbitrary. I can see this when I go back to Page 1.!!
    But If Page 1 were showing and I did the same Operation The chart behaves as I expect it too.
    Can this behaviour be explained? How do I resolve this Problem? Also I have Observed that from time to time the Sca
    ling on X Axis may also change when the Chart is Hidden by the tab control. I have not been able to identify the reason for this, It is totally random.
    Good Luck!
    Mache
    Attachments:
    Time_Tab.vi ‏50 KB

    I did a similar workaround ...
    Everytime I Toggle the Run Button, I am making sure the active Tab is the one with Waveform Chart. This way the waveform Initializes fine. Then I try to Switch the active tab back to its One Previous Value, programatically - So that the user may have somewhat seamless interaction.
    There is one hitch however - The waveform Chart needs some time to initialize and my data stream is also coming at every second. So if I switch Immediately to some other tab, Sometimes I am successful, Sometimes I am not. Again this depends om System Speed and such. If I update the Tab Control at the next iteration, it is very irritating visually. So I left the Tab control at the waveform chart after reset. If the User wants they can switch it Bac
    k.
    Of Course the best thing to do is don't Reset. Referred the problem to NI Apps. They said it will be fixed in the next version.
    Well! Got to make enough money without resetting so that we can buy the new Version, which will reset!! Ciao! And Thanks for your answer.
    Regards,
    Mache
    Good Luck!
    Mache

  • Can waveform chart be given focus when modifying y-axis numeric scale

    Hello,
    I have an application where I have a waveform chart (LV7.0) and a string variable on the same screen.  Since, in this application, a user inputs data into the string with a bar code reader, and since that can happen at any time, I constantly give the string control key focus.  This is done within a loop.  The problem is, I want to be able to double click the y-axis scaling on the chart and modify it at runtime, effectively zooming in or out on the chart.  Ideally, during modification of the chart, the chart would have key focus, and I'd set keyf ocus on the string control to be the inverstion of the key focus of the chart... but that doesn't work.  Does anyone know how to do what I'm trying to accomplish?
    Thanks.

    Hi rickford66,
    i think you can use an event structure for it. Set the key focus of your control in the timeout case. You can change the timeout depending on the user events. Another solution could be to use the key down event of the VI to read the barcode.
    Hope it helps.
    Mike

  • How to use ni-6008 and build a four channel data acquisition at a rate of 250 samples per channel and display all the data in a waveform chart

    how to use ni-6008 and build a four channel data acquisition at a rate of 250 samples per channel and display all the data in a waveform chart 

    Hi kdm,
    please stick in one thread for the same topic!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Plot more than one analog value to a waveform chart by reading from Serial Port

    I have 4 LDRs and I want to plot their values to a waveform chart by reading them from the serial port. I have looked around and found an example of a VI plotting one value to a waveform chart (attached below) but I am unsure about how to expand this for 4 different waveforms, mostly because I don't particularly understand the way is being read currently. If someone could either point me in the way of a relevant example or explain/show me a solution, or explain howthe current VI I have works, that would be greatly appreciated.
    Attachments:
    LDRread.vi ‏20 KB

    Since I assume each LDR (whatever that is) has its own serial connection, you will need to read from 4 different serial ports.  From there, just form an array of all the data and write to the chart.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Maybe you are looking for