LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find difference between two numbers (DBL)

Solved!
Go to solution

Gaurav,

 

I wish you all success!!!

 

Thanks,

Davidson

0 Kudos
Message 11 of 16
(3,066 Views)

I think using the work "difference" is not clear.  What would you expect as an output for the "difference" between (-5) and (-1)?  (+4)?  Are you looking for the magnitude and direction of motion along a number line from the first number to the second?

 

Example_VI.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 12 of 16
(3,056 Views)

You are right. The naming difference is confusing.

 

I would require it to be (-4).

In a way i would require the direction of motion from max to min. ie) i assumed my first number should be always max.

 

Thank,

Davidson

0 Kudos
Message 13 of 16
(3,045 Views)

So, you want the magnitude and direction of travel from Max to Min?  That'll always be the negative of the absolute difference.  No?

 

Example_VI_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 14 of 16
(3,038 Views)
Solution
Accepted by topic author Davidson_D

@davidson D wrote:

[...] ie) i assumed my first number should be always max.


 

It's easier if you know your first number is always larger.

 

Example_VI.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 15 of 16
(3,019 Views)

Jim,

 

Thank you very much for the help.

 

I really appreciate the active replies 🙂

 

Thanks,
Davidson

0 Kudos
Message 16 of 16
(2,999 Views)