U.S. Converters USC520 User Manual

Serial ethernet converter (rs232, rs485, rs422) industrial panel mount, 2 ports

Advertisement

Quick Links

U.S. Converters LLC
USC520 / USC540 User Manual
User Manual for
Serial Ethernet Converter (RS232, RS485, RS422)
Industrial Panel Mount, 2 Ports
Serial Ethernet Converter (RS232, RS485, RS422)
Industrial Panel Mount, 4 Ports
USC520:
USC540:
1 / 52
www.usconverters.com
File Version: V1.0.4
Copyrights © U.S. Converters

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the USC520 and is the answer not in the manual?

Questions and answers

Summary of Contents for U.S. Converters USC520

  • Page 1 USC520 / USC540 User Manual www.usconverters.com User Manual for USC520: Serial Ethernet Converter (RS232, RS485, RS422) Industrial Panel Mount, 2 Ports File Version: V1.0.4 USC540: Serial Ethernet Converter (RS232, RS485, RS422) Industrial Panel Mount, 4 Ports U.S. Converters LLC 1 / 52...
  • Page 2: Table Of Contents

    USC520 / USC540 User Manual www.usconverters.com Contents 2. Overview ................................. 4 2.1. Brief Introduction ..........................5 2.2. Features ............................... 5 2.3. Basic Parameter ........................... 6 2.4. Dimension ............................6 2.5. Indicators and DIP switches ......................... 7 2.6. DB9 Pin Definition ..........................9 3.
  • Page 3 USC520 / USC540 User Manual www.usconverters.com 3.5.17. Reset ............................33 4. Setting Protocol ............................33 4.1. Network Setting Protocol ........................33 4.1.1. Set Parameter Process ......................33 4.1.2. Setting Command Content ...................... 34 4.1.3. Commands’ Return Content ....................38 4.2. Serial Setting Protocol ........................39 4.2.1.
  • Page 4: Default Parameters

    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...
  • Page 5: Overview

    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.
  • Page 6: Basic Parameter

    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.
  • Page 7: Indicators And Dip Switches

    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.
  • Page 9: Db9 Pin Definition

    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+” ...
  • Page 10: Product Function

    USC520 / USC540 User Manual www.usconverters.com 3. Product Function The following is function diagram of USC520/USC540 USC520/USC540 Function Diagram Each serial port corresponds to two sockets: socket A and socket B. Socket B can be enabled or disabled. U.S. Converters LLC 10 / 52 Copyrights ©...
  • Page 11: Socket A Communication

    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.
  • Page 12: Tcp Server Mode

    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.
  • Page 13: Tcp And Udp Comparison

    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.
  • Page 14: Socket B Communication

    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.
  • Page 15 USC520 / USC540 User Manual www.usconverters.com U.S. Converters LLC 15 / 52 Copyrights © U.S. Converters...
  • Page 16: Modbus Gateway

    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.
  • Page 17: Modbus Rtu To Modbus Tcp

    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.
  • Page 18: Modbus Active Query Function

    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.
  • Page 19 USC520 / USC540 User Manual www.usconverters.com 3. Return result for query command is as drawing: U.S. Converters LLC 19 / 52 Copyrights © U.S. Converters...
  • Page 20: Modbus Polling Function

    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.
  • Page 23: Extra Functions

    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.
  • Page 24: Self-Defined Heartbeat Function

    USC520 / USC540 User Manual www.usconverters.com 3.4.3. Self-Defined Heartbeat Function USC520/USC540 supports heartbeat function. Heartbeat is divided into network heartbeat and serial port heartbeat. ① Set Network heartbeat through web page Drawing 26 - Self-Defined Heartbeat Function U.S. Converters LLC 24 / 52 Copyrights ©...
  • Page 25: Self-Defined Registration Package Function

    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: ①...
  • Page 26 USC520 / USC540 User Manual www.usconverters.com ② Test result: U.S. Converters LLC 26 / 52 Copyrights © U.S. Converters...
  • Page 27: Web To Serial

    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');...
  • Page 28: Network Printing Function

    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.
  • Page 29 USC520 / USC540 User Manual www.usconverters.com ② Set Printer Driver Click next and input the USC520/USC540’IP address,then keep clicking next til finished ③ Serial port connects to the printer, open a word file to print U.S. Converters LLC 29 / 52 Copyrights ©...
  • Page 30: Serial Port Packaging Mechanism

    0.1ms. T= 1/baud rate*10*4 3.4.8. Flow Calculation When USC520/USC540 receives data from network and then send to serial port, as the limit of serial port U.S. Converters LLC 30 / 52 Copyrights © U.S. Converters...
  • Page 31: Synchronous Baud Rate (Rfc2217)

    ① 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.
  • Page 32: Keepalive

    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.
  • Page 33: Firmware Upgrade

    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.
  • Page 34: Set Parameter Process

    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 38: Commands' Return Content

    FF 01 02 45, if user name and password are wrong, 45 = 'E' Return results of read command Description: Return all parameter of USC520/USC540 network. 193 bytes in total, no parity, no protocol, return U.S. Converters LLC 38 / 52 Copyrights ©...
  • Page 39: Serial Setting Protocol

    USC520 / USC540 User Manual www.usconverters.com parameter directly. Returned content: 193 (basic parameter+serial parameter+serial parameter) Return results of save settings command If settings are correct, it returns: FF 01 04 4B Return results of basic settings command FF 01 05 4B...
  • Page 40 USC520 / USC540 User Manual www.usconverters.com CLEAR Factory reset UART Set/query serial port 0 parameter UART1 Set/query serial port 1 parameter SOCK Set/query port 0 network SOCKETA parameter SOCK1 Set/query port 1 network SOCKETA parameter SOCKB Set/query port 0 network SOCKETB parameter...
  • Page 41: Enter At Command Mode

    Change work mode from command mode to transparent transmission mode after run this command correctly 3. AT+Z  Function: Re-start USC520/USC540  Format:  Set AT+Z<CR> <CR><LF>+OK<CR><LF> Parameter: N/M <Notice>: USC520/USC540 will re-start after run this command correctly. U.S. Converters LLC 41 / 52 Copyrights © U.S. Converters...
  • 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;...
  • Page 45: Parameter Configuration

    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 47 USC520 / USC540 User Manual www.usconverters.com Software Configuration-Password 2. Basic parameter configuration Click “Full Show” and all basic parameter is revealed. Set the parameter as needs and click “Base Save” then can set successfully. U.S. Converters LLC 47 / 52 Copyrights ©...
  • Page 48 USC520 / USC540 User Manual www.usconverters.com Software Configuration --Full Show U.S. Converters LLC 48 / 52 Copyrights © U.S. Converters...
  • 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.
  • Page 51 Similar RFC2217: Please refer to Chapter 3.5.10 Similar RFC2217 4. Firmware Upgrade If USC520/USC540 need to upgrade with new firmware, please contact USR sales. During firmware upgrade, USC520/USC540 connects to PC directly. PC Upgrade via Wi-Fi is prohibited. U.S. Converters LLC 51 / 52 Copyrights ©...
  • Page 52 USC520 / USC540 User Manual www.usconverters.com Firmware Upgrade U.S. Converters LLC 52 / 52 Copyrights © U.S. Converters...

This manual is also suitable for:

Rs422Rs232Usc540Rs485

Table of Contents