RobotStudio event

Converting a DINT to a REAL value

Hi,
my PLC is mapped with the IRC5 trought Devicenet. The data type used for PLC to be passed over DeviceNet is DINT (32bit).

Note that the DINT value that I'm working with is already converted from a REAL value in the PLC.


How should I proceed to convert the DINT value found in my Analog Input signal to a REAL value (floating point)?  
fvadnais2010-11-12 21:09:06
- Francois

Comments

  • fvadnais,

    If you have already converted the number to DINT at the PLC it won't be floating point any more will it?

    Regards
    Dave
  • Hi, the size of PLC data is DINT 32 bit over the DNet Network. The value contained in one of the DINT 32 is a bit copy of a FLOAT 32 (no conversion here). I think the Float format is from a standard called IEEE754. I was just wondering if the ABB controller could read this format directly from their Ainputs.
    The workaround is to convert the Float to INT x 1000 with the PLC and then, take this value on the robot side divided by 1000 to get the floating value back with 3 digit after decimal point. Is this sounds fair?  
    - Francois