Author Topic: Convert Modbus Holding Register Data to character  (Read 1805 times)

aquilmustafa

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Convert Modbus Holding Register Data to character
« on: August 01, 2016, 04:54:55 AM »
Hi,

I need some help. I'd like to convert Holding register data coming from Telemecanique PLC to Character format. Cause my PLC is Storing String in Holding Registers. Any help would be appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Convert Modbus Holding Register Data to character
« Reply #1 on: August 01, 2016, 09:43:06 AM »
There is a function that is part of AdvancedHMI to help with this:

MfgControl.AdvancedHMI.Drivers.Common.CalculationsAndConversions.WordsToString

Here is an example of how to use it:
Code: [Select]
        Dim v() As String = ModbusTCPCom1.Read("40001", 10)
        Dim MyString as String = MfgControl.AdvancedHMI.Drivers.Common.CalculationsAndConversions.WordsToString(v)

aquilmustafa

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Convert Modbus Holding Register Data to character
« Reply #2 on: August 05, 2016, 03:17:39 AM »
Hey Archie,

Thanks a ton for the Help.