Author Topic: Writing Floats to a Trilogic FX2424  (Read 892 times)

ShutterAce

  • Newbie
  • *
  • Posts: 3
    • View Profile
Writing Floats to a Trilogic FX2424
« on: February 14, 2017, 06:45:15 PM »
I am a completely new to HMI's and VB programming. It's OK to treat me like I know nothing. This is a one-off machine that we have built in-house. I'm just trying to make the interface user-friendly.

I have been able to get my controls and lamps working as well as doing reads and writes to DM's. I cannot, however, figure out how to write to a 32 bit FP. I can read from them with no problem. I'm sure it's probably something really simple but it is escaping me.

In a nutshell, I am using the Digital Panel Meters to read and write variables to and from the PLC. This works fine except for when the data is a float. The format is "00.000". I am connected via TCP. Any help would be appreciated.

Thank you!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Writing Floats to a Trilogic FX2424
« Reply #1 on: February 14, 2017, 06:58:36 PM »
Is it writing at all? Did you have to change the ByteSwap or WordSwap in the driver properties? If so, you will need to apply a patch for it to write correctly.


ShutterAce

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Writing Floats to a Trilogic FX2424
« Reply #2 on: February 14, 2017, 07:02:39 PM »
Yes, both SwapBytes and SwapWords are set to true.

Sometimes it will appear to write. What happens is I will try to change a stored value and it comes back as ".000" instead of the value I tried to input.

What patch is it that I might need?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI

ShutterAce

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Writing Floats to a Trilogic FX2424
« Reply #4 on: February 15, 2017, 11:32:31 AM »
Awesome! Seems to be working.

Thank You Archie.