AIBUS is a communication protocol developed by Xiamen Yudian Automation Technology Co., Ltd. for AI series display control instruments. It can realize complete functions with simple instructions. It is characterized by writing parameters and reading functions at the same time, so the parameters are not destroyed when reading. The cycle time, plus the instruction length is small, so it has a faster rate than MODBUS (especially when there is a write command, the MODBUS write command can not complete the function of reading the lower computer data at the same time, it will destroy the cycle of the read command. , extending the cycle of reading), AIBUS protocol has the ability to form a large-scale process control system. AIBUS adopts 16-bit summation correction code. The lower computer is fast and reliable, and supports different baud rates such as 9600 and 19200. At 19200 baud rate, the host computer accesses an AI-7/8 series high-performance instrument. The average time is only 20mS, and the average time to access the AI-5 series meters is 40mS. The instrument allows up to 80 instruments to be connected to one RS485 communication interface (to ensure reliable communication, an RS485 repeater is required when the number of instruments is greater than 60). AI series instruments can use PC, touch screen and PLC as the host computer. The software resources are abundant and the development speed is extremely fast. The PC software of the base and PC widely adopts WINDOWS as the operating environment, which is not only intuitive and convenient to operate, but also powerful. The application of the latest industrial flat panel touch screen PC brings a new interface to industrial automation. This makes the price of the measurement and control system using the instrument + upper computer structure much lower than the traditional DCS system, and the performance and reliability also have superior potential than the traditional DCS system. Yudian AI-5 series instruments can write up to 1 million times of life, while AI-7/8 series instruments allow continuous writing of parameters, such as writing setpoints or output values, with a write life of up to 1 billion times. The machine will form a complex adjustment system.
First, the interface specifications
The AI ​​series instruments use an asynchronous serial communication interface, and the interface level complies with the provisions of the RS232C or RS485 standards. The data format is 1 start bit, 8 bits of data, no parity, 1 or 2 stop bits. The baud rate of the communication transmission data can be adjusted to 4800~19200 bit/S, usually 9600 bit/S. When the number of instruments connected to a single communication port is more than 40 or a faster refresh rate is required, it is recommended to use 19200bit/S. When the distance is long or the communication is unreliable and often interrupted, 4800bit/S is optional. The AI ​​instrument adopts multi-machine communication protocol, and adopts RS485 communication interface, which can connect 1~80 instruments at the same time to one communication interface.
RS485 communication interface communication distance is more than 1KM (some practical applications have reached 3-4KM), only two lines can make multiple AI instruments communicate with the computer, better than RS232 communication interface. In order to use the ordinary personal computer PC as the host computer, RS232/RS485 or USB/RS485 type communication interface converter can be used to convert the RS232 communication port or USB port on the computer into the RS485 communication port. For this purpose, Yudian has developed a new RS232/RS485 and USB/RS485 converter, which has the advantages of small size, no need to initialize and can adapt to any software, no external power supply, and certain anti-lightning capability.
According to the RS485 interface, the RS485 communication interface can connect up to 32 instruments or computers on one communication line. When you need to connect more instruments, you need a repeater, or you can choose a communication interface with a chip such as 1/2 or 1/4 load to increase the number of connectable instruments. The currently produced AI instrument communication interface uses a low-load chip and a certain lightning protection and anti-static function, and can connect about 60 instruments without a repeater.
The RS232 and RS485 communication interfaces of the AI ​​instrument use optical isolation technology to isolate the communication interface from other parts of the instrument. When one of the instruments on the communication line is damaged or faulty, it will not affect other instruments. Similarly, when the communication part of the instrument is damaged or the host fails, the instrument can still measure and control normally, and the instrument can be operated through the instrument keyboard, and the work reliability is high. The correctness of the 16-bit check code is 30,000 times that of simple parity, which basically guarantees data reliability. And when other companies on the same network also use the master-slave communication products, such as PLC, inverter, etc., in most cases, the AI ​​series instruments will not be interfered by other company's product communication, and there will be no confusion or communication failure. problem. However, the AI ​​instrument protocol does not guarantee the normal operation of other company products, so unless it is absolutely necessary, the AI ​​instrument should not be mixed with other products on an RS485 communication bus, but different buses should be used separately.
Second, the communication instructions
The AI ​​meter uses a hexadecimal data format to represent various instruction codes and data. The AI ​​instrument software communication instruction is optimized. There are only two standard communication commands. One is the read command and the other is the write command. The two commands make the PC software easy to write, but can operate the instrument 100% completely. Standard reading And write instructions are as follows:
Read: Address code +52H (82) + parameter code to be read +0+0 + check code
Write: Address code +43H (67) + parameter code to be written + write number low byte + write number high byte + check code
Address code: In order to connect multiple AI instruments on one communication interface, each AI instrument needs to be programmed with a different communication address. The valid address is 0~80 (some models are 0~100), so up to 81 AI instruments can be connected to one communication line. The communication address of the instrument is determined by the parameter Addr. The internal number of the instrument uses two repeated values ​​of 128~208 (hexadecimal 80H~D0H) to indicate the address code. Since the number greater than 128 is less used (such as the ASC mode protocol usually only uses 0-127). The number), thus reducing the possibility of conflicts due to data and address duplication. The AI ​​instrument communication protocol stipulates that the address code is two identical bytes and the value is (meter address +80H). For example, if the meter parameter Addr=10 (hexadecimal number is 0AH, 0A+80H=8AH), the address code of the meter is:
8AH 8AH
Parameter code: The parameter of the meter is represented by the parameter code of an 8-bit binary number (one byte, written as a hexadecimal number). It indicates the name of the parameter to be read/written in the instruction.
Check code: The check code adopts 16-bit sum check mode. The check code calculation method of read command is:
The code to read the parameter ×256+82+ADDR
The check code calculation method of the write command is the remainder calculated by the 16-bit binary addition of the following formula (the overflow part is not processed):
The parameter code to be written ×256+67+ parameter value to be written +ADDR
In the formula, ADDR is the value of the instrument address parameter, and the range is 0~80 (be careful not to add 80H). The check code is the remainder obtained by adding the binary 16-bit integer to the above formula, and the remainder is 2 bytes, with the low byte first and the high byte after. The parameter values ​​to be written are represented by 16-bit binary integers.
Return data: Whether reading or writing, the meter returns the following 10 bytes of data:
Measured value PV+ given value SV+ output value MV and alarm status + read/write parameter value + check code
The PV, SV and read parameter values ​​each occupy 2 bytes, representing a 16-bit binary signed complement integer. The lower byte is first, the high byte is after, and the integer cannot represent the decimal point. The user is required to be in the upper computer. Processing; MV occupies one byte, in 8-bit signed binary number format, the value range is -110~+110, the status bit occupies one byte, and the check code occupies 2 bytes, a total of 10 bytes. The meanings of the data returned by different models are as follows:
Instrument model | Regulator thermostat | AI-708M inspection instrument | AI-708H/808H Flow channel | AI-808H Temperature/pressure channel | AI-301M frequency regulator / IO module |
PV | Measured value PV | Measurements | Instantaneous flow measurement | Temperature measurement in 0.1 ° C | Measured value PV |
SV | Current given value SV | Channel number (1-6) | Cumulative flow low Or batch control of measured values | Pressure measurement in 0.001 MPa | Current given value SV |
MV | Output value MV | Status byte B | Cumulative flow high Or batch control of a given value | Pre-compensation flow or frequency value in 0.1 Hz | Adjust the output value MV |
Status byte | Status byte A | Status byte A | Status byte A | ||
Parameter value | Indicates the value of the parameter to read or write |
Return check code: the remainder obtained by adding the PV+SV+ (alarm status *256+MV)+parameter value+ADDR by integer addition. When calculating the check code, every two 8-bit bytes form a 16-bit binary integer for addition, the overflow number is ignored, and the remainder is used as the check code.
The status byte A indicates the status of the instrument part, and its meaning is as follows (bit 7 is fixed to 0):
Regulator and single display (V7.0) | AI-702M/704M/706M | Regulator, thermostat and single display (V7.5) | |
Bit 0 | Upper limit alarm (HIAL) | Upper limit alarm (HIAL) | HIAL |
Bit 1 | Lower limit alarm (LoAL) | Lower limit alarm (LoAL) | LoAL |
Bit 2 | Positive deviation alarm (dHAL) | 0 | HdAL |
Bit 3 | Negative deviation alarm (dLAL) | 0 | LdAL |
Bit 4 | Enter overrange alarm (orAL) | Overrange alarm (orAL) | Oral |
Bit 5 | AL1 state, 0 is action | 0 | Alternate (0) |
Bit 6 | AL2 state, 0 is action | 0 | 0 means MV is the output value, 1 is the status word B. |
The inspection instrument has a status byte B. Bits 0~6 of status byte B indicate the input states of OP1, OP2, AL1, AL2, AU1, AU2, and MIO, respectively. 0 indicates no turn-on or no output, 1 indicates that the external switch is on or has output, OUTP Or the corresponding bit is fixed to 0 when AUX is making adjustment output. The function can be used as the output or output of the switch of the host computer. The alarm port that is not used by the ALP parameter setting can be used as the I/O port. The switch can be realized by modifying the NONC (normally open/normally closed) parameter. The output of the quantity, when used as a digital input, should set the nonc corresponding bit to normally open. If the read signal is 1, it means that the external switch is closed or has a signal input.
Parameter code table for AI instrument read/write (V8.0 518/518P/708/708P/719/719P)
Parameter code | AI-518/518P | Description |
00H | Desired point | Unit with measured value |
01H | HIAL upper limit alarm | Unit with measured value |
02H | LoAL lower limit alarm | Unit with measured value |
03H | dHAL positive deviation alarm | Unit with measured value |
04H | dLAL negative deviation alarm | Unit with measured value |
05H | AHYS alarm backlash | Unit with measured value |
06H | CtrL control mode | 0, ONOFF; 1, APID; 2, nPID; 3, PoP; 4, SoP |
07H | P proportional band | Unit with measured value |
08H | I integration time | second |
09H | d differential time | 0.1 second |
0AH | CtI control cycle | 0.1 second |
0BH | InP input specifications | See instructions for use |
0CH | dPt decimal point position | 0,0;1,0.0;2,0.00,3,0.000; if the above data is read +128, it means that all measured values ​​and parameters using the same unit as the measured value (whether temperature or linear signal) are required. The display processing is performed after the 10th and 4th rounds. For example, the value of dPt is 128+1=129, and the measured value of the read or related parameter value is 16 bits, the actual value should be 10.0. If the dPt value is 1, the actual displayed data is 100.0; It can also be written, but it can't be added 128 when writing, and the range of writing data is 0~3. |
0DH | ScL scale lower limit | Unit with measured value |
0EH | ScH scale upper limit | Unit with measured value |
0FH | ALP alarm output selection | See the instructions for the meaning |
10H | Sc measurement translation correction | Unit with measured value |
11H | oP1 main output mode | 0, SSR; 1, rELy; 2, 0-20; 3, 4-20 |
12H | OPL output lower limit | % |
13H | OPH output limit | % |
14H | CF function selection | See the instructions for the meaning |
15H | Instrument model feature word | 5180 (AI-518) or 5187 (AI-518P) |
16H | Addr mailing address | |
17H | FILt digital filtering | |
18H** | AMAn manual / automatic selection | 0,MAN;1,Auto;2,FMAn;3,FAut |
19H | Loc parameter blocking | |
1AH** | MV manual output value | |
1BH | Srun run/stop selection | 0, run; 1, StoP; 2, HoLd |
1CH | CHYS control hysteresis | Unit with measured value |
1DH | At self-tuning | 0,OFF;1,on;2;FoFF |
1EH | SPL reference lower limit | Unit with measured value |
1FH | SPH reference limit | Unit with measured value |
20H | Fru unit and power frequency | 0,50C; 1,50F; 2,60C; 3,60F |
21H | OHEF OPH effective range | Unit with measured value |
22H | Act positive / negative | 0,rE;1,dr;2,rEbA;3,drbA |
23H | AdIS alarm selection | 0,OFF;1,on |
24H | Aut cold output specification | 0, SSR; 1, rELy; 2, 0-20; 3, 4-20 |
25H | P2 cold output proportional band | Unit with measured value |
26H | I2 cold output integration time | second |
27H | D2 cold output differential time | 0.1 second |
28H | CtI2 cold output cycle | 0.1 second |
29H | Et event input type | 0, nonE; 1, ruSt; 2, SP1.2; 3, PId2 |
2AH*** | SPr heating rate limit | Unit of measurement / (minutes) (requires equivalent measurement for unit processing) |
2BH* | Number of Pno blocks | Integer |
2CH* | PonP power-on selection | 0, Cont; 1, StoP; 2, run1; 3, dASt; 4, HoLd |
2DH* | PAF program parameters | See the instructions for the function |
2EH* | STEP block number | Integer |
2FH* | Run time | 0.1 or 0.1 hour, determined by PAF parameters |
30H* | Event output status | 0, no event output; 1, event 1 (AL1) action; 2, AL2 action; 3, AL1 and AL2 action |
31H** | OPrt soft start time | |
32H** | Strt valve rotation time | Define the time required for the valve to rotate |
33H** | Lower limit for SPSL | When the external input port is used to measure the valve feedback signal, set the valve positioning value 1 |
34H** | SPSH external limit | When the external input port is used to measure the valve feedback signal, set the valve positioning value 2 |
35H** | Ero fault output value | Adjust the output value of the meter when the sensor input fault or overrange is defined |
36H** | AF2 | Function parameter 2 |
37H~3FH | spare | |
40H~47H | EP1~EP8 | |
48H** | Valve position (read only) | The value 0~25600 corresponds to 0~100%, and the number of readings is divided by 256 squares as a percentage. |
49H~4FH | spare | |
50H~51H | SP 1, t 1 | SP1 is the given value 1, and t1 is the first program value. |
52H~ | SP2 ~ block data, the number is defined by the Pno parameter |
Description:
1. The parameter with an * asterisk is only available for AI-518P/708P/719P. If AI-518/708/719 is read or written, it is regarded as invalid parameter code. The parameter with ** is AI-719 and other instruments. Can be used, the parameters with *** are AI-518P/708P/719/719P and other models can be used.
2. If the parameter other than the parameter code (invalid parameter code or a
Kitchen Cooking Utensils,Unique Kitchen Gadgets,Kitchen Utensils And Gadgets,Fun Kitchen Gadgets
Garwin Enterprise Co.,Ltd , https://www.garwincn.com