AdvancedHMI Software

General Category => Support Questions => Topic started by: MrPike on October 29, 2023, 01:02:53 PM

Title: Modbus read to Double
Post by: MrPike on October 29, 2023, 01:02:53 PM
Hey Archie, I have been away from AHMI for awhile but now I'm taking on another project and need to relearn some things.  I want to set the maximum value of a guage compact on a button click with a modbus register value but can't get the string from the modbus read to parse to the double of the meter.  i tried Double. tryparse method but this does not accept String() types.  Any help is appreciated, thanks

 
Title: Re: Modbus read to Double
Post by: Godra on October 30, 2023, 02:01:24 PM
Maybe add

Code: [Select]
(0)
at the end and also check the following link:

  https://stackoverflow.com/questions/1172306/convert-string-to-double-vb
Title: Re: Modbus read to Double
Post by: MrPike on October 30, 2023, 10:21:43 PM
Thanks Godra, I had already googled that link and was able to figure it out.  I had one too many arguments in my code.

Much appreciated.