U.S. Converters RS232 User Manual

Manual is about: Serial Ethernet Converter (RS232, RS485, RS422) Industrial Panel Mount, 2 Ports

Summary of RS232

  • Page 1

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 1 / 52 copyrights © u.S. Converters 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 pan...

  • Page 2

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 2 / 52 copyrights © u.S. Converters contents 2. Overview ......................................................................................................................................................... 4 2.1. Brief introdu...

  • Page 3

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 3 / 52 copyrights © u.S. Converters 3.5.17. Reset ...................................................................................................................................... 33 4. Setting protocol ..........................

  • Page 4

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 4 / 52 copyrights © u.S. Converters 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 23 work mode of port 2 tcp...

  • Page 5: 2.  Overview

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 5 / 52 copyrights © u.S. Converters 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 s...

  • Page 6

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 6 / 52 copyrights © u.S. Converters 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. Communicati...

  • Page 7

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 7 / 52 copyrights © u.S. Converters 2.5. Indicators and dip switches indicator description ①power indicate power. On when power is supplied ②work indicate working status. It blinks when n520/n540 works well. If it is on or off for ...

  • Page 8

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 8 / 52 copyrights © u.S. Converters  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...

  • Page 9

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 9 / 52 copyrights © u.S. Converters 2.6. Db9 pin definition  for rs232 port, pin definition is as below  for rs485 port, pin 3 works as “b(-)”, pin 7 works as “a+”  for rs422 port pin definition 2 rx, pin of receives data 3 tx 5...

  • Page 10: 3.  Product Function

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 10 / 52 copyrights © u.S. Converters 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 ...

  • Page 11

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 11 / 52 copyrights © u.S. Converters 3.1. Socket a communication 3.1.1. Tcp client model 4.1.1 tcp client mode 1) different from udp mode, in this mode, connection has status of ‘disconnected’ and active. Connection is still active...

  • Page 12

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 12 / 52 copyrights © u.S. Converters 3.1.2. Tcp server mode 1) different from udp, in this mode, connection has status of disconnected and active. Connection is still active although usc520/usc540 does not send data. 2) usc520/usc5...

  • Page 13: Tcp

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 13 / 52 copyrights © u.S. Converters 3.1.5. Tcp and udp comparison tcp udp advantages stable, no loss reliable connection mechanism resend after data sending fails no connection mechanism, simple, flexible suit for small packet and...

  • Page 14

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 14 / 52 copyrights © u.S. Converters httpd client test screenshot 3.2. Socket b communication usc520/usc540 support double socket communication mode, socket a and socket b. One serial port corresponding to two socket communication ...

  • Page 15

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 15 / 52 copyrights © u.S. Converters.

  • Page 16

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 16 / 52 copyrights © u.S. Converters 3.3. Modbus gateway 3.3.1. Transmit modbus protocol in transparent mode usc520/usc540 supports the transmission of modbus protocol in transparent mode 3.3.2. Modbus rtu to modbus tcp usc520/usc5...

  • Page 17

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 17 / 52 copyrights © u.S. Converters 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...

  • Page 18

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 18 / 52 copyrights © u.S. Converters 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 p...

  • Page 19

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 19 / 52 copyrights © u.S. Converters 3. Return result for query command is as drawing:.

  • Page 20

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 20 / 52 copyrights © u.S. Converters 3.3.4. Modbus polling function usc520/usc540 support modbus polling function under tcp server mode. Set usc520/usc540 as modbus poll, support multiple host polling to check parameter. 1. Multipl...

  • Page 21

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 21 / 52 copyrights © u.S. Converters ③ 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 ...

  • Page 22

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 22 / 52 copyrights © u.S. Converters ② 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 p...

  • Page 23

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 23 / 52 copyrights © u.S. Converters when using modbus polling function. If polling interval is too shot and baud rate is too low for the process of polling command which might lead to conflict between command circle and polling ti...

  • Page 24

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 24 / 52 copyrights © u.S. Converters 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 ...

  • Page 25

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 25 / 52 copyrights © u.S. Converters 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 e...

  • Page 26

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 26 / 52 copyrights © u.S. Converters ② test result:.

  • Page 27

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 27 / 52 copyrights © u.S. Converters 3.4.5. Web to serial web to serial function can make interaction between webpage and serial. 1. Set port 6432 as default. 2. Open webpage and click “web to serial”. It pops up “connect success” ...

  • Page 28

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 28 / 52 copyrights © u.S. Converters 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 n...

  • Page 29

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 29 / 52 copyrights © u.S. Converters ② 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.

  • Page 30

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 30 / 52 copyrights © u.S. Converters 3.4.7. Serial port packaging mechanism usc520/usc540 can configure serial port packaging time and serial port packaging length. Usc520/usc540 will make packaging for the data of serial port acco...

  • Page 31

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 31 / 52 copyrights © u.S. Converters speed, user have to control the flow, if not the problem of data overflow on serial port side will occur. So data flow is required to calculated when sending data from network to serial port. Ex...

  • Page 32

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 32 / 52 copyrights © u.S. Converters 01 6 bits 10 7 bits 11 8bits 2 stop bit 00 1 bit 01 2bits 3 parity enable 00 disable parity 01 enable parity 5:4 parity type 00 odd 01 even 10 mark 11 clear 8:6 nc 000 0 using methods: 1. Usr-tc...

  • Page 33: 4.  Setting Protocol

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 33 / 52 copyrights © u.S. Converters customized mac. 3.4.14. Firmware upgrade firmware upgrade is fulfilled via network. For details, please refer to chapter 5.1 configure parameter with configuration software. 3.4.15. Hardware flo...

  • Page 34

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 34 / 52 copyrights © u.S. Converters 4.1. Network setting protocol 4.1.1. Set parameter process 1. Build socket: build udp socket, destination ip: 55.255.255.255, destination port: 1901. Low is in front. 2. Setting command process:...

  • Page 35

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 35 / 52 copyrights © u.S. Converters com 2 settings ff xx 08 [mac] [usrname] [password] com parameter xx usr cloud 0x10 [mac] [usrname] [password] notice: check bit is sum check, starts from length byte (including length) to adding...

  • Page 36

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 36 / 52 copyrights © u.S. Converters basic parameter: name byte example explanation ucsequencen um 1 xx write the read values uccrc 1 xx write the read values ucversion 1 xx write the read values ucflags 1 80 ip address type: 0 in ...

  • Page 37

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 37 / 52 copyrights © u.S. Converters ② port settings parameter command port parameter: name bytes example explanation ulbaudrate 4 00 c2 01 00 baud rate ucdatasize 1 08 com data bits (0x05/0x06/0x07/0x08) ucparity 1 01 com parity 1...

  • Page 38

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 38 / 52 copyrights © u.S. Converters 4.1.3. Commands’ return content 1. Return results of search command return command: bytes name example explanation 0 tag_status ff 1 packet_length 24 2 cmd_discover_targ et 01 3 board_type 00 4 ...

  • Page 39

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 39 / 52 copyrights © u.S. Converters parameter directly. Returned content: 193 (basic parameter+serial parameter+serial parameter) 4. Return results of save settings command if settings are correct, it returns: ff 01 04 4b 5. Retur...

  • Page 40

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 40 / 52 copyrights © u.S. Converters 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 paramete...

  • Page 41

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 41 / 52 copyrights © u.S. Converters 4.2.2. Enter at command mode ① send +++ to usc520/usc540 through serial port ② usc520/usc540 return ‘a’ ③ need reply “a” within 3s once received previous ‘a’ ④ return+ok to enter at command mode...

  • Page 42

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 42 / 52 copyrights © u.S. Converters  date xxxx.Xx.Xx (for example 2014.01.02 stands for january 2 nd , 2014). 4. At+ver  function: set/query firmware version  format:  query at+ver +ok=  parameter:  ver: set/query the firmwa...

  • Page 43

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 43 / 52 copyrights © u.S. Converters  password: password, supports max 5 bytes 8. At+webport  function: set/query web server port of usc520/usc540  format:  query at+webport +ok=  set at+webport +ok =  parameter:  port: web ...

  • Page 44

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 44 / 52 copyrights © u.S. Converters  parameter:  baudrate: baud rate  9600,19200,38400,57600,115200,230400,380400,460800  data_bits: data bits 5,6,7,8  stop_bits: stop bits 1,1.5,2 (which module supports)  parity: check bit ...

  • Page 45

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 45 / 52 copyrights © u.S. Converters  format:  query at+dhcpen +ok=  set at+dhcpgw= +ok  parameter  type:  on: open dhcp server function  off: close dhcp server function (usc520/usc540 works as wireless switch at this time) ...

  • Page 46

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 46 / 52 copyrights © u.S. Converters 1. Usc520/usc540 and setup software pc are within same lan. 2. Disable the anti-virus software and firewall on pc. 3. Disable network card nothing to do with this testing. Download the [usr-tcp2...

  • Page 47

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 47 / 52 copyrights © u.S. Converters 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...

  • Page 48

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 48 / 52 copyrights © u.S. Converters software configuration --full show.

  • Page 49

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 49 / 52 copyrights © u.S. Converters software configuration-base save  websocket port: refer to chapter 4.1.8.3 webpage to serial  webpage port: it is 80 by default when visit webpage.  device id: refer to chapter 4.1.8.6 device...

  • Page 50

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 50 / 52 copyrights © u.S. Converters 3. Port configuration ( port1 / port2 configuration) click the com to set, revise parameter then click “save com1”. Software configuration-com 1 configuration  serial baud rate: it can be stand...

  • Page 51

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 51 / 52 copyrights © u.S. Converters  serial pack length: relate to serial unpacking mechanism.  similar rfc2217: please refer to chapter 3.5.10 similar rfc2217 4. Firmware upgrade if usc520/usc540 need to upgrade with new firmwa...

  • Page 52

    Usc520 / usc540 user manual www.Usconverters.Com u.S. Converters llc 52 / 52 copyrights © u.S. Converters firmware upgrade.