Define Modbus input registers as 32-bit float on CS8C

  • Hi all,


    I have a Beckhoff PLC send some data to an old CS8C, over Modbus/TCP.


    One of the variables I'm broadcasting is a 32-bit float.

    On the beckhoff side I've just mapped it into the output registers area, so it instantenuously becomes a "DWORD".


    The problem is it stays like that on the robot side: I assign it to a "num" variable, and it displays as if it is an UNSIGNED LONG (so basically, identical to the raw DWORD).


    How can I tell the CS8C this num is a floating point number?


    See below the modbus.xml of the robot.

    I don't have access to SRS at the moment unfortunately and had to manually edit it.



    Additional relevant definitions from the .dtx file (this is just a fragment, not the complete file):



    Would be grateful for any help...

  • AD
  • Hello,

    Modbus TCP is different with all PLC, and some type are not possible with someone.

    Perhaps the solution is to multiply the value to transfer an integer.


    An example on CS8 with one Float Input and one Float Output :

    XML
    <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
    <TOPICSLIST>
        <TOPIC Name="Modbus" Card="0" Channel="0" Equipment="0" RefreshPeriod="200" Actif="1">
            <MODULE Tag_name_root="Bit" IDModule="BOOLEAN" InputSize="" OutputSize="0">
                </MODULE>
            <MODULE Tag_name_root="Word" IDModule="WORD" InputSize="" OutputSize="64">
                <ITEM Name="MbInputFloat" Syntaxe="%QF0" Offset="0"/><ITEM Name="MbOutputFloat" Syntaxe="%IF2" Offset="2"/></MODULE>
        </TOPIC>
        <GENERAL_PARAMETERS TopicName="Modbus" TCP_Port="502" ConnectionNumber="2"/>
    </TOPICSLIST>

    and the .dtx file for the datas :

    Edited once, last by Galet ().

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