background image

User Manual

Your TrustWorthy Industrial IoT Partner

www.pusr.com

110

Fig. 158

Message reported

9.5.

Data query

There are three methods to actively query the data collected through the serial port from the communication channel: Json format,

Modbus TCP, Modbus RTU. Firstly, user need enable the data query function.

9.5.1. Json

When select MQTT or AWS IOT channel, user need configure the MQTT broker parameters in MQTT Gateway tab or Cloud service

tab at first, select Json query type and setting the query topic in the Fig.159. The report topic is same as described in section 9.4.1.

Fig. 159

JSON query type

The Json content need conform to template described in section 9.4.3.

Содержание USR-N510

Страница 1: ...USR DR404 AT 指令集 1 USR N5X0 Series User Manual V1 0 0 Serial to Ethernet Device Server Build a Smarter IoT world Your Trustworthy Partner USR N510 USR N520 USR N540 USR N580 ...

Страница 2: ...n 13 2 7 3 Network configuration Step1 14 2 7 4 Data transmission test Step2 and 3 15 2 8 Reload factory settings button 16 2 9 Technical support and assistance 16 3 Configuration and parameter details 18 3 1 Web interface V1 version 18 3 1 1 Status 18 3 1 2 IP settings 20 3 1 3 Serial port settings 21 3 1 4 Websocket server 23 3 1 5 Miscellaneous settings 24 3 1 6 Management 25 Reboot 26 Restore ...

Страница 3: ... setting 46 4 2 TCP Client 47 4 2 1 Properties 47 4 2 2 SSL TLS 48 4 2 3 transient connection 48 4 3 UDP Server 49 4 3 1 Properties 49 4 4 UDP Client 51 4 4 1 Properties 51 4 4 2 UDP multicast 52 4 5 HTTP Client 54 4 5 1 Properties 54 4 5 2 HTTPS 55 4 6 Websocket server 55 5 Virtual COM port 58 5 1 TCP Server Application with Virtual COM 59 5 2 TCP Client Application with Virtual COM 62 5 3 Enable...

Страница 4: ...ibution 92 8 2 4 Custom mode 94 8 3 Subscribe to a topic 96 9 Edge computing 98 9 1 Add modbus slave device 98 9 2 Add modbus data points 99 9 2 1 Register type and offset 99 9 2 2 Raw data types and byte order 100 9 2 3 Data points configuration 100 9 3 Export and import configuration 102 9 4 Data report 104 9 4 1 Communication channel 104 9 4 2 Report method 104 9 4 3 Payload Json template 105 9...

Страница 5: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 4 ...

Страница 6: ...2 RS232 485 422 to Ethernet device server USR N520 6 2 RS232 485 to Ethernet device server USR N540 4 RS232 485 422 to Ethernet device server USR N540 4 4 RS485 to Ethernet device server USR N580 8 RS485 to Ethernet device server 1 2 Features The USR N5X0 field mount serial device server series share the same software platform on different available hardware components It provides High performance...

Страница 7: ...very multiple device setting and monitoring Choice of power input AC DC adapter DC Jack or DC direct Terminal Block High security via certificate verification SSL TLS encryption for serial data transmission HTTPS TCPS MQTTS firmware V2 0 0 or later Support modbus RTU master edge computing modbus gateway MQTT gateway firmware V2 0 0 or later Support SNMP V1 V2c firmware V2 0 0 or later ...

Страница 8: ...ate the installation site and place the device against the wall Use the wall mount plates as a guide to mark the locations of the screw holes Drill two holes over the two marked locations on the wall Insert the wall sinks into the walls Insert the screws into the wall sinks Leave a 2 mm gap between the wall and the screw head to allow for wall mount plate insertion Align the wall mount plate over ...

Страница 9: ...ure that the top of the DIN Rail clip hooks over the top of the DIN Rail as shown in Fig 3 Fig 3 Install DIN Rail mounting kit Once the DIN Rail is seated correctly in the DIN Rail clip press the front of the device to rotate the device down and into the release tab on the DIN Rail clip If seated correctly the bottom of the DIN Rail should be fully inserted in the release tab ...

Страница 10: ...sh down on the top of the DIN rail clip release tab with your finger As the clip releases lift the bottom of the device as shown in the following illustration Fig 5 Remove the DIN Rail 2 2 Serial port The USR N5X0 supports the RS 232 RS 422 and RS 485 protocols adopts DB9 male connector and is software configurable The serial port pin assignments are given in the table 2 ...

Страница 11: ...7 RTS Tx A 8 CTS Rx 9 The USR N5X0 6 supports the RS 232 and RS 485 protocols and is software configurable And RS232 adopts DB9 male connector RS485 adopts terminal block The DB9 pin assignment is same to table 2 RS232 Fig 7 N520 6 serial port The USR N5X0 4 supports only RS 485 protocols and adopts 3 pin 5 08mm pitch industrial terminal blocks The serial port pin assignments are shown in Fig 8 ...

