Jump to content

Recommended Posts

  • MVP 2023

I always tell people when they first start using PLC software to take the time to go through every menu and every sub-menu to get an idea of what's buried in there and where.  It's useful where you run into a question like this you can say "I thought I saw something like that..."

From ladder, look at Math -> Float -> Convert and you'll see the two blocks used for moving between floats and integers.  Go into the Help and search for "float convert" and you'll see much better usage diagrams than I can go into here.


What you're running into is how much of the pain in the butt it is to use floating point in a PLC.  Everybody thinks they need it if there are decimals involved.  You can get precision more elegantly with integers (especially longs) if you embrace the concept of a "virtual decimal point".  Every number is 10, 100, 1000 times larger to accommodate the precision on the other side of the decimal and you just keep track of it.  It's an easier technique you pick up with experience.

Joe T. 

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

  • Create New...