User Guide for Milesight models including: UC100, Featuring LoRaWAN IoT Controller, UC100 Featuring LoRaWAN IoT Controller, LoRaWAN IoT Controller, IoT Controller, Controller
Milesight Download | Milesight IoT - IoT Solution Provider
Milesight UC100 | Delmation
File Info : application/pdf, 21 Pages, 913.08KB
DocumentDocumentIoT Controller Featuring LoRaWAN® UC100 User Guide Safety Precautions Milesight will not shoulder responsibility for any loss or damage resulting from not following the instructions of this operating guide. The device must not be remodeled in any way. Do not place the device close to objects with naked flames. Do not place the device where the temperature is below/above the operating range. Power off the device when installing or wiring. Make sure electronic components do not drop out of the enclosure while opening. The device must never be subjected to shocks or impacts. Declaration of Conformity UC100 is in conformity with the essential requirements and other relevant provisions of the CE, FCC, and RoHS. Copyright © 2011-2022 Milesight. All rights reserved. All information in this guide is protected by copyright law. Whereby, no organization or individual shall copy or reproduce the whole or part of this user guide by any means without written authorization from Xiamen Milesight IoT Co., Ltd. For assistance, please contact Milesight technical support: Email: iot.support@milesight.com Tel: 86-592-5085280 Fax: 86-592-5023065 Address: Building C09, Software Park III, Xiamen 361024, China Revision History Date May 27, 2022 Doc Version Description V 1.0 Initial version 2 Contents 1. Product Introduction ......................................................................................................................... 4 1.1 Overview ...................................................................................................................................4 1.2 Features ................................................................................................................................... 4 2. Hardware Introduction ...................................................................................................................... 4 2.1 Packing List ..............................................................................................................................4 2.2 Hardware Overview ................................................................................................................. 5 2.3 LED Patterns and Reset Button .............................................................................................. 5 2.4 Dimensions (mm) .................................................................................................................... 5 3. Device Installation ............................................................................................................................. 5 4. Operation Guide .................................................................................................................................6 4.1 Log in the ToolBox ...................................................................................................................6 4.2 LoRaWAN Settings .................................................................................................................. 7 4.3 General Settings .................................................................................................................... 10 4.3.1 Basic Settings ............................................................................................................. 10 4.3.2 RS485 Settings ........................................................................................................... 10 4.4 IF-THEN Command ............................................................................................................... 13 4.5 LoRa D2D Settings .................................................................................................................14 4.6 Maintenance .......................................................................................................................... 17 4.6.1 Upgrade ....................................................................................................................... 17 4.6.2 Backup .........................................................................................................................17 4.6.3 Reset to Factory Default .............................................................................................18 5. Device Payload ................................................................................................................................ 18 5.1 Device Information ................................................................................................................ 19 5.2 Sensor Data ........................................................................................................................... 19 5.3 Downlink Command .............................................................................................................. 21 3 1. Product Introduction 1.1 Overview UC100 is an IoT controller used for remote control and data acquisition from Modbus RS485 devices via LoRaWAN® networks. It can read up to 16 Modbus RTU devices and support Modbus transparent transmission between server and RS485 devices as a Modbus to LoRaWAN® converter. Besides, UC100 supports multiple trigger conditions and actions which can work autonomously even when the network drops. 1.2 Features Easy to connect with diverse wired sensors through RS485 interfaces Support LoRaWAN® wireless communication Multiple triggering conditions and actions Embedded watchdog for work stability Industrial metal case design with a wide operating temperature range Compliant with standard LoRaWAN® gateways and network servers Quick and easy management with Milesight IoT Cloud solution 2. Hardware Introduction 2.1 Packing List 1 × UC100 Device 1 × Type-C Cable & Power Adapter 1 × Terminal Block 2 × Wall Mounting Kits 1 × Quick Guide If any of the above items are missing or damaged, please contact your sales representative. 4 2.2 Hardware Overview 2.3 LED Patterns and Reset Button The reset button is inside the device. Device Status System is functioning properly Reboot: hold the reset button inside the device for more than 3 seconds Reset to factory default: hold the reset button inside the device for more than 10 seconds Fail to acquire data from data interfaces Device upgrade or system error LED Status Static On Static On Slowly Blinks Static On Quickly Blinks Slowly Blinks Static On 2.4 Dimensions (mm) 3. Device Installation UC100 device can be placed on a desktop or mounted to a wall. 1. Take off the back cover of UC100 device, and fix the wall plugs into the wall according to the drilling position as referred. 5 2. Screw the cover on the mounting positions and install back the device. 4. Operation Guide 4.1 Log in the ToolBox 1. Download ToolBox software from Milesight IoT website. 2. Power on the UC100 device, then connect it to computer via the type-C port. 3. Open the ToolBox and select type as "General", then click password to log in ToolBox. (Default password: 123456) 6 4. After logging in the ToolBox, you can change device settings. 4.2 LoRaWAN Settings LoRaWAN settings are used for configuring the transmission parameters in LoRaWAN® network. Basic LoRaWAN Settings: Go to "LoRaWAN Settings -> Basic" to configure join type, App EUI, App Key and other information. You can also keep all settings by default. 7 Parameters Device EUI App EUI Application Port Working Mode Join Type Application Key Device Address Network Session Key Application Session Key RX2 Data Rate RX2 Frequency Spread Factor Confirmed Mode Description Unique ID of the device on the label. Default App EUI is 24E124C0002A0001. The port is used for sending and receiving data, the default port is 85. Fixed as Class C. OTAA and ABP modes are available. Appkey for OTAA mode, default is 5572404C696E6B4C6F52613230313823. DevAddr for ABP mode, default is the 5th to 12th digits of SN. Nwkskey for ABP mode, default is 5572404C696E6B4C6F52613230313823. Appskey for ABP mode, default is 5572404C696E6B4C6F52613230313823. RX2 data rate to receive downlinks. RX2 frequency to receive downlinks. Unit: Hz If ADR is disabled, the device will send data via this spread factor. If the device does not receive ACK packet from network server, it will resend data 3 times at most. 8 Reporting interval 30 mins: the device will send a specific number of LinkCheckReq MAC packets to the network server every 30 mins to validate connectivity; If there is no response, the device will re-join the network. Rejoin Mode Reporting interval > 30 mins: the device will send a specific number of LinkCheckReq MAC packets to the network server every reporting interval to validate connectivity; If there is no response, the device will re-join the network. Set the number of When rejoin mode is enabled, set the number of LinkCheckReq packets sent. packets sent ADR Mode Allow the network server to adjust datarate of the device. Tx Power Transmit power of device. Note: 1) Please contact sales for device EUI list if there are many units. 2) Please contact sales if you need random App keys before purchasing. 3) Select OTAA mode if you use Milesight IoT Cloud to manage devices. 4) Only OTAA mode supports rejoin mode. LoRaWAN Frequency Settings: Go to "LoRaWAN Settings -> Channel" to select supported frequency and select channels to send uplinks. Make sure the channels match what you set in the LoRaWAN® gateway. If frequency is one of CN470/AU915/US915, you can enter the index of the channel that you want to enable in the input box, making them separated by commas. Examples: 1, 40: Enabling Channel 1 and Channel 40 9 1-40: Enabling Channel 1 to Channel 40 1-40, 60: Enabling Channel 1 to Channel 40 and Channel 60 All: Enabling all channels Null: Indicates that all channels are disabled 4.3 General Settings 4.3.1 Basic Settings Parameters Device ID Reporting Interval LoRa D2D Change Password Description Show the SN of the device. Reporting interval of transmitting data to the network server. Range: 1-1080 mins, default: 20 mins See details on chapter 4.5. Change the password to log in ToolBox. 4.3.2 RS485 Settings UC100 has one RS485 port for Modbus RTU device connection. 10 1. Connect RS485 device to RS485 port. 2. Go to "General -> RS485" to enable RS485 and configure serial port settings. Serial port settings should be the same as the RS485 terminal devices. Parameters Stop Bit Data Bit 1 bit/2 bit are available. 8 bit is available. Description Parity None, Odd and Oven are available. Baud Rate 1200/2400/4800/9600/19200/38400/57600/115200 are available. Execution Interval (ms) Max Resp Time (ms) Max Retry Time (ms) Modbus RS485 bridge LoRaWAN The execution interval between each Modbus channel command. The maximum response time that the UC100 waits for the reply to the command. If it does not get a response after the max response time, it is determined that the command has timed out. Set the maximum retry times after the device fails to read data from RS485 terminal devices. If this mode is enabled, the device will transmit Modbus RTU commands from the network server to RS485 terminal devices transparently and send Modbus reply originally back to the network server. 11 Port: Select from 2-84, 86-223. 3. Click to add Modbus channels, then save configurations. Parameters Channel ID Name Slave ID Address Quantity Type Byte Order Sign Fetch Description Select the channel ID you want to configure from 16 channels. Customize the name to identify every Modbus channel. Set Modbus slave ID of a terminal device. The starting address for reading. Set read how many digits from starting address, it fixes to 1. Select the data type of Modbus channels. Set the Modbus data reading order if you configure the type as Input register or holding register. INT32/Float: ABCD, CDBA, BADC, DCBA INT16: AB, BA The tick indicates that the value has a plus or minus sign. After clicking, UC100 will send Modbus read command to test if it can read correct values. Example: as this setting, the device will send command: 01 03 00 00 00 01 84 0A 4. Click "Fetch" to check if UC100 can read correct data from terminal devices. Note: Do not click "Fetch" frequently since the response time to reply is differ for every terminal device. 12 4.4 IF-THEN Command UC100 supports configuring locally IF-THEN commands to do some actions automatically even without a network connection. One device can be added 16 commands at most. 1. Go to "Command" page, and click "Edit" to add commands. 2. Set an IF condition based on the terminal device data or UC100 device status. Condition Channel Description When UC100 device gets certain response (False, True, Above, Below, Within) in certain RS485 channel (Channel Name + Channel ID), this command is triggered. Is continued for: the updated value should last for some time that is longer 13 Received a D2D control command than a sole reporting interval. Set lockout time: after the lockout time, UC100 will check if the latest RS485 response matches the condition still. 0 means this IF condition will only be detected once. This only works with the LoRa D2D feature enabled. See details on chapter 4.5. 3. Set THEN action according to your request. You can add at most 3 actions in one command. Action Description Send a LoRaWAN Send a custom message to the network server. message Restart the Device Reboot the device. Send a D2D control This only works with LoRa D2D feature enabled. See details on chapter 4.5. command Send a Modbus command via the RS485 interface This only works with LoRa D2D feature enabled. See details on chapter 4.5. 4.5 LoRa D2D Settings LoRa D2D protocol is developed by Milesight and used for setting up transmission among Milesight devices without a gateway. When the LoRa D2D setting is enabled, UC100 can work as a LoRa D2D controller to send control commands to other devices or work as a LoRa D2D agent to receive commands to trigger a reboot or message to the network server. 1. Go to "General -> Basic" page, enable LoRa D2D feature, and define a unique LoRa D 2D key which is the same as LoRa D2D controller or agent devices. (Default LoRa D2D Key: 5572404C696E6B4C6F52613230313823) 14 2. Go to "LoRaWAN Settings -> Basic" to configure the RX2 datarate and RX2 frequency. When UC100 works as LoRa D2D controller, it will send commands as RX2 settings. 3. Go to "Command" page to set corresponding operations. When the RS485 channel triggers, UC100 can work as LoRa D2D controller to send a control command to control the LoRa D2D agent device. The command should be a 2-byte hexadecimal number. 15 When UC100 receives a LoRa D2D command, it can work as a LoRa D2D agent to reboot the device or send Modbus command to RS485 terminal devices. 16 4.6 Maintenance 4.6.1 Upgrade UC100 supports upgrade firmware locally via ToolBox software. 1. Download firmware from www.milesight-iot.com to your PC. 2. Go to "Maintenance -> Upgrade", click "Browse" to import firmware and upgrade the device. You can also click "Up to Date" to search for the latest firmware of the device and upgrade. Note: Any operation on ToolBox is not allowed during upgrading, otherwise the upgrading will be interrupted, or even the device will break down. 4.6.2 Backup UC100 devices support configuration backup for easy and quick device configuration in bulk. Backup is allowed only for devices with the same model and LoRa frequency band. 1. Go to "Maintenance -> Backup and Reset", and click "Export" to save the current configuration as json format backup file. 2. Click "Browse" to select the backup file, then click "Import" to import the configurations. 17 4.6.3 Reset to Factory Default Please select one of following methods to reset device: Via Hardware: Open the case of UC100, and hold the reset button for more than 10s until the LED blinks. Via ToolBox Software: Go to "Maintenance -> Backup and Reset" to click "Reset". 5. Device Payload All data are based on the following format (HEX): Channel1 Type1 Data1 Channel2 Type2 Data2 Channel 3 ... 1 Byte 1 Byte N Bytes 1 Byte 1 Byte M Bytes 1 Byte ... Among them, Data field are shown as little endian. For decoder examples, you can find them at https://github.com/Milesight-IoT/SensorDecoders. 18 5.1 Device Information UC100 reports basic device information of device every time joining the network. Channel ff Type 01 (Protocol Version) 09 (Hardware Version) 0a (Software Version) 0b (Power event) 16 (Device SN Data Size/Byte 1 2 2 1 8 Description 01 => V1 01 20 => V1.2 01 01 => V1.1 ff => powered on 64 45 B4 34 11 30 00 01 => SN is 64 45 B4 34 11 30 00 01 Example: ff0bff ff0101 ff166445b43411300001 ff090100 ff0a0101 Channel ff ff ff ff ff Type 0b (Power Event) 01 (Protocol Version) 16 (Device SN) 09 (Hardware Version) 0a (Software Version) Value ff (powered on) 01 (V1) 64 45 B4 34 11 30 00 01 0100 (V1.0) 0101 (V1.1) 5.2 Sensor Data UC100 reports RS485 sensor data according to reporting interval (20 mins by default). Channel ff Type 19 (RS485) Byte Mutable (4-7) Description Total: Byte 1+Byte 2+Byte 3+Value Byte 1: Channel ID Byte 2: Data Size Byte 3: Data Type Code 00 01 02 03 04 05 06 07 08 Data Type Coil Discrete Input16 Hold16 Hold32 Hold_float Input32 Input_float Input_int32_with upper 19 16 bits 09 Input_int32_with lower 16 bits Hold_int32_with upper 0a 16 bits 0b Hold_int32_with lower 16 bits ff 15 (Modbus collecting exception) 1 Channel ID of failed Modbus collection. Note: Channel ID can be configured in ToolBox. Channel ID 00 01 02 ... 0f Description RS485 (Modbus Master) Channel 1 RS485 (Modbus Master) Channel 2 RS485 (Modbus Master) Channel 3 ... RS485 (Modbus Master) Channel 16 Examples: Channel ff Type 19 (RS485) ff 19 07 02 03 15 00 Channel ID 07 => Channel 8 Data Size 02 => 2 bytes Data Type 03 => Hold 16 Value 15 00 => 00 15 = 21 Note: When data type is holding register or input register, ToolBox can set different byte orders. Take below Modbus register response from RS485 sensors as example: Register Address 0 1 Value (Hex) 00 15 00 20 When using different byte orders, you can use ToolBox to fetch different results, and the device will upload data with little endian order. Data Type Holding/Input Register (INT16) Holding/Input Register (INT32) Byte Order AB BA ABCD CDAB BADC Fetch Result 21 (0x15) 5376 (0x1500) 1376288 (0x00150020) 2097173 (0x00200015) 352329728 (0x15002000) Uplink (HEX) 15 00 (BA) 00 15 (AB) 20 00 15 00 (DCBA) 15 00 20 00 (BADC) 00 20 00 15 (CDAB) 20 Holding/Input Register (INT32 with upper 16 bits) Holding/Input Register (INT32 with lower 16 bits) DCBA / / 536876288 (0x20001500) 21 (0x15) 32 (0x20) 00 15 00 20 (ABCD) 15 00 00 00 20 00 00 00 If UC100 fails to connect the Modbus data, it will send an error message. Channel ff ff 15 00 Type 15 (Poll Failed) Value 00 => Channel 1 5.3 Downlink Command UC100 supports downlink commands to configure the device. The application port is 85 by default. Channel Type Description 03(Set Reporting Interval) 2 Bytes, unit: s ff 10 (Reboot) ff (Reserved) Examples: 1. Reporting Interval Channel ff ff 03 b0 04 Type 03 (Set Reporting Interval) Value b0 04 => 04 b0 = 1200 s = 20 mins 2. Reboot the device Channel ff ff 10 ff Type 10 (Reboot) Reserved ff -END- 21