Announcement

Collapse
No announcement yet.

Floating Point Numeric Entry to PLC

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • Floating Point Numeric Entry to PLC

    If I set up the numeric entry variable as an unsigned integer, and specify the data entry as 5 digits with 3 of those to the right of the decimal place, then this is how the number must be entered - 5 presses, where three of those wind up right of the decimal. so the presses for "9.375" would be "9375"...resulting in that net entry with three of the entries to the right of the decimal.

    However, the operator keeps wanting to enter "9.375", which puts him a decimal off in his entry because of his pressing the decimal point on the key pad. If the numeric entry variable is set as floating point 32, then the entry is intuitively as the operator expects - he enters the decimal point to put it where he wants it in his entry.

    The problem with this is that a floating point 32 cannot be transferred to the PLC, because the only variable available is in the EA9 is a "V", and the PLC sees this as a signed integer. There is no "R" or other such variable that connects the HMI data entry to a floating point/ real number on the PLC side.

    With the variable set up as floating point 32 on the HMI side, the entry works perfect and the number displayed is correct. However, the PLC sees this variable as a "0" or rounds it to the closest integer. I can't get the floating point on the HMI side to a real number on the PLC side.

    Can someone help out with this? I can make the conversion from signed integer to real number work, but my operator just can't seem to get his head wrapped around having to enter 4 or five digits, including zeros required to fill out those 3 spaces right of the decimal point.


  • #2
    Which cpu are you addressing? In most of the AutomationDirect DL line two V registers can be grouped and used as a floating point. To view the CPU value from Directsoft use a dataview window. Enter the first V register address (let's say V2000) and set the data format to Real. It will display the value from V2000/V2001 as a real (floating point) number. Enter a value from the HMI and you should see it shown there.
    Last edited by bcarlton; 12-30-2018, 11:51 PM.
    thePLCguy

    Bernie

    Comment



    • #3
      Not sure if you left the Cmore tag as a V Number. A problem ( or quirk) with the Cmore is you have to erase the numeric entry and make another to change the format ( or i haven't been able to figure out how) to make a V to a R. I guess i'm thinking Do More at the moment because i've given up on the DL line after using Do More but in DL you can use Float as well you just have to set it up in Cmore to read/write as Float.

      Comment

      Working...
      X