Страница 12: ...effects of noise caused by electromagnetic interference EMI and protect your device it is still strongly advised to ground the device properly There is a grounding screw next to the terminal block you should connect it to the grounding at all times 2 4 Ethernet RJ45 interface The 10Base T 100Base TX adaptive Ethernet RJ45 interface supports automatic MDI MDIX connection refer to Fig 10 below for t...

Страница 13: ...ry default settings The USR N5X0 serial device server comes with the following default settings Table 5 Default parameters Parameter Default Values User Name admin Password admin Device IP 192 168 0 7 Subnet Mask 255 255 255 0 Gateway IP 192 168 0 1 COM port 115200 None 8 1 COM operation mode TCP server 23 MQTT Disable firmware V2 version Edge computing Disable firmware V2 version 2 7 Quick test U...

Страница 14: ...as been completed as shown in Fig 11 and Fig 12 It is strongly recommended for the users to set the Network Parameters through configuration tool first Other device specific configurations can later be carried out via user friendly Web Interface Fig 11 Windows configuration tool Fig 12 Test assistant 2 7 2 Hardware connection For fast networking of USR N5X0 series serial server you need to prepare...

Страница 15: ...ss all N5X0 connected to the LAN will be located regardless of whether or not they are part of the same subnet as the host In EthernetTool click Search to search your LAN for N5X0 device servers When your unit appears in the search results you can click device to select it and change the IP type to DHCH save your change Wait for 5s and search it again Fig 14 IP network setting When accessing the s...

Страница 16: ...cable The default IP address of serial server is 192 168 0 7 Set the PC s IP address as 192 168 0 X X is any valid value from 2 to 253 except 7 The specific Windows system operation page is shown in Fig 16 you can access the Web page of the USR N5X0 series serial server through browser as mentioned above Fig 16 IP setting of PC 2 7 4 Data transmission test Step2 and 3 You can select an operation m...

Страница 17: ...b for confirming values of parameters Fig 17 shows an example of parameters setting to test transparent transmission Fig 17 Transparent transmission test 2 8 Reload factory settings button Press the Reload button inside a small hole on the back panel for 3 15 seconds and then release or follow the procedure in Section 3 1 6 to restore the USR N5X0 Series Industrial Serial Device Server to the fact...

Страница 18: ... Manual Your TrustWorthy Industrial IoT Partner www pusr com 17 Description of your software firmware version application function description etc A complete description of the issue and steps to reproduce ...

Страница 19: ...n Fig 18 This approach web interface for configuring your device is the most user friendly It is the most recommended and the most common method used for USR N5X0 Serial Device Server Series Please go to its corresponding section for a detailed explanation Fig 18 Authentication Required for Accessing Web Interface 3 1 1 Status After entering the correct user name and password and the authenticatio...

Страница 20: ...s The MAC address of the serial server Running time Total time after the device start work It will starts from 0 after reboot Port status The working status of checked serial port Select the serial port currently to be displayed 1 Conn Status A ETH connection status of socket A IDLE Initialization status LISTEN When the module works as TCP Server it is listening for connection access CONNECTING Wo...

Страница 21: ...ic or DHCP If you choose DHCP the rest of the options will be greyed out or disabled DNS type Click the drop down menu to select the DNS mode auto or manual If you choose auto the DNS options will be greyed out or disabled IP address IP address is a 32 bit address assigned to devices connected to the Internet The IP address consists of two fields the network number field Net id and host number fie...

Страница 22: ...e DNS When the device uses a static IP address the user is required to fill in this item 8 8 8 8 Google will be a good choice If a specific DNS server is not used the default gateway IP address is generally sufficient After finishing the network settings configuration please click the Save button to save all changes that have been made Finally the web browser will be redirected to the Reboot page ...

Страница 23: ...e connected device Default is 8 which is the default for the majority of serial devices Parity bits This bit checks the integrity of the transmitted data Choices are None Odd Even Set this to match the parity setting of the connected device Default is None which is the default for the majority of serial devices Stop bits This indicates that a character has been transmitted Set this to match the st...

Страница 24: ...emote host in this field Once again this should match the IP setting of the TCP UDP server program Timeout reconnection TCP UDP client The default is disable If you want to keep connection continually you can disable it Data idle Time is the time period for which the device waits for data If the USR N5X0 Series does not receive data during established idle time timeout the USR N5X0 Series will dis...

Страница 25: ...IoT Partner www pusr com 24 Fig 23 Websocket server 3 1 5 Miscellaneous settings This configuration tab includes several system level settings such as device name websocket system log user name and password Most of these settings are optional ...

