Series 2, Serial Card Modbus RTU

Yo!

   Im sure others have had the same frustration that I have. I am trying to bring Modbus registers in and everything comes in fine except for the floating points. My addressing is correct, I can get the values in modbuspoll on my computer. The floating points are showing up garbled and irratic. I believ it has to do with the '32-bit Floating point, Bi-Endian' structure and the standard driver just wont do it. I believe I need the Mynah Special Modbus firmware to flash the card so I can get the structure options I need with the special data. Guardian Support wasnt any help. If there is an alternate way to bring the registers in by intiger and then combining/ formatting them to be correct, that would work also. Ive attached the Myna manual that explains the driver. Ive also included the manual for the registers Im bringing in (atmos 41 "pages 19-25" )Thanks in advance!

https://metergroup.com/products/atmos-41/atmos-41-support/?_gl=1*8cbg2v*_up*MQ..*_gs*MQ..&gclid=CjwKCAiAgoq7BhBxEiwAVcW0LO--DcAzA2YmLVAWLurKRaObBxGXAcybEsZUK8moON0Vu0FneR0RPRoCE6MQAvD_BwE

0601.Mynah- DeltaV Serial Modbus manual v1.58s.pdf

Dave Harmon

Automation Specialist

  • The Byte order looks to be the issue, where the PLC is using a different setting than DeltaV.

    A work around is to read the raw 32 bit integers and converting it back into a float via a CALC block in DeltaV.

    The Mantissa, Log, sign components are extracted from the integer using bitwise operators. and you can combine these to recreate the float value. Not pretty, but doable. There are posts in the community that discuss this. I don't currently have access to my system to grab the actual expression.

    Andre Dicaire

  • In reply to Andre Dicaire:

    Here's a link to a post with the expression. See the last response from IntuitiveNeil.
    emersonexchange365.com/.../binary32-coversions-in-deltav
  • UPDATE: I was able to find a KBA (NA-0200-0173) which provides instructions to allow DeltaV to correctly read floating-Point values via Modbus. I put the instruction into a calc block as it states and it works perfect. In case the attachment wont work, here is the KBA.

    Expression To Reverse The Word Order For Floating Point PLC Register Values
    Article ID: NA-0200-0173
    Publish Date: 11 Jan 2019
    Article Status: Approved
    Article Type: Product Issues
    Required Action: Information Only

    1 Introduction This Knowledge Base Article, NA-0200-0173, provides instructions to allow DeltaV to correctly read floating-point values via Modbus from a PLC or other device, which has stored the floating-point value(s) in a different register order than DeltaV is able to access.

    2 Background The Modbus specification does not identify a register order for the two 16-bit words that make up the 32 bits of the IEEE754 floating-point number. DeltaV uses the register order found in Modicon PLCs, which have the Least Significant Word in the lower address register and the Most Significant Word in the higher address register. If the PLC or other field device uses the opposite order, there are two ways to read the correct value from the pair of registers.
    1. The preferred method is to modify the register values in the PLC or field device to put the values in a compatible order.
    2. The other method is to use an Expression in a CALC block in a DeltaV Module to rearrange the word order. An Expression that will accomplish this rearrangement along with the necessary information for its use is described below.
    In order for DeltaV to manipulate the bits without losing any resolution, the register values must be read into DeltaV as a 32-bit unsigned integer. For DeltaV versions earlier than V6, the Expression must be modified to use individual 16-bit unsigned integer registers, since the 32-bit integers were not handled correctly in older DeltaV versions.

    In a CALC block, lines similar to the following must be entered in the Expression for each floating-point value to define an OUT value for each floating-point value:

    OUT1 := (' PLC Register'=0) OR (' PLC Register‘=32768)?0: (SHR(ROR(' PLC Register',7),9)+8388608)*EXPT(2,((SHR(' PLC Register’,7)&255)-150))*((' PLC Register’&32768)=0?1:-1);

    where:
    the same actual register External Parameter is substituted for ‘PLC Register’ in each case.

    Examples of actual register External Parameters are:
    ‘//C1/IO1/C05/P02/DEV01/DS06/R40129.CV’ for an I/O Parameter
    ‘//C105020106/R40129.CV’ for a DST Parameter

    The following portion of the expression is used to force a zero (0) value when the register values are zero (0):
    (' PLC Register’=0) OR (' PLC Register’=32768)?0:
    The above portion of the expression can be deleted to save processing time, but a value of 1.17549421e-38 will result instead of zero (0) when the registers both contain zero (0).

    Note: The expression above only works on 32-bit integer parameters. The CALC block IN1 through IN16 parameters are floating point registers. Wiring a 32-bit unsigned integer register to IN1 will convert the value to floating point format. The SHR and ROR functions will produce incorrect results if using the IN1 through IN16 CALC block parameters.

    Contact Information Services are delivered through our global services network. To contact your Emerson local service provider, click Contact Us. To contact the Global Service Center, click Technical Support. Page 2 of 3

    Dave Harmon

    Automation Specialist