adccommunitymod (AutomationDirect) asked a question.

CLICK ModbusTCP floats

Created Date: February 17,2016

Created By: DuctSoup

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

First off, I am *SO* loving these new C0-11ARE-D CLICKs. What an awesome addition to the line. I'm just finishing some lighting controllers and only remembered today that this PLC can also act as a ModbusTCP master. Gave it a try and dang if it didn't work right out of the gate. Noticed one funny thing. In CLICK a zero sometimes shows up as a float that's very near but not quite zero. The slave is reporting holding registers encoded as a standard float. In the CLICK 2.0 software data view a slave value of 0.0 is being displayed as 2.326436E-41, or something like that. If I use Ignition to poll the slave I get 0.0. If I have the CLICK polling the slave then poll the CLICK with Ignition I'm correctly getting 0.0 again. Last time I checked with Modpoll the slave reported 0.0. I totally get that I'm talking about doing floating point math on an economical industrial PLC and this observation isn't a problem for the project I'm finishing. I'm just curious if anyone has any experience or insight to share. Is this behavior coming from the CLICK, or the CLICK software?


  • adccommunitymod (AutomationDirect)

    Created Date: February 17,2016

    Created by: kewakl

    Click float is only -3.4028235E+ 38 to 3.4028235E+ 38

    So the E-41 may be beating the bounds.

    Wait for someone more knowledgeable corrects me.;)

  • adccommunitymod (AutomationDirect)

    Created Date: February 18,2016

    Created by: DuctSoup

    Duh, thanks!

  • adccommunitymod (AutomationDirect)

    Created Date: February 18,2016

    Created by: Do-more PE

    Correct. Click as well as most PLC's adheres to the IEEE-754 Floating Point standard.

  • adccommunitymod (AutomationDirect)

    Created Date: February 17,2016

    Created by: DuctSoup

    First off, I am *SO* loving these new C0-11ARE-D CLICKs. What an awesome addition to the line.

    I'm just finishing some lighting controllers and only remembered today that this PLC can also act as a ModbusTCP master. Gave it a try and dang if it didn't work right out of the gate. Noticed one funny thing. In CLICK a zero sometimes shows up as a float that's very near but not quite zero.

    The slave is reporting holding registers encoded as a standard float.

    In the CLICK 2.0 software data view a slave value of 0.0 is being displayed as 2.326436E-41, or something like that.

    If I use Ignition to poll the slave I get 0.0.

    If I have the CLICK polling the slave then poll the CLICK with Ignition I'm correctly getting 0.0 again.

    Last time I checked with Modpoll the slave reported 0.0.

    I totally get that I'm talking about doing floating point math on an economical industrial PLC and this observation isn't a problem for the project I'm finishing. I'm just curious if anyone has any experience or insight to share. Is this behavior coming from the CLICK, or the CLICK software?

    Expand Post