HF6208 User Manual
HF6208 User Manual
HF6208 - HF6508
Overview of Characteristic
Support RS485 transmission Use Modbus protocol to control 8 DI, 8 AI interfaces and
control 8 DO
DI input voltage range 0 ~ 40V, AI input voltage range 0 ~ 5V, input current range 0 ~ 25mA
http://www.iotworkshop.com -1-
HF6208_HF6508 IO Controller User Manual
HISTORY ...........................................................................................................................................7
http://www.iotworkshop.com -2-
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com -3-
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com -4-
HF6208_HF6508 IO Controller User Manual
LIST OF FIGURES
Figure 1. HF6208_HF6508 Appearance ....................................................................................................... 10
Figure 2. HF6208 Front interface .................................................................................................................. 11
Figure 3. HF6508 Front interface .................................................................................................................. 11
Figure 4. RJ45 Pin Definition ........................................................................................................................ 12
Figure 5. HF6208_HF6508 Mechanical Dimension ...................................................................................... 13
Figure 6. HF6208_HF6508 Software Protocol Structure............................................................................... 15
Figure 7. General AP Network ...................................................................................................................... 16
Figure 8. STA Application ............................................................................................................................. 17
Figure 9. Configure the Wi-Fi Parameter ...................................................................................................... 18
Figure 10. Transparent data transmission example ........................................................................................ 20
Figure 11. TCP Server data transmission example ........................................................................................ 21
Figure 12. Multi Socket data transmission example ........................................................................................ 21
Figure 13. Webpage set up multi Socket channel ........................................................................................... 22
Figure 14. Web Page Config Keepalive .......................................................................................................... 22
Figure 15. Web Page Configure Timeout........................................................................................................ 23
Figure 16. External web page ......................................................................................................................... 23
Figure 17. Internal web page .......................................................................................................................... 23
Figure 18. Web Page Function Setting ........................................................................................................... 24
Figure 19. Heartbeat Function ........................................................................................................................ 24
Figure 20. Other Function ............................................................................................................................... 24
Figure 21. Tools Read DI/AI ........................................................................................................................... 29
Figure 22. DI Count Value Setting Display ...................................................................................................... 33
Figure 23. IOTService Display Information ..................................................................................................... 35
Figure 24. IOTService Device Status Page .................................................................................................... 36
Figure 25. IOTService Device Editing Page .................................................................................................... 36
Figure 26. IOTService Advanced Settings Page ............................................................................................. 37
Figure 27. I/O Control Main Page ................................................................................................................... 38
Figure 28. I/O Connection Settings ................................................................................................................. 39
Figure 29. I/O Parameter Display ................................................................................................................... 40
Figure 30. AI/DI Setting................................................................................................................................... 40
Figure 31. DO Display..................................................................................................................................... 41
Figure 32. DI Display ...................................................................................................................................... 41
Figure 33. AI Display....................................................................................................................................... 42
Figure 34. Parameter Display ......................................................................................................................... 43
Figure 35. Socket Setting................................................................................................................................ 44
Figure 36. Modbus Parameter Setting ............................................................................................................ 45
Figure 37. I/O Connection Settings ................................................................................................................. 45
Figure 38. I/O Display ..................................................................................................................................... 46
Figure 39. Modbus Poll Setting ....................................................................................................................... 47
Figure 40. Modbus Poll Setting ....................................................................................................................... 48
Figure 41. Modbus Poll Display ...................................................................................................................... 48
Figure 42. Modbus Poll Display ...................................................................................................................... 49
Figure 43. Modbus Poll Display ...................................................................................................................... 49
http://www.iotworkshop.com -5-
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com -6-
HF6208_HF6508 IO Controller User Manual
LIST OF TABLES
HISTORY
Ed. V0.1 12-18-2017 First Version
http://www.iotworkshop.com -7-
HF6208_HF6508 IO Controller User Manual
1. PRODUCT OVERVIEW
parameter Model
Item HF6208 HF6508
System Information
Processor MIPS/320MHZ Cortex-M3/96MHz
/Frequency
http://www.iotworkshop.com -8-
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com -9-
HF6208_HF6508 IO Controller User Manual
2. HARDWARE INTRODUCTION
The HF6208_HF6508 unit is a complete solution for serial port device connecting to network. This
powerful device supports a 10/100BASE-T Ethernet connection, a reliable and proven operating
system stored in flash memory, an embedded web server, a full TCP/IP protocol stack, and standards-
based (AES) encryption. Remote IO controller can be easily use IOTService or webwapge to set
parameter.
http://www.iotworkshop.com - 10 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 11 -
HF6208_HF6508 IO Controller User Manual
RS485 use two wire links, A(DATA+), B(DATA-). Connect A(+) to A(+), B(-) to B(-) for communication.
The RS485 serial port of this product is used to control the relay or read DI status and AI input. Not for
UART data throughput.
http://www.iotworkshop.com - 12 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 13 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 14 -
HF6208_HF6508 IO Controller User Manual
3. FUNCTIONAL DESCRIPTION
The HF6208_HF6508 IO Controllers have the following features:
➢ Send Modbus data control module by establishing TCP / UDP or Telnet.
➢ Containing Web Server Allows users to access this product through the device browser such
as PC or mobile phone, modify parameters or debug.
The HF6208_HF6508 device uses the IP address for network communications. If uses the TCP to
assure that no data is lost or duplicated. If using UDP to assure that data can be fast and effective to
destination address.
HF6208_HF6508 can be set as a wireless STA and AP as well. And logically, it supports two
wireless interfaces, one is used as STA and the other is AP. Other STA devices can join into the
wireless network through AP interface. So it can provide flexible networking method and network
topology. Functions is as follow:
<Introductions>
AP: Wireless access point which is the central joint. Usually, wireless router is a AP, other STA
devices can connect with AP to join the network.
http://www.iotworkshop.com - 15 -
HF6208_HF6508 IO Controller User Manual
STA: Wireless station which is terminal of a wireless network. Such as laptop and pad etc.
3.2.1. AP Network
HF6208 can construct a wireless network as AP. All the STA devices will consider the AP as the
centre of the wireless network. The mutual communication can be transported by AP, shown as follow:
Take the following picture as an example. When router works in AP mode, HF6208 connects to the
user’s devices by RS232/RS485 interface. In this topology, the whole wireless network can be easily
stretched.
http://www.iotworkshop.com - 16 -
HF6208_HF6508 IO Controller User Manual
After the PC is connected to the product AP hotspot or the network cable is directly connected to
the product network port (In case of direct connection, the device takes some time to dynamically
assign IP addresses to the PC. The PC can also statically set the IP of the network segment
10.10.100.XXX to speed up the network connection speed), parameters can be configured, as shown
below.
http://www.iotworkshop.com - 17 -
HF6208_HF6508 IO Controller User Manual
Use PC to connect with HF6208_HF6508 through its AP hotspot or Ethernet connection. Input the
default IP(10.10.100.254, default username and password: admin/admin) to login the webpage to
configure the parameter.
http://www.iotworkshop.com - 18 -
HF6208_HF6508 IO Controller User Manual
This product provides 1 Ethernet interface adaptive function (LANN function, assign IP address to
the device, WAN function, connect router). Through this Ethernet interface, users can control the
device through Ethernet.
Remark:It takes a little time for the device to automatically assign an IP address to an Ethernet
device. For example, with a PC network cable directly connected devices, you can manually set the
PC static IP to speed up. PC side can use the ipconfig command to query its own IP.
The device supports transparent transmission mode. In this mode, the user only needs to set
some necessary parameters (network communication parameters). After power on, the device can
automatically connect to the default network and server. Set communication parameters using Web
pages or configuration software. After the connection is established, the user can send the Modbus
message to control module, and the specific Modbus register packets can check the following Chapter.
http://www.iotworkshop.com - 19 -
HF6208_HF6508 IO Controller User Manual
None: Throughput method, raw data packet. network should use Modbus RTU packet to control
our IO device.
Modbus: network use Modbus TCP packet to control IO device. Set this to transfer modbus TCP
to Modbus RTU.
http://www.iotworkshop.com - 20 -
HF6208_HF6508 IO Controller User Manual
Transparent transmission mode supports TCP Server, TCP Client, UDP Server, UDP Client
communication application. UDP Server is special function. Details see following Cli instruction. There
is a default tcp server socket created. The Socket can be modified to work at one of the above
working mode. When Socket works as TCP server, It will support multiple TCP connection (maximum
5 TCP clients). Multiple TCP connection will work in below structure:
Upload data flow: All the different TCP connection or the Client’s data will be continuously transmitted
to UART.
Download data flow: All data received from UART will be copied and broadcasted to every TCP client.
The device supports maximum 5 Socket channel, each socket can work individually at TCP/UDP,
Multi Socket simultaneous communication of data stream is as following.
Multi Socket can be created through software configure or webpage configure. The below set up 3
socket channel.
http://www.iotworkshop.com - 21 -
HF6208_HF6508 IO Controller User Manual
3.5. Keepalive
When the TCP connection between device and server became abnormal. The device will check
the abnormal status and reconnect to server (When the device working in TCP Client Mode), When
the device working in TCP Server, It will break the TCP client and wait for next connection.
3.6. Timeout
The device will break the TCP connection after some time (default is 300 seconds and it can be
modified)if there is no data packet received from Destination TCP target . It will reconnect to server
(When device works in TCP Client mode). When device working in TCP Server, it will disconnect with
TCP Client. This mechanism can effectively restore TCP abnormal connection. If set it to “0”, this
function will be close.
http://www.iotworkshop.com - 22 -
HF6208_HF6508 IO Controller User Manual
HF6208_HF6508 supports OTA (over the air) firmware upgrade. User can use webpage to
upgrade its firmware, whether external or internal webpage (192.168.0.101/hide. Internal webpage
can be used for upgrade external webpage). Please check below example. IP address is assigned by
router.
http://www.iotworkshop.com - 23 -
HF6208_HF6508 IO Controller User Manual
Support heartbeat function, can set the heartbeat time and content (heartbeat time is the same as
keepalive setting). If the product does not receive data from TCP server within heartbeat time, it will
send heartbeat to server. The heartbeat function can only be enabled when socket is set as TCP client.
The HF6208_HF6508 device parameters can be exported and loaded into other equipment..
http://www.iotworkshop.com - 24 -
HF6208_HF6508 IO Controller User Manual
4. MODUBUS MESSAGE
Users can send Modbus RTU messages to control relays or read IO port data.
Modbus message format is: [device address] [function code] [start register address high 8 bits]
[low 8 bits] [read / write register high 8 bits] [low 8 bits] [CRC check Low 8] [CRC high 8].
DO can be read or write. Function code is 0x01 and 0x05 (write single coil) or 0x0F (write multiple
coil)
http://www.iotworkshop.com - 25 -
HF6208_HF6508 IO Controller User Manual
default is
01)
⚫ Device Address (1byte): is the device address field in the modbus protocol, which is set
to 01 here.
⚫ function code (1byte): DO control write single coil function code 0x05.
⚫ register address (2bytes): 8 DO DO address in the microcontroller.
DO1:0x0010
DO2:0x0011
DO3:0x0012
DO4:0x0013
DO5:0x0014
DO6:0x0015
DO7:0x0016
DO8:0x0017
⚫ write data(2bytes):
on:0xff00。
off:0x0000。
⚫ CRC16(2bytes):Standard CRC16 check, tool bits available efficacy calculated.
According to the above format, the following message can be input in TCP & UDP to control the
closing of DO. After the message 01 05 00 10 ff 00 8d ff is sent, the module will reply the same
message and the DO1 light will be on. (TCP & UDP tools can be downloaded from Hi-flying official
website).
Such as:
http://www.iotworkshop.com - 26 -
HF6208_HF6508 IO Controller User Manual
Relay Off 01 05 00 17 00 00 7D CE 01 05 00 17 00 00 7D CE
http://www.iotworkshop.com - 27 -
HF6208_HF6508 IO Controller User Manual
Inquiries: 01 01 00 10 00 08 3c 09
Return (example):
01 01 01 FF 11 C8 (1~8 Relay On)
01 01 01 0F 11 8C (1~4 Relay On)
01 01 01 F0 51 CC (4~8 Relay On)
01 01 01 03 11 89 (1~2 Relay On)
The first 4 bytes returned, here 0xff means the state of 8 DOs. From right to left, it indicates the
state of DO1 ~ DO8 respectively. 1 On, 0 means OFF
Table8. DO Status
Status Hex DO8 DO7 DO6 DO5 DO4 DO3 DO2 DO1
1~8 BIN 1 1 1 1 1 1 1 1
On HEX F F
1~4 BIN 0 0 0 0 1 1 1 1
On HEX 0 F
4~8 BIN 1 1 1 1 0 0 0 0
On HEX F 0
1~2 BIN 0 0 0 0 0 0 1 1
On HEX 0 3
Inquiries: 01 01 00 00 00 08 3d cc
Return (example): 01 01 01 00 51 88
The first 4 bytes returned, here 0x00 indicates the input of 8 DIs. From right to left, indicate the
status of DI1 ~ DI8 respectively. 1 indicates input, 0 indicates no input.
Inquiries: 01 04 00 00 00 08 f1 cc
Return (Example): 01 04 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 2c
1-4th channel test 0-5V voltage, the input is not allowed exceed this voltage value.
5-8th channel test 0-25mA current value, the input is not allowed exceed this current value.
http://www.iotworkshop.com - 28 -
HF6208_HF6508 IO Controller User Manual
The 3th byte is the total data bytes returned, each 2 bytes represents a value, sorted from low to
high. For example, the first 2 bytes represent the value of AI1, here 0x0000, the specific conversion
formula is first 0x0000 converted to decimal value. The convention example is as following.
Voltage: V=(value / 1024)* 5 V , unit: V.
Current: I =(value / 1024)* 25 mA , unit: mA.
Example: 01 04 10 03 FE 00 00 00 00 00 00 02 92 00 00 00 00 00 00 59 8D
AI1 Voltage Input: 03 FE (HEX) =1022 (DEC)
(1022/1024)*5≈4.990 V=4990mV
AI5 Current Input: 02 92 (HEX) =658 (DEC)
(658/1024)*25≈16mA
http://www.iotworkshop.com - 29 -
HF6208_HF6508 IO Controller User Manual
Note: The initiative to report instructions is actually an instruction to control DO. The fields are the
same.
So let me explain here, the stack address of the initiative report is set to 00 by default. This field is
used to distinguish whether the DI change is actively uploaded or the DO control returns.
Note: As you can see, here a byte (station address) is 00, because we set the reporting address to
00, and the content of this byte is the set content.
The second and third fields (starting from 0) represent the DI serial number, 0x0010 DI1; 0x0011
DI2; ......, 0x0017 DI8;
The fourth field indicates whether there is input: FF means yes; 00 means no
Regist
er Function
Length Meaning Value Range Nature
Addres Code
s
High Byte: Device's Modbus
0~254
03(Read) Station Address 0~254
0X003F 2 Bytes Read Write
06(Write) Low Byte: Whether to Enable DI 0:Not Enable
Active Reporting 1:Enable
High Byte: The Address that DI
0~254 Read Write
Actively Reports
03(Read) 00-07 means that
0X0040 2 Bytes
06(Write) Low Byte: Baud Rate
1200、2400、 Read Write
(6X08 defaults to 115200)
4800、9600、
http://www.iotworkshop.com - 30 -
HF6208_HF6508 IO Controller User Manual
19200、38400、
57600、115200
0X0041 03(Read) 2 Bytes Version Information Internal Definition Only Read
0-65535
03(Read) AI1 Active reporting interval, in
0X0042 2 Bytes 0 means not Read Write
06(Write) milliseconds
enabled
0-65535
03(Read) AI2 Active reporting interval, in
0X0043 2 Bytes 0 means not Read Write
06(Write) milliseconds
enabled
DI1 count value
03(Read)
0X0044 2 Bytes Data high byte first, data low 0-65535 Read Write
06(Write)
byte second
DI2 count value
03(Read)
0X0045 2 Bytes Data high byte first, data low 0-65535 Read Write
06(Write)
byte second
DI3 count value
03(Read)
0X0046 2 Bytes Data high byte first, data low 0-65535 Read Write
06(Write)
byte second
DI4 count value
03(Read)
0X0047 2 Bytes Data high byte first, data low 0-65535 Read Write
06(Write)
byte second
DI5 count value
03(Read)
0X0048 2 Bytes Data high byte first, data low 0-65535 Read Write
06(Write)
byte second
DI6 count value
03(Read)
0X0049 2 Bytes Data high byte first, data low 0-65535 Read Write
06(Write)
byte second
DI7 count value
03(Read)
0X004A 2 Bytes Data high byte first, data low 0-65535 Read Write
06(Write)
byte second
DI8 count value
03(Read)
0X004B 2 Bytes Data high byte first, data low 0-65535 Read Write
06(Write)
byte second
Example 1: Use 03 function code to query part of the device information, you can broadcast all
devices with FF address
Send: FF 03 00 3F 00 05 A0 1B
Return: 01 03 0A 01 00 00 07 1E FF 00 00 00 00 14 19
It means all the parameter information of 0x003F-0043 of the broadcast query device of the host
computer, of which device No. 01 answers, its device information is: modbus address is 01, DI
reporting address is 00 and is not enabled, baud rate is 115200, AI1 and AI2 report Not Enabled.
Send: 01 03 00 44 00 08 04 19
Return: 01 03 10 00 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 43
Among them, only DI1 counts, 00 26(HEX) = 38(DEC), converted to decimal number is 38 counts.
http://www.iotworkshop.com - 31 -
HF6208_HF6508 IO Controller User Manual
Refer to the description in the table above for the register definition.
Send:01 06 00 3F 01 01 79 96
Return:01 06 00 3F 01 01 79 96
Send:01 06 00 40 02 07 C8 BC
Receive:01 06 00 40 02 07 C8 BC
Ex 3:Set DI counter
Send:DI-1 01 06 00 44 00 08 c8 19
DI-2 01 06 00 45 00 08 99 d9
DI-3 01 06 00 46 00 08 69 d9
DI-4 01 06 00 47 00 08 38 19
DI-5 01 06 00 48 00 08 08 1a
DI-6 01 06 00 49 00 08 59 da
DI-7 01 06 00 4A 00 08 a9 da
DI-8 01 06 00 4B 00 08 f8 1a
DI1~DI8 counter is 8
http://www.iotworkshop.com - 32 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 33 -
HF6208_HF6508 IO Controller User Manual
HF6508 is connected to the LAN port of the router via a network cable to access the network.
HF6208 is connected to the LAN port of the router through a network cable or set to STA mode to
connect to a hotspot through WIFI and access the network. Or HF6208 as a hot spot, the computer
directly connects to the hot spot of HF6208.
Download the following configuration software and install it on the control computer.
IOTService: a tool to manage and set HF6208_HF6508 network connection parameters. You can
set the HF6208_HF6508 network IP address, socket connection parameters, ModbusTCP to
ModbusRTU function, and create virtual serial ports, virtual channels, D2D channels, etc.
IO control tool: included in the IOTService installation package, IO integrated setting tool for
DI/AI/DO, interface display, easy to set or read data
TCPUDP Debug tool: establish a Socket test tool, use the original format command, simulate the
host computer software to use Socket to send and receive data
Serial debugging assistant: serial debugging tool, using original format commands, simulating
the host computer using serial port to send and receive data
Modbus Poll: Modbus master device simulation tool, to help Modbus communication device
developers to simulate and test Modbus communication protocol, for monitoring, testing, debugging
Modbus communication devices
http://www.iotworkshop.com - 34 -
HF6208_HF6508 IO Controller User Manual
5.2.2. IOTService
Device list page: displays the device "online status", local area network IP address, and firmware
version information.
Device status page: display socket connection information, serial port information, network
connection information, socket and serial port data transmission and reception statistics.
http://www.iotworkshop.com - 35 -
HF6208_HF6508 IO Controller User Manual
Device editing page: Set Socket connection parameters, set UART parameters, set Ethernet
or WIFI connection router parameters.
Advanced settings page: set UART protocol, set heartbeat package, register package
information.
NONE: The original data is transmitted transparently without any conversion. For example,
when the upper computer software and the lower computer equipment use ModbusRTU format to
transmit data, this mode is adopted.
Modbus: protocol conversion mode, to achieve the conversion between ModbusTCP format
and ModbusRTU format, ModbusTCP end as the host, such as: the host computer software uses
ModbusTCP format, the lower computer equipment uses ModbusRTU format, select this mode.
http://www.iotworkshop.com - 36 -
HF6208_HF6508 IO Controller User Manual
The latest IOTservice tool has an IO control tool. The IO control tool can help us to check the
DO and DI status of the device and the input data of AI, and can make corresponding statistics
on AI and DI.
Step1, How to open the IO tool: Open the IOTService tool, and click "IO Control" in the menu
bar to start the I/O tool.
http://www.iotworkshop.com - 37 -
HF6208_HF6508 IO Controller User Manual
Step2, IO tool connection parameter settings, click "Settings" -> "Connection Settings",
select the corresponding parameters:
Support TCP Server, TCP Client, UART connection and ModbusRTU / TCP protocol settings.
After setting the MAC address, the parameters of this device will be saved in the tool, and
the parameters that have been set will be automatically recalled next time.
http://www.iotworkshop.com - 38 -
HF6208_HF6508 IO Controller User Manual
Step3, after successful connection, the following interface will appear, in the interface we
can see there are DI count, DI input, AI input and control of the relay.
http://www.iotworkshop.com - 39 -
HF6208_HF6508 IO Controller User Manual
Step4: After the IO tool is successfully connected to the device, you can perform the
corresponding AI and DI initial settings on the device according to user needs as shown below. Click
"Settings" -> "Device Settings" to enter the setting box, where you can set the maximum and minimum
values of AI or set the formula for conversion. The initial value and unit time of DI can also be set.
Note that the "unit time" in the DI display count value refers to the unit time period for setting the
statistical count
Step5: when the connection is successful, you can perform a simple test. Click the button in
the following figure to control the relay, and there is a corresponding indicator on the device. The
following picture is the effect picture of clicking all positive.
http://www.iotworkshop.com - 40 -
HF6208_HF6508 IO Controller User Manual
When the switch is closed, the DI indicator lights up and the DI status is 1; when the switch is
open, the DI indicator turns off and the DI status is 0.
There are two situations of DI access, dry contact and wet contact. Logic 0 of dry contact means
floating, 1 means ground.
Wet contact logic 1 means connect 0~3V power supply, wet contact 0 means connect 5~40V
power supply.
The current value (Read Data) is the total number of times the device is connected and
disconnected. The current value (Read Data) is counted from the initial value, which can be set.
The display count value is the number of statistics in the current unit time period, the unit time
can be set, frequency = display count value/unit time.
Step 7: This module comes with a 5V voltage, connect the 5V voltage to AI 1, and the test result
is as shown in the figure below. The data of AI needs to be obtained manually. The default value of AI
(1-4) is the voltage value, and the default value of AI (5-8) is the current value. The voltage or current
detection can be adjusted through the jumper cap setting on the internal circuit board.
AI5 connects a resistor to the 5V voltage terminal, you can test the current, and calculate the
resistance value through the formula or set the formula to do other conversions.
http://www.iotworkshop.com - 41 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 42 -
HF6208_HF6508 IO Controller User Manual
HF6508 is connected to the LAN port of a router through the network cable, and the computer is
also connected to the same router through the network cable or WIFI. Open the IOTService tool, you
can see the parameters of HF6508:
Device list page: You can see the IP address of HF6508, such as 192.168.18.7
Device editing page: you can see the HF6508 network socket parameters, the default is TCP
Server, port number 8899
Advanced settings page: Set the UART protocol to Modbus and enable the conversion function
between ModbusTCP and ModbusRTU
Modbus: protocol conversion mode, open the ModbusTCP and ModbusRTU conversion function,
the host computer software uses ModbusTCP format, the lower computer equipment uses
ModbusRTU format, select this mode.
http://www.iotworkshop.com - 43 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 44 -
HF6208_HF6508 IO Controller User Manual
Step1: Open the I/O setting tool, click "Settings" --> "Connection Settings", select the "TCP Client"
setting box, fill in the connection parameters, and click the "Connect" button to establish a connection.
Server address: Fill in the IP address obtained by HF6508 from the router, such as 192.168.18.7
Server port number: fill in the receiving port number of HF6508 network socket, such as 8899
Step 2: After entering the I/O main interface, you can click the relay switch button to control the
relay switch and read the DI and AI status parameters.
http://www.iotworkshop.com - 45 -
HF6208_HF6508 IO Controller User Manual
Step 1: Open Modbus Poll, click Connect, select Modbus TCP/IP protocol, enter the IP
address and port number of HF6508 (can be queried in IOTService), for example, the IP address of
HF6508 is 192.168.18.7, Server Port: 8899
http://www.iotworkshop.com - 46 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 47 -
HF6208_HF6508 IO Controller User Manual
Step4: After entering the command in the command bar, you can control the switch of DO1-8, and
the corresponding indicator will also be displayed according to the status.
If you set the opening and closing of DO1 as follows, click Functions --> 05 Write Single Coil in
turn, and the setting box pops up as follows:
http://www.iotworkshop.com - 48 -
HF6208_HF6508 IO Controller User Manual
Write the corresponding DO address, select the Value value (On or Off), after sending, you can
see the corresponding DO state changes.
Step5: The data transmitted by Modbus can also be displayed in Communication Traffic, which is
convenient for viewing the original interactive data.
Step 1: Open the TCPUDP Dbg tool, click "Create Connection", fill in the matching parameters, as
in the example here:
http://www.iotworkshop.com - 49 -
HF6208_HF6508 IO Controller User Manual
Type: TCP
Step 2. After clicking "Create", enter the TCP connection data sending and receiving page, click
"Connect" to establish a socket connection between TCPUDP tool and HF6508.
Fill in the ModbusTCP format query command or control command in the sending area, and receive
the returned information in the receiving area. Refer to the "4. Modbus Message" chapter to calculate
the corresponding value.
Control DO State:
Query DI status:
Query AI status:
http://www.iotworkshop.com - 50 -
HF6208_HF6508 IO Controller User Manual
HF6508 is connected to the LAN port of a router through the network cable, and the computer is also
connected to the same router through the network cable or WIFI. Open the IOTService tool, you can
see the parameters of HF6508:
Device list page: You can see the IP address of HF6508, such as 192.168.18.7
Device editing page: you can see the HF6508 network socket parameters, the default is TCP Server,
port number 8899
http://www.iotworkshop.com - 51 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 52 -
HF6208_HF6508 IO Controller User Manual
Step1: Open the I/O setting tool, click "Settings" --> "Connection Settings", select the "TCP Client"
setting box, fill in the connection parameters, and click the "Connect" button to establish a connection.
Server address: Fill in the IP address obtained by HF6508 from the router, such as 192.168.18.7
Server port number: fill in the receiving port number of HF6508 network socket, such as 8899
http://www.iotworkshop.com - 53 -
HF6208_HF6508 IO Controller User Manual
Step 2: After entering the I/O main interface, you can click the relay switch button to control the relay
switch and read the DI and AI status parameters.
http://www.iotworkshop.com - 54 -
HF6208_HF6508 IO Controller User Manual
To use the Modbus Poll tool for testing, you need to select "Modbus RTU/ASCII Over TCP/IP" on
the Connection Setup page, and Mode to select RTU to establish a connection. For subsequent test
steps, refer to "5.3.3 Using Modbus Poll Software to Control Reading DI/ AI/DO".
Step 1: Open the TCPUDP Dbg tool, click "Create Connection", fill in the matching parameters, as in
the example here:
Type: TCP
http://www.iotworkshop.com - 55 -
HF6208_HF6508 IO Controller User Manual
Step 2. After clicking "Create", enter the TCP connection data sending and receiving page, click
"Connect" to establish a socket connection between TCPUDP tool and HF6508.
Fill in the ModbusRTU format query command or control command in the sending area, and receive
the returned information in the receiving area. Refer to the "4. Modbus Message" chapter to calculate
the corresponding value.
Example:
Control DO state:
It can be seen that the DO1 indicator is on and the relay DO1 is closed.
It can be seen that the DO1 indicator is off and the relay DO1 is off.
http://www.iotworkshop.com - 56 -
HF6208_HF6508 IO Controller User Manual
Query DO status:
http://www.iotworkshop.com - 57 -
HF6208_HF6508 IO Controller User Manual
Query DI status:
http://www.iotworkshop.com - 58 -
HF6208_HF6508 IO Controller User Manual
Query AI status:
http://www.iotworkshop.com - 59 -
HF6208_HF6508 IO Controller User Manual
HF6208_HF6508 products provide RS485 serial port, users can use this serial port to control
relays and read DI status and AI value. Take HF6208 as an example to introduce.
http://www.iotworkshop.com - 60 -
HF6208_HF6508 IO Controller User Manual
Power on the HF6208, connect the router with an Ethernet cable, open the IOTService tool to
view, use the default configuration, the serial port baud rate is 115200
Step 1: Use the USB to RS485 serial port tool to connect the HF6208 and the PC. In the
device manager of the PC, check the COM port number, as shown in COM3 below.
If the normal COM slogan does not appear or the yellow exclamation mark is displayed, please
check whether the serial port tool is plugged in and the serial port driver is correctly installed (this
driver needs to be obtained from the USB to RS485 tool supplier)
http://www.iotworkshop.com - 61 -
HF6208_HF6508 IO Controller User Manual
By default, the baud rate of HF6X08 is 115200,8,1,None. If the user has modified the baud
rate of the device before but does not remember it, you can use the search function to find the
baud rate of the device.
Step1, open the I/O tool software, click "Settings" -> "Connection Settings", first set a UART
parameter, connect the device, as shown below:
Baud rate: No match is required, 9600 can be preselected. Device ID: Fill in the correct
address number.
http://www.iotworkshop.com - 62 -
HF6208_HF6508 IO Controller User Manual
Step2: After connecting, click "Settings" -> "Advanced Settings" -> "Search Device" to enter
the search process:
After the search is successful, a "prompt" will appear to search for the device successfully.
Close the prompt box, you can see the searched baud rate, as shown below: 115200
http://www.iotworkshop.com - 63 -
HF6208_HF6508 IO Controller User Manual
Step3: Then return to the "Settings" -> "Connection Settings" page, the baud rate setting
115200 can be connected to the device.
Step1: Open the I/O control software, set the UART parameters, refer to the following:
COM port: select the actual COM port number, here select COM3
Baud rate: 115200; Data bit: 8; Stop bit: 1; Check bit: NONE
Step2: Click "Connect" to open the I/O setting page. You can click the relay switch button to
control the relay switch and read the DI and AI status parameters.
http://www.iotworkshop.com - 64 -
HF6208_HF6508 IO Controller User Manual
To use the Modbus Poll tool for testing, you need to select “Serial Port” on the Connection Setup
page and Mode to select RTU to establish a connection. For subsequent test steps, please refer to
“5.3.3 Using Modbus Poll Software Control to Read DI/AI/DO” Instructions.
http://www.iotworkshop.com - 65 -
HF6208_HF6508 IO Controller User Manual
Step1: Open the serial port debugging software on the computer. Here we will introduce
"Dasha serial port debugging software" as an example.
Select the port number and baud rate on the serial port parameter page, as in the example
here:
Port: COM3; baud rate: 115200; data bit: 8; parity bit: none; stop bit: 1
http://www.iotworkshop.com - 66 -
HF6208_HF6508 IO Controller User Manual
Step2: Fill in the ModbusRTU format query command or control command in the sending area,
select hexadecimal, the receiving area receives the returned information, refer to the "4. Modbus
message" chapter, you can calculate the corresponding value.
Example:
Control DO state:
It can be seen that the DO1 indicator is on and the relay DO1 is closed.
It can be seen that the DO1 indicator is off and the relay DO1 is off.
http://www.iotworkshop.com - 67 -
HF6208_HF6508 IO Controller User Manual
Query DO status:
http://www.iotworkshop.com - 68 -
HF6208_HF6508 IO Controller User Manual
Query DI status:
Query AI status:
(1022/1024)*5≈4.980 V=4980mV
http://www.iotworkshop.com - 69 -
HF6208_HF6508 IO Controller User Manual
Step1: Set HF6208 to STA mode, connect to a router with internet access, and set Socket connection
parameters:
As an example here:
In the WIFI project: the setting mode is APSTA or STA, the STA wireless name sets the name of the
router to be connected, and the STA wireless password sets the password of the pre-connected
wireless router.
In the connection project: Set the protocol to TCP Client mode. The server-side address sets the pre-
connected server address, and the server port number sets the server-side receiving port number.
Note: In this example, the server address is a temporary test address. When testing, users need to set
their own server address.
http://www.iotworkshop.com - 70 -
HF6208_HF6508 IO Controller User Manual
Step2: In the advanced settings page, the UART protocol is set to Modbus
http://www.iotworkshop.com - 71 -
HF6208_HF6508 IO Controller User Manual
The remote server can use the TCPUDP test tool to simulate the server or use a self-built server for
testing, depending on the user's own needs.
Step1: Start the TCPUDP test tool on the computer side of the remote server, click "Create Server",
create a server receiver, and start the server.
Step2: Start the server and wait for the HF6208 to establish a TCP Socket connection with the server.
Fill in the ModbusTCP format query command or control command in the sending area, and receive
the returned information in the receiving area. Refer to the "4. Modbus Message" chapter to calculate
the corresponding value.
Control DO state:
http://www.iotworkshop.com - 72 -
HF6208_HF6508 IO Controller User Manual
Control DI state:
http://www.iotworkshop.com - 73 -
HF6208_HF6508 IO Controller User Manual
Query AI status:
http://www.iotworkshop.com - 74 -
HF6208_HF6508 IO Controller User Manual
Step1: Open the I/O control software, set the TCP Server connection parameters, refer to the following:
Protocol: ModbusTCP
Device ID: 01
http://www.iotworkshop.com - 75 -
HF6208_HF6508 IO Controller User Manual
Step2: Click "Connect" to open the I/O setting page. You can click the relay switch button to control
the relay switch and read the DI and AI status parameters.
http://www.iotworkshop.com - 76 -
HF6208_HF6508 IO Controller User Manual
HF6208_HF6508 supports remote creation of a virtual serial port. The created remote virtual
serial port can be used to remotely read and control the device.
Step1: Referring to the previous chapter, set HF6208 to connect to a wireless router in STA mode,
and set the UART protocol to NONE.
Step2: Install the IOTService tool on the remote computer, enter ServiceID, and display
"Connected Server"
Step3: On the "Device Edit" page, click "Virtual Channel" and add a virtual serial port under
"Virtual Serial Port".
http://www.iotworkshop.com - 77 -
HF6208_HF6508 IO Controller User Manual
Step4: On the "Device List" page, in the virtual channel column, when "Connect" is displayed, the
virtual serial port is created and connected successfully.
If "DisConn" is displayed, the virtual serial port is connected successfully and cannot be used.
http://www.iotworkshop.com - 78 -
HF6208_HF6508 IO Controller User Manual
At this time, you can use the serial port mode to read and control the DI/AI/DO status of HF6208. For
the method, please refer to the chapter "5.5. Local Serial Port Modbus RTU Protocol Control of
HF6208". Here, I/O tools are used for demonstration.
Open the I/O control software and set the UART parameters. Refer to the following:
COM port: select the actual COM port number, here select COM11
Baud rate: 115200; Data bit: 8; Stop bit: 1; Check bit: NONE
http://www.iotworkshop.com - 79 -
HF6208_HF6508 IO Controller User Manual
Click "Connect" to open the I/O setting page. You can click the relay switch button to control the
relay switch and read the DI and AI status parameters.
http://www.iotworkshop.com - 80 -
HF6208_HF6508 IO Controller User Manual
Using the HF6208_HF6508 DI active reporting function, after the two HF6208_HF6508 devices
are set up, the function of DI remote real-time control of DO can be realized.
The two devices can be the same model HF6508/HF6208, or can be paired with HF6208 and
HF6508.
When the DI of each control party is closed, the DO corresponding to the controlled party will be
closed immediately, and channels 1 to 8 correspond to each other.
Through instruction setting, modify HF6208_HF6508 address to 02, the default initial value is
01
Set the address to 01, enable DI active reporting, and the reporting address is 02
Return: 01 06 00 3f 01 01 79 96
Step2, set the reporting address 02 and the baud rate of the device, send: 01 06 00 40 02 07
C8 BC
Return: 01 06 00 40 02 07 c8 bc
In this example, the two devices use HF6508 and HF6208 to form a pair. HF6508 is the controlled
party and HF6208 is the controlling party.
By controlling the closed state of HF6208 DI, the output state of HF6508 DO is synchronously
controlled.
That is, HF6208_DI1 is closed, then HF6508_DO1 is closed; HF6208_DI1 is open, then HF6508_DO1
is open
http://www.iotworkshop.com - 81 -
HF6208_HF6508 IO Controller User Manual
Step1, HF6508 is connected to the LAN port of the router through the network cable
Step2, HF6208 is set to STA mode, connect to the hotspot of the same router through WIFI. As shown
in the figure below, the two settings are in the same LAN.
Step3: HF6508 setting adopts the default TCP Server mode, port number 8899, UART protocol:
NONE
http://www.iotworkshop.com - 82 -
HF6208_HF6508 IO Controller User Manual
Port number: fill in the receiving port number 8899 of HF6508, UART protocol: NONE
Step5: After Socket connection of HF6508 and HF6208 shows Connected, you can start to control.
http://www.iotworkshop.com - 83 -
HF6208_HF6508 IO Controller User Manual
Connect a switch between DI1 and GND of HF6208. After the switch is closed, the HF6208_DI1
indicator lights up, the HF6508_DO1 relay closes, and the HF6508_DO1 indicator also lights up.
Similarly, DI2~DI8 of HF6208 are connected to the switch. Synchronous control of DO2~DO8 of
HF6508
In this example, the two devices use HF6508 and HF6208 to form a pair. HF6508 is the controlled
party and HF6208 is the controlling party.
By controlling the closed state of HF6208 DI, the output state of HF6508 DO is synchronously
controlled.
http://www.iotworkshop.com - 84 -
HF6208_HF6508 IO Controller User Manual
That is, HF6208_DI1 is closed, then HF6508_DO1 is closed; HF6208_DI1 is open, then HF6508_DO1
is open
Step1, HF6508 is connected to a router LAN port through a network cable to access the internet
network
Step2, HF6208 is set to STA mode, connect to the hotspot of another router via WIFI, and access the
internet network.
Step3, Both devices are added to the IOTService tool, and the online status is displayed.
Step4, Refer to the D2D setup instructions, set HF6208 and HF6508 to establish D2D connection.
In the example, select the HF6208 device, enter "Device Edit" -> "Virtual Channel" -> "D2D Channel",
select the MAC address of HF6508, and establish a D2D connection.
http://www.iotworkshop.com - 85 -
HF6208_HF6508 IO Controller User Manual
Step5: After setting, check the D2D connection status of HF6208 and HF6508, and both display
Connected, then you can start control.
http://www.iotworkshop.com - 86 -
HF6208_HF6508 IO Controller User Manual
Connect a switch between DI1 and GND of HF6208. After the switch is closed, the HF6208_DI1
indicator lights up, the HF6508_DO1 relay closes, and the HF6508_DO1 indicator also lights up.
Similarly, DI2~DI8 of HF6208 are connected to the switch. Synchronous control of DO2~DO8 of
HF6508.
AI's active reporting function is to allow the collected analog quantity to be automatically sent to
the host computer. This method does not require the host computer to perform Modbus command
query, which is very useful for Internet-based network analog monitoring.
First open the I/O setting tool, connect to HF6X08, and then open the "Advanced Settings" page,
you can set the reporting time of the two analog quantities A1 and A2. Automatic reporting: Select Yes
to enable the reporting function. The time interval can be selected from 0 to 65535, and the unit is ms.
If No is set, active reporting is not enabled.
http://www.iotworkshop.com - 87 -
HF6208_HF6508 IO Controller User Manual
Set the reporting interval of AI1 and the reporting interval of AI2. If both AI1 and AI2 are set, data
will be reported at the minimum interval.
The data reporting format is the same as the returned data format of the Modbus query.
The command (ModbusRTU format) when the UART protocol is NONE is: AA 04 02 XX YY C1
C2
Example: 01 04 02 00 00 B9 30
When the UART protocol is Modbus, it does not support active reporting.
Here AA represents the address of the device (can be set through advanced parameters), XX YY
is a reported AI quantity, the voltage value/current value expressed in hexadecimal, C1 C2 is the CRC
check.
When only one report is set for A1 and A2, the upload instruction is the same, so the user should
know whether to report to A1 or A2.
(2) If A1 and A2 are set to be uploaded at the same time, actually 8 AI parameters are uploaded,
and it is valid when DI is set to actively report. The upload instruction is:
Example: 01 04 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 2C
The upload time of the two settings is executed with the minimum setting value.
For example: AI1 actively reports a time of 100ms, and AI2 actively reports a time of 2000ms, but
actually reports 8 AI values in 100ms.
http://www.iotworkshop.com - 88 -
HF6208_HF6508 IO Controller User Manual
Step1: Open the "I/O Settings" tool, click "Settings" -> "Connection Settings" and select a way to
connect to the device.
Step2, Then click "Settings" -> "Advanced Settings" to set up the reporting function of AI1 and AI2,
here set to report once every 1000ms.
Step3: Return to the main page of the "I/O Settings" tool, you can view the reported AI value, as
shown in the following figure:
Step1: Open the "I/O Settings" tool, click "Settings" -> "Connection Settings" and select a way to
connect to the device.
http://www.iotworkshop.com - 89 -
HF6208_HF6508 IO Controller User Manual
Step2, then click "Settings" -> "Advanced Settings" to set up the reporting function of AI1 and AI2,
here set to report once every 1000ms.
Step3: Open the TCPUDP test tool and establish a socket connection with HF6X08. You can obtain
the data reported actively by HF6X08:
http://www.iotworkshop.com - 90 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 91 -
HF6208_HF6508 IO Controller User Manual
HF6208_HF6508 supports DC 5~40V input. It provides DC plug-in power input and terminal-
type power input in two ways. Choose one of the two.
HF6508 supports Ethernet connection to switch or router LAN port to access network or direct
connection to computer network port
HF6208 supports AP and STA modes and can be connected in the following ways:
1,HF6208 is in AP mode, and the computer is directly connected to the HF6208 hotspot
2,HF6208 works in STA mode, connects to a wireless router hotspot, and accesses the network
3,HF6208 is connected to the LAN port of the router through a network cable to access the network
http://www.iotworkshop.com - 92 -
HF6208_HF6508 IO Controller User Manual
HF6208_HF6508 supports 8-way relay output, with a control capability of 10A 30VDC or 10A 250VAC,
each output circuit uses a set of conversion relays, and the output node is divided into two types:
normally open (NO-Com) and normally closed (Com-NC). , Users can choose the appropriate wiring
method according to their own use scenarios.
Note: When connecting a high-power inductive load, it should be noted that the maximum start-stop
current of the load should be within the load range of this device. It is recommended to use this device
as a controller to control the intermediate relay to avoid damage to the output interface of this device
due to excessive current.
There are two situations of DI access, dry contact and wet contact. Logic 0 of dry contact means
floating, 1 means ground.
Wet contact logic 1 means connect 0~3V power supply, wet contact 0 means connect 4~40V
power supply.
The current value (Read Data) is the number of times the device is connected and disconnected.
The current value (Read Data) is counted from the initial value, which can be set.
Connect a passive switch between DI-X and GND at the DI input, and control the state of the
input by closing and opening the control switch.
http://www.iotworkshop.com - 93 -
HF6208_HF6508 IO Controller User Manual
Between the GND and DI-X interface, you can control the on and off of the power circuit
through a series switch, and you can also series connect NPN and PNP sensors to replace the
role of the switch.
The first type: DI is connected to the positive pole, negative pole and GND, and can be connected to
8-channel DI. At this time, logic 1 means to access 0~3V power, logic 0 means to connect 5~40V
power
The second type: DI is connected to the negative pole of the power supply, GND is connected to the
positive pole of the power supply, and only one DI can be connected. Logic 0 means to connect 0~3V
power supply, logic 1 means to connect 5~40V power supply
http://www.iotworkshop.com - 94 -
HF6208_HF6508 IO Controller User Manual
HF6208_HF6508 default setting: A1~A4 measure voltage, range 0~5V; A5~A8 measure current,
range 0~25 mA
When measuring voltage and current, GND is connected to the negative electrode, and AI is
connected to the positive electrode.
in addition, the 8-channel AI also supports custom settings to detect voltage or current, which needs to
be set through an internal jumper cap.
http://www.iotworkshop.com - 95 -
HF6208_HF6508 IO Controller User Manual
http://www.iotworkshop.com - 96 -
HF6208_HF6508 IO Controller User Manual
------------------------------------------------------------------------------------------------------------
Address: Room 1002,Building 1,No.3000,Longdong Avenue,Pudong New
Area,Shanghai,China,201203
Web: www.iotworkshop.com or www.hi-flying.com
Contact:
Sales: [email protected]
Support: [email protected]
Service: [email protected]
Business: [email protected]
---------------------------------------------------------------------------- -------------------------------
For more information about IOTworkshop modules, applications, and solutions, please visit our web
site www.iotworkshop.com
<END OF DOCUMENT>
http://www.iotworkshop.com - 97 -