1 RS232 Protocol. 1.1 RS232 Protocol presentation. 1.2: Decoding. For example:



Similar documents
ND48-RS ASCII A2.04 Communication Protocol

RFID MODULE Mifare Reader / Writer SL025B User Manual Version 1.4 Nov 2012 StrongLink

MAGELLAN CONNECTING TO CASH REGISTER EXPRESS

Binary Representation

Master-Touch and ValuMass. Modbus Communications. INSTRUCTION MANUAL (Rev. 2.1)

How-To Set Custom Scale Format for FedEx Ship Manager

ENTTEC Pixie Driver API Specification

HOST Embedded System. SLAVE EasyMDB interface. Reference Manual EasyMDB RS232-TTL. 1 Introduction

Temp. & humidity Transmitter Instructions

Additional Setup Instructions for Modbus: RTU, ASCII, TCP, Omni & Enron

NHD-0420D3Z-FL-GBW-V3

CHD603BM-U USB Mifare Card Reader User Manual

Barcode Reader Connection Guide (COGNEX SLMP Connection)

MSR605. Programmer s Manual. Magnetic Stripe Card Reader/Writer (High & Low Coercivity) Revision B

RFID MODULE Mifare Reader / Writer SL031 User Manual Version 2.7 Nov 2012 StrongLink

NG360 Inclinometer with digital RS485 communications port and 360 degree measuring range

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

Process Control and Automation using Modbus Protocol

Application Note 2. Using the TCPDIAL & TCPPERM Commands to Connect Two TransPort router Serial Interfaces Over TCP/IP.

eztcp Technical Document Modbus/TCP of eztcp Caution: Specifications of this document may be changed without prior notice for improvement.

1. SAFETY INFORMATION

Virtual Integrated Design Getting started with RS232 Hex Com Tool v6.0

Metrologic MS1690 2D Scanner Installation Guide

NUM INFORMATION US N 111 1/9

The Answer to the 14 Most Frequently Asked Modbus Questions

Introduction: Implementation of the MVI56-MCM module for modbus communications:

RFID MODULE Mifare Reader / Writer SL032 User Manual Version 1.5 Nov 2012 StrongLink

Laser Barcode Scanner User s Manual

USR-TCP232-T Hard Version: V2.0 Doc Version: V

PRT3 Printer Module: ASCII Protocol Programming Instructions

INTMOD485-LH Protocol Converter

S88XPressNetLI v1.0. Installation, user and reference manual KDesign Electronics, PCB design by RoSoft

Interface Protocol v1.2

SMS Alarm Messenger. Setup Software Guide. SMSPro_Setup. Revision [Version 2.2]

Application & Quick-Start Guide

DT105X / PB105 Series

PRODUCT MANUAL SKX OPEN SKX ADVANCE ZN1RX-SKXOPEN. Edition 2 Version 1.1

PROGRAMMING SOFTWARE FOR ASYNCHRONOUS SERIAL ENCODERS AMS / ATS / AMM / ATM

Experts in Chem-Feed and Water Treatment. How To Connect. Aquatrac Training. ProMinent Fluid Controls

Allen-Bradley. Bar Code. 2-D Hand-Held. Programming Guide. Bar Code. Scanners. (Cat. No HTG-4)

HDMI Switch USER MANUAL VS481A

Siemens S (Ethernet)

MTS Master Custom Communications Protocol APPLICATION NOTES

2011, The McGraw-Hill Companies, Inc. Chapter 3

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

1 Serial RS232 to Ethernet Adapter Installation Guide

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Programming and Using the Courier V.Everything Modem for Remote Operation of DDF6000

Serial Communications / Protocol in AirTest Products