Страница 26: ...s established This means that the TCP application will not receive buffered serial data during a TCP link breakage To keep the serial data when there is no TCP connection and send out the buffered serial data immediately after a TCP connection is established you can disable this option Reset timeout This function is used for the serial device server without any data transmission or reception for a...

Страница 27: ...server at the same time Before the serial server restarts successfully the serial server does not work and cannot forward any data packets This function is to restore the factory default configuration value once the user sets the wrong parameter and causes the serial port server to work abnormally Click the Restore factory button and a prompt box will pop up on the page Click yes Firmware upgrade ...

Страница 28: ...er in the firmware Therefore the device can be accessed by using a web browser for configuring by entering the device s IP address in the URL field of your web browser An authentication will be required and you will have to enter the username Default value is admin and password Default value is admin for accessing the web interface as shown in Fig 26 This approach web interface for configuring you...

Страница 29: ...address The IP address of the serial server Port status The working status of checked serial port Select the serial port currently to be displayed Conn Status A ETH connection status of socket A IDLE Initialization status LISTEN When the module works as TCP Server it is listening for connection access CONNECTING Works as TCP client the module is establishing a connection to the TCP Server CONNECTE...

Страница 30: ...server The detailed description of the configuration parameters on this interface is shown in table 12 Fig 28 Network web page Table 12 Network configuration list Parameter Item Description Network protocol Click the drop down menu to select the IP Address Setting mode Static or DHCP If you choose DHCP the rest of the options will be greyed out or disabled DNS type Click the drop down menu to sele...

Страница 31: ...te DNS When the device uses a static IP address the user is required to fill in this item 8 8 8 8 Google will be a good choice If a specific DNS server is not used the default gateway IP address is generally sufficient The configuration will save to flash memory after clicking Save button All configurations take effect after a system reboot 3 2 3 Serial port settings The serial port module include...

Страница 32: ...trol This allows you to choose how the data flow will be controlled Choices are No Flow Control RTS CTS Hardware Flow Control or Xon Xoff Software Flow Control Set this to match the flow control setting of the connected device Default is None If Xon Xoff is selected the Xon and Xoff characters are 0x11 for Xon and 0x13 for Xoff Note that these are hexadecimal numbers of ASCII characters i e 0x11 1...

Страница 33: ... Series will disconnect temporarily When the data comes in it will reconnect automatically Users do not need to reconnect Modbus polling This option is selected when multiple modbus maters from Ethernet are polling the same serial port Each serial port supports up to 16 simultaneous TCP connections allowing hosts to simultaneously transmit receive data to from the same serial port USR N5X0 Series ...

Страница 34: ...ic settings general topic settings TLS secure transmission last will message and advanced settings Fig 32 MQTT connection profiles Table 15 MQTT basic setting Parameter Item Description Enable Turns MQTT gateway on or off Version Select the mqtt protocol version V3 1 and V3 1 1 are supported Client ID The client ID defined the identifier of the N5X0 Gateway The IDs of the various MQTT clients have...

Страница 35: ...reconnection interval after a fail network connection Clean session Valid only for Qos1 and Qos2 When the clean session is checked the client does not want a persistent session If the client disconnects for any reason all information and messages that are queued from a previous persistent session are lost When the clean session is unchecked the broker creates a persistent session for the client Al...

Страница 36: ...ected client To receive messages the client must subscribe to the topic A topic can have one or more topic levels Each topic level is separated by a slash Topic Level Separator Binding Port The MQTT topic is bound to the serial port number of the device Any data from the COM Port1 of the gateway will send to all the TOPIC it bindings to Qos QoS 0 at most once In this case the client publishes a me...

Страница 37: ...Table 16 Binding port Same to Table 16 QoS Same to Table 16 3 2 6 Edge computing The N5X0 supports southbound fieldbus protocols of Modbus RTU protocols It also supports northbound MQTT Cloud protocols of MQTT Broker TCP UDP HTTP in socket AWS IOT and Alibaba Cloud IoT Platform The N5X0 fulfills a different role on each of its sides Each role is determined by your devices settings Therefore set th...

Страница 38: ...ateways send requests to collect data from devices Therefore you must specify the data collection interval The unit is millisecond If 60 milliseconds is required to collect the data of each property the total time required to collect the data of all properties is calculated as follows Total required time Time required to collect the data of each property 60 ms Number of properties for the slave de...

Страница 39: ...ith modbus address mapping to realize a single modbus command query in data query Formula Modbus register store only whole numbers For this reason a scale factor often needs to be applied For example a modbus register with a temperature value may read as 723 and a multiplier of 0 1 need to be applied to get the correct value of 72 3 in the SCADA system the formula is s 0 1 If the data type is a Fl...

