USC520 / USC540 User Manual www.usconverters.com 1.1. Default Parameters User name admin Password admin IP address 192.168.0.7 Mask 255.255.255.0 Gateway 192.168.0.1 Work Mode of Port 1 TCP Server Local Port of Port 1 Work Mode of port 2 TCP Server...
2. Overview 2.1. Brief Introduction USC520/USC540 is used to transmit data transparently between TCP/UDP data packets and a RS232/RS485/RS422 interface. It has an ARM processor, low power, fast speed, high stability and two/four serial ports which can work as RS232, RS485 or RS422 serial interface which compiles to industrial standard.
USC520 / USC540 User Manual www.usconverters.com 22. Support one channel Web socket, realize bidirectional transparent transmission between web page and serial side 23. Power supply in two mode, DC adapter or 5.08-2 terminal pin 24. Communication indicator light of two serial port: RX/TX 25.
USC520 / USC540 User Manual www.usconverters.com 2.5. Indicators and DIP switches Indicator Description ① Power Indicate power. On when power is supplied Indicate working status. It blinks when N520/N540 ② Work works well. If it is on or off for a period, N520/N540 works improperly, you should power cycle to restart.
Page 8
USC520 / USC540 User Manual www.usconverters.com For RS232 port, DIP switches are down, such as the below picture. For RS485 port, DIP switches are up, such as the below picture. For RS422 port, DIP switches on the left are up, DIP switch on the light are down, U.S.
USC520 / USC540 User Manual www.usconverters.com 2.6. DB9 Pin Definition For RS232 port, pin definition is as below Definition RX, pin of receives data For RS485 port, pin 3 works as “B(-)”, Pin 7 works as “A+” ...
Once there is an interrupt, it can be detected rapidly then make USC520/USC540 disconnect from former connection and reconnect. It will connect to same source port when USC520/USC540 try to connect server and local port is not “0”. It supports Synchronous baud rate (Similar RCF2217), which can revise USC520/USC540’s serial parameter as baud rate accordingly.
Different from UDP, in this mode, connection has status of disconnected and active. Connection is still active although USC520/USC540 does not send data. USC520/USC540 listens to local port set firstly, respond and build connection when there is a connection request. Serial port will send data to all client which connected with USC520/USC540 at the same time once serial port received data.
USC520/USC540 can handle complex HTTP protocol so user just do programming for serial, and not need to worry about HTTP. When USC520/USC540 sends data to HTTP server via serial port, it only needs to send the header of requested data; All the returned data will be transmitted by USC520/USC540, user need to analyze the packets.
A and socket B at one time. When data comes from socket A and socket B simultaneously, USC520/USC540 will transmit the data of socket A to serial port firstly, and then transmit the data of socket B once the data of socket A finished.
USC520/USC540 supports the transmission of modbus protocol in transparent mode 3.3.2. Modbus RTU to Modbus TCP USC520/USC540 support Modbus RTU to Modbus TCP, settings as below: Open USR-TCP232-M4,E45 Setup Software, set USC520/USC540 as TCP server or TCP client. Select “ModbusTCP” on the red color Click to save the parameter Modbus TCP Configuration U.S.
USC520 / USC540 User Manual www.usconverters.com 4. Check and verify Modbus RTU to Modbus TCP through modbus Poll and Modbus Slave 5. Setting modbus software is as below: 6. Click OK once configuration finished, update the data of modbus slave and modbus data will also be updated.
USC520 / USC540 User Manual www.usconverters.com 3.3.3. Modbus Active Query Function Modbus active query function can be realized through the serial heartbeat packet function of USC520/USC540. 1. Open serial heartbeat packet function via web page, query command is heartbeat packet data, example: 2.
Modbus Poll, support multiple host polling to check parameter. 1. Multiple host polling is realized through virtual com. ① Set parameter of USC520/USC540 via web page, make sure to select ModbusTCP Poll and set overtime ② Open virtual com software to setup serval ports and connects to USC520/USC540 U.S.
Page 21
USC520 / USC540 User Manual www.usconverters.com ③ Open modbus slave software, choose the serial port which connected with USC520/USC540. Run modbus Poll software and make port-forwarding with this serial port. ④ The value of modbus poll will also be changed when you revise the value of modbus slave.
Page 22
USC520 / USC540 User Manual www.usconverters.com ② Open modbus slave software, choose the serial port which connected with USC520/USC540. Run modbus polling softare to select network mode and connect with USC520/USC540. ③ The value of modbus poll will also be changed when you revise the value of modbus slave.
IP. It is static IP192.168.0.7 by default. DHCP is effective after change to DHCP and restart. When USC520/USC540 connects to router or device assigning IP, it require IP address from host within network, which takes about 5-15 seconds. Then you can search N520’s IP address.
USC520 / USC540 User Manual www.usconverters.com 3.4.4. Self-Defined Registration Package Function USC520/USC540 supports self-defined registration package function and also supports to send self-defined registration package after connection establishment, meanwhile, it supports to send registration package when sending data. One example as blow: ①...
Web to serial needs user’s webpage programming ability. Design webpage, request own device’s data and process data then reveal the results on webpage. According to chapter4.1.17 Customized Webpage, can download revised webpage into USC520/USC540 . 1. Build a connection and connect to USC520/USC540 function connectx(){ try{ socket=new WebSocket('ws://'+window.location.host+':6432');...
USC520 / USC540 User Manual www.usconverters.com socket.onerror=sError; socket.onmessage=sMessage; socket.onclose=sClose 2. Receive Data Function function sMessage(msg) 3. Send data function function send() 3.4.6. Network Printing Function Network printing function is similar to printer server, it can be realized by the previous serial printer through the existed printing driver.
① If there is no overflow, m bytes data must be transmitted within n seconds, then the transmitting time of M bytes data: If n >2T, then data will not overflow, USC520/USC540 can work normally. Just need keep n>T under baud rate 9600.
3.4.12. Webpage Port USC520/USC540 has built-in webpage server and the port is 80. Also the port can be revised and visit the web via revised port. 3.4.13. Revise MAC User can check software’s MAC address.
Don’t enable it if device doesn't support Hardware flow control . This function is only run under RS232 port. XoN/XoFF: USC520/USC540 support software flow control function. It is disabled by default. It can be selected under RS232 port or RS422 port.
Build UDP SOCKET, destination IP: 55.255.255.255, destination port: 1901. Low is in front. Setting command process: ① The network send searching command ② USC520/USC540 returns IP address and MAC ③ The network read USC520/USC540’s parameter ④ Organize setting command according to MAC, known user name/password and parameter to be configured.
Page 35
USC520 / USC540 User Manual www.usconverters.com [MAC] [usrname] settings [password] parameter 0x10 [MAC] [usrname] Cloud [password] Notice: Check bit is sum check, starts from length byte (including length) to adding before checking (not including checking), result is check value, only low byte is remained.
Page 36
USC520 / USC540 User Manual www.usconverters.com Basic Parameter: Name Byte Example Explanation ucSequenceN Write the read values ucCRC Write the read values ucVersion Write the read values ucFlags IP address type: 0 in 8 bit: DHCP;1 in 8 bit: Static IP...
Page 37
USC520 / USC540 User Manual www.usconverters.com ② Port settings parameter command Port parameter: Name bytes example Explanation ulBaudRate 00 C2 01 00 Baud Rate ucDataSize COM data bits (0X05/0x06/0x07/0x08) COM parity ucParity 1: no, 2: odd, 3: even, 4: mark, 5: space...
Page 42
Query AT+VER<CR> <CR><LF>+OK=<ver><CR><LF> Parameter: ver: Set/Query the firmware version of USC520/USC540 Gerenal version: AA.BB.CC: AA stands for big version, BB stands for small version number, CC stands for hardware version C.C Custom version: AA.BB.CC.DD-ID; DD stands for customer’s version, ID stands for customer’s ID number...
Page 43
Set AT+ SEARCH <CR> <CR><LF>+OK =< port,keywords><CR><LF> Parameter: port: serching port of USC520/USC540, default 48899 keywords: searching key words of USC520/USC540, Default: www.usr.cn (Max 20 bytes). 9. AT+CLEAR Function: Restore factory setting Format: Set AT+CLEAR<CR>...
Page 44
UDPC: UDP client TCPA: TCP auto WEBUART: websocket, tranmission from webpage to serial port IP: Server’s IP address when USC520/USC540 works as “CLIENT’ Port: Protocol port, decimal number, smaller than 65535 13. AT+DHCPEN Function: Open/close DHCP Server;...
AT+DHCPGW=<Type><CR> <CR><LF>+OK<CR><LF> Parameter Type: On: open DHCP server function Off: close DHCP server function (USC520/USC540 works as wireless switch at this time) 14. AT+WANN Function: Set/query obtained WAN port IP (DHCP/STATIC); Format: Query AT+WANN<CR>...
Page 46
3. Disable network card nothing to do with this testing. Download the [USR-TCP232-M4&E45] Setup software. Search device and all USC520/USC540 devices within LAN. It includes IP, name, MAC and version. Software Configuration—Search 1. Click ‘Device’ on the top of the program and then check user name/password via ‘User config’. If it is correct, it reveals USC520/USC540 information.
Page 49
User name: Authentication Code for revising parameter to avoid other users within same LAN revising it. Password: same as user name. Device Name: USC520/USC540 ’s name an be revised. MAC address: USC520/USC540 ’ MAC IP address type: Static and DHCP ...
Page 50
Destination IP/Port: IP connected when USC520/USC540 works as client (TCP Client/HTTPD Client/UDP Client) Local Port: port USC520/USC540 to connect. Advice to set it to “0’’ when USC520/USC540 works under TCP Client for connection with Random port. TCP Server Type: No.
Need help?
Do you have a question about the USC520 and is the answer not in the manual?
Questions and answers