Read waveform from FPGA

We just got an NI PCIE-7851R FPGA board.  I need to do someothing very simple but haven't found yet how to do it.
I want to read the four A/D inputs at a selected sample frequency, and once per second from my host computer read the resulting samples as four waveforms.
I see how to read one sample at a timne using the example program but not multiple samples in a waveform.
Thanks.

I don't remember seeing an example on how to do this, but what it takes is a memory buffer that the FPGA dumps samples into, and then host reads from.  This is usually a DMA FIFO, but other FPGAs have other memory, like LUTs, DRAM and a several others that can hold values temporarily.
http://zone.ni.com/reference/en-XX/help/371599G-01​/lvfpgaconcepts/fpga_storing_data/
http://zone.ni.com/reference/en-XX/help/371599G-01​/lvfpgaconcepts/fpga_transfer_data/
http://zone.ni.com/reference/en-XX/help/371599H-01​/lvfpgaconcepts/fpga_dma_how_it_works/
There is some faith involved in that the host gets these samples and you have to assume they are taken at the sample interval you expect.  But running on an FPGA it is much more dedicated than something like Windows and it will do the work the way you asked.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Similar Messages

  • Read waveform from file error: end of file

    Hi,
    I want to to save waveforms from DAQ and then, after the acquisition is stopped, I want to see again that waveforms to analyse my data.
    I tried to do a simple VI in which simulated signals can be saved to a file and can be read drom that file too. This is possible by using a Save Button and a Read Button. The problem is that when the Save Button is OFF and the Read Button is ON the error "End of file" occours, even if I know that there are more data that can be read from the file.
    I read from
    http://forums.ni.com/t5/LabVIEW/End-Of-File-Error/m-p/387817#M193812
    that this could be solved by choosing the option "Reload for each call" for the Read block, but it doesn't seem to work.
    Does anyone have an idea to solve that?
    Thanks
    Attachments:
    waveform write and read.vi ‏71 KB

    First, a suggestion -- since your file name is the same every time, put a single instance of it outside your While loop and bring it into the loop as a "tunnel", using the same wire for all your Case statements.
    I don't understand the logic of your construction.  You have a While loop that never stops.  As long as "Write" is true, it writes to a (new originally?) file, presumably appending at the end, closing the file after the write.  If Read is true, it tries to read the i-th Waveform.  What if there are less than i writes?
    Why not simplify things.  Remove the While loop, remove the Case Statements and Read/Write buttons, and simply do one Simulate Signal, one Write, and one Read (not wiring anything into the Read's Record selector).  Does that work?  If so, then think about how you might extend this to handle multiple reads and writes.  Is there ever a situation when you envision doing Reads while you are also doing Writes?  Isn't it more likely that, at any instance, you are going to be doing only Writes (for example, while generating data) or only Reads (while analyzing the saved data)?  [I'm not saying that you might want to do both simultaneously, but if you don't have to, don't complicate things for yourself].
    Bob Schor

  • Saving portion of data acquired from FPGA and visualize it on HOST RT Waveform Graph

    Hi all,
    i'm using FPGA to acquire data @1 Mhz from a Custom module in a SCTL an place it in a block memory Target Scoped FIFO1 Block memory of 1023 elements.
    What i want to do is acquire a known waveform and and visualize acquired data just to check if data is corrupted or if samples are correctly representing waveform.
    I'm reading data from FIFO1 and placing in a MEMORY in another SCTL to not affect 1st SCTL.
    My intention in this is to create a one shot reading operation to place 1023 elements from FIFO1 to MEMORY (attached pic).
    After this i have another while loop that perform communication with the HOST to read data from MEMORY.
    data type is FXP signed 24 bits word with 24 bit integer part. 
    I cannot visualize anything on the host waveform graph.. Can you tell me why?
    I've attached FPGA vi and HOST vi.
    Thanks in advance.
    Attachments:
    1.png ‏60 KB
    TEST acquired waveform.vi ‏170 KB
    Host Testing Acquired Data.vi ‏112 KB

    Hi Mariano,
    I need your complete project in order to review your application. Anywhere, you could try to run this example, that shows you the best practice in order to achieve data integrity ensuring no underflow/overflow events in data transfer.
    In RT VI you can try to use Type Cast function in order to obtain DBL values from FXP ones.
    Look @ this white paper that allows you to use floating point in FPGA side.
    I hope that the above informations will help you in solve your issue.
    Best Regards.
    CLA_CUP

  • Reading Waveform (.hws) files from Analog Waveform Editor into LabVIEW causes read errors

    Hi Gang,
    In my application, I want to create files Using the Analog Waveform Editor and then, through LavVIEW, play them out through an D/A.
    I've not been able to read the .hws file into LV.  I've tried two methods:
    Using the Read Waveform VI in the Waveform palette, yields Error -1821.
    I looked in the knowledgebase and found the article "Using the Analog Waveform Editor and HWS Files with Multifunction DAQ Devices"  That recommended using the HWS VIs that are a part of the FGEN driver.  I tried that and get an Error -21515.
    The file I want to read is quite small, only 20 samples.  Is there some limitation on .hws files or the Waveform Editor I'm not aware of?
    I've attached the file if anyone is willing to experiment. I had to change the extension from .hws to .txt to be able to attach it.
    All responses will be appreciated.
    Thanks,
    Roger
    Solved!
    Go to Solution.
    Attachments:
    Havesine.TXT ‏108 KB

    Interesting. I tried to look at your file with the low level read .hws file vi's and I too got error -21515. So I tried the NI-HWS express load.vi and it looks like it worked. I'm not familiar with the analog waveform editor...does it store using the dynamic data type? Oh I converted the dynamic data to 1d array of waveforms using the convert from dynamic data.vi.
    Using LabVIEW 2010SP1 and TestStand 4.5

  • Trouble capturing waveform from PXI-4472

    I'm really a very green newbie at this stuff, so bear with me...
    I've got a PXI-4472 data acquisition board and a PXI-5411 waveform generator. I've connected the arbitrary out of the 5411 to the channel 0 in on the 4472. An external oscilloscope shows a 1v-amplitude sine wave being generated.
    I created a very simple VI to show what the 4472 is capturing. It connects a NI-DAQ channel I generated to the standard "AI Acquire Waveform.vi", then out to a Waveform Chart, all within a while loop with a Stop button. Problem is, all the waveform chart seems to be showing is the running average of the waveform instead of the form itself (solid line, a tad above zero).
    I can hook the 4472 input channel up to a DC-out power supply, a
    nd when I vary the voltage, the waveform chart changes as well.
    So my question (whew!): What's wrong here that's not allowing me to capture a waveform from the 4472 (in turn from the 5411) and display it on my waveform chart?
    Thanks in advance for the help.

    Never mind.... it was a sample rate problem. I upped the sample rate and it came out ok.

  • When I record an audio track, there is a waveform. When I stop recording, the waveform disappears and becomes a straight line. It also disappears from the track edit window. But the sound is there. How can I stop the waveform from disappearing?

    When I record an audio track using Logic Pro X, there is a visible waveform which appears as I record. When I stop recording, the waveform disappears and becomes a straight line. It also disappears from the track edit window. But the sound is still there. How can I stop the waveform from disappearing? And can I do something to view it after it has disappeared? Anyone know the anser?

    In Logic:
    Preferences/Audio Set Recording Delay to 0 <zero>
    This should always be set to zero unless a specific set of circumstances exist and you're audio drivers do not report position correctly.
    On occasion, usually when importing a Logic 9 project, Logic-X randomly changes this to a negative/positive number.  It's actually a bug in Logic, as it should always display the waveform.

  • Read data from 3 arduino analog pins

    Hi, 
    My name is Jack. I have a question about how to read multiply data from arduino analog inputs in labview. I have tried to read data from 2 pins by using same way (continuous analog samples) and the system works well. However, I failed in reading data from one more pin, no matter I used the same way as to read continuous analog samples or the method to read analog voltage. 
    My idea is to read battery voltage from pin 0, and the transducer voltages from pin 1 and pin 2 and convert them to currents. Pin 1 and Pin 2's signals work well, but pin 0 does not that good.
    Another question is that how to plot data of pin 1 and pin 2 into one waveform chart. I have tried to bundle the two arrays; it didn't work, however.
     Attached is my VI. Thanks for help. 
    Attachments:
    final final project.vi ‏747 KB

    This article presents a procedure for reading the analog ports of Arduino UNO R3 board , on which a Joystick shield was installed. The analog data are related to the position of command and can be monitored from the front panel of our program , for which we use serial communication.
    https://decibel.ni.com/content/docs/DOC-33281
    Atom
    Certified LabVIEW Associate Developer
    Attachments:
    analog_JOYSTICK_ARDUINO.zip ‏1 KB
    cmd arduino JOYSTICK.vi ‏65 KB

  • I am writing datas into a FIFO ,i am reading datas from fifo .but when i am writing datas like a a(0),a(1),a(2 like that.when i am reading dating datas a(0)comes to a(3 ) rd place .what is the reason ?

    I am writing datas into a FIFO in FPGA Target side  ,i am reading datas from fifo in windows host side  .but when i am writing datas like a a(0),a(1),a(2 like that.when i am reading dating datas a(0)comes to a(3 ) rd place, a(1) comes to a a(0) .what is the reason ?

    Please use a shorter title in your subject line and not post the entire question in therre.  (See the subject line I created.)   There is also no such word as "datas".  Data is already plural.
    Please read http://stackoverflow.com/help/how-to-ask.  Your question is hard to read because you aren't using proper punctuation and capitalization of your sentences.  It looks like one run-on sentence.
    Beyond that, it is impossible to help you solve our problem with just your question.  Please provide some more information.  Perhaps even attach code we can look at.  Show us what the data you are sending is supposed to look like, and what it actually looks like.

  • MSO-X 4000 Read Waveform Timeout

    I'm having trouble using the NI instrument drivers for the Agilent MSO-X 4000 oscope. I'm trying to use the trigger on channel 2 to acquire the waveform on channel 1. Currently, I always get this error code : "VISA Read in Agilent 2000 3000 X-Series.lvlib:Wait for Acquisition Complete.vi->Agilent 2000 3000 X-Series.lvlib:Read Waveforms (Single).vi->"
    The problem comes from Read Waveform vi timing out. This does not occur if I set the trigger characteristic mode to "Auto" instead of "Normal". I've attached a screen shot of parts of the code. The top section is my initialization phase and I use the bottom section to read after the signal is setup. In both Auto and Normal mode, I get a full waveform on the oscilloscope, but obviously with it constantly triggering in Auto mode, I don't get the correct waveform. I'm completely baffled as to why this is happening. I've dug through the forums and someone recommended updating the firmware, which I did to no avail.
    Attachments:
    LabviewCode.jpg ‏77 KB

    I've figured out the problem after digging through the MSO Programming guide.
    I believe there's a programming error in the instrument driver that I downloaded from here:
    http://sine.ni.com/apps/utf8/niid_web_display.mode​l_page?p_model_id=21187
    I removed the "IG;" command from the Initiate.vi (called by Read Waveform.vi) in the MSO Instrument driver and the program works fine. The "Read Waveform.vi" is actually reading the waveform twice using two different commands. The first read (IG) clears the screen, so if the oscope is in triggered/single mode, there won't be a waveform to read for the 2nd time and therefore it will time out. If the oscope is in Auto mode, the screen is updated with data so the .vi doesn't time out, but returns garbage data

  • Get waveform from TDS2012

    Hello,
          the attachment is an example whose function is to acquire the waveform from an oscilloscope  from a reference book. Now I'm wondering whether the waveform displayed in the waveform graph is just the waveform the oscilloscope acquires. My oscilloscope is TDS2012. I connect the oscilloscoe probe to the channel 1 input connctor.Attach the probe tip and ground lead to the PROBE COMP connectors.The  PROBE COMP signal is a square wave with a frequency of 1KHz and a peak voltage of 5V. If I choose channel 1 as the trig source, and let the programme run for 1000 times,it will take more than 1minute to complete this task. I just want to know whether the  waveforms  refreshed in the waveform graph are generated by the source during the  1 second since the programme starts.
    Attachments:
    get waveform from an oscilloscope with VISA function.vi ‏17 KB

    Hi yaoyao,
    Your question all depends on the behavior of the CURVE? command.  If it generates a new acquisition each time it is called, then you should be seeing 1000 different waveforms.  If CURVE? simply transfers the existing waveform without initiating a new one, you will be transferring the same waveform 1000 times.  The programming manual should have more details about the behavior.  You may need to call
    You should look at the LabVIEW instrument driver that we have for this instrument:
    http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=047216EC20B66FABE0440003BA7CCD...
    The instrument driver should simplify programming and you can look at the block diagrams to see which instrument commands are being sent.

  • How to save a waveform from TDS3000 series oscillosco​pe to PC via GPIB?

    Hi, I'm a summer intern and I've been recently assigned the task to transfer a telecom pulse mask waveform from a TDS3054 to the PC via GPIB. My question is, is there anyway that I can save the waveform on the scope and transfer the file onto my PC? Or even better yet, save the waveform directly onto my PC in a spreadsheet format?

    First, download the instrument driver for the TDS3054 scope from National Instruments' Instrument Driver Network. Depending on what software you have installed on your system, you may need to download additional software (look at the "Required Software" section). If you have Measurement Studio 6.0 and the NI-GPIB driver, you should have everything you need.
    Once you've installed the instrument driver, look at the instructions that came with the instrument driver for how to save and read from your oscilloscope, and look at the instructions here for how to use that instrument driver with Visual Basic 6.0.
    TonyH
    Measureme
    nt Studio

  • Error in acquiring waveform from the agilent 54621A oscillosco​pe .

    error  1074003951 occurs when  acquiring waveform from  the agilent 54621A oscilloscope.
    I have installed
    agilent 546xx series instrument driver
    NI VISA 14.0

    The *IDN command is sent and i have chequed the VISA read it returns the correct string .The error still exists i have attached the block program
    Attachments:
    AGILENT 54621A Acquire Waveform.vi ‏16 KB

  • Error in Agilent 2k3k4k X-Series drivers when using examples that contains "read waveforms.​vi"

    Hi, all
    Something goes wrong when using agilent 2k3k4k drivers. Could anyone help me?
    Agilent DSO-X 2012A oscilloscope
    Drivers are download from:
    http://sine.ni.com/apps/utf8/niid_web_display.down​load_page?p_id_guid=9E84674573AF6AB8E0440021287E6A​...
    Each time when running examples:
    Agilent 2000 3000 X-Series Acquire Waveform.vi
    Agilent 2000 3000 X-Series Acquire Waveform continuously.vi
    Agilent 2000 3000 X-Series Acquire Multiple Waveform.vi
    Errors rise and the oscilloscope is crashed and needed to be shut down and restarted. It seems that the example can't pass the "Read Waveforms.vi" in the Block Diagram. The PrintScreen   is as follows:

    sagha wrote:
    According to the MAX they are correct (IVI driver for the Agilent 33519B downloaded from the NI website). When I run the IVI Initialize block any frequency, amplitude, offset, etc. settings on the function generator are reset to the default values. So, something is being sent to the instrument.
    However, I've also tried adding the General Error Handler block right after the Initializaiton block to cancel the -1073807339 error. Then, I add the IviFgen Configure Standard Waveform [STD] block to set the function generator frequency. The program throws an error that looks like a resource problem:
    "Error -1074130544 occurred at IviFgen IVI Error Converter.vi
    Possible reason(s):
    The session handle is not valid.
    Complete call chain:
        IviFgen IVI Error Converter.vi
        IviFgen Configure Standard Waveform [STD].vi
        <myViName.vi>
    What could be the reason for an invalid session handle? I've followed the NI tutorials on setting up IVI instruments in MAX and in LabVIEW.
    Okay, this is new information.  Nothing in your previous posts mention that the initialztion did anything at all besides return the timeout error.  The invalid session handle is because you closed the session.
    I'm having trouble following your descriptions.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • How to read columns from spreadsheet?

    I have text based spreadsheet files containing several columns of data (previously collected data written to file by "write to spreadsheet file" function). Each column is separated by a tab character.
    I need to plot each column on a separate waveform chart. I am trying to use the "read data from spreadsheet" function to do this, which I understand reads in the spreadsheet file as a 2D array.
    I cannot figure out how to separate each column from the 2D array which is the output of the "read data from spreadsheet" function. For each column in the spreadsheet, I need a 2D array, the first row of which is a series of numbers (1, 2, 3, 4, 5, 6 etc) representing arbitrary time points, and the second row is the act
    ual data from ONE column of the spreadsheet. I could then wire this 2D array to a waveform chart. I would need a separate 2D array for each column in the spreadsheet.
    Could someone suggest how this can be done? Better yet, is there example code available somewhere that shows how to do it?
    Thanks.

    Array indexing in LabVIEW version 6i can be confusing.
    I include an example code that you can study to see how it is done in your case.
    Basically, you need to disable the row index when using the ArrayIndex function. In earlier versions of LabVIEW this was done by right clicking on the index-input and selecting disable/enable input but with the new version this is no longer needed. Just wire what you have and the other port will be disabled automatically. However, if you are using version 6i, make sure you wire the array to the ArrayIndex first. You should then get a 2D version of the Indexing function automatically. In older versions you had to manually drag it to a bigger dimension. Attached are two files. One data file, data.txt, with three rows and three co
    lumns, and one VI, ColumnIndexing.vi, that reads out a specific column from that text file.
    This example code is compatible with LabVIEW 4.1 and up.
    Hope this helps. /Mikael
    Attachments:
    data.txt ‏1 KB
    columnindexing.vi ‏21 KB

  • Cannot read data in FPGA

    Hi guys, I have a code that I developed for reading in digital data through digital lines in a PXI-7813R. But unfortnately, in the Host vi, I cannot acquire any data, even though I have fed in an external signal to the digital line in the PXI through a connector.
    I have a data graph to display this signal, but nothing can be seen when I run the problem! Anyone know what the problem is?
    I have attached the project.
    ANy help would be great.
    Thanks, Anoop
    Solved!
    Go to Solution.
    Attachments:
    Digital Input FPGA.lvproj ‏100 KB
    FPGA.vi ‏79 KB
    Host.vi ‏81 KB

    Hi, thanks for the reply.
    I have a couple of questions though. I dont understand what you mean in the first line. I have set the READ in the FPGA VI to be true so that when it is pressed, data can be read from the HOST VI.
    Now, getting on to the issues you highlighted.
    1. I have included a polling delay and the error issue is now sloved. But, when you mean "Also make sure you wire your error in to the while loop stop condition....", I have did this using the polling. Is this OK?
    2. You mention "In your vi, you are writing...." do you mean in the FPGA? If so, I have set the "read?" flag on the case structure, to use it as a switch for teh true conditon. is this not correct?
    I have attached the modified Project along with this. Feel free to edit it if you feel the urge too
    Attachments:
    Digital Input FPGA.lvproj ‏91 KB
    Host.vi ‏99 KB
    FPGA.vi ‏199 KB

Maybe you are looking for

  • Printing problem from Photoshop CS2 to HP 3500CP plotter

    I am running Photoshop CS2 on the computer connected to my 3500CP plotter. I have for the past few years had no problem printing. This past several days tried to proint a banner for my daughter's birthday and whenI go from Print with Preview to start

  • How to debug WFXML 1.1 XML response?

    Hello, I am using the Extended Communication configuration of a Web Activity step in a custom workflow (R/3 version 4.7).  The step is setup to start an external non-SAP WF using WFXML 1.1 and store the response in a WF Proxy container element using

  • How do I erase everything off my macbook

    I have a late 2011 macbook pro and I want to restore it to factory settings how do I do this

  • How do I get to the sleep timer settings on iPad?

    THe very first time I turned on my new iPad, I was offered the chance to change the timeout value of the sleep timer; how many seconds or minutes of inactivity before the iPad puts itself to sleep.  I changed it from 15 seconds to 'Never' and now I c

  • Report is executing more than one hour

    Hi All, I have an issue with my report,its taking more than one hour for execution. This report is called through an package,in package there are cursors which retrive data and sends to mail.The problem is with this select statement in cursor,its tak