Milan Posted June 28, 2018 Report Share Posted June 28, 2018 I'm honored to use the incremental encoder 500imp/rev. I need to display the exact position on the screen. How I can calculate a position, since sharing with a comma is not possible. For 500 imp I have 37.68mm. Measuring range is from 0-1100mm, with a precision of 0.1mm I use jazz T20HS Sorry for my bad English. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted June 29, 2018 MVP 2023 Report Share Posted June 29, 2018 Unfortunately, doing math in a Jazz is hard. They're really designed to use 16 bit signed integers. If there's any way you can upgrade to a V130 you can do your scaling in floating point registers. The only way to do this in a Jazz is to use an implied decimal. Since 500 pulses = 37.68 mm and your range is 1100 mm, you'll need to work with an value of 110000 for the total length. Which requires a 32 bit "long" integer. If you really want to tackle this in a Jazz you need to read the Help on Special Functions without Elements so you can learn how to work with these larger elements using two consecutive MIs. Joe T. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now