Страница 40: ...ease refer to USR N5X0 Quick Start Guide with AWS IoT for detail Please refer to USR N5X0 Quick Start Guide with PUSR cloud for detail 3 2 8 System setup This system setting tab includes several system level settings such as device name websocket system log user name and password Most of these settings are optional Fig 38 System settings Table 21 System settings list Parameter Item Description Mod...

Страница 41: ...function is used to restart the USR N5X0 series serial server by software Before the serial server is completely restarted the device does not work and cannot forward any data packets This restart is different from the hardware reset of power on restart but the serial server system software is reset just like the warm restart of the windows operating system Once a new setting is changed you can us...

Страница 42: ...the device will then proceed to restart itself In most cases you might require to re configure your device 3 3 Configuration software 3 3 1 Discovering your device server After you start EthernetTool software if the USR N5X0 Serial Device Server is already connected to the same gateway as your PC the device can be accessed via broadcast packets Users can search all the USR N5X0 Series device serve...

Страница 43: ... save new configuration settings to flash memory To reset the device 1 Right click a desired device to display the settings menu 2 Select Reboot Press the Reboot button and the system will give a reset response Fig 42 Reboot the device 3 3 4 Restore to factory default settings The configuration utility provides the function to restore the serial device server to factory default settings If you rea...

Страница 44: ...n tool Select the device you want to visit and right click then click External web config you will open the web server with default browser such as Google Chrome Fig 44 Open webpage in browser 3 4 AT command In order to reduce the length of this document we have organized this section into a special document Please refer to USR Cortex M7 series serial to Ethernet device server AT command manual fo...

Страница 45: ... are provided in following sections After choosing the proper operation mode in this chapter refer to Chapter 3 for detailed configuration parameter definitions Because the V2 firmware contains all the function of V1 firmware we describe the configuration in V2 firmware as illustration in this chapter users of V1 version can refer to it for reference Fig 45 Block diagram 4 1 TCP Server 4 1 1 Prope...

Страница 46: ...b UI to go to Port1 page as shown in Fig 46 2 For Serial Settings on the Port configuration page please go to Section 3 2 3 3 Click on the Socket tab in this page select TCP Server in the working mode options The local ports of different serial ports must be different After receiving network data the device determines which serial port the data is sent to based on the local port For example the de...

Страница 47: ...t allows 8 connection at a time This option specifies the maximum number of remote devices clients with maximum of 16 clients that can be connected to the serial device on this COM port And users can define the behavior when the connection established exceed the maximum Kick when the connection exceeds the maximum number actively kick out the oldest connection first in first kick out Keep when the...

Страница 48: ...ttings of the work mode for PORT1 port 1 Click on the Port1 tab on the menu frame on the left side of Web UI to go to Port1 page as shown in Fig 49 2 For Serial Settings on the Port configuration page please go to Section 3 2 3 3 Click on the Socket tab in this page select TCP Client in the working mode options Please specify the Destination IP address and port number of the TCP server program on ...

Страница 49: ...TLS1 2 version protocol User can select None certificate Authentication server certificate authentication and bidirectional certificate authentication Fig 51 SSL TLS encryption 4 2 3 transient connection This connection called transitory due to its short lived nature If the serial port or network port receives none data within the setting time the connection will be automatically disconnected The ...

Страница 50: ...4 3 1 Properties User Datagram Protocol UDP is a faster and more efficient transport protocol than TCP but it is a connectionless transport protocol it does not guarantee the delivery of network datagram In UDP mode you can unicast or multicast data from the serial device to one or multiple host computers and the serial device can also receive data from one or multiple host computers Please beware...

Страница 51: ... to and it can be any number between 1 and 65535 The local ports of different serial ports must be different After receiving network data the device determines which serial port the data is sent to based on the local port 5 After finishing configuring the working Mode please scroll down to the bottom of the page and click on Save Apply button to save all the changes that you have made All configur...

Страница 52: ...on After verification is enabled OFF the N5X0 only communicates with the destination port of the destination IP address If the data is not from this channel the N5X0 will discard the data If verification is disabled ON N5X0 does not filter the data of the destination IP address and destination port Fig 55 shows an example of configuration setting for UDP Client mode under the Port1 socket page You...

Страница 53: ...ended to avoid conflicting with the well known port numbers You should match this setting with the remote UDP program Note that this number is usually called destination port in the remote UDP program 5 After finishing configuring the working Mode please scroll down to the bottom of the page and click on Save Apply button to save all the changes that you have made All configurations take effect af...

Страница 54: ...er Manual Your TrustWorthy Industrial IoT Partner www pusr com 53 Fig 57 USR 5X0 1 UDP multicast setting Fig 58 USR N5X0 2 UDP multicast setting Fig 59 shows an example of test in this mode with two N5X0s ...

