AdvancedHMI Software
General Category => Support Questions => Topic started by: adam22ym on December 08, 2013, 08:05:11 PM
-
I have a Modbus coming in as a Celsius temp and I would like to convert it to a Fahrenheit. I have tried *1.8+32 in the ValueScaleFactor in several different methods without success (Using various DigitalPanelMeters). What am I missing? where can I do some of these conversions at for this and others? Thanks
-
Hi. I had similar question. If you have your DataSubscriber in celsius where you get your data (lets call it DS_temperature), click on it, go to properties panel, click on events and double click on DataChanged event. It should take you to a sub that handles change od subscriber data. I'm going to assume that result is going in basic label, BL_fahrenheit.
Private Sub DS_temperature_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DS_temperature.DataChanged
BL_fahrenheit.Value = CInt(DS_temperature.Value)*1.8+32
End Sub