Wuxi-Gold-Serial-Communications-Protocol: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
AIBUS Communication Interface Protocol Instruction | AIBUS Communication Interface Protocol Instruction | ||
Version 7.0 | Version 7.0 | ||
| Line 13: | Line 12: | ||
* An RS485 communication interface can connect to up to 80 instruments. | * An RS485 communication interface can connect to up to 80 instruments. | ||
Interface Specifications: | Interface Specifications: <br><br> | ||
AI series instrument apply asynchronous serial communication interface, and are RS232C and RS485 | |||
compatible. The data structure is 1 start bit + 8 data bit + 1 or 2 stop bit. The communication baud | AI series instrument apply asynchronous serial communication interface, and are RS232C and RS485 compatible. The data structure is 1 start bit + 8 data bit + 1 or 2 stop bit. The communication baud rate are selectable from 1200 to 19200 bit/second, generally 9600 bit/S. When a communication port connect to more than 40 instruments or quicker refresh speed is needed, 19200bit/S is recommended. When the communication is not stable, 4800bit/S is recommended. If RS232C communication interface is used, a computer communication port can connect to 1 instrument. If RS485 interface is used, a communication port can connect to up to 80 instruments. | ||
rate are selectable from 1200 to 19200 bit/second, generally 9600 bit/S. When a communication port | |||
connect to more than 40 instruments or quicker refresh speed is needed, 19200bit/S is recommended. | RS485 communication interface is superior to RS232. The communication distance of RS485 can be longer than 1KM, and multiple instruments can communicate with computer through only two wires. A computer with RS232C communication port or USB port can realize RS485 communication by a RS232/RS485 or USB/RS485 communication interface converter. Yudian specially developed its own RS232/RS485 and USB/RS485 interface converter. Compared to competing products, it is smaller, can run without initialization or power supply, and provides protection from thunderbolt. According to RS485 standard, a communication line can only connect maximum 32 of instruments or computers unless a repeater is installed or communication interfaces with special chip such as 75LBC184 or MAX487 are used. Yudian communication interface adopts 75LBC184 chip, can connect up to 60 instruments without repeater, and provides protection from thunderbolt and static electricity. The RS232C and RS485 communication interfaces of AI instruments apply electric isolation technology to separate the communication interface and the other part of the instrument circuit. When an instrument can work, it won’t affect other instruments. If there is any problem with communication or with the computer, the instrument can still work well, and can be operated by its front panel. The 16 bit ECC can guarantee the reliability of the data. In case of communication malfunction, for example, when there are instruments with same address or there are products from other company, due to the 16 bit ECC, the instruments and computers can still independently work well without data confusion. Therefore, the distributed control system composed by AI instruments has high reliability. The control computer can be common PC which has rich software resource and is developing very fast. The AI application software for control computer can work in WINDOWS operating system. It is powerful and has friendly user interface. The Yudain AIDCS is cheaper than traditional DCS, but its performance and reliability are better. | ||
When the communication is not stable, 4800bit/S is recommended. | |||
If RS232C communication interface is used, a computer communication port can connect to 1 | <br><br> | ||
instrument. If RS485 interface is used, a communication port can connect to up to 80 instruments. | |||
RS485 communication interface is superior to RS232. The communication distance of RS485 can be | |||
longer than 1KM, and multiple instruments can communicate with computer through only two wires. | |||
A computer with RS232C communication port or USB port can realize RS485 communication by a | |||
RS232/RS485 or USB/RS485 communication interface converter. Yudian specially developed its | |||
own RS232/RS485 and USB/RS485 interface converter. Compared to competing products, it is | |||
smaller, can run without initialization or power supply, and provides protection from thunderbolt. | |||
According to RS485 standard, a communication line can only connect maximum 32 of instruments or | |||
computers unless a repeater is installed or communication interfaces with special chip such as | |||
75LBC184 or MAX487 are used. Yudian communication interface adopts 75LBC184 chip, can | |||
connect up to 60 instruments without repeater, and provides protection from thunderbolt and static | |||
electricity. | |||
The RS232C and RS485 communication interfaces of AI instruments apply electric isolation | |||
technology to separate the communication interface and the other part of the instrument circuit. | |||
When an instrument can work, it won’t affect other instruments. If there is any problem with | |||
communication or with the computer, the instrument can still work well, and can be operated by its | |||
front panel. The 16 bit ECC can guarantee the reliability of the data. In case of communication | |||
malfunction, for example, when there are instruments with same address or there are products from | |||
other company, due to the 16 bit ECC, the instruments and computers can still independently work | |||
well without data confusion. Therefore, the distributed control system composed by AI instruments | |||
has high reliability. | |||
The control computer can be common PC which has rich software resource and is developing very fast. | |||
The AI application software for control computer can work in WINDOWS operating system. It is | |||
powerful and has friendly user interface. The Yudain AIDCS is cheaper than traditional DCS, but its | |||
performance and reliability are better. | |||
Communication Instruction: | Communication Instruction: | ||
Instructions and data of AI instruments are in hexadecimal structure. After optimization, the | Instructions and data of AI instruments are in hexadecimal structure. After optimization, the | ||
Revision as of 23:29, 3 March 2008
AIBUS Communication Interface Protocol Instruction Version 7.0 Summary: AIBUS is the communication protocol for Yudian AI series instruments. It features:
- Performs powerful functions by simple instructions.
- High speed. 3-10 times faster than other protocols (for example MODBUS), and suitable for
building large system.
- Applies 16 bit summation ECC (error correction code) and provides reliable communication.
- Supports baud rate of 1200, 2400, 4800, 9600 and 19200. With baud rate 19200, the average
communication time to access an AI-7 or AI-8 series instrument is 20ms, and that of an AI-5 series instrument is 50ms.
- An RS485 communication interface can connect to up to 80 instruments.
Interface Specifications:
AI series instrument apply asynchronous serial communication interface, and are RS232C and RS485 compatible. The data structure is 1 start bit + 8 data bit + 1 or 2 stop bit. The communication baud rate are selectable from 1200 to 19200 bit/second, generally 9600 bit/S. When a communication port connect to more than 40 instruments or quicker refresh speed is needed, 19200bit/S is recommended. When the communication is not stable, 4800bit/S is recommended. If RS232C communication interface is used, a computer communication port can connect to 1 instrument. If RS485 interface is used, a communication port can connect to up to 80 instruments.
RS485 communication interface is superior to RS232. The communication distance of RS485 can be longer than 1KM, and multiple instruments can communicate with computer through only two wires. A computer with RS232C communication port or USB port can realize RS485 communication by a RS232/RS485 or USB/RS485 communication interface converter. Yudian specially developed its own RS232/RS485 and USB/RS485 interface converter. Compared to competing products, it is smaller, can run without initialization or power supply, and provides protection from thunderbolt. According to RS485 standard, a communication line can only connect maximum 32 of instruments or computers unless a repeater is installed or communication interfaces with special chip such as 75LBC184 or MAX487 are used. Yudian communication interface adopts 75LBC184 chip, can connect up to 60 instruments without repeater, and provides protection from thunderbolt and static electricity. The RS232C and RS485 communication interfaces of AI instruments apply electric isolation technology to separate the communication interface and the other part of the instrument circuit. When an instrument can work, it won’t affect other instruments. If there is any problem with communication or with the computer, the instrument can still work well, and can be operated by its front panel. The 16 bit ECC can guarantee the reliability of the data. In case of communication malfunction, for example, when there are instruments with same address or there are products from other company, due to the 16 bit ECC, the instruments and computers can still independently work well without data confusion. Therefore, the distributed control system composed by AI instruments has high reliability. The control computer can be common PC which has rich software resource and is developing very fast. The AI application software for control computer can work in WINDOWS operating system. It is powerful and has friendly user interface. The Yudain AIDCS is cheaper than traditional DCS, but its performance and reliability are better.
Communication Instruction:
Instructions and data of AI instruments are in hexadecimal structure. After optimization, the
instructions are condensed to two: one is reading, another is writing. This is very simple but can full
control the instrument.
The reading/writing instructions are as below:
READ : address code + 52H (82) + code of the parameter to be read + 0 + 0 + ECC.
WRITE : address code + 43H(67) + code of the parameter to be written + LSB of the value to be
written + MSB of the value to be written + ECC.
1. Address code:
Every instrument in the same communication line should have a unique address which is from 0
to 80. So one communication line can connect to up to 81 AI instruments. The instrument address
is defined by parameter “Addr”.
The instrument address code is a two byte integer with every byte from 128 to 208 (80H to D0H
hexadecimal), and the two byte are all equal to instrument adress+80H. For example, if the
instrument address is 10 (0AH, 0AH+80H=8AH), then the address code is 8A8AH.
For multi-channel instruments, every active channel take one unique address. For example, an
AI-7048 has 4 channels of controls, and takes 4 addresses. If Addr=5, then 5,6,7,8 are the
communication address for its 4 channels.
2. Parameter code:
a parameter of AI instrument is represented by a parameter code which is one byte in
hexadecimal format. The parameter code was summarized as below.
Address
Controller
AI-708/808/708P/808P
Multi-channel
Indictor
Flow Totalizer
AI-708H/Y
Frequency
controller /IO
Controller V7.5
(AI-501/701/519/7048
(V7.0 ~ V7.1) AI-702/704/706M
(V7.6)
module
AI-301M
)
00H
SV (setpoint)
or SteP (program segment)
SV (batch
control setpoint)
SV (Frequency
control
setpoint)
SP1 or SP2
or SteP (program type)
01H
HIAL
(High limit alarm)
HIA(X) FHIA HIAL
HIAL*
(High limit alarm)
02H
LoAL
(Low limit alarm)
LoA(X) FLoA LoAL
LOAL*
(Low limit alarm)
03H
dHAL (Deviation High
limit alarm)
SPE dHAL
HdAL (deviation high
limit alarm)
04H
dLAL (Deviation low limit
alarm)
Act dLAL
LdAL (deviation low
limit alarm)
05H dF (Dead band) dF(X) Esn dF AHYS* (hysteresis)
06H
Ctrl
(Control mode)
FSc Ctrl
At *
(auto-tuning switch)
07H
M5
(Hold parameter)
PdIH M5
P
(proportional band)
08H P (Rating parameter) CSc P I (integral time)
09H t (Lag parameter) CdIH t d (derivative time)
0AH CtI (Control period) Cut CtI
CtI
0BH Sn (Input specification) Sn(X) FdIH
Frd
(Frequency
range)
InP (input
specification)
0CH
dIP (Decimal point
position)
dIP (X) FdIP dIP
dPt (Decimal point
position)
0DH dIL (Input low limit) Dil(X) PA dIL SCL (Input low Limt)
0EH dIH (Input high limit) dIH(X) Po dIH SCH (Input high limt)
0FH
ALP (Alarm output
allocation)
ALP(X) Co ALP
AOP (Alarm output
allocation)
10H Sc (Input offset) Sc (X) Frd Switch status SCb (Input offset)
11H OP1 (Output mode)
oPn (retransmission
output channel)
CF oP1
OPt (output mode)
12H OPL (mV output low limit)
IoL (retransmission
Low limit)
Bc OPL
OPL
13H
OPH (mV output high
limit)
IoH (retransmission
high limt)
IoL OPH
OPH
14H CF (function selection)
AF (function
selection)
FoH CF
AF (Advanced
function selection)
15H
Instrument model identifier
or program status code
(program type)
Model identifier Model identifier
Model
identifier
Model identifier
16H
addr (communication
address)
addr addr addr
Addr
17H dL (input filter) dL Ioh dL FILt (input filter)
18H run (Run paramenter)
no/nc (NO/NC
selection)
Dl Run
A-M (auto/manual
selection)
19H Loc (Parameter Lock) Loc Loc Loc
Loc
1AH
MV (manual output value)
Or C01 (for program type)
Spare Spare MV
MV
1BH t01 spare FDF
nonc (NO/NC
selection)
1CH C02 CHIA
unit (measurement
unit)
1DH t02 CLOA CtrL (control mode)
1EH C03 PHIA
Act (direct/reverse
action)
1FH t03 PLOA
CHYS (control
hysteresis)
20H C04 ALP
Fru (unit and power
frequency selection)
21H t04 FSB
Aut (auxiliary output
type)
22H C05 CDIP OPrt (soft-start)
23H t05 PDIP
OHEF (work range of
OPH)
24H C06 PSc
SPr (start slope
control)
25H t06 CLN
SPL (low limit of
setpoint)
26H C07 FLJH
SPH (upper limit of
setpoint)
27H t07 FLJL SP1 (setpoint 1)
28H C08 EJH SP2 (setpoint 2)
29H t08 EJL
2AH C09
Batch
accumulation
clear
2BH –
55H
T09 – C31 (program data)
56H Running time (read only)
57H
MV (manual output value,
for program type only)
Remarks:
1) No return for reading any parameter code not included in the above table. AI-501 and 701 have
only part of the above parameters, the operation on a parameter code that AI-501/701 doesn’t
possess is actually operated on parameter “SP1”.
2) The 1AH is the manual output value in the instruments with manual control function.
3) 15H is the instrument model specification:
Model Model Identifier
AI-518/708/808(V7.1) =Baud rate (4800/9600/19200)
AI-518P/708P/808P(V7.1) = program control byte (<256)
AI-501 = baud rate (compatible mode) or 1501 (made to order)
AI-701 = baud rate (compatible mode) or 1701 (made to order)
AI-519(V7.5) = baud rate (compatible mode) or 1519 (made to order),
selectable by parameter AF
AI-702M/704M/706M 768
AI-708H/808H (flow channel) 256 (common accumulation mode); 258 (batch control
mode)
AI-808H (temperature/pressure channel) 257
AI-301M 512
AI-7048 7048
For AI-708P/808P series instruments, 15H is the program control digit. The MSB (Most Significant
Byte) is 0, the LSB (Least Significant Byte) is as below:
(X) (X) (X) (X) (EV2) (EV1) (HOLD) (STOP)
The first four bits are not applicable.
HOLD and STOP = 0, program run
STOP = 0, HOLD = 1, program pause
STOP = 1, HOLD = 1, program stop
EV1 or EV2 indicates event output status. 1 means event output is working. 0 means event output
is not working
4) Flow accumulation clear:
The flow accumulation parameter FLJH and FLJL of AI-708H/808H can be reset to 0, but can’t be
modified. The method is to write 30808 to FLJH, then the FLJH, FLJL (flow accumulation) and FJH,
EJL (flow accumulation before compensation) will be reset to 0, and parameter CLn will increase 1.
CLn is read-only. Writing 31808 to parameter code 2AH can clear batch accumulation value, and
also reset batch control output relay.
3. ECC (error correction code):
ECC applies 16 bit summation code. It is a two byte integer with the low byte before the high
byte.
READ instruction ECC = module of (parameter code*100H + 52H + Addr)/10000H
WRITE instrument ECC = module of (parameter code*100H + 43H + writing value + Addr) /
1000H
The range of Addr is 0~80.
4. Returned data:
For both READ and WRITE instruction, the instrument will automatically return to the follow
data:
Process value (PV) + Set value (SV) + output value MV + alarm status + READ/WRITE
parameter value + ECC
The PV, SV and the parameter value are all two byte integers with low byte before high byte.
MV takes one byte with range -110~+110, and the alarm status takes also one byte. ECC takes 2
bytes. The total number of bytes is 10.
The meaning of the returning data is as below:
Model Controllers Multi-channel
Indicators
AI-708H/
808H flow
channel
AI-808H
temperature/pressure
channel
AI-301M
frequency
module
PV Measurement
value PV
PV PV of Instant
flow
PV of temperature
with unit 0.1℃
PV
SV Setpoint SV Channel
number
Low byte of
Accumulation
flow or PV of
batch control
PV of pressure with
unit 0.001MPa
SV
MV Output value
MV or status
byte B
Status byte A Output value
MV
Status byte Status byte A Status byte A
High byte of
accumulation
flow or SV of
batch control
Flow before
compesation or
frequency with unit
0.1Hz Status byte A
Parameter
Value
The parameter value to be read or written.
ECC of Returned data: = (PV + SV + (alarm status*256+MV) + parameter value + Addr)
module 1000H
The status byte A indicates some status of the instrument. The details are as follow:
Controllers/Single-channel Multi-channel Controllers/Single-channel
indicators (V7.0) indicators Indicators (V7.5)
Bit 0 HIAL (high limit alarm) HIAL HIAL
Bit 1 LoAL (Low limit alarm) LoAL LoAL
Bit 2 dHAL (Deviation high limit
alarm)
0 HdAL (Deviation high
limit alarm)
Bit 3 dLAL (Deviation low limit
alarm)
0 LdAL (Deviation low
limit alarm)
Bit 4 orAL (input over range
alarm)
orAL orAL
Bit 5 AL1 status, 0 means
activate
0 Spare (0)
Bit 6 AL2 status, 0 means action 0 0: MV output value
1: status byte B
Bit 7 Always set to 0
The multiple-channel indicators have status byte B. For controllers and single-channel
indicators with version 7.5 or above, if Bit 6 of status byte A is 0, MV byte means MV; if it is 1, MV
byte means status byte B. The 0 to 6 bits of status byte B indicate the status of port OP1, OP2, AL1,
AL2, AU1, AU2 and MIO. 0 means switch off or no output, and 1 means switch on or output.
When OUTP or AUX works as control output, the corresponding bits is 0. By communication
function, the host computer can input or output on-off signals via the above ports. The idle output
port which is not set as alarm output port by parameter ALP, can be set as on-off signal input/output
port. By parameter nonc (normal open/normal close) can output on-off signal. To input an on-off
signal, nonc should be set to “no”. That 1 is read means that external switch is open or signal is
input.
Programming Every time the control computer sends an instruction to the instrument, the instrument will return one data. The instrument should reply the data within 0-150ms. Computer cannot send a new instruction before receiving the reply; otherwise, it will cause some error. If the instrument does not reply after the maximum response time, there is some problem, for example, invalid instruction, communication line malfunction, error communication address or the instrument is power off. Then the control computer should send the instruction again. For example, in order to set setpoint (the according parameter code is 0) of the instrument with ADDR 1 to 100.0℃ (the integer value is 1000), the program designed by VB is as below: 1. Initialize the communication port, includes set the baud rate equal to the instrument and set 8 data bit, 2stop bit, no parity bit. Note that some model of RS485 communication port or RS-232/RS-485 communication converter have some request for RTS or DTR control wire. The computer should program for those control wire. 2. VB program instruction: COMM1.OUTPUT=CHR$(129)+CHR$(129)+CHR$(67)+CHR$(0)+CHR$(232)+CHR$(3)+CHR $(44)+CHR$(4) 3. Decimal point: the parameter value is an integer. The decimal digits can be read from parameter code 0CH. 4. Engineering unit (for version 7.5 or above only): the engineering unit can get from parameter code 1CH.
Communication Specification: Model AI-301, AI-7/8 series instruments AI-5 series instruments Maximum return time (4800bit/S) 100mS 150mS Minimum return time (19200 bit/S) 5mS 5mS Average access period (19200bit/S) 20mS 50mS Available writing times 1 billion 10 million Note: For AI-5 series instruments, the writing interval is better longer than 2 minutes. Otherwise, the longevity of storage unit may be shortened.