annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

compare two data

Risolto!
Vai alla soluzione
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
Messaggio 1 di 16
6.302Visualizzazioni

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.

Messaggio 2 di 16
6.292Visualizzazioni

Try something like this:

 

 

Scarica tutti
Messaggio 3 di 16
6.289Visualizzazioni

Thank you sir. I am trying it.

0 Kudos
Messaggio 4 di 16
6.232Visualizzazioni

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

Messaggio 5 di 16
6.229Visualizzazioni

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
Messaggio 6 di 16
6.222Visualizzazioni

Check the concept on this link Nested Case Structure.

 

Messaggio 7 di 16
6.206Visualizzazioni

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



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
Messaggio 8 di 16
6.175Visualizzazioni

@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 ;).

Scarica tutti
Messaggio 9 di 16
6.172Visualizzazioni
Soluzione
Accettato da autore argomento 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.


 

Messaggio 10 di 16
6.159Visualizzazioni