03-08-2022, 02:01 PM
KC868-COLB support use by MQTT or TCP Server or TCP Client work mode. When using MQTT, use Json format send command. When using TCP by HEX format command. KC868-COLB's PC software support "DEBUG" mode for programmer developing.
[attachment=708]
open your KC868-COLB PC software, use mouse left button quick click > 5 times will enable "DEBUG" mode.
[attachment=709]
this page for debug relay
[attachment=710]
this page for read digital input, analog input and DS18B20 temperature sensor data.
[attachment=711]
this page for debug set temperature and analog input threshold and RTC clock
[attachment=712]
This is write RTC clock example.
for example, set RTC clock:
we set 2022-03-08 21:38:00 to KC868-COLB
send command is:
5E 01 32 C0 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 03 08 15 26 00
0x5E 01 : begin byte, never change it.
0x32 C0: command type
0x06 00: message length now the message is "16 03 08 15 26 00" total 6 bytes
0x00 ... ... 00 38 of 0x00 retain bytes, not chang it.
0x16 03 08 15 26 00 is year,month,date, hour,minute,second
0x16=22 use two last number of year, default begin with20 so year=2022
0x03=03
0x08=08
0x15=21
0x26=38
0x00=00
[attachment=708]
open your KC868-COLB PC software, use mouse left button quick click > 5 times will enable "DEBUG" mode.
[attachment=709]
this page for debug relay
[attachment=710]
this page for read digital input, analog input and DS18B20 temperature sensor data.
[attachment=711]
this page for debug set temperature and analog input threshold and RTC clock
[attachment=712]
This is write RTC clock example.
for example, set RTC clock:
we set 2022-03-08 21:38:00 to KC868-COLB
send command is:
5E 01 32 C0 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 03 08 15 26 00
0x5E 01 : begin byte, never change it.
0x32 C0: command type
0x06 00: message length now the message is "16 03 08 15 26 00" total 6 bytes
0x00 ... ... 00 38 of 0x00 retain bytes, not chang it.
0x16 03 08 15 26 00 is year,month,date, hour,minute,second
0x16=22 use two last number of year, default begin with20 so year=2022
0x03=03
0x08=08
0x15=21
0x26=38
0x00=00