Jump to content

Quotient and Remainder


swoopstar

Recommended Posts

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!

post-6175-1158383088.jpg?width=400

post-6175-1158383114.jpg?width=400

Link to comment

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

Link to comment
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.

Link to comment

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.

Link to comment
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?

Link to comment
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

Link to comment
:blink: My brain hurts...

:D 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>

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.