LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format string to dynamic data

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...

 

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 1 of 9
(6,073 Views)
Why are you using the dynamic datatype? It is only useful when using express VIs -- and only marginally then! Can you show your code?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 9
(6,067 Views)

See picture

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 3 of 9
(6,063 Views)

Ah... so you are wanting to write these two values as one datapoint on an XY graph. Yes?

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 9
(6,053 Views)

The appropriate datatype for a XY graph is a cluster containing an array of X values and an array of Y values.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 9
(6,052 Views)

Yes, this two "wires" are changing...so I want to PLOT graph of this two values..

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 6 of 9
(6,047 Views)

Hi master,

 

do you really think that name is appropriate? Smiley Wink

 

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...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 9
(6,030 Views)

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...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 9
(6,023 Views)

@GerdW wrote:

Hi master,

 

do you really think that name is appropriate? Smiley Wink

 

....


LOL

0 Kudos
Message 9 of 9
(6,013 Views)