How To Send A Message From A Computer To A Computer (Iwea) On A Microsoft Macbook 2.5 (Isoa) To A Microsatellite 2.4 (Ios) On An Unix (Ise

MEMOBUS/Modbus Communications

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Laser Barcode Scanner

1 INTRODUCTION. This document describes the procedure to upgrade LTMR.

LDG Electronics External Meter Serial Communications Protocol Specification

USER MANUAL. VS-81H 8x1 HDMI Switcher MODEL: P/N: Rev 4

RS-485 Protocol Manual

HDMI Matrix Switch USER MANUAL VM0404H

Application Note. Introduction AN2471/D 3/2003. PC Master Software Communication Protocol Specification

Monitor Calibrator Quick Guide

CENTRONICS interface and Parallel Printer Port LPT

NMEA 0183 INSTALLATION AND OPERATING GUIDELINES

Toshiba Serial Driver Help Kepware Technologies

Name Description Model Number. Parameters Min. Typ. Max. Note. Vaux Voltage 9.8 V 12 V 13.2 V Auxiliary Supply Voltage

Knowledge Base Article. Integrating ISONAS Access Control System with TagMaster LR-series RFID Readers

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

POS Integration. Prepared by: Binh Nguyen

SYMETRIX SOLUTIONS: TECH TIP August 2015

How To Use A Powerpoint On A Microsoft Powerpoint 2.5 (Powerpoint 2) With A Microsatellite 2.2 (Powerstation 2) (Powerplant 2.3) (For Microsonde) (Micros

WEB log. Device connection plans

Wifi Web Server Module w TF Socket User s Guide

ADSL Router Quick Installation Guide Revised, edited and illustrated by Neo

LAN / WAN Connection Of Instruments with Serial Interface By Using a Terminal Server

Programming the BetaBrite Classic LED electronic sign

SureServo Communication Parameters SureServo Parameter Memory Addresses Connecting to DirectLogic PLCs...6 8

LBNP RS-232/485/422 serial device server. User manual

HOMEWORKS. RS-232 Protocol. Data Protocol for Communicating with Lutron's HOMEWORKS System

RECON-4 Portable Multi-gas Detector Software Manual

Modbus and ION Technology

SMS based remote control system

HDMI over IP Broadcasting System ITEM NO.: HE05BT, HE05BER HDMI Matrix over IP Broadcasting

Consult protocol, Nissan Technical egroup, Issue 6

User's Guide. Dosimeter Configuration Software ADR-1/60

WIZnet S2E (Serial-to-Ethernet) Device s Configuration Tool Programming Guide

Smarthome SELECT Bluetooth Wireless Stereo Audio Receiver and Amplifier INTRODUCTION

4511 MODBUS RTU. Configuration Manual. HART transparent driver. No. 9107MCM100(1328)

WEB log. Device connection plans

A short description to the VABus protocol

Table of Contents. Creating a VC1000 Network... 3

Data Analysis Software

Catalogue. Write Text Command (A command)...5. Write Variable Command (C command)...7. Write Graphics Command (E command)...8.

RS485 & Modbus Protocol Guide

USB Serial Adapter ICUSB232SM3. Instruction Manual. 1-Port 3ft USB to RS232 DB9 Serial Adapter Cable

Using a USB to Serial adapter and Terminal Emulator in Windows 7 to communicate with a DM101

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

CMC-DN01 DeviceNet Slave Communication Card Operation Manual

Quectel Cellular Engine

Configuring the WT-4 for Upload to a Computer (Ad-hoc Mode)

Table 1 below is a complete list of MPTH commands with descriptions. Table 1 : MPTH Commands. Command Name Code Setting Value Description

Transcription:

1 RS232 Protocol 1.1 RS232 Protocol presentation Bund rate: 19200 BPS Data length: 8bit Stop bit:1bit Parity bit: none Data frame format: Stx: frame start flag, always=02h Item code: data name, valid range 20H~FFH HEX 16Bit Data: valid data ASCII Checksum: 8bit Check sum=itemcode+16bit high byte+16bit low byte (only get the low byte) CR: End of frame always=0dh 1.2: Decoding ASCII When you get 9byte data form the RS232 port: 1: Abnegate the start flag. 1 st =02H? 2: Break out the Item code byte 2 st byte (Item code is the ASCII format, you should decode Item code to hex format) 3: Break out the valid data bytes 3 6byte (Valid data is the ASCII format, you should decode valid data to hex format) 4: Break out the CheckSum byte 7 8 byte (CheckSum is the ASCII format, you should decode CheckSum to hex format) 5: Break out the end byte of frame, 9 byte 0D(always 0D) 6: Colligation all the data of receive frame, you can get the information of receive data. Notice: You can sure the frame is availability if your receive data satisfy three condition of below. 1: the start byte is 02 2: the end byte is 0D 3: checksum= ItemCode+MSB (valid data) +LSB (valid data) only get low byte If the receive frame not satisfy these three condition at the same time, this frame is invalidation. For example:

Example1 CO2 decode: Receive data: 02 50 30 32 46 38 34 41 0D 50 Item Code of receive value.(item Code) The Hex format of Item code, 50 the hex format of letter P 30 32 46 38 valid data (Data1 Data2 Data3 Data4) 30 ASCII code of number 0 32 ASCII code of number 2 46 ASCII code of number F 38 ASCII code of number 8 Valid data is 0x02F8 34 41 CheckSum value.(checksum1 CheckSum2) 34 ASCII code of number 4 41 ASCII code of number A 4A=50+02+F8 only get low byte Colligation all the data of this frame, we got the hex format of CO2 concentration (02F8) H, from this example, you know the CO2 concentration is (02F8) H== (760) D ppm Example2 Temperature decode: Receive data: 02 42 31 32 38 41 44 45 0D 50 Item Code of receive value. (Item Code) The Hex format of Item code, 42 the hex format of letter B temperature Item Code. 31 32 38 41 valid data (Data1 Data2 Data3 Data4) 31 ASCII code of number 1 32 ASCII code of number 2 38 ASCII code of number 8 41 ASCII code of number A Valid data is 0x128A 44 45 CheckSum value.(checksum1 CheckSum2) 44 ASCII code of number D 45 ASCII code of number E DE=50+12+8A only get low byte Colligation all the data of this frame, we got the hex format of temperature (128A) H= (4746) D

Temperature DegC=4746/16-273.15=23.475 =23.475*9/5+32=74.255. Example3 RH decode: Receive data: 02 30 44 44 33 32 31 45 0D 41 Item Code of receive value. (Item Code) The Hex format of Item code, 41 the hex format of letter A RH Item Code. 30 44 44 33 valid data (Data1 Data2 Data3 Data4) 30 ASCII code of number 0 44 ASCII code of number D 44 ASCII code of number D 33 ASCII code of number 3 Valid data is 0x0DD3 32 31 CheckSum value.(checksum1 CheckSum2) 32 ASCII code of number 2 31 ASCII code of number 1 21=41+0D+D3 only get low byte Colligation all the data of this frame, we got the hex format of RH (0DD3) H= (3539) D RH*100=3539/100=35.39, RH=35.39%. 1.3: RS232 Communication cable manufacture The communication cable sort(right to left):rj45 brown brown-white green green-white blue blue-white yellow yellow-white. RS232 Port:brown port 2, brown-white port 3,blue port 5. The cable RJ45 input ZGw08VRC,RS232 input to PC s serial port Diagram 1 (communication connect photo)

RJ45 right to left: brown brown-white green green-white blue blue-white yellow yellow-white Diagram 2 (RJ45 photo)

brown port 2, brown-white port 3,blue port 5. The other wire cut off Diagram 3 (RS232 photo)

Diagram 4 (Communication Cable) 2 How to calibrate detector 2.1 Calibration in factory Use standard gas, with 3 point calibration method. 2.2 Calibration by user With zero calibration method, the calibration scope is 0~65535ppm. If we know the environment CO2 concentration is 1000ppm, and the detector display 1070ppm, We know the CO2 concentration exceed about 70ppm, so we should decrease 70ppm. Write -70ppm to the detector, (-70) D= (FFBA) H

Write 02 5D 46 46 42 41 31 36 0D 5D Item Code of receive value. (Item Code) The Hex format of Item code, 5D the hex format of letter ] zero calibration Item Code. 46 46 42 41 valid data (Data1 Data2 Data3 Data4) 46 ASCII code of number F 46 ASCII code of number F 42 ASCII code of number B 41 ASCII code of number A Valid data is 0xFFBA 31 36 CheckSum value.(checksum1 CheckSum2) 31 ASCII code of number 1 36 ASCII code of number 6 16=5D+FF+BA only get low byte Write 02 5D 46 46 42 41 31 36 0D to detector, finish zero calibration. Exanalogia: If we know the environment CO2 concentration is 1000ppm, and the detector display 950ppm. We need write 50ppm to detector, (50) D= (0032) H send 02 5D 30 30 33 32 38 46 0D to detector, Bingo. End