Any way to use double data types in RsLogix?

opmal7

Member
Join Date
Dec 2014
Location
Moline
Posts
35
I'm using RsLogix Micro Starter Lite for some basic PLC programming. I have an incoming RS-422 message that is composed of hex bytes. Some of the data in that message are integers, SP float, and DP float. I've been able to extract the info for the integers and SP floats into other data types using COP and MOV commands, but I don't have an option for a DP Float data type.

Anyone know if doubles are available in other RSlogix versions, or if there is a work around?
 
I've never tried this but some bit moving may give a useable value, assuming the double precision value is within the range of the single precision.

Transfer the following bits (starting with the most significant and working downward) from the double precision location to the single precision location.

Preserve the upper 9 bits of the double precision into the upper bits of the single precision.

Skip the next 3 bits of the double precision

Preserve the next 23 bits. Ignore the remaining bits of the double precision number.
 
I've never tried this but some bit moving may give a useable value, assuming the double precision value is within the range of the single precision.

Transfer the following bits (starting with the most significant and working downward) from the double precision location to the single precision location.

Preserve the upper 9 bits of the double precision into the upper bits of the single precision.

Skip the next 3 bits of the double precision

Preserve the next 23 bits. Ignore the remaining bits of the double precision number.

If this works, well then good job! where did you get is littletidbit of information from?
 
I just looked up the structure (yeah Wikipedia) of both types of floating point and determined what I could toss away realizing that the precision those bits represent is obviously what we would be giving up.

I would like to find out if this would work - looking at the structures it seems reasonable.

Edit - actually thinking about it some more it may not be this simple regarding the bits in the exponent.
 
Last edited:
there are AOI's that have been written for double precision control logix
sorry I just cannot remember where they are located
 

Similar Topics

Hi All, I'm keep getting double quotes in between selections rather than the beginning and the end. Here's the script and please help to find...
Replies
7
Views
797
Hi guys I'm having some weird data conversion issue over modbus happening. And I found a post here before that is similar to what I'm seeing but...
Replies
6
Views
7,161
Hi all, I am currently trying to develop a HMI application which will need the user to enter a data matrix code and then verify it by re-entering...
Replies
1
Views
2,645
Hi all. I am new to PLCS.net and have looked at several previously posted threads in hopes of finding the answer to my question; to no avail (it...
Replies
1
Views
1,697
What is the simples way to do a double click of a button in a ladder logic. New here and I hope this has not been asked before.
Replies
22
Views
529
Back
Top Bottom