User Tools

Site Tools



Device Addressing

In this section device refers to the PLC or MCU that is connected to the ComfileHMI hardware.

The ComfileHMI needs to know the address of the device in order to communicate with it.

In each widget's property page, the device's address space can be configured.

Pressing the .. button will open the following window where device and device address can be bound to the widget.

The address value must expressed in the format DeviceID:Address.

  • If the address is left blank, there will be no communication with the device

Data Types for Word Addresses

Word Addresses can be used to read/write data 16-bit signed and unsigned integers, 32-bit signed and unsigned integers, and 32-bit floating point values.

The following code can be used in CUBLOC devices to store floating point values in the Modbus registers. The example below stores the floating point value Value into register D0.

Dim Value As Single
Value = 0.0
Dim Bytes As Integer
Bytes = 0
	Bytes = Peek(Memadr(Value), 4)
	_D(0) = Bytes.Byte1
	_D(0) = (_D(0) << 8) Or Bytes.Byte0
	_D(1) = Bytes.Byte3
	_D(1) = (_D(1) << 8) Or Bytes.Byte2
	Delay 1000

Back to ComfileHMI

comfilehmi/hmieditor_address/index.txt · Last modified: 2017/06/27 11:45 by COMFILE Technology