User Guide for Milesight models including: UC300 IoT Controller, UC300, IoT Controller, Controller

Milesight

User Guide LoRaWAN

Milesight UC300 IoT Controller | B Meters | UK and Ireland


File Info : application/pdf, 31 Pages, 3.26MB

PDF preview unavailable. Download the PDF instead.

UC300-User-Guide-LoRaWAN
UC300 User Guide
IoT Controller Featuring LoRaWAN®

Follow us:

/bmetersuk

B METERS UK | www.bmetersuk.com | Milesight

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 wirings.  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
UC300 is in conformity with the essential requirements and other relevant provisions of the CE, FCC, and RoHS.

Copyright © 2011-2023 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 Mar. 17, 2022 June 30, 2023

Doc Version V 1.0 V 2.0

Description Initial version Update based on hardware V2.x

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 Wiring Examples ...................................................................................................................... 5 2.4 LED Indicators ..........................................................................................................................7 2.5 Reset Button ............................................................................................................................ 7 2.6 Dimensions (mm) .................................................................................................................... 8
3. Hardware Installation ........................................................................................................................8 3.1 Antenna Installation ................................................................................................................ 8 3.2 Device Installation ................................................................................................................... 8 3.3.1 Wall Mounting ............................................................................................................... 8 3.3.2 DIN Rail Mounting ......................................................................................................... 9
4. Operation Guide ...............................................................................................................................10 4.1 Log in the ToolBox .................................................................................................................10 4.2 LoRaWAN Settings ................................................................................................................ 11 4.3 Data Interface Settings ......................................................................................................... 15 4.3.1 Basic Settings ............................................................................................................. 15 4.3.2 Digital Input/Pulse Counter ........................................................................................15 4.3.3 Digital Output .............................................................................................................. 17 4.3.4 RS485 .......................................................................................................................... 17 4.3.5 RS232 .......................................................................................................................... 20 4.3.6 Analog Input/PT100 ................................................................................................... 21 4.4 IF-THEN Command ............................................................................................................... 21 4.5 Milesight D2D Settings ..........................................................................................................24 4.6 Data Storage .......................................................................................................................... 26 4.7 Data Retransmission .............................................................................................................28 4.8 Maintenance .......................................................................................................................... 30 4.8.1 Upgrade ....................................................................................................................... 30 4.8.2 Backup .........................................................................................................................30 4.8.3 Reset to Factory Default .............................................................................................31
5. Device Payload ................................................................................................................................ 31
3

1. Product Introduction
1.1 Overview
UC300 is an IoT controller used for remote control and data acquisition from multiple sensors. It contains different I/O interfaces such as analog inputs, digital inputs, relay outputs, serial ports and so on, which support remote device data transmission and control via LoRaWAN®. Besides, UC300 supports multiple trigger conditions and actions which works autonomously even when the network drops.
1.2 Features
 Easy to connect with diverse wired sensors through DI/DO/AI/PT100/RS232/RS485 interfaces
 Multiple triggering conditions and actions  Embedded watchdog for work stability  Industrial metal case design with 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× UC300 Device

1× LoRaWAN® Antenna

1× Power Adapter

5× Terminal Blocks

1 × DIN Rail Mounting Clip

1 × Wall Mounting Bracket

4× Wall Mounting
Kits

4× Fixing Screws

4

1× Quick Start Guide

1 × Warranty Card

If any of the above items is missing or damaged, please contact your sales representative.

2.2 Hardware Overview

2.3 Wiring Examples
(1) Digital input wiring: Dry Contact:
Wet Contact:
(2) Relay output wiring:
5

(3) 4-20mA wiring: 3-Wire: 2-Wire:
(4) 0-10V wiring: (5) PT100 wiring: 3-Wire:
2-Wire:
6

(6) RS232/RS485 wiring:

RS485 Terminal Resistor1: DIP Switch
1 on 2 off 3 off 1 off 2 on 3 off 1 off 2 off 3 on

Description Add 120  resistor between A and B
Add pull-down resistor on B Add pull-up resistor on A

2.4 LED Indicators

LED Indication

Status

Description

Static On

System works

SYS System Status Slowly Blinks

Fail to acquire data from data interfaces

Static On

System error

Off

Not join to network

Blinks as Requests

Send join network requests

Blinks TwiceStatic On Succeed to join to network

ACT Network Status

Blinks Once

Succeed to send uplinks

Blinks Twice

Fail to send uplinks

Blinks Twice

Receive downlinks

2.5 Reset Button
There is a reset button inside the device.
1 Add resistors to avoid data-corrupting reflections if RS485 data rate is high or cable length is is long.

7

Function Reset

Description SYS LED Static Green Static Green  Rapidly Blinking Off  Static Green

Action Press and hold the reset button for more than 10 seconds.
Release the button and wait. The device resets to factory default.

2.6 Dimensions (mm)

3. Hardware Installation 3.1 Antenna Installation
Rotate the antenna into the antenna connector accordingly. The external antenna should be installed vertically always on a site with a good signal.
3.2 Device Installation
UC300 device can be placed on a desktop or mounted to a wall or a DIN rail.
3.3.1 Wall Mounting
1. Fix the wall mounting bracket to the device with 2 screws.
8

2. Drill 4 holes on the wall according to the bracket, then fix the wall plugs into the wall. 3. Fix the device to the wall plugs with screws. When installation, it's suggested to fix the two screws on the top at first.
3.3.2 DIN Rail Mounting
1. Fix the mounting clip to the device with 3 screws.
You can also try below installation methods:
2. Hang the device to the DIN rail. The width of DIN rail is 3.5cm. 9

4. Operation Guide 4.1 Log in the ToolBox
1. Download ToolBox software from Milesight IoT website. 2. Power on the UC300 device, then connect it to computer via type-C port.
3. Open the ToolBox and select type as General, then click password to log in ToolBox. (Default password: 123456)
4. After logging in the ToolBox, you can change device settings.
10

4.2 LoRaWAN Settings
LoRaWAN settings is 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.
11

Parameters

Description

Device EUI

Unique ID of the device on the label.

App EUI

Default App EUI is 24E124C0002A0001.

Application Port

The port used for sending and receiving data (RS232 data excluded), default port is 85.

Join Type

OTAA and ABP modes are available.

LoRaWAN Version V1.0.2, V1.0.3 are available.

Class Type

It's fixed as Class C.

Application Key Appkey for OTAA mode, default is 5572404C696E6B4C6F52613230313823.

Device Address DevAddr for ABP mode, default is the 5th to 12th digits of SN.

Network Session Nwkskey for ABP mode, default is 5572404C696E6B4C6F52613230313823.
Key

Application Session Key

Appskey for ABP mode, default is 5572404C696E6B4C6F52613230313823.

RX2 Data Rate RX2 data rate to receive downlinks.

RX2 Frequency RX2 frequency to receive downlinks. Unit: Hz

Spread Factor If ADR is disabled, the device will send data via this spread factor.

Confirmed Mode If the device does not receive ACK packet from network server, it will resend

12

data once.

Reporting interval  30 mins: the device will send a specific number of

LinkCheckReq MAC packets to the network server with periodic or threshold

uplinks everytime more than 25~35 mins passes to validate connectivity; If

Rejoin Mode

there is no response, the device will re-join the network. 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 Note: the actual sending number is Set the number of packet sent + 1.

ADR Mode

Allow 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 the LoRaWAN® gateway. Note: When Single-Channel Mode is enabled, only one channel can be selected to send uplinks and the ADR will not work. Please enable Single-Channel Mode if you connect device to DS7610.

13

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 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
14

4.3 Data Interface Settings
4.3.1 Basic Settings

Parameters Device ID
Reporting Interval
Data Storage Data
Retransmission D2D Key
Change Password

Description Show the SN of the device. Reporting interval of transmitting data to network server.Default: 20mins, range: 1~1080 mins Note: RS232 transmission will not follow the reporting interval. Disable or enable reporting data storage locally. (see section 4.6 to export data)
Disable or enable data retransmission. (see section 4.7)
Set a unique key the same as the setting in Milesight D2D controller or agent device. The D2D Key is 5572404C696E 6B4C6F52613230313823. Change the password to loggin ToolBox.

4.3.2 Digital Input/Pulse Counter
UC300 supports 4 digital inputs and every input can work as either digital input mode to detect high/low level or pulse counter to record counting values. When working as digital input, UC300 will upload the data according to reporting interval or when status changes.

15

Parameters Enable
Digital Input Fetch
Counter Digital Filter
Start/Stop
Refresh Clear
Modify the

Description Enable digital input to detect status and upload the data.
Click to get the current input status.
It's recommended to enable when pulse period is greater than 250 us. Click to start/stop counting. Note that UC300 will send non-changeable counting values if you do not click Start. Refresh to get latest counter values. Count the value from 0. Set the initial counting value.

16

count values
4.3.3 Digital Output
UC300 supports 2 digital outputs to control the devices.

Parameters
Enable
When Power is Restored, DO
Fetch Switch

Description Enable the digital output to control the device and upload changed status. After the device power is restored, the DO status will return to normally closed or normally open according to this parameter.
Click to get the current output status. Click to change the DO status.

4.3.4 RS485
UC300 has one RS485 port to support Modbus RTU or transparent device connection .
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.

17

Parameters Enable Stop Bit Data Bit

Description Allow the device to collect RS485 data and upload the data. 1 bit/2 bit are available. 8 bit is available.

Parity

None, Odd and Oven are available.

Baud Rate

1200/2400/4800/9600/14400/19200/38400/57600/115200 are available.

Execution Interval (ms)
Max Resp Time (ms)
Max Retry Time (ms)
Modbus RS485 bridge LoRaWAN
Pass-through Mode

The execution interval between each Modbus channel command.
The maximum response time that the UC300 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 device fails to read data from RS485 terminal devices. If this mode is enabled, the device will transmit Modbus RTU commands from network server to RS485 terminal devices transparently and send Modbus reply originally back to the network server. Port: Select from 2-84, 86-223. Select pass-through mode when Modbus RS485 bridge LoRaWAN is enabled. Active Pass-through: network server can send any type of command to

18

3. Click

RS485 device and RS485 device can only react according to server commands. Two-way Pass-through: not only can network server send any type of command to RS485 device, but also RS485 device supports transmitting the data to the network server actively. Note: When Two-way Pass-through is enabled, Modbus channels can't be used and corresponding IF-THEN command will not work.
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 32 channels.
Customize the name to identify every Modbus channel.
Set Modbus slave ID of terminal device.
The starting address for reading.
Set read how many digits from starting address. It fixes as 1.
Select data type of Modbus channels. Set the Modbus data reading order if you configure the type as Input register or holding register.This will affect the uplink order and for details refer to UC300 LoRaWAN ®Communication Protocol. INT32/Float: ABCD, CDBA, BADC, DCBA INT16: AB, BA The tick indicates that the value has a plus or minus sign. After click, UC300 will send Modbus read command to test if it can read correct values. Example: the device will send command as below setting: 01 03 00 00 00 01 84 0A

Fetch All

Click to fetch all configured channels.

4. Click Fetch to check if UC300 can read correct data from terminal devices.

19

Note: Do not click Fetch frequently since response time to reply is differ for every terminal device.
4.3.5 RS232
UC300 has one RS232 interface for transparent communication. Usually it will use different tunnels from other data interfaces to communicate with server.

Parameters Baud Rate
Data Bit Stop Bit Parity Packet Length (byte)
Serial Frame Interval (ms)
Port

Description 1200/2400/4800/9600/14400/19200/38400/57600/115200 are available. 8 bit is available. 1 bit/2 bit are available. None, Odd and Oven are available. When the device receives RS232 data up to this length, it will fragment it as a single packet and send to network server. The interval that the device sends out real serial data stored in the buffer area to public network. The range is 10-65535 milliseconds. Note: data will be sent out when real serial data size reaches the preset packet size, even though it's within the serial frame interval. Send or receive RS232 data from this port, this port should different from the Application port. Range: 2-84, 86-223.

20

4.3.6 Analog Input/PT100
UC300 has two 4-20mA analog inputs, two 0-10V analog inputs and two PT100 inputs for analog device connection. After wirings, you can click Fetch to check if the value is correct. PT100 Note: 1) The temperature unit in the reporting package is fixed as °C. 2) Please modify the command IF condition threshold settings if you change the temperature unit.
4.4 IF-THEN Command
UC300 supports configuring locally IF-THEN commands to do some actions automatically even without network connection. One device can be added 16 commands at most. 1. Go to Command page, click Edit to add commands.
21

2. Set a IF condition based on the terminal device data or UC300 device status. Users can add at

most 2 conditions in one command.

Condition

Description

Time

Set the time condition. You can sync the time manually on Status page.

When UC300 device detects the DI as a specific status.

Digital Input

Is continued for: the DI changed status should last for some time. Set lockout time: after the lockout time, UC300 will detect if DI status matches

the condition. 0 means this IF condition will only be detected once.

Counter

When pulse counter reaches a specific value. This only works when DI works as counter mode.

When the value reaches any threshold.

Channel/4-20m Is continued for: the analog value should last for some time.

A/0-10V/PT100 Set lockout time: after the lockout time, UC300 device will detect if analog

value matches the condition. 0 means this IF condition will only be detected

22

Received a message The Device Restarts Received a D2D control command

once. When UC300 device receive a specific message from server.
When the device restarts.
When the device works as a D2D agent device to receive a D2D control command. See details on chapter 4.5.

3. Set THEN action according to your request. Users can add at most 3 actions in one command.

Action

Description

Send a custom message to the server. Users can add variables on the message. Example: PT100=$T1 The message will replace the "$T1" as real temperature value. Corresponding variable names are shown as below:

Data Interface

Variable Name

Send a custom message

DI 1/2/3/4 Counter 1/2/3/4

$DI1, $DI2, $DI3, $DI4 $C1, $C2, $C3, $C4

DO 1/2 4-20mA 1/2

$DO1, $DO2 $A1, $A2

0-10V 1/2

$V1, $V2

PT100 1/2

$T1, $T2

RS485 Channel 1/2...32

$R01, $R02, $R03, .........$R31, $R32

Output Trigger

DO can be set to normally open/normally closed/change status. Delay Time: this action will trigger after a specific time; Duration: the output status will last for a specific time, 0 means permanent.

Restart the Device Reboot the device.

Send a D2D control The device works as a D2D controller device to send a D2D control

command

command. See details on chapter 4.5.

Send a Modbus command via

This only works when UC300 works as D2D agent device. See details on chapter 4.5.

23

RS485 interface 4. After setting all commands, click Save.
4.5 Milesight D2D Settings
Milesight D2D protocol is developed by Milesight and used for setting up transmission among Milesight devices without gateway. When the D2D setting is enabled, UC300 can work as a Milesight D2D controller to send control commands to other devices or work as a Milesight D2D agent to receive commands to trigger the DO or RS485 devices. 1. Go to General > Basic page to define a unique D2D key which is the same as D2D c ontroller or agent devices. (Default D2D Key: 5572404C696E6B4C6F52613230313823)
2. Go to LoRaWAN Settings > Basic to configure the RX2 datarate and RX2 frequency. When UC300 works as Milesight D2D controller, it will send commands as RX2 settings.
24

3. Go to Command page to set corresponding operations. When DI triggers, UC300 can work as D2D controller to send control command to control the D2D agent device. The command should be a 2-byte hexadecimal number.
When UC300 receives a D2D command, it can work as a D2D agent to trigger the DO, restart the device or send Modbus command to RS485 terminal devices.
25

4.6 Data Storage
UC300 supports storing 1,000 data records locally and export data via ToolBox. The device will record the data according to reporting interval even not joining to network. 1. Go to Status page to click Sync to sync the device time.
26

2. Go to General > Basic to enable data storage feature.
3. Go to Maintenance > Backup and Reset , click Export to select the data time period and click Save to export data.
27

4. Click Clear to clear all stored data inside the device if necessary.
4.7 Data Retransmission
UC300 supports data retransmission to ensure the network server can get all data even if network is down for some times. There are two ways to get the lost data:  Network server sends downlink commands to enquire the historical data for specifying time
28

range, refer to UC300 LoRaWAN ®Communication Protocol.  When network is down if no response from LinkCheckReq MAC packets for a period of time,
the device will record the network disconnected time and re-transmit the lost data after device re-connects the network. Here are the steps for retransmission: 1. Go to General > Basic to enable data storage and data retransmission feature.
2. Go to LoRaWAN Settings > Basic to enable rejoin mode feature and set the number of packets sent. Take below as example, the device will send LinkCheckReq MAC packets to the network server regularly to check if the network is disconnected; if there is no response for 8+1 times, the join status will change to de-active and the device will record a data lost time point(the time to join the network).
3. After the network connected back, the device will send the lost data from the point in time when the data was lost according to the data re-transmission reporting interval. Note: 1) If the device is reboot or re-powered during data retransmission, the device will re-send interrupted retransmission data again after device is reconnected back to the network. 2) If the network is disconnected again during data retransmission, it will only send the latest disconnection data. 3) UC300 supports to send downlink commands to enquire the historical data for specifying time range, refer to UC300 LoRaWAN ®Communication Protocol.
29

4.8 Maintenance
4.8.1 Upgrade
1. Download firmware from Milesight website to your PC. 2. Go to Maintenance > Upgrade, click Browse to import firmware and upgrade the device. Note: Any operation on ToolBox is not allowed during upgrading, otherwise the upgrading will be interrupted, or even the device will break down.
4.8.2 Backup
UC300 devices support configuration backup for easy and quick device configuration in bulk. Backup is allowed only for devices with the same model and LoRaWAN® frequency band. 1. Go to Maintenance > Backup and Reset, click Export to save current configuration as json format backup file. 2. Click Browse to select backup file, then click Import to import the configurations.
30

4.8.3 Reset to Factory Default
Please select one of following methods to reset device: Via Hardware: Open the case of UC300, hold on the reset button for more than 10s until SYS LED blinks. Via ToolBox Software: Go to Maintenance > Backup and Reset to click Reset.
5. Device Payload
Please refer to the UC300 LoRaWAN ®Communication Protocol; for decoders of Milesight IoT products please click here.
-END-
31



References