Страница 55: ...POST At the same time the data sent by the httpd server can be transparently transmitted to the serial port Fig 60 shows an example of configuration setting for HTTP Client working mode under the Port1 socket page You can configure other serial ports in the same way Fig 60 HTTP client mode Please follow the following steps to configure connection settings of the work mode for PORT1 port 1 Click on...

Страница 56: ...ication is enabled on the remote server user need to configure SSL encryption parameters on N5X0 User can select TLS1 0 or TLS1 2 version protocol User can select None certificate Authentication server certificate authentication and bidirectional certificate authentication Fig 61 SSL TLS encryption 4 6 Websocket server When the operation mode of this device is WebSocket server the user needs to sp...

Страница 57: ...r www pusr com 56 Fig 62 Websocket server setting 5 Click on the websocket to serial tab browser will connect to the websocket server of N5X0 automatically Fig 63 Browser as websocket client to connect N5X0 Fig 64 shows an example of test in this mode ...

Страница 58: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 57 Fig 64 Data transmission test ...

Страница 59: ...etwork regardless of whether the instruments are used locally or at a remote site To enable Virtual COM on host computer you will require a VCOM software to emulate the COM port For Windows operating system a software utility called VCOM is supported by PUSR to be used for this purpose This function is useful with devices such POS terminals Bar Code Readers Serial printers etc since it allows you ...

Страница 60: ...67 VCOM overview 5 1 TCP Server Application with Virtual COM Virtual COM on host computer allows remote access of serial devices over TCP IP networks through Serial IP Virtual COM ports that work like local native COM ports Fig 68 is an example of Virtual COM application diagram There are traditionally only two Physical COM ports COM 1 and COM 2 on the personal computer PC while there can be sever...

Страница 61: ... Diagram of Virtual COM Application over TCP IP Network 1 If the serial device server is running in TCP Server Mode recommended the VCOM utility on the host computer should be configured as the TCP client connecting to the serial device server The characteristic of this mode is that the IP address of the host can be changed usually automatically assigned by the router and the IP address of the ser...

Страница 62: ...te that if a COM port number is used by other application or your operating system you can not select it Fig 71 Select one COM port 3 After selecting the virtual COM ports please enter the IP Address of the serial device server with the specified Port Number The Port Number here is the Local Listening Port for the serial device server which is specified in the Local Port field of Fig 72 ...

Страница 63: ...73 Virtual COM11 status 5 2 TCP Client Application with Virtual COM 1 If the serial device server is running in TCP Client Mode the VCOM utility on the host computer should be configured as the TCP server waiting for a serial device server to connect to the host computer The feature of this mode is that the IP address of the computer cannot be changed but the IP address of the serial device server...

Страница 64: ... 2 Select one COM port as the Virtual COM port before proceeding as shown in Fig 76 Note that if a COM port number is used by other application or your operating system you can not select it 3 After selecting the virtual COM ports please enter the specified Port Number This Port Number is the Destination Port of the serial device server ...

Страница 65: ...cted the process is completed Fig 77 Virtual COM12 status 5 3 Enable RFC2217 through Virtual COM Enabling this function allows users to use customized RFC2217 commands on the network to dynamically modify the serial port s baud rate data bits stop bits and parity bits This function is only allowed when the working mode is TCP Server and TCP Client Note that this protocol is used to change the seri...

Страница 66: ...orthy Industrial IoT Partner www pusr com 65 Fig 78 RFC2217 enabled Fig 79 enable RFC2217 in VCOM When we change serial parameters in Virtual COM port 1 we can see these parameters have took effect in serial port of USR N5X0 ...

Страница 67: ...rity bits setting AS shown in the table 23 below Check sum of 4 bytes of baud rate and serial parameter definition retain the least significant byte 115200 N 8 1 55 AA 55 01 C2 00 03 C6 9600 N 8 1 55 AA 55 00 25 80 03 A8 Table 23 Serial parameter definition Bit Position Function Value Description 1 0 Data bits 10 7 Data bits 11 8 Data bits 2 Stop bits 0 1 Stop bits 1 2 Stop bits 3 Parity bit enabl...

Страница 68: ... 32 per network the master device takes up an address on the network The maximum length of the serial network cannot exceed 1200m regardless of boosters and repeaters 6 1 Ethernet masters with serial slaves When the host computer or PLC is Modbus TCP Master the Modbus TCP function must be enabled the remote device must work in Modbus RTU Slave mode The N5X0 TCP Server mode supports Modbus TCP with...

Страница 69: ... slave 6 2 Serial master with Ethernet slave Many HMI Human Machine Interface systems use a serial interface to connect to a discrete DCS Data Control System However many DCSs are now Ethernet based and operate as a Modbus TCP server device The N5X0 Modbus gateway can link a serial based HMI to distributed DCSs over an Ethernet network When the host computer or HMI is Modbus RTU Master if the remo...

