LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare two data

Solved!
Go to solution
Hi I want to compare two numerics entered through numeric control a,b. If a=b then i want to see "RAM" , if ab then i want to see "JADU" in the indicator.in the front panel.I am using labView version 13. Please suggest Best Regards Supriyo Senapati
0 Kudos
Message 1 of 16
(4,131 Views)

If they are integers, just use an equal comparison and a case structure. If they are floating point (e.g. DBL), all precautions of comparing floating point values apply.

Message 2 of 16
(4,121 Views)

Try something like this:

 

 

Download All
Message 3 of 16
(4,118 Views)

Thank you sir. I am trying it.

0 Kudos
Message 4 of 16
(4,061 Views)

You could also simply use a select node and two string diagram constant.

Message 5 of 16
(4,058 Views)

Sir, my actual message did not posted clearly. I don't know why it happened. My actual message was like that -

I want to compare two numerics entered through numeric control a,b. If a=b then i want to see "RAM" , if a<b then i want to see "SHYAM" , if a>b then i want to see "JADU" in the indicator.in the front panel. I am using labView version 13.Thanks. Regards Supriyo

0 Kudos
Message 6 of 16
(4,051 Views)

Check the concept on this link Nested Case Structure.

 

Message 7 of 16
(4,035 Views)

@supriyasenapati wrote:

I want to compare two numerics entered through numeric control a,b. If a=b then i want to see "RAM" , if a<b then i want to see "SHYAM" , if a>b then i want to see "JADU" in the indicator.in the front panel.


In another thread, Christian suggested something that I really think would apply here.  Subtract a and b and wire the result directly into a case structure selector terminal.  Set the first case to be "..-1".  This case will be for when a < b.  The next case will be "0" (for a = b) and finally "1.." for a > b.  Of course, this works best if using integers.  When using doubles, then you might want to be more careful.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 16
(4,004 Views)

@supriyasenapati wrote:

Sir, my actual message did not posted clearly. I don't know why it happened. My actual message was like that -

I want to compare two numerics entered through numeric control a,b. If a=b then i want to see "RAM" , if a<b then i want to see "SHYAM" , if a>b then i want to see "JADU" in the indicator.in the front panel. I am using labView version 13.Thanks.


Well, that's not that different. If this is giving you problems, you should probably start with some tutorials.

 

Try this:

 

 

 

This is cleaner than case structures, because a single image can show all code ;).

Download All
Message 9 of 16
(4,001 Views)
Solution
Accepted by topic author supriyasenapati

@supriyasenapati wrote:

Sir, my actual message did not posted clearly. I don't know why it happened. My actual message was like that -

I want to compare two numerics entered through numeric control a,b. If a=b then i want to see "RAM" , if a<b then i want to see "SHYAM" , if a>b then i want to see "JADU" in the indicator.in the front panel. I am using labView version 13.Thanks. 


Most likely you pasted while in HTML Mode and stuff betweeen <> got stripped.

 

To reproduce, the  paragraph above was pasted below while the edit window was set to HTML, so that's clearly what happened!

 


Sir, my actual message did not posted clearly. I don't know why it happened. My actual message was like that - I want to compare two numerics entered through numeric control a,b. If a=b then i want to see "RAM" , if ab then i want to see "JADU" in the indicator.in the front panel. I am using labView version 13.Thanks.


 

Message 10 of 16
(3,988 Views)