Appending Waveforms in Loop

Hi all,
my goal is to continuously acquire measurement data as a fist step, in a for loop I want to read all the data from the buffer continuously in a waveform format. In the loop, I want to append the waveforms each iteration in order to use it for logging at a certain time and for displaying at other times.
Using arrays, this is no problem using the build array function, however, I have some trouble doing the same thing with waveforms of multiple channels.
Please find the attached VI and thank you for any advice on this problem
Regards,
Jack
Attachments:
problem.vi ‏83 KB

Hello,
I have looked to your code and I have seen one mistake in the For Loop.  
As you can see the size of the array is zero it implicate zero iteration of For Loop and an empty array of waveforms on the output . 

Similar Messages

  • Can I append the file name from a Foreach Loop Container Enumerator into a SQL Server Statement?

    I would like to pass back via an Email the name of the file that was successfully FTP'ed to a remote server. And I was hoping to do this via an Execute SQL Task with the following SQL Statement...but I just don't know if it will append the Foreach Loop Container
    variable enumerator to the appended Email message that I am building in SQL Server or if I can and how I can...
    I sort of get the feeling that I can try and do this via Dynamic SQL...I just don't know if by building dynamic SQL if my Foreach Loop Container enumerator variable will be appended to my Email Message via the SQL Server UPDATE 
    @[User::FTPFHFileName]
    Or do I add a Data Flow Task and an OLE DB Command and pass the Foreach Loop Container enumerator variable to a Stored Procedure referenced in the OLE DB Command via a "?"
    Thanks for your review and am hopeful for a reply.

    Hello,
    It seems that the issue had been solved and thanks for your sharing. It will be very beneficial for other community members who have similar questions.
    I’d like to mark this issue as "Answered". Please also feel free to unmark the issue, with any new findings or concerns you may have.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Using assign-activity:Append to append child nodes in XML-tree within loop

    I would like to produce an XML looking something like this (just an example):
    <Customer>
    <Name>Tom</Name>
    <Invoices>
    <Invoice>
    <InvoiceData>.....</InvoiceData>
    </Invoice>
    <Invoice>
    <InvoiceData>.....</InvoiceData>
    </Invoice>
    </Invoices>
    </Customer>
    For different reasons (composite PK's in DB etc) I have to first get the Customer-data, and then get each Invoice for that customer.
    Then I have to loop the Invoices and append each Invoice-node to the XML, ending up with the whole thing when the loop is finished.
    This should be pretty simple (I guess), and I have tried different variations of the Append (assign activity), but everytime I end up with only the last Invoice-node.
    I can see in the Flow-window of the BPEL Console that it is not the same Invoice-node I'm appending within the loop-iterations, so that can not be the case in any way.
    In other words it seems to copy instead of appending.
    What is wrong ?
    Is this a bug in the Append function ?
    Any suggestions to other approaches that might work ? (I have to use the loop to get 1 and 1 Invoice-node though, and in that way put the whole XML together in some way)
    Edited by: user1694182 on 09.okt.2008 05:08

    Thank you for your answer.
    After taking your "debugging"-suggestions at hand and running some tests, I can now see that it gets appended in some way, but not correctly.
    1st LOOP ROUND:
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>308</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    Correct so far.
    2nd LOOP ROUND:
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>322</measurePointId>...</measurePoint>
    <measurePoint><measurePointId>322</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    So now it appends the new measurepoint, but overwrites the 1st as well... Strange..
    3rd LOOP ROUND (last round):
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>382</measurePointId>...</measurePoint>
    <measurePoint><measurePointId>382</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    So suddenly the same Append doesn't append, but overwrites the 2 I had with the new measurepoint...Strange...
    WHAT I DO IN MORE DETAIL:
    1: Assign(copy) the whole XML in the 1st loop round. (Copy - FROM: submitInstallation_InputVariable - TO: Powel_InstallationServiceInput)
    2: Within each loop round I collect the whole XML with just 1 measurePoint (TransformActivity - FROM: DBAdapter-output - TO: submitInstallation_InputVariable).
    3: Within each loop round I then append the new measurePoint (collected in step 2) to the measurePoints-node. (Append - FROM: submitInstallation_InputVariable - TO: Powel_InstallationServiceInput)
    PS! I can see in the BPEL Console that it is a new measurePoint that gets collected in step 2, and just 1 node.
    Help/tips on this is very appreciated ! :-)
    Edited by: user1694182 on 14.okt.2008 00:57

  • Append data to a waveform graph

    I am using the Acquire N - Multi-Digital Trig to acquire a series of data. I wish to store the data acquired, by saving them into a file (Export Waveforms To Spreadsheet File) however, the waveform graph data are not appended. I have tried to see the example provided for appending data to a waveform graph (example.zip) on this webpage but I wasn't able to apply the principle to my application. (I have even tried the Append Waveforms.vi function but I cannot connect it to the waveform graph data).
    I will appreciate it if I can have any suggestions on how to append the waveform graph data, so as to store them in a file.
    Thank you

    There is an Append Waveforms.vi that you can use for this. It's located in the Functions>>Waveform>>Waveform Operations palette. That will append two waveforms, which is different from just an array. If you only want to append arrays, you can use the Build Array function to concatenate two arrays.
    J.R. Allen

  • Generating a tri state waveform pattern and writing into DAQ card

    Hi,
    I am using LV8.0 and NI-6259 DAQ card.
    I want to generate a waveform pattern which initially goes to +5v and goes to 0v and then again goes to -5v
    and finally goes to 0v. 
    I have used the waveform pattern generator and have generated 4 kinds of waveform with some particular samples
    and I will be appending all the 4 waveform patterns(+5, 0, -5, 0) and the appended waveform will be written into DAQ card.
    The problem is:
        When I probe CRO at the Analog output pin of the DAQ card, the pin level will be always at +5v and sometimes
        it goes to 0 and back to +5v. But I am expecting a waveform with 3 voltage levels i.e.., +5( some 100 samples), 0v(for some 1000 samples.
        -5v(same as +5v) and 0v( 2000 samples). 
    How to get this kind of waveforms in NI-6259 DAQ(M Series) card.
    Please find the attached VI which I have created.
    Letme know the loophole in the VI and correct way of generating a tristate waveform.
    Thanx in advance, 
     Yogesh
    Attachments:
    PWM_sample.vi ‏43 KB

    Hello YogeshaYS,
    Thanks for your post!
    I see that you are wanting to output a waveform that goes from 5 to 0 to -5 and then back to 0. It looks like from your code that you want to do this in a continuous fashion? If this is so you will need a while loop to output the waveform. Take a look at one of our shipping examples that shows how to do analog output waveform. Go to Help >> Find Examples. When here go to Hardware Input and Output >>  DAQmx >> Voltage >> Cont Gen Voltage Wfm-Int Clk.vi. Your VI works great but it only does the output once so that may be why you see some interesting results on your output. Let me know if any of this information helps you with your program. I was able to run it in a continuous mode and see the voltage levels go from 5 to 0 to -5 just like you were wanting. Have a great day YogeshaYS and please reply if you have any other questions on this. 
    Cheers!
    Corby_B
    http://www.ni.com/support 

  • How to playback a digital waveform

    Hi I would like to do some post processing work on a digital graph data. I would like to use 2 seperate VIs for data acquisation and post processing. So first I acquire the data  then pass the whole waveform data as an input to the other subVI but I olways get the last waveform  . Could you please let me know how I can pass the whole information about a continous digital waveform without saving it on disk
    thanks

    You can do a variety of things, such as building an array of waveforms by auto-indexing them where you wire out of the aquisition loop.  Alternatively, if you want just a single long waveform, the Append Waveforms.vi (Functions -> Programming -> Waveform -> Analog Waveform) should do nicely.  You can also manipulate the waveform components directly and append the data arrays if you want some more control over it, but that's pretty much what the built in vi does.
    The Colex Group
    Lead Software Engineer
    Certified LabVIEW Developer

  • Shifter register for array of waveforms

    Hi guys,
    I was trying to use shift register to append waveforms from multiple channels to their previous waveforms correspondingly.
    The problem is when I click the stop button on the front panel and saved the data, the data file contains nothint except for some words like "waveform","t0", and "dt".
    The attachment is the image of my VI.
    Thanks!
    Jude
    Attachments:
    screencap3.png ‏101 KB

    Your problem is your FOR loop at the bottom.  When you first call this VI, the shift register will have the default value for the data type.  In this case it will be an empty array of waveforms.  A FOR loop will iterate the smallest of the size of the smallest autoindexing input array or the N.  Well, the smallest will be 0 because of that empty array.  So the FOR loop actually does not run at all.  It just outputs an empty array.  What you need to do is put a case structure around that FOR loop.  When the loop index of the WHILE loop is 0 (first time reading anything) set the output to the waveform you just read.  If the loop index is greater than 0 run the FOR loop like you have now.
    If you look at the VI I gave you here you will see what I mean.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • 1D array of waveforms to single waveform

    I'm got a continuous data application which results in an output of a
    1D array of waveforms.  This is done because the VI reads the
    waveform out of the buffer at certain intervals in  a loop, which
    seems to be the only way to acquire data in a continuous mode at high
    speed off of a non NI card, as reccomended by the manufacturer,
    Measurement Computing.  The waveforms are passed out of the loop,
    becoming a 1D array of waveforms.  I need to append the array
    elements to one another (waveforms) to end up with a single waveform to
    ease the latter processing.  I'd prefer to do this using the time
    stamps to make sure there are no misalignments, but I'd settle for a
    simple method to append them to one another.
    I've tried using the append waveform VI in a loop with what I thought
    was appropriate logic, but I always seem to end up with just a portion
    of the original data.  Help is greatly appreciated. FYI I'll be
    out of the office until Tues, so I won't be using info this until
    then.  - Thanks.

    How exactly are you using the Append Waveform in a loop? Using it in a for loop like in the attached picture should work.
    Attachments:
    Append Waveforms.JPG ‏8 KB

  • Adding waveform from

    Hi,
    I wrote an application using USB 6215 DAQ in order to aquire analog signal on AI0. I aquire signals in continuous mode, that means loop structure is used. I would like to add waveform from loop iteration 1 to waveform from loop iteration 2 (loop iterations ale 1,2,3,4,5,6...) in order to compare them. In loop iteration 2 so I will have waveform from iteration 1 and iteration from iteration 2. Next iteration (3rd) I would like to have waveform from iteration 2 and iteration 3 to compare them. I used append to waveform VI, but I always want to see only 2 waveforms (from current loop iteration and from previous iteration). Any suggestion?
    Kindest regards,
    Tomaz Lusin

    Hi tomaz,
    If I understood your question, this should do what you need.  I used a waveform generator as I don't have a DAQ source on this PC.
    Regards,
    Jim
    LV 2013
    Attachments:
    WaveLoop.png ‏5 KB

  • Problem with loop condition

    Hi :
       i am selecting the records based on s_date, but i want to display records for each week for which i am using R_DATE.If i enter 1month duration on selection screen, i wil display records for each week based on r_date.
    But my program is not entering the loop.Its displaying all the records together for the duration s_date only.
    In the loop, i am collecting the data into other internal table so that i can download the records into excel sheet.
    DO v_weeks TIMES.
       CLEAR v_newdat.
       CLEAR v_date1.
        CLEAR datef5.
        CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
          EXPORTING
            date      = date2
            days      = 7
            months    = 0
            signum    = '+'
            years     = 0
          IMPORTING
            calc_date = datef5.
        REFRESH r_date.
        r_date-low = date2.
        r_date-high = datef5.
        r_date-sign = 'I'.
        r_date-option = 'BT'.
        APPEND r_date.
    LOOP AT it_tab  where erdat IN r_date.
          it_tab1-v_cnt1 = v_cnt1.
          it_tab1-v_cnt2 = v_cnt2.
          it_tab1-v_cnt3 = v_cnt3.
          it_tab1-v_cnt4 = v_cnt4.
          it_tab1-date2 = r_date-low.
          it_tab1-datef5 = r_date-high.
          APPEND it_tab1.
          CLEAR v_cnt1.
          CLEAR v_cnt2.
          CLEAR v_cnt3.
          CLEAR v_cnt4.
          CLEAR v_cnt.
          CLEAR v_newdat.
          CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
            EXPORTING
              date      = datef5
              days      = 1
              months    = 0
              signum    = '+'
              years     = 0
            IMPORTING
              calc_date = v_newdat.
          date2 = v_newdat.
        ENDLOOP.
    Thanks.
    Raghu

    Hi Suresh,
       it_tab has the records for the dates entered in S_DATE, but i want to collect records based on r_date into other internal table it_tab1 so that i can download to excel.
    thx

  • How do i create this waveform?

    I can't make this signal on my own... Can somebody help me plz?
    The signal thus consisted of:
    1. Window 1: wave of 40 Hz and amplitude 3 extending from 50 to 375 ms
    2. Window 2: wave of 170 Hz and amplitude 3 extending from 130 to 170 ms
    3. Window 3: wave of 60 Hz and amplitude 3 extending from 400 to 425 ms
    4. Window 4: wave of 20 Hz and amplitude 4.5 extending from 450 to 475 ms
    5. Two Gabor atoms with amplitude of 3.5, width 10 ms and frequencies of 90 and 170 Hz that were centered at 225 ms and 250 ms respectively.
    It should look something likt the picture in the attachtment
    With Kind Regards,
    Patrick
    Message Edited by MrHond on 06-20-2006 12:11 PM
    Attachments:
    sinusverzameling.JPG ‏15 KB

    Hello,
    In the Labview shipping examples there is an example on how to append waveforms in labview. Go to: Help>>Find examples. In the example finder select the search tab and enter: creating waveforms. There will be an example called: Append Waveforms example.vi.
    Regards,
    RikP
    National Instruments 
    Rik Prins, CLD
    Applications Engineering Specialist Northern Europe, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • Big waveform to text

    Hi,
    I have to append waveform arrays to a single waveform then convert them to text file. 
    There are 8M lines (rows) X 60 column of character (maximum).
    Then, I m facing "not enough memory" problem, and I think I have to save the waveform to binary files. But for viewing purpose, I still have to convert them to text file. 
    Any idea to view big waveform ? 
    Here I attached the VI and waveform which saved in binary format. Please advise. Thanks. 
    Attachments:
    readBinaryToWfmToASCII.zip ‏204 KB

    Is there a reason to use text vs binary?  I usually switch to binary at about 10,000 points.  That said, the advice you were given above is good.  You can't do it all in one step.  You have to break it up. I have one more tip for you.  If you save your data so each text field is always exactly the same width (it can be padded with spaces), it is trivial to seek to a specific line by calculating the offset from the beginning of the file.  With variable length fields, you need some sort of indexing.  At that point, you should probably use binary (try TDMS or NI-HWS).
    You may also want to read the tutorial on handling large data sets in LabVIEW.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Struggling With the VIDEO TAG (loop)

    After a lot of attempts got this to work:
    var vid = $("<video autoplay width='768' height='594'>" +
              "<source src='back_new.mp4' type='video/mp4'/>" +
                                   "</video>");
    sym.$("vid_down").append(vid);
    but loop is not working... any thoughts?

    Immediately after
    sym.$("vid_down").append(vid);
    add this
    vid.attr('loop','true');
    hth
    Darrell

  • Appending Square Waves

    Hello I am trying to create a VI that will generate a waveform from two 1D arrays, one for the amplitude of a section of the waveform and another for the duration of that section. For example if I were to put in [1,2,3] into the amplitude array and [2,5,10] into the duration array I would receive a graph that had an amplitude of 1 for 2 seconds, then amplitude 2 for 5 seconds, then aplitude 3 for 10 seconds. I am using the Append Waveform function to do this.
    I have a VI that will generate the amplitudes correctly, but the delays do not work, each amplitude is only true for one second a piece, no matter what i put into the delay array. Does anyone have any suggestions on how to force the amplitudes to be active for a given amount of time?
    I have attached a picture of my code so far.
    Thank you
    Solved!
    Go to Solution.
    Attachments:
    Waveform.PNG ‏19 KB

    I think this will do what you are looking for.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Step Waveform.vi ‏13 KB
    Step Waveform.png ‏45 KB

  • LeCroy wavesurfer acquisition loop slowdown

    Hello,
    I am trying to acquire waveforms from a wavesurfer 434 over ethernet, and I am running into a problem where the scope triggers and then displays a "Processing... " message for multiple seconds before the scope is ready to trigger again. Timeout errors occur even though I am feeding the scope a 10Hz signal (the timeout is set to 10 seconds). This only happens once every 2-3 triggers, and I do not have any of the math, measure, or averaging features enabled on the scope, so I am not sure what is being processed. When I do not have the VI running, this does not occur in either normal or single trigger mode (ie, this does not occur if I manually press the "single" trigger button on the scope multiple times).
    More information:
    - I am using the example vi, "LeCroy Wave Series Acquire Waveform In Loop.vi," from the 3.2 revision of the driver package and have not modified it.
    Thank you in advance for any tips/suggestions.
    Attachments:
    LeCroy Wave Series Acquire Waveform In Loop.vi ‏24 KB

    Might want to check the following whitepapers:
    Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
    http://www.ni.com/white-paper/2835/en/#toc4
    Timing and Synchronization Features of NI-DAQmx
    http://www.ni.com/white-paper/4322/en/

Maybe you are looking for

  • Dunning - ST22- Exception in GET_DUNNING_CUSTOMIZING FM.

    Hi Experts, Issue is, When the user ran the Dunning report on July 16th, (selection criteria is--> July 16th & From customer 1 TO customer 999999999), bcoz of some thing, at CUST_444, the Exception was raised (say, for customers CUST_111, CUST_222, C

  • Contracts with different Currencies

    Hi SAP experts,is it possible  to create a Contract with different currencies in line items for a vendor???.Thank you for any advice.

  • Reference date of last data load in query

    Is it possible to referece the date of the data load in a query via user exit / formula variable or some other way? We have a requirement to display data in a query based on when the data was last loaded. If the data load has not occured this month,

  • SL - Pages & Printing problems

    I have upgraded to SL. Since then my business logo doesn't print properly. It has a colored design with some gray scaled lettering surrounding it. When I select it and copy to another application such as : Word - it then has a black background as doe

  • Decode does not work for line breaks

    Hi experts, In a BLS, I am decoding a string which I output .  It decodes the spaces but not for linea breaks.  What is wrong ¡? Thanks and best regards, Antonio Rodriguez  Rubalcaba