Страница 70: ...ave Fig 85 Modbus TCP slave settings Open the Modbus Poll and Modbus Slave software go to Connect Connect and the connection parameters are configured as follows in this case IP address of USR N5X0 is 172 16 14 12 host IP address is 172 16 14 15 Fig 86 Modbus emulator settings serial master and Ethernet slave ...

Страница 71: ...time the remote device must work in Modbus RTU Slave mode The N5X0 supports up to 16 simultaneous TCP connections Fig 87 Serial master with multiple serial slaves If there are more than one serial masters in RS485 network users should select modbus poll function and configure response timeout in Fig 88 please refer to section 7 5 for bus collision detection Fig 88 Modbus RTU master settings USR N5...

Страница 72: ... settings USR N5X0 2 3 4 Fig 90 Modbus emulator settings serial master and serial slave 6 4 Serial master via virtual COM with serial slaves When the host computer is Modbus RTU master if we use VCOM the Modbus TCP function must be disabled the remote device must work in Modbus RTU Slave mode ...

Страница 73: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 72 Fig 91 New virtual COM port mapping Fig 92 Mapping a virtual COM port ...

Страница 74: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 73 Fig 93 Virtual COM port mapping details Fig 94 Serial device settings ...

Страница 75: ... serial master and serial slave 6 5 Modbus poll with serial heartbeat packet When the N5X0 is Modbus RTU Master the serial device work in Modbus RTU Slave mode the ModbusTCP function must be disabled N5X0 works in TCP server mode it supports up to 16 TCP connections Fig 96 Modbus RTU master Settings ...

Страница 76: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 75 Fig 97 Serial heartbeat packet as modbus command Fig 98 Modbus response transparently transmission ...

Страница 77: ...er interval within the specified baud rate For example assuming that the serial port is set to 1200 bps 8 data bits 1 stop bit and no parity In this case the total number of bits needed to send a character is 10 bits included 1 start bit and the time required to transfer one character is 10 bits 1200 bits s 1000 ms s 8 3 ms Therefore you should set the Interval timeout to be larger than 8 3 ms Rou...

Страница 78: ...ets 7 3 Registration packet This function is only allowed when the working mode is UDP and TCP Client The content of the registration packet can be up to 40 bytes long Users can choose to display this content in hexadecimal format or ASCII format Once connected The registration packet is only sent once when the network connection is established Prefix of DATA The registration packet is filled in f...

Страница 79: ...tion packet type Fig 103 Registration packet method 7 4 Socket B Socket B supports TCP Client and UDP Client Socket B and Socket A share the registration packet and heartbeat packet When Socket B initiates a connection it uses a random local port number to connect to the target server ...

Страница 80: ...is parameter is mandatory Fig 105 RS485 bus detection 7 6 Serial Printer setting Serial device servers transform any serial device into an Ethernet capable device that can be used in a network These servers allow serial devices such as a printer control mechanisms or control systems to be used in a network without relying on the serial port of a computer for connectivity This way any serial device...

Страница 81: ...ashion to the Serial Printer option in the COM Ports dialog box This option allows the associated TCP port to be identified as a serial printer connection The connection does not consume a user license is restricted to output only and filters out the end of document marker correctly In this case IP address of USR N5X0 is 172 16 14 12 Fig 106 Serial printer option Fig 107 Serial printer setting wiz...

Страница 82: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 81 Fig 108 Serial printer setting wizard 1 Fig 109 Serial printer setting wizard 1 ...

Страница 83: ...y enable NTP function If this option is chosen the default value cn ntp org cn should be shown in the NTP server field User can select a proper Time Zone from the dropdown box If the N5X0 device is connected to the Internet and should connect to other servers over the Internet to get NTP server you will need to configure the DNS server in order to be able to resolve the host name of the NTP server...

Страница 84: ...nable the SNMP function by checking the Enable box The supported SNMP Version v1 v2c The default SNMP Community Strings or passphrases is admin Fig 112 Enable SNMP agent Table 24 PUSR OID list Item OID IP address 1 3 6 1 2 1 4 20 1 1 172 16 14 12 Subnet mask 1 3 6 1 2 1 4 20 1 3 172 16 14 12 Preferred DNS 1 3 6 1 2 1 12 5 0 Alternate DNS 1 3 6 1 2 1 12 6 0 Gateway 1 3 6 1 2 1 4 21 1 1 172 16 14 12...

Страница 85: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 84 Fig 113 SNMP test ...

Страница 86: ...roker client design eliminates the need for all devices in the system to be online at the same time The clients i e devices or things communicate directly with the broker which plays the role of middleman to pass messages back and forth between clients 8 1 Basic settings When configuring the Broker information Client ID Host and Port are already filled in by default You can also modify it by yours...

