Oled Display Fundamentals And Applications.The frequency converter is displayed on the touch screen. S7-200SMART PLC communicates with Haipu Mont HD20 converter MODBUS RTU to control the converter and how to start, stop, forward, reverse, write frequency and read current and voltage on the touch screen.
01 Learning purpose.
This article is the use of S7-200SMART PLC MODBUS RTU library instructions and the basic operation of MCGS touch screen application, through this article to let everyone for the understanding and application of MODBUS RTU library instruction communication and the basic application of MCGS touch screen.
02 device configuration.
1. One Haipmont HD20 frequency converter.
2.S7-200SMART PLC ST40 one.
3.485 one communication line.
4. A motor.
One 5.MCGS TPC1570Gi touch screen.
03 control requirements.
S7-200SMART PLC communicates with Highmont HD20 converter MODBUS RTU to control the converter and how to start, stop, forward, reverse, write frequency and read current and voltage on the touch screen.
04 wiring instructions.
The power supply is connected to L1 and L3N (220V) and the power supply L1/L2/L3N (380V).
two。. Use the RJ45 cable crystal head to connect according to the figure below. For PLC, it is 3 positive and 8 negative, and the frequency converter is 2 positive and 7 negative.
05 set the parameters of frequency converter.
F00.10 is set to 2 (frequency communication given 2).
F00.11 is set to 2 (command communication given 2).
F17.00 is set to 1 (1 stop bit, 8 data bits, even parity,).
F17.01 is set to 3 (baud rate 9600).
F17.02 is set to 2 (converter station address 2).
06 write PLC program.
Step 1: (M address used for power-on initialization).
Step 2: (use the initialization instruction completion bit to activate the MSG instruction).
Step 3: (set the write control command MSG instruction).
The EN enabler uses M1.0 to connect.
First: the activation end uses M1.0 plus the rising edge to activate.
RW: fill in 1 to write.
ADDR: fill in 412801 (PLC MODBUS RTU starting register address 40001 and converter control command word 0x3200 0x convert hexadecimal to decimal 12800 and add up to 412801).
Count: number of addresses used, enter 1.
DataPtr: storage address. Enter & VB200, that is, the address where VW200 starts.
Done: complete bit, bit address, fill in M1.1.
Error: wrong bit, enter MB3.
Program segment 5 is done by polling. When M1.0 is on, complete bit M1.1 turns on and resets M1.0 and sets the next MSG instruction M1.2.
Step 4: (set the write frequency to make the MSG instruction).
The EN enable end uses M1.2 to connect.
First: the activation end uses M1.2 plus the rising edge to activate.
RW: fill in 1 to write.
ADDR: fill in 412802 (PLC MODBUS RTU starting register address 40001 and converter control command word 0x32011.0x means hexadecimal converted to decimal 12801 and added equal to 412802).
Count: number of addresses used, enter 1.
DataPtr: storage address. Enter & VB202, that is, the address where VW202 starts.
Done: complete bit, bit address, fill in M1.3.
Error: wrong bit, enter MB4.
Program segment 7 is done by polling. When M1.2 is on, complete bit M1.3 turns on reset M1.2 and sets the next MSG instruction M1.5.
Step 5: (set the MSG instruction to read the output voltage).
The EN enable end is connected using M1.5.
First: the activation end uses M1.5 plus the rising edge to activate.
RW: enter 0 to read.
ADDR: fill in 413077 (PLC MODBUS RTU starting register address 40001 and converter control command word 0x3314 0x convert hexadecimal to decimal 13076 and add up to 413077).
Count: number of addresses used, enter 1.
DataPtr: storage address. Enter & VB204, that is, the address where VW204 starts.
Done: complete bit, bit address, fill in M1.4.
Error: wrong bit, enter MB5.
Program segment 7 is done by polling. When M1.5 is on, complete bit M1.4 turns on and resets M1.5 and sets the next MSG instruction M13.0.
Step 6: (set the MSG instruction to read the output current).
The EN enabler uses M3.0 to connect.
First: the activation end uses M3.0 plus the rising edge to activate.
RW: enter 0 to read.
ADDR: fill in 413078 (PLC MODBUS RTU starting register address 40001 and converter control command word 0x3315 0x convert hexadecimal to decimal 13077 and add up to 413078).
Count: number of addresses used, enter 1.
DataPtr: storage address. Enter & VB206, that is, the address where VW206 starts.
Done: complete bit, bit address, fill in M2.0.
Error: wrong bit, enter MB10.
Program segment 7 is done by polling. When M3.0 is on, complete bit M2.0 turns on and resets M3.0 and sets the next MSG instruction M1.0.
Step 7: (use contacts to control the frequency converter to start, stop, forward, reverse, write frequency).
The first step: (choose the corresponding model of the actual touch screen, here I am the TPC1570Gi model, you can choose according to your actual touch screen model. ).