Multiple waveforms to spreadsheet
I am aquiring episodic data, say 2seconds at 20kHz then a 30 second interval and more data. I am saving this in a tdms file and all is fine.
I would now like to export these waveforms to a tab delimited spreadsheet, and I like the header etc that the cannede vi's offer. However when I set the append option to false, there is a new file for each waveform. When I set it to true, the next waveform gets appended at the bottom (same columns, new rows) instead of as new columns same rows. With the write array to spreadsheet, there is a transpose option. Is there something analogous for waveforms, or will I just have to use the write to spreadsheet and make my own headers etc?
thanks a ton!
(Using LabView2013 on Win7)
No offense was intended, the point is that if you focus on building the program all you will get is the program. However if you focus on building all the reusable bits you will get the program you need but you will also get a bunch of reusable code the will make your next program faster and easier.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
Similar Messages
-
Export Multiple Waveforms to Spreadsheet
Hey guys, I'm new to this forum--first post--so if I accidentally leave anything out please do your best to whip me into shape.
I just started with labview this week and am trying to collect data from Advantech's USB-4718. It has 8 thermocouple inputs with which I am attempting to simultaneously collect temperature readings and export them all to a .csv. The VI I've come up with so far is my best attempt at getting the formatting of the .csv to come out correctly. In that respect it does exactly what I want it to, however, it will only give me a single reading from each of the channels. So basically I am looking for some advice on how to append the array of waveforms anew with each iteration of the for loop, or if I should be building the array of data a bit differently.
I'm hoping this is a simple matter of looping the appropriate VIs, or simply putting a shift register in the right place. I realize I may have to simply use brute force to index and collect waveform components and just feed them into the write to spreadsheet VI, but I'd like to explore some cleaner alternatives before I get into all of that.
In addition, after reviewing this forum I realize I am surely prone to some mistakes that simply scream noob. So feel free to scream it at me. I'm pretty sure I made a nice CPU burner out of my VI, but I'm not entirely sure so if anyone could give some advice on avoiding those. Also if anyone has any advice for a new LabVIEW user in general--what to watch out for, goals to work towards--I'm all ears. I have a very demanding summer job that requires I learn and use all this stuff and I'd very much like to rise to the challenge.
Cheers,
Travis.
Attachments:
Multiple Channel Export (rev3).vi 72 KBThe problem apears to be with your array appendixing, and as you correctly guessed your shift registers. If you simply rearrange the components to look like:
then it should do exactly what you want it to do. -
How to save multiple waveforms to excell spreadsheet
Hi Everyone,
So I just got a new project in lab which is to use our new DAQ board(NI USB 6341) to read a voltage from 5 PMTs. I'm new to labview, and am struggling quite a bit but here's what I've done and would like to accomplish:
My example today uses two channels sampled at 1K.
1.Interface with the deivice and create a Task to measure from more than one channel. -Complete
-In my example code I have the sampling rate at 1k and N samples at 100. Eventually I would like to sample at 100Khz. What is an appropriate N samples?
2. Generate Labview code that will continuously take data untill I tell it to stop and bring each channel to its own tab delimited column on the write out file.
I cannot get step two work correctly. My understanding was that the DAQ assistant in my example outputs a 1D array of waveforms and that "Export Waveforms to Spreadsheet file" VI would read each element as its own array but I cannot get it to do that.
3. Graph in real time the two channels 10 seconds at a time. I.E I want it to continuously have a 10 second window([1,10],[2,11]...[101,111]) etc. so that way I know the current run time for sampling and I can see the current events. This is a tricky situation because I want each to have their own plot and I haven't found a good way to use the register to append new data without eventually running out of memory. The other issue is that when I append the data it shows from 0 seconds to my current time, I would like it to show me the waveform in time as discussed above.
If I could get some help on either of these two fronts, I would be immensely greatful. Thank you so much for your help, and for reading this
Best,
-Joe
PS- Attached is my code. Give it a run and see what it does to understand things a little better please.
Attachments:
Read Voltage.vi 60 KBOkay so the charts ended up working out nicely if I wanted to sample at 1kHz and have samples to read=100
But If I now up my sampling rate to 100kHz and 25k samples to read for 5 channels I immediately receive the error message:
"Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem."
I guess my first question, would be what is happening that is making the VI crash right away, the DAQ board can handle 500KHz across all channels so that is not the issue, how can I create my VI to handle this amount of data?
Attachments:
Read Voltage.vi 94 KB -
Legend for multiple waveform chart
I have a Waveform Chart (and legend) with multiple waveforms. I can control the visibility of a given waveform on the chart programmatically using the "ActPlot" and "Plot.Visible?" properties.
Is it possible to programmatically make the legend only contain the plot names that are visible at any given time?
Cheers,
Dan
Dan
CLDHello DanB,
Following along the lines of what smercurio_fc suggested, you can use the Legend>Number Of Rows property (LegNumRows) to change the number of rows of your legend to the number of plots you are viewing, and then use the Plot>Plot Name property (Plot.Name) to edit the names of the plots yourself. I cannot see a property to extract these names dynamically, so this is probably your best bet.
I hope this helps, otherwise please do let us know if there is anything further,
Kind Regards,
Michael S.
Applications Engineer
NI UK & Ireland -
Display multiple waveforms on chart
I need help. I try to display multiple waveforms on a single chart. Two waveforms (Ideal PWM and Target Pressure) are made up of a single point instead of waveform or array; thus I have to build them into array. The problem is that I can display all the waveforms, but once awhile the chart shows a missing point on the waveform. I have attach a screen shot of my diagram. I'm using LV 8.6. Can anyone help? Thank you very much.
BC
Message Edited by DSI on 04-14-2008 11:46 AM
Attachments:
Display Waveforms.doc 163 KBI would suggest creating an array based on the size of the other waveforms that are being graphed. Presumably you have a certain number of points for all the other waveforms, and they all have the same number of points for that iteration. Thus, create a Y array for the 2 values that you want to graph to be of the same size, rather than a single point. If you run the attached VI in highlight mode you can see what I mean.
Attachments:
chart with lines.vi 18 KB -
Getting rid of the date stamp in "Export Waveform to Spreadsheet.vi"
Probably a very simple and stupid question, but how do I get rid of the date stamp while keeping the time stamp in the "Export Waveform to Spreadsheet File.vi"? I may have found the place on the block diagram, but I'm not entirely clear how that vi works.
Thanks,
JoeNever mind, I've figured it out.
For the curious, it was a matter of altering the "Waveform to Date Time String.vi" in the "Export Waveform to Spreadsheet.vi". All you need to do is stop it from concatenating the time string with the date string in that particular VI. I hope this helps some of my fellow newbies.
Sorry to waste the rest of your time.
Thanks,
Joe -
Display multiple Waveform-Graphs on a separate Frontpanel
Hi there,
I'm looking for a solution to display multiple waveform-graphs on a separate frontpanel.
In my application I measure a number of channels (number is a user-input). The signals I want to display each in a separate waveform-graph, because they have different scales. They shall be arranged that way, that the user can switch them on and off or arranges them on the screen, while the application is running (measuring). He shall also be able to maximize all graphs or a graph window to have a closer look at the signals.
I already tried several things.
1. I placed the maximum number of graphs in a separate vi, which I start in my application and then switch the frontpanel on and off via a property-node. The values I also write via the references of the waveform-array, which I place in an array. This way I can also change the propertys of each plot (scale, xmin xmax, etc), but I always have all graphs on the screen (also the unused).
2. I then tried to change the visible-property of the unused graphs, but I cannot scale and rearrange the remaining graphs to the full frontpanel-size, because this property is read-only.
3. I placed just one waveform-graph in the vi and then start as many vis, as I need. This is cool, because I also can program the position and size of each frontpanel, so that they are arranged in a grid on the display, but all the graphs are separate and it is uncomfortable if the user had to arrange them separate. The windows need to be docked ore something like that.
4. I tried to place the graph-vis in subpanels, but then I cannot change the position and size of the vis programmatically.
Has anyone an idea, how to solve this?
I am using LabView2009Sp1 Professional Development System
Thanks NormanThanks so far,
I attached some examples of what I tried already.
1. MaximumNumberOf Graphs - I show 6 graphs although only two are needed. I cannot rescale the used ones to the full screen size, because the property is read-only
2. RescaledFrontpanel - I switch the unused graphs to invisible, resize the frontpanel to hide the unused graphs, but now the window is not zoomable
3. GridOfWindows displays the desired grid of graphs in separate windows, but they don't stick together
I hope this explains the situation better.
Norman
Attachments:
multigraph.llb 136 KB -
I am reading back values of several waveforms that were saved to disk using the write to spreadsheet vi. Some of the data sets are longer than others eg. 35 seconds vs 45 seconds. All have the same sample rate.
See the code segment below. If I select the larger files first then all the data will show. If I select a smaller file first the larger ones will be truncated to the size of the small file. I am using LV 7.0.
Attachments:
codesnippet.vi 41 KBI needed to make some grammatical/ nomelclature changes, But, Could not edit the previous post.
so posting again
"Thats because you are inserting into an array of a predefined size.
For ex,
When you try inseting a 1D array 'A' of 50 elements as row 1 of a 2 D array of 40 elements(in row 0 ), only only the first 40 elements will get insetred into 2 D array. You lose the last 10 elements of array 'A'
To avoid this, I suggest you use XY graph( of course you have to create an x axis with the index of each element in the inserted array and plot on xy graph).
Any doubts, do get back"
regards
Dev -
Multiple Arrays to Spreadsheet
Hi,
I've a vi that process data files and saves the analysis on a new file (it's a 2D array). This being done in a for loop to allow multiple files to be processed with user intervention. Instead of saving a new analysis file every iteration, I would like to save all of the analyzed data in one file. For example:
Cable #11
x y z
1 2 3
4 5 6
Cable #12
4 5 4
3 2 2
The two problems I have:
I know how to insert headers but how do you insert a string after each array?
How do I save all the arrays to one array? I've tried taking the spreadsheet function out of the for loop, but it didn't work.
I'll appreciate any input,
Solved!
Go to Solution.I've tried appending it in & out of the for loop and it doesn't make a difference; it just writes the last data file.
Thank you for taking a look at it. The data I want to save is the case structure outside of the for loop.
Attachments:
stat_done.vi 124 KB -
Create a DAQ program and display results on with waveform and spreadsheet
I need help creating a DAQ program that will read digital and analog channels and display on a continuous waveform, and then display readings on a spreadsheet
You definitely want to start with the example programs. There are many of them which ship with LabVIEW and even more on NI's Example Programs Library (http://www.ni.com/devzone/libraries/default.htm). Also, if you are wanting to use an Excel spreadsheet, I would suggest getting the Report Generation Toolkit for Microsoft Office. It simplifies your coding immensely and will save you a lot of time.
J.R. Allen -
I need help. I need to put multiple plots in a waveform graph. In the vi in attachments, I put a example. In the waveform chart, function good, but in the waveform graph, don't work put two or more plots in the graph. I need to do the same thing that I do in the chart in the graph. Thanks for all.
Attachments:
graph-chart.vi 15 KBPlease check the example which comes along with labview about how to plot multiple plots in a waveform-Go to specified folder in your pc
C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\general\graphs
-Open gengraph.llb in that folder for examples.
Thanks
uday,
Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
Certified LabVIEW Associate Developer (CLAD) Using LV13 -
Multiple waveform chart automatic plot
Hello
I need to plot multiple signals in the same waveform chart. The problem is that the number of signals is not constant. I have a control that enables me to change the number of signals to plot each time I run my VI. Is there any way to do it?
Thanks in advance.
JoãoHello,
I don't see many other way to do this...
You could also manualy enable or disable charts but i don't see a way to do this in a synamic way...
Regards
Richard Keromen
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
>> Découvrez, en vidéo, les innovations technologiques réalisées en éco-conception -
Synchroniz​e reset of multiple waveform charts
My main VI has multiple sweeping waveform chart, base off the Continuous Measurement and Logging template. I want to be able to change x axis range (toggling between 10 seconds of data and 3 seconds of data)
I did it by changing the X scale range min to zero and max to the appropiate sample size, and clear the history. While this works for each chart they always ended up off sync instead.
At first I thought that's because I put it in a ub VI. But moving everything to te main vi does not change the behavior.
Any ideas? Thanks.
Solved!
Go to Solution.Well those all have to run sequentially in the UI thread so there is no way to do them "Simultaineuosly" HOWEVER, if you bookend those property nodes with an Involk of the method Defer FP Updates (True then False) you'll see much more what you expect.
Tighter alignment of the "Clear Histoys" would also be done by splitting up your p-nodes so do all of them at first then change all the scales.
Jeff -
Create a change request for multiple customers from spreadsheet
Hello Experts,
1.We have a spreadsheet with 100's of Customer data maintained in it , can we create a change request by downloading data from spreadsheet directly instead of manually entering the data in the CR. Also can we create a single change request for multiple Create customers.
2.Can we create CR's automatically , lets say we have 100's of customer data loaded into MDG hub by Data Services using DEBMAS Idoc , can this create automatic CR's , is this possible.
Thanks.Dear Collins,
1.We have a spreadsheet with 100's of Customer data maintained in it , can we create a change request by downloading data from spreadsheet directly instead of manually entering the data in the CR. Also can we create a single change request for multiple Create customers.
Answer:there are various options are available in MDG to process multiple material as shown below
you can down load the customers using file down load funcationality and same change,upload the customers using the file Upload process.
you can create a single CR for muntiple customers options are shown below.
2..Can we create CR's automatically , lets say we have 100's of customer data loaded into MDG hub by Data Services using DEBMAS Idoc , can this create automatic CR's , is this possible.
Answer:Yes you can create CR automatically using DTIMPORT tcode and some configuration needs to be done further reading go to the link SAP Master Data Governance - SAP Library
regards
shankar -
How to synchronous multiple waveform acquisition for 6025E board(ACH0 & ACH1)
We are now using 2 AI Acquire Waveform.vi to acquire 2 seperate analog channels(ACH0 & ACH1). However the 2 acquired waveforms are not synchronised.
a. How to synchronise the 2 waveform?
b. How to ensure that both vi start acquisition at the same instance(together)?
Merry christmas.
thks & Best regards
lynI would suggest using the AI Acquire Waveforms.vi instead of AI Acquire Waveform.vi (note the plurality of the names) multiple times. If you use AI Acquire Waveforms.vi, then you can acquire the waveforms simulataneously from multiple channels. You can also use the intermediate DAQ VIs to build such an application. Although they are a bit more robustious, they have the advantage of giving more control to the developer. LabVIEW ships with many examples which use these so you may want to reference those as you start to build your VI. Best of luck!
J.R. Allen
Maybe you are looking for
-
790FX-GD70 First build, no post out of box. (FF)
Hello, I've read a few threads on the 790FX-GD70 and FF led read outs. I've included direct links to newegg.com for closer inspection: Mobo: MSI 790FX-GD70 AM3 Processor: AMD Phenom II X4 965 Black 125W Memory: G.SKILL 4GB (2 x 2GB) 240-Pin DDR3 1
-
Problem launching SQL Developer in Mac
Hi, I downloaded SQL developer latest version and tried to launch, but it's not launching. My java version: 1.5.0_13-121 I tried replacing my ojdbc14.jar with ojdbc15.jar, still it's not launching. Q1: Can somebody give some pointer on this. Which I
-
When a title is added, Flex selects a title which is oriented vertically and pointing downward. How can I set the orientation of the title, for examle, to be 180 degrees rotated?
-
I was wondering of anyone out there is using Demantra Demand Planning with Oracle Applications Server 10.1.3 on 11.5.10.2 that is not on a Windows Platform, and what the environment variables set in opmn.xml are referring to; 9i/10g client on the Win
-
TS1559 why dont apple fix the porblem of the greyed out wifi and bluetooh glinch.
Why don't apple fix the greyed out problems