Jump to content
Sign in to follow this  
zoogies

Computing modulus in Labview 7

Recommended Posts

Can this be done? I looked this up, and it looks like you do it in Labview 8 via MathScript. It's not one of the basic palette features on Labview (I'm using 7.1)

I made a simple quick-and-dirty VI, but I don't really like this since it's kind of hacked together. Labview doesn't really have a floor function, so I took the result of the divide, made an indicator from it, went to 'properties', made it an unsigned word (so that it would have to be a positive integer) and set it to 'coerce down' (round down). So this will do x modulo y for me, which accomplishes what I need, but it seems like there must be an easier way?

http://forums.lavag.org/index.php?act=attach&type=post&id=6247

Share this post


Link to post
Share on other sites

There is an easier way: it's called the Quotient and Remainder function on the Numeric palette. This is a combination floor and modulo function. I've been using LabVIEW since 5.0, and it's been there at least that long.

http://forums.lavag.org/index.php?act=attach&type=post&id=6250

Share this post


Link to post
Share on other sites

Wow, thanks!

I noticed "round to -infinity" before but didn't really stop to think about what it could have meant. Hm, interesting name to call a floor function...

Share this post


Link to post
Share on other sites

Join the conversation

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

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

Sign in to follow this  

×
×
  • Create New...

Important Information

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