Share this

Research on Programmable Logic Controller Control of Frequency Converter Based on USS Protocol

2026-04-06 07:51:02 · · #1
1. Introduction Computer and communication technologies have become a core part of most solutions in industrial environments, and their proportion in systems is rapidly increasing. In industrial control, AC motor drives are increasingly being accomplished using frequency converters (VDCs), not only as standalone actuators but also, with increasing intelligence, integrated into a cohesive whole with remote computers through various communication methods. In practical engineering implementation, the start, stop, direction, alarm, fault indication, and fault reset of VDCs are typically controlled by terminal block switch signals, while speed control uses analog setpoint control. Because the output of the VDC generates strong interference signals, the controller may sometimes malfunction. Furthermore, when the control distance is long, the amount of wiring work is excessive. With the development of fieldbus-based underlying control networks, VDC manufacturers have launched products with data communication capabilities. Using an RS-485 communication interface for system configuration and monitoring is a low-cost connection solution. 2. USS Control Protocol for Siemens Frequency Inverters 2.1 Characteristics of the USS Protocol USS is a communication protocol developed by Siemens for frequency inverters. It supports communication connections between frequency inverters and PCs or PLCs, and is often suitable for smaller-scale automation systems. It uses a master-slave architecture to form an industrial monitoring network, with one master station and 1 to 31 slave stations, each with a unique identifier. The characteristic of this structure is that it solves automation problems using a single, fully integrated system. All Siemens frequency inverters can use the USS protocol as a communication link. Digital information transmission improves the system's automation level and operational reliability, solving the interference and drift problems caused by analog signal transmission. The communication medium uses RS-485 shielded twisted-pair cable, with a maximum range of 1000m, effectively reducing the number of cables and thus significantly reducing development and engineering costs, as well as greatly lowering customer startup and maintenance costs; the communication efficiency is high, reaching 187.5 kbit/s. For a system with 10 speed controllers, each with 6 process data points requiring updating, the typical PLC scan cycle is several hundred milliseconds. It adopts an operation mode similar to PROFIBUS, with a bus structure of unit station and master-slave access. The message structure includes parameter data and process data; the former is used to change the speed controller parameters, and the latter is used to quickly update the speed controller's process data, such as start/stop, speed setting, and torque setting. It boasts extremely high speed and reliability. Using the USS interface provided on the Siemens frequency converter's main unit, only an RS-485 communication board needs to be inserted into the terminal to achieve full remote control of the frequency converter. 2.2 USS Protocol Communication Data Format The USS protocol communication character format consists of one start bit, one stop bit, one even parity bit, and eight data bits. The maximum data message length is 256 bytes, including a 3-byte header, a 1-byte checksum, and the main data block. The data block is organized in word format, with the high byte first. The communication data message format is shown in Table 1. STX—Start character, 02Hex; LGE—Message length, n+2, 3≤n≤254; ADR—Slave address code, where bits 0-4 represent the slave address, bit 5 is 1 for broadcast transmission, bit 6 is 1 for mirror transmission (used for network testing), and bit 7 is 1 for special messages; BCC—Checksum character, the XOR sum of all bytes starting from STX. While completing process control data within a frame, device control parameters can be read and written by specifying parameter numbers. The data block consists of the parameter value field (PKW) and the process data field (PZD), both of which are variable-length data. PKW field—Parameter value field, consisting of parameter identification code, sub-parameter number, and parameter value; the number of parameters can be up to 124 words depending on the device's definition; PZD field—Process control data field, including control word/status word, setpoint/actual value, up to 16 words; PKE—Parameter identification code; IND is used to specify sub-parameter numbers for certain array-type device parameters. For SIEMENS MMV/MDV frequency converters, the protocol is simplified: IND is fixed at 0; PKW is a 3-word format, i.e., only PWE1; PZD1 in the PZD field is the control word/status word, used to set and monitor the operating status of the frequency converter; PZD2 in the PZD field sets the frequency. 3. PLC Control Frequency Converter Programming The PLC communication program is written in subroutine mode. The main control program controls the frequency converter by calling relevant subroutines to send commands. Data reception is completed by the background interrupt program. The command sending subroutine processes the frequency converter target speed value and command parameters into USS protocol format, sends them out, sets the sending flag, resets the reception completion flag, and enables reception interrupt and timer interrupt. When the frequency converter sends a response message, the background interrupt program is activated to receive the frequency converter's status value and current speed value, stores them in the reception buffer, resets the sending flag, and sets the reception completion flag. 3.1 The main control program checks the contents of the frequency converter's reception buffer according to the sending flag and reception completion flag based on the sampling time interval and performs corresponding processing. The communication program consists of five subroutines: communication port initialization, running, stopping, and speed setting, as well as a series of interrupt service subroutines. The flowchart of the main control program is shown in Figure 1. 3.2 Communication Subroutines The communication subroutines are as follows: SBR0 // Communication initialization program MOVB16#49, SMB30 // Initialize P0 to 9600kb, 8bit, even parity MOVB14, "P0-ST-LEN" // Set the send buffer and number of characters to send MOVB16#2, "P0-ST-STX" // STX MOVB12, "P0-ST-LGE" // LGE MOVB0, "P0-ST-ADR" // Master address MOVB255, "TO" ENI ATCH4, 25 ATCH6, 11 RET SBR2 // Motor start subroutine MOVB PADR, "P0-ST-ADR" // Get the slave address from the master control buffer MOVW16#0C7F, "P0-ST-PZD0" // Set to stop motor start and forward rotation CALL "Send-BP" // Call the send program RET SBR4 // Set motor speed Motor operation subroutine MOVB "BPADR", "P0-ST-ADRS" // Get slave address of master control buffer MOVW16#0C7F, "P0-ST-PZD0" // Set motor start and forward rotation MOVW "BIT/SP", "P0-ST-PZD1" // Get speed value of master control buffer LDW>= "P0-ST-PZD1", 16#4000 // Check if the maximum speed is exceeded MOVW16#4000, "P0-ST-PZD1" CALL "Send-BP" // Call send program RET SBR5 // Send program Send-BP MOVD&VB3500, ACO // Calculate BCC MOVB14, AC1 // Loop to calculate BCC and store it in "P0-ST-BCCS" Set retransmission count counter XMT "P0-ST-LEN", 0 // Send ATCH0, 9 // Interrupt service routine number for end of send MOVB100, "h" //Timer duration 100ms ATCH1, 10 //Timer interrupt handling, if no data is received, retransmit the data RET 3.3 Interrupt receiving subroutine The interrupt receiving subroutine consists of a series of service routines, including 3 cases. (1) Determine whether the first 3 characters of the interrupt reception are the specified characters. If yes, point the receive interrupt pointer to the next interrupt routine, reset the timer, and XOR the BCC value; otherwise, disable the receive interrupt and wait for the timer interrupt to handle the error. (2) For the reception of data blocks, a counting method is used for control. When the count is zero, the calculated BCC value should be 0; otherwise, disable the receive interrupt. (3) When the timer interrupt is activated, it indicates that the reception has timed out. The retransmission count is decremented by 1. If it is not 0, the contents of the transmit buffer are automatically retransmitted; if it is 0, the error flag is set. 4 Conclusion In the application of frequency converter drive engineering, the traditional method is to use switch and analog signals to control the frequency converter. The signals are easily interfered with, resulting in control errors. The method of controlling the frequency converter using the USS communication protocol based on the RS-485 interface greatly reduces system wiring, avoids the impact of various electromagnetic interferences on the control equipment, and effectively improves the system's anti-interference capability.
Read next

CATDOLL 123CM Alisa (TPE Body with Hard Silicone Head)

Height: 123cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/54/70cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22