LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to array urgent~!



@elo85 wrote:
how do I save the graph?

What do you mean? e.g.

  1. Save the xy data in a regular file to be read and graphed again later?
  2. Save a picture of the graph?
  3. Make the current graph data the deafult?
0 Kudos
Message 21 of 51
(1,264 Views)
now i can see the data result and plot the graph.
but i also wan to save the data and graph. Is it possible to make it?
just like at the front panel will have a button to click and to save it
0 Kudos
Message 22 of 51
(1,265 Views)

You can save both the data and the graph.

Depending on the LV version that you are using, you can use the write to file functions (ex: text, spreadsheet, measurement) by wiring the data to the write to file vi (located in the File I/O of the Functions Palette).  The graph can be saved as an image file, for example using write to jpeg file.

I'll post an image... 

0 Kudos
Message 23 of 51
(1,257 Views)

Here's an example of saving the array data to a text file and the graph image (same as your front panel) to a jpeg file:

 

In this example, the same name (leading name) is given to both the text and jpeg files.  The example can be further simplified by simply wiring a file path control to the write file vi's..

The waveform graph property node is obtained by right clicking on the waveform graph indicator (on block diagram) and selecting create property node..

Message Edited by JoeLabView on 09-07-2007 07:34 AM

0 Kudos
Message 24 of 51
(1,259 Views)
wow..that's too complicated for my level. Could explain the example in more detail? Or is there any easier way?
I'm using labview 7. Anyway thanks for your help~!
0 Kudos
Message 25 of 51
(1,246 Views)


@JoeLabView wrote:

The waveform graph property node is obtained by right clicking on the waveform graph indicator (on block diagram) and selecting create property node..


My mistake..  I'm reducing my daily dose of cafeine, and it's affecting me 😉

You need to use an invoke node.  I'll prepare a code template in LV7.0 for you..

0 Kudos
Message 26 of 51
(1,239 Views)

See the attached example.  I created a small template in LV7.0, but saved as a vi.

You'll need to provide data (numeric array) which is wired to both the graph and to the "array to spreadsheet string" in order to convert it to string before saving it to a text file.  The example won't run as it is..  Also, you'll need to fill in the paths for both the graph image (saved as jpeg in the example) and the text file.

Sorry, I had to do this quickly..  It should get you going..  🙂

 

0 Kudos
Message 27 of 51
(1,233 Views)
i posted my block diagram..
can anyone help me see whether my connection correct?
thanks lot!!!!!!
0 Kudos
Message 28 of 51
(1,221 Views)
You have no graph data dependency on the part of the Write JPEG File VI. As JoeLabView showed in his screenshot, you need to get the data into the graph first before you grab the image. Use the error input of the Get Image node as in the snippet below:


For simplicity sake I didn't wire all of the Write To JPEG vi inputs.

Message Edited by Bill@NGC on 09-07-2007 09:04 PM

0 Kudos
Message 29 of 51
(1,212 Views)
Ok, my conscience bothered me, so I finished the wiring:



Message Edited by Bill@NGC on 09-07-2007 09:20 PM

0 Kudos
Message 30 of 51
(1,208 Views)