Benlawder

Conversion

5 posts in this topic

I have an omron CJ2M PLC, and am trying to do a conversion but I can't find the instruction for it.

how do i convert a udint to a double floating point number (64bit).  I need the accuracy for further calculations.

Thanks in advance 

Share this post


Link to post
Share on other sites

Benlawder.

Take a look at the DBLL instruction.

Not sure if that is what you are looking for.

Share this post


Link to post
Share on other sites

DBLL is 32 bit to 64 bit float - DBL is 16 bit to 64 bit float.

Share this post


Link to post
Share on other sites

Thanks guys that is exactly what I was looking for.  The description in the help is apparently wrong: it says that DBLL converts double floating to 32 bit signed binary. Wrong direction.

One more question while you are here... to move the double floating point is it best to use XFER and move it as a block, or use MOVL twice? Are there benefits to one or the other?

Share this post


Link to post
Share on other sites

I noticed the incorrect description also.

I would use XFER.  Should be a bit easier to understand down the road.

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