LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing data from an array

Hi,

I need help. I represent graphically some data taken from a text file and I want the application to have a warning about the data read from the file that exceeds a certain threshold (value 30). I tried with an error message but will display the message for my first value of more than 30. I would like to have a report, if this is possible in labview, to see all the values that go beyond 30. Any idea  will be a great help.

Thank you.

0 Kudos
Message 1 of 9
(2,707 Views)

I do not have LB18, so I can not see your code.
Here is one of many methods for solving your problem.

compare.png

0 Kudos
Message 2 of 9
(2,697 Views)

@MP21 wrote:

I need help. I represent graphically some data taken from a text file and I want the application to have a warning about the data read from the file that exceeds a certain threshold (value 30). I tried with an error message but will display the message for my first value of more than 30. I would like to have a report, if this is possible in labview, to see all the values that go beyond 30. Any idea  will be a great help.


What kind of "Warning"? How is the "report" supposed to look like?

Do you only want to see the outside values, or do you want to still see all values, just with the outside values highlighted in some other way? Do you have a typical datafile (how many rows /columns? What do the rows/columns represent?)

 

You subtract the first element. Do you want to range check before or after? Are you applying the range check to the x or y data?

 

You have a 2D array and you are not doing any linear algebra, so please use array functions, not matrix operations. In fact I suspect you are just having two columns. Combine them into a 1D complex array and wire straight to the xy gaph terminal. No need for express VIs.

0 Kudos
Message 3 of 9
(2,681 Views)

One way would be to highlight the outside points in the graph, e.g. with a red outline. Here's a very simple example.

 

HighlightGT30.png

 

Message 4 of 9
(2,675 Views)

It is a solution, the possibility of highlighting values that exceed 30 per graph, but I would like the report to appear in the form of a message or something similar to warn me that threshold value has been exceeded. If I could extract the values over 30 and display separately with a message, but I have no idea how. However, I'll highlight them on the chart because it's very interesting.

I monitor some biological data and I want to do a time analysis of the data. That is why the first value that is read it is transformed in the value "0" and I represent in function of it and the others, because the first value read from an individual represents the value of "0" for it (I do not care about it as a value but as a variation in time).
To answer the first message, I have a three-column file: the first represents the time, the second represents the data read from a sensor, and the third represents the data read from a second sensor. I graphically represent the data read from the first t sensor depending on time ( x-time, y-sensor data).

0 Kudos
Message 5 of 9
(2,646 Views)

Hi,

If you want a message with the points that exceed the threshold, maybe something like that could help you (snippet attached) :Threshold elements alert.png

 

Message 6 of 9
(2,637 Views)

I know it sounds stupid, I need help because I can not find the function I've circled in the program you gave me. Please if you can tell me what a function it is. I'm sorry, but my knowledge in labview is low.
Thank you!

0 Kudos
Message 7 of 9
(2,614 Views)

Hi MP21,

 

it's a function which converts a numeric value into a (decimal) string.

And there is a string functions palette with a conversion sub-palette…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 9
(2,611 Views)

Don't worry it's normal to ask question when you're starting. You can find the function in 'Programmation', 'String', 'Number/String', 'In decimal string'.

0 Kudos
Message 9 of 9
(2,608 Views)