02-24-2012 02:56 AM
In my project I have "format string" (like 6.4234 ....), I would like to plot XY Graph(build XY Grapg). I try to convert string to dynamic data so I can plot graph. I try with "convert to dynamic data", but it's not show correct(decimal numbers...). I also try string to byte->convert to dynamic data...
02-24-2012 03:51 AM
02-24-2012 04:20 AM
See picture
02-24-2012 04:59 AM - edited 02-24-2012 05:06 AM
Ah... so you are wanting to write these two values as one datapoint on an XY graph. Yes?
Mike...
02-24-2012 04:59 AM - edited 02-24-2012 05:04 AM
The appropriate datatype for a XY graph is a cluster containing an array of X values and an array of Y values.
Mike...
02-24-2012 05:04 AM
Yes, this two "wires" are changing...so I want to PLOT graph of this two values..
02-24-2012 07:38 AM - edited 02-24-2012 07:38 AM
Hi master,
do you really think that name is appropriate?
Well, graphs like to plot values (aka numbers aka floats). You want to plot values, but for some unknown reason you are making strings from the numbers. Strings by the way are unknown to graphs... But well, there are wires available carrying the numbers you want to plot! Why not use them and connect them to the BuildGraph expressVI?
I would also suggest trying the basics course offered by NI! Looking at the examples may help too - as reading the (context) help in general...
02-24-2012 08:24 AM
Unless you are only wanting to plot a single datapoint, this code must live inside a loop somewhere. If you want to see new data as it comes in, you need to modify your code to use that loop to accumulate the new data with each iteration into arrays of X and Y values (use shift-registers) and after each acquisition, bundle the two arrays together and send the result to the XY graph.
Alternately, if you just want to see the results at the end, accumulate the data as before, but only bundle them together outside the loop after it finishes executing.
MIke...
02-24-2012 09:39 AM
@GerdW wrote:
Hi master,
do you really think that name is appropriate?
....
LOL