Страница 87: ...also need to select to configure Client Certificate File and Client key file Click the choose file button on the far right to select the certificates you have generated Uploads a Certificate Authority CA file A Certificate Authority CA is an entity that issues digital certificates A digital certificate certifies the ownership of a public key by the named subject of the certificate Uploads a client...

Страница 88: ...are filled with 0 and False by default When you enter the values of Last Will Topic and Last Will Payload you can complete the configuration of Will Message Fig 118 Last will message After finishing configuring the basic settings please scroll down to the bottom of the page and click on Save Apply button to save all the changes that you have made All configurations take effect after a system reboo...

Страница 89: ...essage 8 2 1 MQTT fx tool introduction MQTT fx is a mainstream MQTT desktop client Compatible with Windows macOS and Linux it can quickly verify whether it is possible to connect to IoT Hub and publish or subscribe to messages MQTT fx in this article refers to version 1 7 1 without special instructions The main page is shown in the figure below The top part is the MQTT Broker connection address ba...

Страница 90: ... the connection address bar to enter the specific connection configuration Select the Profile Type as MQTT Broker Fill in broker emqx io for Broker Address and 1883 for Broker Port as shown in the figure below Fig 122 Connection Profiles Click OK to confirm the configuration return to the main interface and click Connect It can be seen that the indicator on the right side turns to green indicating...

Страница 91: ...s After finishing configuring the Publish topic1 please scroll down to the bottom of the page and click on Save Apply button to save all the changes that you have made All configurations take effect after a system reboot Fig 124 Add Publish topic Click to enter the Subscribe Tab to enter PubTopic1 in the topic box Then select a QoS level click the Subscribe button and the list of subscribed topics...

Страница 92: ...ial debug assistant on PC and open COM Port with the N5X0 s serial default settings as below Fig 126 Serial debug assistant setting Click send button On the MQTT fx page you will receive a message from the cloud that was sent from the N5X0 For Payload decoded by select JSON Pretty Format Decoder to show the message ...

Страница 93: ...ess After finishing configuring the Publish topic2 please scroll down to the bottom of the page and click on Save Apply button to save all the changes that you have made All configurations take effect after a system reboot Fig 128 Topic distribution mode Click to enter the Subscribe Tab to enter PubTopic2 in the topic box Then select a QoS level click the Subscribe button and the list of subscribe...

Страница 94: ...h serial debug assistant on PC and open COM Port with the N5X0 s serial default settings as below Fig 130 Serial debug assistant setting Enter the correct serial data format test message hello from N5X0 Click send button On the MQTT fx page you will receive a message from the cloud that was sent from the N5X0 ...

Страница 95: ...Save Apply button to save all the changes that you have made All configurations take effect after a system reboot Fig 132 Custom mode Click to enter the Subscribe Tab to enter PubTopic3 in the topic box Then select a QoS level click the Subscribe button and the list of subscribed topics will appear on the left The current number of subscribed topics is 0 as shown in the following figure ...

Страница 96: ...ial debug assistant on PC and open COM Port with the N5X0 s serial default settings as below Fig 134 Serial debug assistant setting Enter the correct serial data format PubTopic3 0 ON message hello from N5X0 Click send button On the MQTT fx page you will receive a message from the cloud that was sent from the N5X0 ...

Страница 97: ...ocess After finishing configuring the Subscribe topic1 please scroll down to the bottom of the page and click on Save Apply button to save all the changes that you have made All configurations take effect after a system reboot Fig 136 Add subscribe topic Click to enter the Publish Tab to enter SubTopic1 in the topic box and enter the message of hello world in the message input box select a QoS lev...

Страница 98: ...r www pusr com 97 Fig 137 Publish message to N5X0 Click Publish to send the messages and return to the serial debug assistant We can find that the serial port has received the message as shown in the following figure Fig 138 Receive message from cloud ...

Страница 99: ...ce required in the network topology as well as overall installation time In addition you can extend the useful life of legacy devices by connecting them to Ethernet and accessing the devices using a preferred protocol TCP UDP HTTP MQTT First users need to enable edge computing function Fig 139 Enable edge computing 9 1 Add modbus slave device Connect serial device to the serial port of N5X0 gatewa...

Страница 100: ... 9 2 1 Register type and offset Table 25 Typical Register Tables Register type Address range Description Coil points 00001 09999 Read function code 0x1 bool values Discrete inputs 10001 19999 Read only function code 0x2 bool values Input registers 30001 39999 Read only function code 0x4 int uint float values Holding registers 40001 49999 Read Write function code 0x3 int uint float values The Modbu...

Страница 101: ...32 ABCD 3 4 2 Unsigned integer 32 bit Big endian uint32 CDAB 3 4 2 Unsigned integer 32 bit Little Endian byte swap float32 ABCD 3 4 2 Float 32 bit Big endian float32 CDAB 3 4 2 Float 32 bit Little Endian byte swap float64 3 4 4 Float 64 bit Note that these could be referred to in different ways for example a 4 Byte Signed Integer might be referred to as a 32 bit Integer in equipment documentation ...

