Re: string to array urgent~! - labview
This is a discussion on Re: string to array urgent~! - labview ; Just before you wire these to the graph, you need to convert the string to numeric, most likely "double", because of fractions.
See attached the image.
<img src="http://forums.ni.com/attachments/ni/170/270149/1/convertToNumeric.PNG"> Message Edited by JoeLabView on 09-06-2007 03:28 PM
convertToNumeric.PNG:
http://forums.ni.com/attachments/ni/...tToNumeric.PNG...
-
Re: string to array urgent~!
Just before you wire these to the graph, you need to convert the string to numeric, most likely "double", because of fractions.
See attached the image.
<img src="http://forums.ni.com/attachments/ni/170/270149/1/convertToNumeric.PNG"> Message Edited by JoeLabView on 09-06-2007 03:28 PM
convertToNumeric.PNG:
http://forums.ni.com/attachments/ni/...tToNumeric.PNG
-
-
Re: string to array urgent~!
LOL! Altenbach!
You're the Wizard of Simplicity!! 
-
Re: string to array urgent~!
If you just want to plot one of the values, look at Joe's example. Take the array you want and wire it to a graph.
There are some on-line (and free) resources available for learning the basics of LabVIEW. Check the links at <a href="http://www.ni.com/academic/lv_training/how_learn_lv.htm" target="_blank">http://www.ni.com/academic/lv_training/how_learn_lv.htm</a>.
-
Re: string to array urgent~!
Delete everything you don't see in my image(e.g. the blue xy graph express VI) and keep only the terminal labeled "VI graph".
This terminal ALWAYS has only a single input. Just wire the output of my loop to it. Voila!
-
Re: string to array urgent~!
elo85 wrote:how do I save the graph?
What do you mean? e.g.
- Save the xy data in a regular file to be read and graphed again later?
- Save a picture of the graph?
- Make the current graph data the deafult?
-
Re: string to array urgent~!
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:
<img src="http://forums.ni.com/attachments/ni/170/270261/1/saveGraph.PNG">
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
saveGraph.PNG:
http://forums.ni.com/attachments/ni/.../saveGraph.PNG
-
Re: string to array urgent~!
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...
-
Re: string to array urgent~!
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..
-
Re: string to array urgent~!
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.. 
template-saveGraph.vi:
http://forums.ni.com/attachments/ni/...e-saveGraph.vi
Similar Threads
-
By Application Development in forum labview
Replies: 1
Last Post: 12-13-2007, 06:40 PM
-
By Application Development in forum Javascript
Replies: 2
Last Post: 10-10-2007, 06:23 PM
-
By Application Development in forum labview
Replies: 0
Last Post: 09-06-2007, 07:40 AM
-
By Application Development in forum labview
Replies: 1
Last Post: 09-06-2007, 06:40 AM
-
By Application Development in forum Graphics
Replies: 1
Last Post: 03-25-2006, 05:21 AM