LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph

The X-axis values must be numbers, not strings. So you need to define some numbers for the X-axis.  The X-axis scale can contain strings.

 

Lynn

Message 11 of 46
(1,590 Views)
Please read the help for Scan From String and look at the examples. You can do a '%s %d' and get a string and integer output or simply 'SART %d' to get an integer. There is also the right click option to build the format string.

And why did you post an image of the front panel with the date/time string? Obviously it had nothing to do with what you say you need parse?
0 Kudos
Message 12 of 46
(1,581 Views)

Good morning,
I tried to solve the problem with the latest tips, but there is a further problem:
I have to be able to have non-sequential numbers on the x axis.
For example:
Sart 01  Sart 02  Sart 03  Sart 10  Sart 120  Sart 04  Sart 05, etc ...
This is a problem because, by setting the x-axis as a numerical sequence, is off the chart that I enclose.
I have to find a way to make sure that the code puts the elements on the x axis with the same sequence with which they are read from the table.
Can you help?

0 Kudos
Message 13 of 46
(1,557 Views)

Hi gmazza,

 


I have to find a way to make sure that the code puts the elements on the x axis with the same sequence with which they are read from the table.


 

When you look at the graph very carefully you will notice it already displays the values in the exact order of the table...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 46
(1,549 Views)

Hello GerdW,
perhaps I have not explained well, but I want the x-axis is composed as follows:
Sart 01 02 03 04 05 29 30 07 08 209 09 10 (I omitted Sart for elements that come after the first one).
Instead, as you can see, for example, the element 209 is the last Sart (because the x-axis is composed of a numerical sequence).
For clarity I'll explain what are the elements Sart: are tools of temperature measurement. The numbers 01, 02, etc. are the identifiers (ID). For this reason it could happen that they are not installed in sequence numbers. So, having to represent a temperature-space graph, I need the x-axis should be composed as explained before.

0 Kudos
Message 15 of 46
(1,545 Views)

Hi gmazza,

 


Sart 01 02 03 04 05 29 30 07 08 209 09 10


 

The values are plotted in exactly that order of x-values...

 

You cannot have a x-scale with numbers not in numerical order! So to solve your problem you could plot the temperature values vs. index of measurement and use that SART number as annotation for the points. There's an example showing how to use annotations in graphs...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 46
(1,528 Views)

I'm sorry, I did not understand what solution you propose.

...to solve your problem you could plot the temperature values vs. index of measurement and use that SART number as annotation for the points.

 

What do you mean by this phrase?

 

 

Thanks

0 Kudos
Message 17 of 46
(1,511 Views)

At the same time I ask you another question.
Can you tie the scrollbar of an array with a graph? That is, can I slide (horizontally) at the same time the array and the chart?

0 Kudos
Message 18 of 46
(1,506 Views)

Hi gmazza,

 

it seems to me you want a X axis with un-ordered values (like "1 20 5 30 8 209"). That's not possible with a XY graph.

So I proposed to use the annotions feature of the graph to put numbers on certain points of the plot.

 

Read the help for graphs, look for examples in the example finder. There's an example that explains the usage of annotations!

 

Edit:

for our other question: Yes, you can do!

Use property nodes to sync array indicator an graph x axis...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 46
(1,505 Views)

Hello GerdW,
I thank you for the advice you gave me yesterday.
Regarding the last, "for our other question: Yes, you can do!
Use property nodes to sync an array indicator graph x axis ... "
Could you explain exactly how to do?
Thank you very much

0 Kudos
Message 20 of 46
(1,474 Views)