Страница 102: ...guration parameters on this interface is shown in table 19 We use the temperature and humidity data points as an example to describe the process After finishing configuring the data points please scroll down to the bottom of the page and click on Save button to save all the changes that you have made All configurations take effect after a system reboot Fig 144 Sensor register reading After the cor...

Страница 103: ...n as a file and then import the configuration file onto other units at any time Backing up configurations for system recovery The export function allows you to export configuration files that can be imported onto other gateways to restore malfunctioning systems within minutes Troubleshooting Exported configuration files can help administrators to identify system problems that provide useful inform...

Страница 104: ...ame settings Select the target unit first and click the choose file button to import Select the file you want to import and then click the open button The data points setting will display on the webpage After finishing importing the configuration file please scroll down to the bottom of the page and click on Save button to save all the changes that you have made All configurations take effect afte...

Страница 105: ...ct MQTT or AWS IOT channel user need configure the MQTT broker parameters in MQTT Gateway tab or Cloud service tab at first and setting the report topic in the Fig 149 Fig 149 Communication channel select 9 4 2 Report method There are three ways to report the data acquired to the communication channel on change interval timer The description of the configuration parameters on this interface is sho...

Страница 106: ...rrounded by curly braces Every key value pair is separated by a comma The order of the key value pair is irrelevant A JSON array contains zero one or more ordered elements separated by a comma The JSON array is surrounded by square brackets A key value pair consists of a key and a value separated by a colon The key is a string which identifies the key value pair The value can be any of the followi...

Страница 107: ...le 2 service sensor1 temperature temperature1 humidity humidity1 user_define bedroom sensor2 temperature temperature2 humidity humidity2 user_define living room event_time sys_net_time device_id sys_mac We can use a tool to compact it Below is a free online tool https jsonformatter org Paste the message in the column on the left and then click Minify JSON It will show a compact JSON format message...

Страница 108: ...at you have made All configurations take effect after a system reboot Fig 153 Json template setting There are three type data point user define system and register value in a Json template System data points The system data points defined by N5X0 gateway is shown in table 27 Table 27 System data points System data points Description sys_sn SN number sys_mac MAC address sys_hard_ver Hardware versio...

Страница 109: ...ser define In addition to the above two types of data points users can also define your own data points Such as user_define living room 9 4 4 Test We now use modbus slave software to simulate two modbus slave device The connection and and parameters settings are show in Fig 155 Two USB to RS485 converters are connecting PC with serial Port 1 and 2 of N540 gateway We use MQTT fx to connect to the s...

Страница 110: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 109 Fig 155 Modbus slave simulation Fig 156 Data acquisiton setting Fig 157 Data report setting ...

Страница 111: ...rmat Modbus TCP Modbus RTU Firstly user need enable the data query function 9 5 1 Json When select MQTT or AWS IOT channel user need configure the MQTT broker parameters in MQTT Gateway tab or Cloud service tab at first select Json query type and setting the query topic in the Fig 159 The report topic is same as described in section 9 4 1 Fig 159 JSON query type The Json content need conform to te...

Страница 112: ...TCP RTU query type When user select Modbus TCP RTU query type to get data the N5X0 gateway will be confused if there are the same slave address in different serial port or same register address in different slave devices All slave devices and registers on a gateway are planned and managed in a unified manner For example user can map slave address 1 in Port1 to slave 1 in N5X0 gateway map slave add...

Страница 113: ... com 112 Fig 162 Slave address mapping Fig 163 Slave address mapping 9 5 3 Modbus TCP When select socket channel user need configure the socket A parameters in PORT tab at first then select Modbus TCP query type We use slave address mapping here for illustration ...

Страница 114: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 113 Fig 164 Modbus TCP query type Fig 165 Socket A parameters setting ...

Страница 115: ...r com 114 Fig 166 Modbus TCP simulator Fig 167 Modbus TCP response 9 5 4 Modbus RTU When select socket channel user need configure the socket A parameters in PORT tab at first then select Modbus RTU query type We use slave address mapping here for illustration ...

Страница 116: ...User Manual Your TrustWorthy Industrial IoT Partner www pusr com 115 Fig 168 Build a virtual COM 10 Fig 169 Modbus RTU query type Fig 170 Modbus RTU simulator Fig 171 Modbus RTU response ...

Страница 117: ...nt or in connection with the sale of USR IoT products EXCEPT AS SET FORTH IN THE TERMS AND CONDITIONS AS SPECIFIED IN THE LICENSE AGREEMENT FOR THIS PRODUCT USR IoT AND OR ITS AFFILIATES ASSUME NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE...

Отзывы: