foxtrot99

Convert int to float

3 posts in this topic

 

I'm trying to read a result from encoder (which in pulse) and convert it to milimeter. To do that, i need to devide it. But here is the problem when i move the result of the encoder read to register (D) then devide it with another register, it doesn't show result in the monitor. It looks like i need to convert it to float first, but i dont know how. My command for the division is DEDIV D17 D40 D22. is there anyway to solve it? Thanks, i really need this. I try to look in the forum but i dont found it. I'm using mitsubishi FX3U-48 MT ESS.

I'm new in this forum, if i break a rule, please tell me. 

 

cek.png

Edited by foxtrot99

Share this post


Link to post
Share on other sites

Use the instruction "DFLT" to convert from regular double-data (32bit) into float. Alternatively "FLT" if you want to convert from 16bit data into 32bit float.

2 people like this

Share this post


Link to post
Share on other sites
On 5/6/2017 at 2:40 PM, kaare_t said:

Use the instruction "DFLT" to convert from regular double-data (32bit) into float. Alternatively "FLT" if you want to convert from 16bit data into 32bit float.

thank you. that's very helpful.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now