swoopstar Posted September 16, 2006 Report Share Posted September 16, 2006 I have been trying to interpret this labview vi but i cant seem to be able to find a simple explanation of what the "Quotient and Remainder" function does. Basically the program mimics a electrical muscle stimulation machine where you are able to input the time on and off, choose the intensity and show the output of a 2500Hz sine wave. Everything else i can pretty much nut out but have no clue about this "Quotient and Remainder" function. Any help would be greatly appreciated! Quote Link to comment
bsvingen Posted September 16, 2006 Report Share Posted September 16, 2006 R = x - y*floor(x/y) IQ = floor(x/y) floor() rounds the value down to the nearest integer. Quote Link to comment
gleichman Posted September 16, 2006 Report Share Posted September 16, 2006 This function is generally used (as it is in your example) to be a counter reset. If you feed an index into X and a reset value into Y then the output R will count up with the index until it reaches Y then it will reset and start counting from 0 again. The output Q will give you how many times this has happened. Example: Save data every 200 loop iterations. X=i (loop index) Y=200 IF R=0 THEN save data Quote Link to comment
Aristos Queue Posted September 16, 2006 Report Share Posted September 16, 2006 Everything else i can pretty much nut out but have no clue about this "Quotient and Remainder" function. Think back to elementary school when you first did division, before you knew about decimals. What is 7 divided by 2 ? Answer: 3 remainder 1. The 3 is the quotient. 1 is the remainder. This is also known as modular division or integer division. Quote Link to comment
Khalid Posted September 18, 2006 Report Share Posted September 18, 2006 Why don't we just call the outputs as Quotient and Remainder -- plain and simple? -Khalid Quote Link to comment
Yair Posted September 18, 2006 Report Share Posted September 18, 2006 Why don't we just call the outputs as Quotient and Remainder -- plain and simple? Now, THAT is a revolutionary idea. And a pretty good one, too... Quote Link to comment
bsvingen Posted September 18, 2006 Report Share Posted September 18, 2006 Now, THAT is a revolutionary idea. And a pretty good one, too... Yea, maybe a good name for the oututs would be: R(eminder) and I(nteger)Q(uotient) :beer: Quote Link to comment
LAVA 1.0 Content Posted September 18, 2006 Report Share Posted September 18, 2006 I never look at the terminal names, I ALWAYS use the icon... It FLOORS me every time I do look at the names Quote Link to comment
Aristos Queue Posted September 18, 2006 Report Share Posted September 18, 2006 If you want one that really makes you want to claw your eyes out, take a look at the output terminal of the Type Cast node... *(type *)&x Changing these names once they're established is non trivial. Unless they're really factually wrong, such changes tends to be lower priority than all the other stuff that needs working on in LV. Quote Link to comment
PaulG. Posted September 26, 2006 Report Share Posted September 26, 2006 Why don't we just call the outputs as Quotient and Remainder -- plain and simple? -Khalid Classic example of some nerd at NI using a $20 word when a $.10 word would have worked a lot better. Quote Link to comment
crelf Posted September 26, 2006 Report Share Posted September 26, 2006 Classic example of some nerd at NI using a $20 word when a $.10 word would have worked a lot better. Interesting - especially since the primitivie itself is called "Quotient and Remainder". That said, it gooes along with the other models they have - eg: the "Add" primitave has an output of "x+y", so it looks like the output is represented as the formulae that arrived at it (I'd prefer NI didn't change the add primitive output to say "add"). Maybe the Q&R outputs could have their equations and then the word in brackets after it? Quote Link to comment
LAVA 1.0 Content Posted September 26, 2006 Report Share Posted September 26, 2006 (I'd prefer NI didn't change the add primitive output to say "add"). I thought the correct english word would be sum...? But I'm not native English speaker. Quote Link to comment
Mike Ashe Posted September 26, 2006 Report Share Posted September 26, 2006 I would think that the IQ and R on the icon would suffice, considering the name of the function. I agree the actual terminal names are a bit overdone on the mathematical rigor ... But on my own list of priorities, this one is pretty low. Quote Link to comment
crelf Posted September 27, 2006 Report Share Posted September 27, 2006 I thought the correct english word would be sum...? But I'm not native English speaker. Add is when there are two terms, sum is when there are more than two. Quote Link to comment
JDave Posted September 28, 2006 Report Share Posted September 28, 2006 Add is when there are two terms, sum is when there are more than two. Though sum is used as the output of the Add Array Elements block, it does technically refer to any result from addition. Going the technical route could provide us some gems of names for the inputs of the Add function: augend for the first input and addend for the second. :laugh: David Quote Link to comment
LAVA 1.0 Content Posted September 28, 2006 Report Share Posted September 28, 2006 Going the technical route could provide us some gems of names for the inputs of the Add function: augend for the first input and addend for the second. How about properly naming the inputs to Build Array; primary, secondary, tertiary, quaternary, quinary, senary, septenary, octonary, nonary, and denary! :laugh: Quote Link to comment
crelf Posted September 28, 2006 Report Share Posted September 28, 2006 My brain hurts... Quote Link to comment
Yair Posted September 28, 2006 Report Share Posted September 28, 2006 My brain hurts... Haven't seen that one in a while. </br></br><object width="425" height="350"><param name="movie" value="http://www.youtube.com/watch?v=HQgF0pRkjMc"></param><param'>http://www.youtube.com/watch?v=HQgF0pRkjMc"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/watch?v=HQgF0pRkjMc" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> Quote Link to comment
Mike Ashe Posted September 28, 2006 Report Share Posted September 28, 2006 Can you embed that last one in a VI with an activeX browser control. Would make a great "I'm Busy" screen to show during those long test runs ... Quote Link to comment
crelf Posted September 28, 2006 Report Share Posted September 28, 2006 Haven't seen that one in a while. Well done! I wasn't sure anyone would know that one Quote Link to comment
Yair Posted September 28, 2006 Report Share Posted September 28, 2006 Can you embed that last one in a VI with an activeX browser control. Would make a great "I'm Busy" screen to show during those long test runs ... Well, I thought it would be a piece of cake (see attached), but for some reason the video doesn't play. HTML isn't my strong suit, so I'm not sure why. Download File:post-1431-1159461005.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.