06-04-2010 02:06 PM
I have been working on a 5114-based digital storage scope application with most of the functionality of the NiScope
Soft Front panel and making little progress. The only approach I could think of was to start with a supplied example
and then modify. I need to acquire several second of non-repetative waveform @ 125ks/s, which works out to 500k
samples. The Configured Acquisition example set to Edge Trigger will get me the waveform, but it has a finite time out. I need an application that will acquire the waveform every time it is triggered and hold it until the next trigger. The Soft Front Panel applocation does well.
As to why I am simply not using the S.F.P is twofold:
1. I need to be able to isolate sections of the acquired waveform and calculate RMS voltage as well as peak to peak
of the sections. I also would like to do point-by-point integration to the area under part of the waveform envelope.
2. I tried saving the data from the S.F.P., but so far have had no success even opening the files.
Kuchean
Solved! Go to Solution.
06-04-2010 03:45 PM
Hi Kuchean,
You mentioned that you would like the application to acquire the waveform every time it is triggered (the Configured Acquisition example does this) and hold it until the next trigger (similar to the SFP application). I may be confused by what you mean with this statement. When you say "hold it", do you mean show it on the display, or pass it somewhere to be saved or processed while new data comes in? Obviously, the display in the Configured Acquisition example will not update until new data is written to it, which means that the next trigger occurred. Is the board actually triggering each time it needs to on the correct edge? Do you instead need more insight into what to do with the data once it is fetched (such as displaying old data along with the new data on the same graph or maybe even saving the data to file or passing to a parallel loop for processing)? I am having trouble understanding what particular feature of the Configured Acquistion example that you would like to modify or add, or what current problem you are experiencing with the program.
You also mentioned the finite time out of the example program. It sounds like you will be acquiring for at least 4 seconds once the trigger occurs (500k samples @ 125kS/s = 4 seconds) so you will probably need to increase the timeout to a larger value than the default 5 seconds to ensure that you do not receive the error while waiting for a trigger and fetching all the data. If you do not know how long the time out needs to be, you can always poll the device to see if it has triggered before calling the fetch function. (Essentially, this example has this exact functionality.)
Regarding the SFP issues, you are correct that if you want to process specific data sets and implement custom algorithms, you will need to implement your own custom code. As far as saving the data and reading it back, what format are you saving in? The LVM format, for example, can be opened in Notepad and you will see a long list of data samples with some header information about the waveform (see below). There should be a few good LabVIEW examples which show how to read back the different file types into LabVIEW, and you can try them out to read the saved files from the SFP.
06-04-2010 09:36 PM
While waiting for the timeout on the the entire vi (Configured Acquisition) just sits there. I wired an indicator to the iteration counter and it is not moving. Once I have the time out, the vi stops and sends me an error message. It essentially says that the acquisition is continuing past the time alloted for it (I am not at work now so I don't have
the system at hand). I set the timeout at 50 sec in an attempt to get the waveform before the system times out.
I get the same error message originating as far as I can recall from the fetch cluster??? sub vi in all the examples
unmodified.
Kuchean
06-04-2010 09:44 PM
Daniel.
It's error -1074126845 originating frim the NIScope Multi Fetch Cluster. I had been posting at the Mutlifunction Daq
board befor I was cled in to there being a High Speed Digitizer Board. There are a few conversations with Efraim and Barron
Kuchean
06-07-2010 08:18 AM
Attached is an NI-SCOPE Example (that never shipped) that implements the exact algorithm used to fetch data by the NI-SCOPE Soft Front Panel (SFP). Essentially, it starts an acquisition and only uses a fetch when the acquisition is known to be complete. It will never time out.
By default, the NI-SCOPE SFP saves in NI-Hierarchical Waveform Storage format (NI-HWS), a binary format. You can find NI-HWS VIs in the Measurement I/O»NI-SCOPE»Utility Functions»NI Hierarchical Waveform Storage palette. NI-HWS is based on HDF5, so can be opened and read by anything which reads HDF5. The internal format is very similar to SCPI-DIF, but implemented in an HDF5 wrapper. If you need more details, please ask.
Example is saved in LabVIEW 7.0.
06-07-2010 09:24 AM
Hi Kuchean,
If you set a timeout on the order of 50 seconds, and you are still getting the timeout error, the board appears to just not be triggering. I would like to know some details about the signal you are triggering off of. What type of signal is it (such as is it a quick spike or a periodic signal of some sort), and what voltage level and frequency is it? Are you triggering off an input channel or a trigger line? How quickly is the signal changing and about how often do you expect the digitizer to trigger? With this particular example, the board completely reconfigures based on a software loop so there will be a bit of extra rearm time associated with re-initializing the board. Also, what type of settings are configured for the board (vertical range, AC/DC coupling, input impedance, trigger level, trigger edge, etc.). It may be easier to provide a screenshot of the front panel which shows all the settings you have configured. If you set the trigger to an Immediate trigger, do you see something that somewhat appears to resemble the signal you would expect? Is there any way you can provide a representative screenshot of the signal/waveform that you are looking to trigger on and acquire? Have you had any luck trying out the other shipping examples such as the Multi-Record acquisition, Fetch Forever, or better yet, the polled acquisition examples that DFGray and I showed?
Thanks,
06-07-2010 11:39 AM
Thank you.
That does it! I was sneaking up on that sort of thing, but my programming with something new can be the "blind squirrell occasionally finds some nuts".
It would have taken me longer than the time available to get to that solution. One tiny problem, something that I skipped in LabView basics probably. The pointer when positioned over the waveform graph is a magnifying glass (scale expansion) not the cross used for dragging cursors. How do I switch?
Kuchean
06-07-2010 02:36 PM
Hi Kuchean,
I am glad to hear that the polling solution worked out. To answer your question about the LabVIEW graph, you can change your mouse pointer to control the cursors by clicking on the cursor icon on the graph palette (see image below).
If it is not displayed already somewhere next to your graph, right-click on the graph and select Visible Items » Graph Palette. The cursor icon should be the leftmost button on the graph palette.
Regards,