LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Export Data Right-Click Graph Display Format

I am sure there is an answer but I can't find it on the forums. On a waveform graph it is possible to right-click it and choose Export Data to Excel or Export Data to Clipboard. Attached is a VI that you can test. When I have the plot axes set to display SI notation the data is exported in SI notation, for example, when the plot is set in SI units the exported data would be 0, 100m, 200m, etc. Excel and other programs do not like SI units, it is possible to always export floating units regardless of the display type set in the plot.

 

Here are the steps to recreate the issue using the attached VI.

  1. Set the VI to run.
  2. Right-click the plots and choose export data.
  3. Look at the exported data.

 

Thanks for your help.

 

Cheers,

mcduff

 

 TestCase.png

 

 

0 Kudos
Message 1 of 12
(4,349 Views)

I cannot help you, but I can give an advice. Do not use the built-in export function, but program an export feature yourself. In this way you have total control on how you save/export your data (since the data is available "on the wire", you can change its format, etc...).

 

edit: you can even create a custom menu which pops up when you right click on your Graph, replacing the default menu options. In this way even the "looking" of the programmed feature will be the same as the default was...

Message 2 of 12
(4,337 Views)

Hello!

 

I have found a workaround for you

Exporting data to excel.png

 

I don't know how to do it manually but here just before exporting the format is changed back to Decimal and after exporting to SI. See the context help to get info about these numbers - this property accepts numbers from 0 to 9.

 

Hope this helps 🙂

 

Marcin

              

Think Dataflow - blog.mtapp.tech
Message 3 of 12
(4,333 Views)

I completely agree with Blokk.  Note that in the case of a Waveform, you have, in addition to an array of floats, two other Cluster elements that you can either (a) ignore, (b) save as separate elements (I don't see much use for t0, but dt is certainly useful to have in a cell, especially with a Row/Column header to label it), or (c) display the (implicit) Time data as either Relative time or Absolute Time (your choice).  You can easily design an Excel structure that has this organized in a way that "makes sense for you".  And, if you have the Report Generation Toolkit, it is not that difficult, and goes very quickly.

 

Bob Schor

Message 4 of 12
(4,328 Views)

Thanks for all of the suggestions. I do know how to create a custom menu and realize I could roll my own menu shortcut as I have done in the past. However, I would have liked to use the "native" LabVIEW shortcut either in a custom menu or the default menu. My feeling is, if NI provides the shortcut, it should just work, that is, I should not have to make work-arounds. In addition, this menu is visible when you right click a plot legend, which is difficult, maybe impossible, to change the legend runtime shortcuts. See

 

http://forums.ni.com/t5/LabVIEW/Disable-or-remove-plot-legend-run-time-menus/td-p/2637999

 

Thanks again for your help.

 

Cheers,

mcduff

0 Kudos
Message 5 of 12
(4,312 Views)

My feeling is, if NI provides the shortcut, it should just work, that is, I should not have to make work-arounds.

 

I disagree. LabVIEW cannot be prepared for all possible usage scenarios/requirements. If you want (almost) total control on what a user can interact with a certain GUI, you need to program it yourself. You could hide the plot legend / disable it totally, and create your own features programmatically.

 

I do not see any problem here, what you described as requirements, can be easily done with some programming (not 2 minutes for sure i admit). You can even create "smart" controls in LabVIEW, and extend features a lot, the limit is only your creativity and will to program. For example, have a look at how XControls can enhance things in LabVIEW: https://decibel.ni.com/content/docs/DOC-13819

Message 6 of 12
(4,301 Views)

I think one of the reasons we use LabVIEW is it is a high-level language. If we want complete control then we could write in C or something similar.

NI has a right click short-cut "Export Data to Excel". When used in certain scenerios the exported data is seen as text instead of numbers by Excel. At least to me, this renders the exported data unusable. I like and use LabVIEW everyday, in fact, it has probably allowed me to keep my job. That being said, in this case, NI is providing a feature that does not work correctly. Either they should eliminate the feature or get it to work correctly. The problem is I cannot eliminate this feature as it always shows up on the legend menu, which has some useful things I rather not eliminate. See the link I provided earlier.

 

Just my 2 cents.

 

Cheers,

mcduff

 

0 Kudos
Message 7 of 12
(4,296 Views)

Yes, I agree with you, they could fix this feature, but I can imagine several other special cases when the exported data would not be too useful. It is really not a big deal to program these several features, instead of using the default built-in menu (or give the user the option to use the built in menu PLUS some special programmed features, for example chose to export into other more useful file formats as TDMS files, etc...).

 

If you want real high level software tool for measurements and data logging/display, you could have a look at the product NI SignalExpress. Maybe it would fulfil your needs better, and no programming required...

0 Kudos
Message 8 of 12
(4,291 Views)

Thanks, but my problem is not with the programming nature. My problem is with the feature. The feature is visible when you right-click the plot legend. I have already removed the feature from my plot so it is not visible. On the plot legend when you right-click it there is a "Show/Hide" plot feature that is very useful. (I want to keep this feature. The menu also allows the user to change the line width, color, etc. All of these are nice to have.) At the bottom is an export feature that I do not want, but can't remove. I understand that I can use a mouse-down event along with filtering and possibly roll my own set of VIs, but just making the color change part work would be alot of work to have the system color chooser pop up etc.  However, the whole reason I am using LabVIEW is to avoid situation like this.

 

Cheers,

mcduff

0 Kudos
Message 9 of 12
(4,282 Views)

Hmm, i am just thinking what could be a nice solution here, now it is more clear what you would like to do: only remove a certain item from the default runtime menu list, but not disabling the whole. If you create an Idea of this required feature, i will vote for it!

 

Hmm, i wonder if it is possible to capture/filter programmatically when the user clicks on the export part of the default menu, so you could replace that particular part with your own code... would be a useful thing...

0 Kudos
Message 10 of 12
(4,275 Views)