General Category > Support Questions

Decimal to Hex

(1/1)

pedroceronjunior:
My PLC only use hexadecimal values ​​, the counters and timers values ​​are given in Hex , the AdvancedHMI converts this value in decimal , I need to show that value in hex ​​in a BasicLabel . :-[ :-[

Archie:
The BasicLabel does not have functionality to convert to Hex.
You can do this with a DataSubscriber and a Label.

- Add a DataSubscriber to your form
- Set the PLCAddressValue to the address you want to display
- Add a Label from the All Windows Forms group in the ToolBox
- Double click the DataSubscriber and enter this code:

--- Code: ---Try
  Label1.Text=DataSubscriber1.Value.ToString("X")
Catch ex as exception
End Try

--- End code ---

Navigation

[0] Message Index

Go to full version