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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted June 29, 2018 MVP 2022 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. Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.