CN102806683A - Special PCI (Peripheral Component Interconnect)-based hydraulic machine motion control method and controller - Google Patents

Special PCI (Peripheral Component Interconnect)-based hydraulic machine motion control method and controller Download PDF

Info

Publication number
CN102806683A
CN102806683A CN2012103005296A CN201210300529A CN102806683A CN 102806683 A CN102806683 A CN 102806683A CN 2012103005296 A CN2012103005296 A CN 2012103005296A CN 201210300529 A CN201210300529 A CN 201210300529A CN 102806683 A CN102806683 A CN 102806683A
Authority
CN
China
Prior art keywords
module
eq2c8q208
data
conversion
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012103005296A
Other languages
Chinese (zh)
Inventor
吴爱国
张凯
吴国强
何熠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin University
Original Assignee
Tianjin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin University filed Critical Tianjin University
Priority to CN2012103005296A priority Critical patent/CN102806683A/en
Publication of CN102806683A publication Critical patent/CN102806683A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

本发明涉及液压机运动控制。为提供一种低成本、高可靠性、使用和维护简单,并且可与工控机共同组成控制系统的控制板卡及能够直接与执行机构信号匹配的控制器,本发明采取的技术方案是,基于PCI的液压机专用运动控制器,包括模拟量输入模块、模拟量输出模块、TMS320F2812数字信号处理模块、EQ2C8Q208逻辑电路转换模块、PCI9054总线数据通讯模块、开关量输入电路模块、开关量输出电路模块;Q2C8Q208逻辑转换电路模块分别与前述各模块相连。本发明主要应用于液压机运动控制。

The invention relates to motion control of a hydraulic press. In order to provide a low-cost, high-reliability, easy-to-use and maintain control board that can form a control system with an industrial computer and a controller that can directly match the signal of an actuator, the technical solution adopted by the present invention is based on PCI hydraulic machine special motion controller, including analog input module, analog output module, TMS320F2812 digital signal processing module, EQ2C8Q208 logic circuit conversion module, PCI9054 bus data communication module, switch input circuit module, switch output circuit module; Q2C8Q208 The logic conversion circuit module is respectively connected with the aforementioned modules. The invention is mainly applied to the motion control of hydraulic presses.

Description

基于PCI的液压机专用运动控制方法及控制器A special motion control method and controller for hydraulic press based on PCI

技术领域 technical field

本发明涉及液压机运动控制,具体讲,涉及基于PCI的液压机专用运动控制器。The invention relates to motion control of a hydraulic press, in particular to a PCI-based special motion controller for a hydraulic press.

背景技术 Background technique

目前我国的工业生产已经进入一个快速发展的阶段,同时,在生产自动化程度越来越高的今天,对各类控制器的需求大大增加。在航空航天、大型装备制造、电子信息等高新领域中,对控制器的稳定性、抗干扰性、精度、速度等指标提出了更高的要求。但现如今国内运动控制器市场仍是国外产品占据大部分份额,而高水平的控制器市场几乎被几家国外公司垄断,也就是说我国现在缺乏一种自主知识产权的低成本高可靠性运动控制器。At present, my country's industrial production has entered a stage of rapid development. At the same time, the demand for various controllers has greatly increased in today's increasingly automated production. In high-tech fields such as aerospace, large-scale equipment manufacturing, and electronic information, higher requirements are put forward for the controller's stability, anti-interference, precision, speed and other indicators. But now the domestic motion controller market is still dominated by foreign products, and the high-level controller market is almost monopolized by several foreign companies, which means that our country now lacks a low-cost, high-reliability motion controller with independent intellectual property rights. controller.

在大型液压机生产行业,一方面受制于国外生产的运动控制器的技术垄断,我国国产液压机一直无法具备完整的自主知识产权,另一方面,大型液压机作为控制对象,其信号类型、规格要求都有其独特之处,而实际应用中多采用通用的运动控制器,这样由于信号特点、规格要求的不匹配,给生产者带来很多不便,同时也会造成不必要的资源浪费。In the large-scale hydraulic machine production industry, on the one hand, subject to the technical monopoly of foreign-produced motion controllers, domestic hydraulic machines in my country have not been able to have complete independent intellectual property rights; It is unique, but in practical applications, general-purpose motion controllers are often used, which will bring a lot of inconvenience to producers due to the mismatch of signal characteristics and specification requirements, and will also cause unnecessary waste of resources.

所以说,开发一款具备自主知识产权,能够较大限度匹配液压机控制系统的运动控制器是有意义的。Therefore, it is meaningful to develop a motion controller with independent intellectual property rights that can match the hydraulic press control system to the greatest extent.

液压系统的组成与实现Composition and Realization of Hydraulic System

多缸液压机主要包括上位机、液压缸组、滑块、机架、油泵组、油箱、检测装置和控制系统。当液压机工作时,油泵将高压液压油从油箱抽取进油路;液压油经过比例伺服阀进入液压缸组,驱动滑块运行。滑块的速度和调平控制是通过不断的调节油路中比例伺服阀的开度,从而改变液压缸的液压油的流量来实现的。The multi-cylinder hydraulic press mainly includes the host computer, hydraulic cylinder group, slide block, frame, oil pump group, oil tank, detection device and control system. When the hydraulic machine is working, the oil pump pumps high-pressure hydraulic oil from the oil tank into the oil circuit; the hydraulic oil enters the hydraulic cylinder group through the proportional servo valve to drive the slider to run. The speed and leveling control of the slider is achieved by continuously adjusting the opening of the proportional servo valve in the oil circuit, thereby changing the flow of hydraulic oil in the hydraulic cylinder.

以80MN多缸锻造液压机为例,描述液压系统组成如图1所示。Taking the 80MN multi-cylinder forging hydraulic press as an example, the composition of the hydraulic system is described as shown in Figure 1.

其中各部分的详细说明如下表所示:The detailed description of each part is shown in the table below:

Figure BDA00002044699800011
Figure BDA00002044699800011

Figure BDA00002044699800021
Figure BDA00002044699800021

控制多缸液压机的关键是多缸液压伺服控制系统。首先,分别通过FPGA和A/D芯片将光栅尺输出的滑块的位置信息(SSI格式)和压力传感器采集的液压缸内的压力信息(电压信号)转换为主控芯片能识别的并行二进制信息。然后主控芯片根据这些信息与控制算法计算出比例伺服阀应有的开度,然后经过D/A芯片和驱动放大电路,输出给比例伺服阀,从而达到控制目标。多缸液压机控制系统原理图如图2所示。The key to controlling the multi-cylinder hydraulic press is the multi-cylinder hydraulic servo control system. First, the position information (SSI format) of the slider output by the grating ruler and the pressure information (voltage signal) in the hydraulic cylinder collected by the pressure sensor are converted into parallel binary information that the main control chip can recognize through the FPGA and the A/D chip respectively. . Then the main control chip calculates the proper opening of the proportional servo valve according to the information and control algorithm, and then outputs it to the proportional servo valve through the D/A chip and the drive amplifier circuit, so as to achieve the control goal. The schematic diagram of the multi-cylinder hydraulic press control system is shown in Figure 2.

发明内容 Contents of the invention

本发明旨在克服现有技术的不足,提供一种低成本、高可靠性、使用和维护简单,并且可与工控机共同组成控制系统的控制板卡及能够直接与执行机构信号匹配的控制器,为达到上述目的,本发明采取的技术方案是,基于PCI的液压机专用运动控制器,包括模拟量输入模块、模拟量输出模块、TMS320F2812数字信号处理模块、EQ2C8Q208逻辑电路转换模块、PCI9054总线数据通讯模块、开关量输入电路模块、开关量输出电路模块;Q2C8Q208逻辑转换电路模块分别与前述各模块相连;The present invention aims to overcome the deficiencies of the prior art and provide a control board with low cost, high reliability, simple use and maintenance, and which can form a control system together with an industrial computer and a controller that can directly match the signal of the actuator , in order to achieve the above object, the technical solution adopted by the present invention is that the special motion controller for hydraulic press based on PCI includes analog input module, analog output module, TMS320F2812 digital signal processing module, EQ2C8Q208 logic circuit conversion module, PCI9054 bus data communication Module, switch value input circuit module, switch value output circuit module; Q2C8Q208 logic conversion circuit module is connected with the aforementioned modules respectively;

EQ2C8Q208逻辑转换电路模块与TMS320F2812数字信号处理模块相连接,通过中断控制方式实现两者之间的数据交换;The EQ2C8Q208 logic conversion circuit module is connected with the TMS320F2812 digital signal processing module, and the data exchange between the two is realized through the interrupt control method;

EQ2C8Q208逻辑转换电路模块经PCI9054总线数据通讯模块与工控机相应的PCI插槽连接,实现工控机与EQ2C8Q208逻辑转换电路之间的并行数据交换。The EQ2C8Q208 logic conversion circuit module is connected with the corresponding PCI slot of the industrial computer through the PCI9054 bus data communication module to realize the parallel data exchange between the industrial computer and the EQ2C8Q208 logic conversion circuit.

模拟量输入模块结构为:EQ2C8Q208通过SPI总线将控制字写入AD7928,期间通过芯片TLP117进行电气隔离;外接端子接收变送器输入的0~10V电压信号,通过电阻分压得到0~5V标准电压信号,经再A/D转换芯片AD7928转换为12位高精度数字信号,然后通过数字量隔离芯片IOS721进行数字信号的电气隔离,隔离后的串行数字信号通过SPI总线传输至EQ2C8Q208。The structure of the analog input module is as follows: EQ2C8Q208 writes the control word into AD7928 through the SPI bus, and conducts electrical isolation through the chip TLP117 during the period; the external terminal receives the 0-10V voltage signal input by the transmitter, and obtains the 0-5V standard voltage through resistor division The signal is converted into a 12-bit high-precision digital signal by the A/D conversion chip AD7928, and then the digital signal is electrically isolated by the digital isolation chip IOS721, and the isolated serial digital signal is transmitted to the EQ2C8Q208 through the SPI bus.

模拟量输出模块结构为:数字信号由EQ2C8Q208通过SPI总线传输至数字量隔离芯片TLP117,在此进行数字信号的电气隔离,串行数字信号通过D/A转换芯片A/D5628将12位高精度数字信号转换为模拟量信号,在经过电压信号放大电路转换为标准0~10电压信号输出。The structure of the analog output module is: the digital signal is transmitted from the EQ2C8Q208 to the digital isolation chip TLP117 through the SPI bus, where the electrical isolation of the digital signal is carried out, and the serial digital signal is converted into a 12-bit high-precision digital signal through the D/A conversion chip A/D5628. The signal is converted into an analog signal, and then converted into a standard 0-10 voltage signal output through a voltage signal amplification circuit.

EQ2C8Q208逻辑电路转换模块进一步包括:高速位置(SSI)采集模块、M法和T法速度计算模块、SPI串行数据通讯模块、TMS320F2812中断控制和仲裁模块、PCI并行总线数据通讯模块,TMS320F2812中断控制和仲裁模块和PCI并行总线数据通讯模块包含在双口RAM中。The EQ2C8Q208 logic circuit conversion module further includes: high-speed position (SSI) acquisition module, M method and T method speed calculation module, SPI serial data communication module, TMS320F2812 interrupt control and arbitration module, PCI parallel bus data communication module, TMS320F2812 interrupt control and The arbitration module and the PCI parallel bus data communication module are included in the dual-port RAM.

TMS320F2812数字信号处理模块进一步包括:AD数据采集及格式转换模块、DA数据格式转换及输出模块、控制算法运行模块和DSP与FPGA的中断数据通讯模块TMS320F2812 digital signal processing module further includes: AD data acquisition and format conversion module, DA data format conversion and output module, control algorithm operation module and DSP and FPGA interrupt data communication module

AD数据采集及格式转换模块用于:将输入的模拟量信号转变为12位高精度数字信号,以SPI串行总线的方式输入EQ2C8Q208逻辑电路转换模块,进而转变成为并行数据信号;通过中断数据通讯子程序获取FPGA存储区中的数据,并按规定数制变换将其变换为控制算法运行可用的数据格式;The AD data acquisition and format conversion module is used to: convert the input analog signal into a 12-bit high-precision digital signal, input it into the EQ2C8Q208 logic circuit conversion module in the form of an SPI serial bus, and then convert it into a parallel data signal; by interrupting the data communication The subroutine obtains the data in the FPGA storage area, and transforms it into a data format available for the operation of the control algorithm according to the specified number system transformation;

DA数据格式转换及输出模块用于:将控制信号通过规定的数值转换转换成对应DA芯片的12位数字量,通过FPGA的SPI串行总线传输至DA转换芯片,进而得到所要的模拟量;The DA data format conversion and output module is used to: convert the control signal into a 12-bit digital quantity corresponding to the DA chip through the specified numerical conversion, and transmit it to the DA conversion chip through the SPI serial bus of the FPGA to obtain the desired analog quantity;

控制算法运行模块用于:工作模式的判断、速度计算方法的切换、输出大小阀的切换、偏差的计算、控制量的计算;The control algorithm operation module is used for: the judgment of the working mode, the switching of the speed calculation method, the switching of the output valve, the calculation of the deviation, and the calculation of the control amount;

(4)DSP与FPGA的中断数据通讯模块。(4) Interrupt data communication module between DSP and FPGA.

本发明的技术特点及效果:Technical characteristics and effects of the present invention:

在控制器硬件方面:本控制板卡可直插到PC机上,和PC机组成一套完整的控制系统,实现了控制系统的整体化,用户可根据不同的控制要求扩充不同的PCI板卡是控制系统的功能更加的完善。并且本发明中的外接调理板于现场可编程门阵列(FPGA)相连,并可根据不同的需求调换不同的调理板以实现不同的性能(如改变D/A的精度等)。本发明还可以脱离PC机主体,采用单独供电模式,可作为独立的控制其使用。In terms of controller hardware: the control board can be directly plugged into the PC, and forms a complete control system with the PC, realizing the integration of the control system. Users can expand different PCI boards according to different control requirements. The function of the control system is more perfect. And the external conditioning board in the present invention is connected with Field Programmable Gate Array (FPGA), and different conditioning boards can be exchanged according to different requirements to achieve different performances (such as changing the precision of D/A, etc.). The present invention can also separate from the main body of the PC, adopt a separate power supply mode, and can be used as an independent control device.

在控制器软件件方面:在现场可编程门阵列EQ2C8Q208上编写并固化了8路高速位置(SSI)接口,和相应的速度计算算法(M法和T法),以实现高速的位置和速度检测,节省了DSP上运动控制算法的运行周期;在数字信号处理器TMS320F2812上,编写了与现场可编程门阵列EQ2C8Q208通讯的中断运行子程序,实现两者之间的快速数据交换。In terms of controller software: write and solidify 8 high-speed position (SSI) interfaces on the field programmable gate array EQ2C8Q208, and corresponding speed calculation algorithms (M method and T method) to achieve high-speed position and speed detection , which saves the running cycle of the motion control algorithm on the DSP; on the digital signal processor TMS320F2812, an interrupt running subroutine communicating with the field programmable gate array EQ2C8Q208 is written to realize the fast data exchange between the two.

附图说明 Description of drawings

图1多缸锻造液压机工作原理图(左为油路图,右为机架图)。Fig. 1 Working principle diagram of the multi-cylinder forging hydraulic press (the oil circuit diagram is on the left, and the frame diagram is on the right).

图2多缸液压机控制系统原理图。Figure 2 Schematic diagram of the multi-cylinder hydraulic press control system.

图3控制器方框图。Figure 3 Controller block diagram.

图4FPGA引脚定义。Figure 4FPGA pin definition.

图5FPGA内部逻辑功能图。Figure 5 FPGA internal logic function diagram.

图6一路高速SSI通信接口模块示意图。Figure 6 is a schematic diagram of a high-speed SSI communication interface module.

图7DSP参数读写中断子程序流程图。Figure 7 DSP parameter read and write interrupt subroutine flow chart.

图8多缸液压机控制系统原理图。Figure 8 Schematic diagram of the multi-cylinder hydraulic press control system.

图9DSP主程序流程图。Figure 9 DSP main program flow chart.

图10DSP控制程序流程图。Figure 10DSP control program flow chart.

具体实施方式 Detailed ways

本发明的目的在提供一种低成本、高可靠性、使用和维护简单,并且可与工控机共同组成控制系统的控制板卡及能够直接与执行机构信号匹配的调理板。The purpose of the present invention is to provide a low-cost, high-reliability, easy-to-use and maintain control board that can form a control system with an industrial computer and a conditioning board that can directly match the signal of an actuator.

本发明的特点在于运动控制板卡可通过PCI接口直插到工控机上,与工控机、信号调理板、被控对象组成一套完整的控制系统,实现了控制系统的整体化,用户可根据不同的控制要求扩充不同性能的PCI板卡使控制系统的功能更加的完善。并且本发明中的外接调理板与FPGA相连,可根据不同的需求调换不同的调理板以实现不同的性能。在FGPA上烧写了8路高速位置(SSI)接口和相应的速度计算方法(M法和T法),以实现高速的位置和速度检测,缩减DSP上运动控制算法的运行周期,从而提高控制系统的整体响应速度。The feature of the present invention is that the motion control board can be directly plugged into the industrial computer through the PCI interface, and form a complete control system with the industrial computer, signal conditioning board, and the controlled object, realizing the integration of the control system. The control requirements to expand the different performance of the PCI board to make the function of the control system more perfect. Moreover, the external conditioning board in the present invention is connected to the FPGA, and different conditioning boards can be exchanged according to different requirements to achieve different performances. 8 high-speed position (SSI) interfaces and corresponding speed calculation methods (M method and T method) are programmed on FPGA to realize high-speed position and speed detection, reduce the running cycle of motion control algorithms on DSP, and improve control The overall responsiveness of the system.

本发明解决上述技术问题所采用的技术方案如下所述:The technical solution adopted by the present invention to solve the problems of the technologies described above is as follows:

1.硬件实现1. Hardware implementation

根据多轴运动控制指标的要求,此专用控制器,其功能电路包括数字量输入输出模块、模拟量输出模块、TMS320F2812数字信号处理模块、EQ2C8Q208逻辑电路转换模块、PCI9054总线数据通讯模块、SSI同步串行总线数据采集模块。本发明将SSI采集,数字量输入输出和模拟量输出都设定制为8路,模拟量输出通过放大电路变为0~10V模拟信号信号输出。According to the requirements of multi-axis motion control indicators, the functional circuit of this dedicated controller includes digital input and output modules, analog output modules, TMS320F2812 digital signal processing modules, EQ2C8Q208 logic circuit conversion modules, PCI9054 bus data communication modules, SSI synchronous serial Line bus data acquisition module. In the invention, SSI collection, digital input and output and analog output are all set to 8 channels, and the analog output is converted into 0-10V analog signal output through an amplifying circuit.

(1)JTAG调试接口模块:现场可编程门阵列EQ2C8Q208将引脚TCK、TDO、TMS、TDI、VCC、GND配置为JTAG调试接口。JTAG引脚的定义为:TCK为测试时钟输入。TMS为测试模式选择,TMS用来设置JTAG接口处于某种特定的测试模式。TDI为测试数据输入,数据通过TDI引脚输入JTAG接口;TDO为测试数据输出,数据通过TDO引脚从JTAG接口输出。(1) JTAG debugging interface module: field programmable gate array EQ2C8Q208 configures pins TCK, TDO, TMS, TDI, VCC, GND as JTAG debugging interface. The definition of JTAG pin is: TCK is the test clock input. TMS is the test mode selection, and TMS is used to set the JTAG interface in a specific test mode. TDI is the test data input, and the data is input to the JTAG interface through the TDI pin; TDO is the test data output, and the data is output from the JTAG interface through the TDO pin.

在使用PC机进行在线调试时,一方面,控制器内的数据通过JTAG调试接口传给控制板卡,板卡将数据通过并口传给电脑。另一方面,调试命令和数据通过并口传给控制板卡。When using a PC for online debugging, on the one hand, the data in the controller is transmitted to the control board through the JTAG debugging interface, and the board transmits the data to the computer through the parallel port. On the other hand, debugging commands and data are sent to the control board through the parallel port.

(2)模拟量输入电路模块:模拟量输入信号为0~10V电压信号,通过电阻分压转为0~5V电压信号,并将转换后的信号给A/D转换电路中的A/D转换芯片A/D7928,得到12位串行数字量电压值。此串行数字量传输至隔离芯片IOS721,IOS721将接收到的数字信号进行电气隔离,输出与EQ2C8Q208电平相匹配的SPI串行总线信号,EQ2C8Q208接收到此SPI总线信号进行处理。另外,A/D转换芯片工作模式受EQ2C8Q208传来的控制字控制,控制字传输期间由隔离芯片TLP117进行电气隔离,传输方式同为SPI串行总线传输。(2) Analog input circuit module: The analog input signal is a 0-10V voltage signal, which is converted into a 0-5V voltage signal through resistor division, and the converted signal is sent to the A/D conversion in the A/D conversion circuit Chip A/D7928, get 12-bit serial digital voltage value. This serial digital quantity is transmitted to the isolation chip IOS721. IOS721 electrically isolates the received digital signal and outputs the SPI serial bus signal matching the level of EQ2C8Q208. EQ2C8Q208 receives the SPI bus signal for processing. In addition, the working mode of the A/D conversion chip is controlled by the control word from EQ2C8Q208. During the transmission of the control word, it is electrically isolated by the isolation chip TLP117, and the transmission method is the same as the SPI serial bus transmission.

(3)模拟量输出电路模块:EQ2C8Q208将模拟量输出量变量对应于0~4095,通过SPI总线传输给D/A隔离电路的隔离芯片TLP117,隔离芯片对接收到的SPI总线数据进行电平转换隔离,将转换后的数字信号传送至D/A转换芯片AD5628。(3) Analog output circuit module: EQ2C8Q208 corresponds the analog output variable to 0~4095, and transmits it to the isolation chip TLP117 of the D/A isolation circuit through the SPI bus, and the isolation chip performs level conversion on the received SPI bus data Isolation, the converted digital signal is sent to the D/A conversion chip AD5628.

模拟量电压转换电路共包括八路结构相同的电压转换电路。模拟量电压转换电路的第一至第八路输入同时连接D/A转换芯片的0~5V电压信号输出通道。模拟量电压转换电路将对应通道的0~5V电压信号转0~10V电压信号。模拟量电压转换电路的八路0~10V电压信号输出至模拟量输出端子的对应通道,模拟量输出信号即为0~10V。The analog voltage conversion circuit includes eight voltage conversion circuits with the same structure. The first to eighth inputs of the analog voltage conversion circuit are simultaneously connected to the 0-5V voltage signal output channels of the D/A conversion chip. The analog voltage conversion circuit converts the 0-5V voltage signal of the corresponding channel into a 0-10V voltage signal. The eight 0-10V voltage signals of the analog voltage conversion circuit are output to the corresponding channels of the analog output terminal, and the analog output signal is 0-10V.

(4)开关量输入电路模块:来自于外部的0V或5V电压信号从开关量输入端口输入。开关量调理电路包括8路功能相同电路,开关量输入端口第一至第八路的0V或5V电压信号通过芯片ADuM1400ARW进行电压变换隔离,将0V或5V电压信号转为0V或3.3V电压信号输出,第一至第八路开关量调理电路的输出连接至EQ2C8Q208的第一至第八路开关量对应的引脚。若对应引脚为高电平,则读取相应位为1;若对应引脚为低电平,则读取相应位为0。(4) Digital input circuit module: 0V or 5V voltage signal from the outside is input from the digital input port. The switching value conditioning circuit includes 8 circuits with the same function. The 0V or 5V voltage signal of the first to the eighth channel of the switching value input port is used for voltage conversion and isolation through the chip ADuM1400ARW, and the 0V or 5V voltage signal is converted into 0V or 3.3V voltage signal output. , the outputs of the first to eighth switching value conditioning circuits are connected to the corresponding pins of the first to eighth switching values of the EQ2C8Q208. If the corresponding pin is high, read the corresponding bit as 1; if the corresponding pin is low, read the corresponding bit as 0.

(5)开关量输出电路模块:EQ2C8Q208将八个通用I/O接口引脚设置为开关量功能,并将第一至第八通道的对应寄存器的值0或1输出第一至第八路开关量对应的功能引脚。若寄存器值为1,则输出3.3V;若寄存器值为0,则输出0V。第一至第八路开关量对应的引脚上的电压信号通过芯片ADuM1400ARW进行电压变换隔离,将0V或3.3V电压信号转为0V或5V电压信号输出。(5) Digital output circuit module: EQ2C8Q208 sets eight general-purpose I/O interface pins as digital functions, and outputs the value 0 or 1 of the corresponding registers of the first to eighth channels to the first to eighth channel switches Quantity corresponds to the function pin. If the register value is 1, then output 3.3V; if the register value is 0, then output 0V. The voltage signals on the pins corresponding to the first to eighth switching quantities are converted and isolated through the chip ADuM1400ARW, and the 0V or 3.3V voltage signal is converted into a 0V or 5V voltage signal for output.

(6)PCI接口电路驱动模块:PCI接口驱动芯片PCI9054将BTERM、READY、ADS、BLAST、WAIT、LRESET、LINT、USERi/DACK0/LLOCKi、USERo/DACK0/LLOCKo引脚配置为PCI通信控制接口,将LA2~LA30引脚配置为29位地址位,将LD0~LD31引脚配置为32位数据位。控制板卡通过PCI接口连接至工控机后,通过工控机操作系统的API函数,可以读写PCI接口驱动芯片PCI9054相应地址所对应的数据值,同时由于PCI9054数据位和地址位引脚与EQ2C8Q208的通用I/O引脚相连接,数据值可以实时反映到EQ2C8Q208中,用于后续的处理。(6) PCI interface circuit driver module: PCI interface driver chip PCI9054 configures BTERM, READY, ADS, BLAST, WAIT, LRESET, LINT, USERi/DACK0/LLOCKi, USERo/DACK0/LLOCKo pins as PCI communication control interface, LA2 ~ LA30 pins are configured as 29 address bits, and LD0 ~ LD31 pins are configured as 32 data bits. After the control board is connected to the industrial computer through the PCI interface, through the API function of the industrial computer operating system, the data value corresponding to the corresponding address of the PCI interface driver chip PCI9054 can be read and written. The general-purpose I/O pins are connected, and the data value can be reflected in the EQ2C8Q208 in real time for subsequent processing.

(7)DSP数据处理器模块:数据处理单元TMS320F2812通过XREADY、XR/W、

Figure BDA00002044699800051
Figure BDA00002044699800052
Figure BDA00002044699800054
GPIIOE0_XINT1引脚实现TMS320F2812与EQ2C8Q208的16位数并行通信,XA[0]~XA[13]引脚配置为14位地址位,XD[0]~XD[15]引脚配置为16位数据位。为实现EQ2C8Q208与TMS320F2812的数据传输,在以上硬件连接的基础上,定制了基于中断控制字的中断读写模式,EQ2C8Q208产生外部中断信号,通过TMS320F2812识别EQ2C8Q208中读写标志位来实现相应的读写控制。(7) DSP data processor module: data processing unit TMS320F2812 through XREADY, XR/W,
Figure BDA00002044699800051
Figure BDA00002044699800052
Figure BDA00002044699800054
The GPIIOE0_XINT1 pin realizes the 16-bit parallel communication between TMS320F2812 and EQ2C8Q208, XA[0]~XA[13] pins are configured as 14-bit address bits, and XD[0]~XD[15] pins are configured as 16-bit data bits. In order to realize the data transmission between EQ2C8Q208 and TMS320F2812, on the basis of the above hardware connection, the interrupt read and write mode based on the interrupt control word is customized, EQ2C8Q208 generates an external interrupt signal, and the corresponding read and write is realized by identifying the read and write flag bits in EQ2C8Q208 by TMS320F2812 control.

所述EQ2C8Q208逻辑转换电路模块与TMS320F2812数字信号处理模块相连接,通过中断控制方式实现两者之间的数据交换,所述TMS320F2812数字信号处理模块与JTAG调试电路接口模块相连接,实现对TMS320F2812数字信号处理模块的算法程序写入和监控。The EQ2C8Q208 logic conversion circuit module is connected with the TMS320F2812 digital signal processing module, and the data exchange between the two is realized through an interrupt control mode. Write and monitor the algorithm program of the processing module.

所述EQ2C8Q208逻辑转换电路模块与8路SSI同步串行数据采集模块相连接,采用电平转换芯片MAX3490将传感器输入的差分信号转换为0~3.3V的TTL电平信号,所述8路SSI同步串行数据采集模块与外接端子相连接,并在两差分信号之间添加电阻,确保电压稳定。The EQ2C8Q208 logic conversion circuit module is connected to the 8-way SSI synchronous serial data acquisition module, and the level conversion chip MAX3490 is used to convert the differential signal input by the sensor into a TTL level signal of 0-3.3V, and the 8-way SSI synchronous The serial data acquisition module is connected with external terminals, and a resistor is added between the two differential signals to ensure voltage stability.

所述EQ2C8Q208逻辑转换电路模块与PCI9054的PCI接口电路模块相连接,采用并行数据传输方式,数据位最大可达32位,地址位最大可达29位,所述PCI9054的PCI接口电路模块与通用PCI总线插头相连接,通过此插头与工控机相应的PCI插槽连接,实现工控机与运动控制板卡之间的并行数据交换。The EQ2C8Q208 logic conversion circuit module is connected with the PCI interface circuit module of PCI9054, adopts parallel data transmission mode, the data bit can reach 32 bits at most, and the address bit can reach 29 bits at most. The bus plug is connected, through which the plug is connected with the corresponding PCI slot of the industrial computer to realize the parallel data exchange between the industrial computer and the motion control board.

所述EQ2C8Q208逻辑转换电路模块与数字电路隔离芯片TLP117相连接,两者通过SPI串行总线由EQ2C8Q208逻辑转换电路模块向TLP117进行单向数据传输,实现电气之间的隔离和高达10M的串行数据通讯,所述数字电路隔离芯片TLP117与D/A转换芯片AD5628相连接,所述D/A转换芯片AD5628与模拟量输出电压放大电路模块LM224J相连接,所述模拟量输出电压放大电路模块LM224J与外接端子相连接,其输出可驱动执行器。The EQ2C8Q208 logic conversion circuit module is connected with the digital circuit isolation chip TLP117, and the two perform unidirectional data transmission from the EQ2C8Q208 logic conversion circuit module to the TLP117 through the SPI serial bus to realize electrical isolation and up to 10M serial data Communication, the digital circuit isolation chip TLP117 is connected with the D/A conversion chip AD5628, the D/A conversion chip AD5628 is connected with the analog output voltage amplification circuit module LM224J, and the analog output voltage amplification circuit module LM224J is connected with the The external terminals are connected, and its output can drive the actuator.

所述EQ2C8Q208逻辑转换电路模块与数字电路隔离芯片TLP117相连接,两者通过SPI串行总线由EQ2C8Q208逻辑转换电路模块向TLP117进行单向数据传输,实现电气之间的隔离和高达10M的串行数据通讯;所述A/D转换芯片AD7928与隔离芯片IOS721相连接,所述隔离芯片IOS721与EQ2C8Q208相连接,串行数字信号由AD转换电路向EQ2C8Q208单向传输,并实现电气之间的隔离;所述数字电路隔离芯片TLP117与A/D转换芯片AD7928相连接,所述A/D转换芯片AD7928与外接端子相连接,作为模拟量数据接口。The EQ2C8Q208 logic conversion circuit module is connected with the digital circuit isolation chip TLP117, and the two perform unidirectional data transmission from the EQ2C8Q208 logic conversion circuit module to the TLP117 through the SPI serial bus to realize electrical isolation and up to 10M serial data Communication; the A/D conversion chip AD7928 is connected with the isolation chip IOS721, and the isolation chip IOS721 is connected with the EQ2C8Q208, and the serial digital signal is transmitted unidirectionally by the AD conversion circuit to the EQ2C8Q208, and realizes electrical isolation; The digital circuit isolation chip TLP117 is connected with the A/D conversion chip AD7928, and the A/D conversion chip AD7928 is connected with an external terminal as an analog data interface.

所述EQ2C8Q208逻辑转换电路模块与JTAG程序下载接口模块相连接,可以完成对EQ2C8Q208逻辑转换电路模块的程序下载。The EQ2C8Q208 logic conversion circuit module is connected with the JTAG program download interface module, and can complete the program download of the EQ2C8Q208 logic conversion circuit module.

所述EQ2C8Q208逻辑转换电路模块与数字隔离芯片ADuM1400ARW相连接,实现电器之间的隔离,所述数字隔离芯片ADuM1400ARW与外接端子相连接,实现数字量的输入和输出。2运动控制板卡及调理板的信号走向说明The EQ2C8Q208 logic conversion circuit module is connected with the digital isolation chip ADuM1400ARW to realize isolation between electrical appliances, and the digital isolation chip ADuM1400ARW is connected with external terminals to realize digital input and output. 2 Description of the signal direction of the motion control board and the conditioning board

一种基于PCI的液压机专用运动控制器包括数字信号处理器TMS320F2812,现场可编程门阵列EQ2C8Q208,基于PCI9054的PCI接口电路,8路高速SSI总线电平转换电路,8路D/A转换电路(调理板上),8路磁耦隔离数字输入电路(调理板上),8路A/D转换电路(调理板上),8路磁耦隔离数字输出电路(调理板上),现场可编程门阵列EQ2C8Q208上编制的多接口融合逻辑,独立电源电路。A PCI-based special motion controller for hydraulic presses includes digital signal processor TMS320F2812, field programmable gate array EQ2C8Q208, PCI interface circuit based on PCI9054, 8-way high-speed SSI bus level conversion circuit, 8-way D/A conversion circuit (conditioning on board), 8-way magnetic coupling isolation digital input circuit (conditioning board), 8-way A/D conversion circuit (conditioning board), 8-way magnetic coupling isolation digital output circuit (conditioning board), field programmable gate array Multi-interface fusion logic compiled on EQ2C8Q208, independent power supply circuit.

模拟量输入信号走向:EQ2C8Q208通过SPI总线将控制字写入AD7928,期间通过芯片TLP117进行电气隔离。外接端子接收变送器输入的0~10V电压信号,通过电阻分压得到0~5V标准电压信号,经再A/D转换芯片AD7928转换为12位高精度数字信号,然后通过数字量隔离芯片IOS721进行数字信号的电气隔离,隔离后的串行数字信号通过SPI总线传输至EQ2C8Q208。Analog input signal direction: EQ2C8Q208 writes the control word into AD7928 through SPI bus, and conducts electrical isolation through chip TLP117 during this period. The external terminal receives the 0-10V voltage signal input by the transmitter, and obtains a 0-5V standard voltage signal through resistance division, which is converted into a 12-bit high-precision digital signal by the A/D conversion chip AD7928, and then passed through the digital isolation chip IOS721 The electrical isolation of the digital signal is carried out, and the isolated serial digital signal is transmitted to the EQ2C8Q208 through the SPI bus.

模拟量输出信号走向:数字信号由EQ2C8Q208通过SPI总线传输至数字量隔离芯片TLP117,在此进行数字信号的电气隔离,串行数字信号通过D/A转换芯片A/D5628将12位高精度数字信号转换为模拟量信号,在经过电压信号放大电路转换为标准0~10电压信号输出。Analog output signal direction: the digital signal is transmitted from the EQ2C8Q208 to the digital isolation chip TLP117 through the SPI bus, where the electrical isolation of the digital signal is performed, and the serial digital signal is converted into a 12-bit high-precision digital signal by the D/A conversion chip A/D5628 It is converted into an analog signal, and then converted into a standard 0-10 voltage signal output through a voltage signal amplification circuit.

开关量输入信号走向:通过数字隔离芯片ADuM1400ARW由外接端子传输至EQ2C8Q208。Digital input signal direction: through the digital isolation chip ADuM1400ARW, it is transmitted from the external terminal to EQ2C8Q208.

开关量输出信号走向:通过数字隔离芯片ADuM1400ARW由EQ2C8Q208传输至外接端子。Direction of switching output signal: through the digital isolation chip ADuM1400ARW, it is transmitted from EQ2C8Q208 to the external terminal.

并行数字量和地址信号走向:现场可编程门阵列EQ2C8Q208作为各种数字量信号的中转模块,完成与PCI总线接口芯片PCI9054的32位数字量和29位地址量的双向数据交换,同时,完成与数字信号处理器TMS320F2812的16位数字量和14位地址量的双向数据交换。Parallel digital quantity and address signal direction: Field Programmable Gate Array EQ2C8Q208 is used as a relay module of various digital quantity signals to complete the two-way data exchange with the 32-bit digital quantity and 29-bit address quantity of the PCI bus interface chip PCI9054, and at the same time, complete the communication with the Two-way data exchange of 16-bit digital quantity and 14-bit address quantity of digital signal processor TMS320F2812.

3逻辑设计与数据通信3 Logic Design and Data Communication

3.1FPGA内部控制逻辑设计3.1 FPGA internal control logic design

本发明已经在EQ2C8Q208中固化了高速位置(SSI)采集模块、M法和T法速度计算模块、SPI串行数据通讯模块、TMS320F2812中断控制和仲裁模块、PCI并行总线数据通讯模块(后两模块包含在双口RAM中)以保证系统各个部分的顺利通讯,并能进行有效的控制,具体逻辑设计如图5所示。The present invention has solidified the high-speed position (SSI) acquisition module, M method and T method speed calculation module, SPI serial data communication module, TMS320F2812 interrupt control and arbitration module, PCI parallel bus data communication module in EQ2C8Q208 (the latter two modules include In the dual-port RAM) to ensure the smooth communication of each part of the system, and to carry out effective control, the specific logic design is shown in Figure 5.

SSI通讯协议为缩写,其全称为同步串行接口。SSI采用主机主动读方式,即主控器对从设备发出一个时钟脉冲,从设备输出一位数据,数据从最高有效位(MSB)开始传输。根据输入SSI信号的时序要求,将SSI采集模块分为时钟产生模块、数据接收模块和数据转换模块。其结构图如图6所示。此模块可根据所选液压机所带光栅尺格式的不同(二进制和格雷码)主动向外设输出时钟信号,并将光栅尺传入的串行位置数据转换为32位并行数据。为本设计采用的是连续采样,采样周期为T,T为一可设定值(从1M到10K)。利用FPGA的特性,在其内实现8路并行SSI采样,并采用同一系统时钟,这样就确保了位置采样的实时性和同步。The SSI communication protocol is an abbreviation, and its full name is Synchronous Serial Interface. The SSI adopts the host active read method, that is, the master controller sends a clock pulse to the slave device, and the slave device outputs one bit of data, and the data is transmitted from the most significant bit (MSB). According to the timing requirements of the input SSI signal, the SSI acquisition module is divided into a clock generation module, a data receiving module and a data conversion module. Its structural diagram is shown in Figure 6. This module can actively output clock signals to peripherals according to the grating scale format (binary and gray code) of the selected hydraulic press, and convert the serial position data from the grating scale into 32-bit parallel data. This design uses continuous sampling, the sampling period is T, and T is a settable value (from 1M to 10K). Utilizing the characteristics of FPGA, 8-way parallel SSI sampling is realized in it, and the same system clock is used, so as to ensure the real-time and synchronization of position sampling.

测速模块则是根据SSI通信模块转换后的并行数据和采样时钟,分别按T法和M法进行速度计算,以实现速度快速计算,减少后续控制算法所需资源。由于本设计采用的是连续采样,并且采样频率较高,所以可以用采样周期T为系统计时的单位时间。The speed measurement module calculates the speed according to the T method and the M method respectively according to the parallel data converted by the SSI communication module and the sampling clock, so as to realize fast speed calculation and reduce the resources required for subsequent control algorithms. Because this design uses continuous sampling, and the sampling frequency is high, so the sampling period T can be used as the unit time of the system timing.

在本设计中,FPGA上实现了一个68*16位的双口RAM,此双口RAM为SPI总线模块和数据中转模块的载体。双口RAM的两端分别主要根据PCI9054的局部总线协议和DSP的外设16位总线协议编写读写控制,其与DSP通信使用的是DSP的16位外部总线,物理地址对应于DSP的0区(既起始地址为0X2000)。上位机与主控制芯片DSP之间的数据交互都通过PCI总线,再经过PCI9054转换到局部总线,再经过FPGA中实现的双口RAM传输到DSP中,反之依然。PCI9054与DSP都被设计为主设备,双口RAM都为从设备。In this design, a 68*16-bit dual-port RAM is implemented on the FPGA, which is the carrier of the SPI bus module and the data transfer module. The two ends of the dual-port RAM are mainly based on the PCI9054 local bus protocol and the DSP peripheral 16-bit bus protocol to write read and write control. It communicates with the DSP using the DSP's 16-bit external bus, and the physical address corresponds to the 0 area of the DSP. (The starting address is 0X2000). The data interaction between the upper computer and the main control chip DSP is through the PCI bus, and then converted to the local bus through the PCI9054, and then transmitted to the DSP through the dual-port RAM implemented in the FPGA, and vice versa. Both PCI9054 and DSP are designed as master devices, and dual-port RAMs are slave devices.

根据实际需求将双口RAM的不同存储区分成不同的功能区,根据不同区的需求做了不同的限定。其中快速共享区的大小为16*16位,设定为PCI9054与DSP都可读写,这部分存储区为PCI9054与DSP共享,数据传输效率最快,用于存放上位机与DSP之间共用的,并需要快速传输的数据。According to actual needs, different storage areas of dual-port RAM are divided into different functional areas, and different restrictions are made according to the needs of different areas. Among them, the size of the fast shared area is 16*16 bits, which is set to be readable and writable by both the PCI9054 and the DSP. This part of the storage area is shared by the PCI9054 and the DSP, and the data transmission efficiency is the fastest. , and require fast data transfer.

由于上位机与DSP之间的数据量会超过快速共享区的大小,但所需传输速率不快,并且都为上位机主动读写。所以设置数据读写区。其设定为PCI9054与DSP都可读写,大小为16*16位。数据读写区的前32位为读写控制字,定义如下:31-16位:偏移地址量,用于区分中断后读写的地址区。15-8位:读/写中断标志,当这八位是FF时,表示进入中断后执行写程序,当这八位是00时,表示进入读中断,进入中断后执行读程序。7-0位:这八位表示一次要读/写的个数。数据读写区的最后32位为中断开启控制字,当其全为1时,INT信号变低,使DSP进入中断。当其全为0时,INT信号变高。DSP内编写相应的中断程序,以实现数据的转换。Because the amount of data between the host computer and DSP will exceed the size of the fast shared area, but the required transmission rate is not fast, and all of them are actively read and written by the host computer. So set the data read and write area. It is set to be readable and writable by both PCI9054 and DSP, and the size is 16*16 bits. The first 32 bits of the data read and write area are read and write control words, defined as follows: 31-16 bits: offset address, used to distinguish the address area for reading and writing after interruption. Bit 15-8: read/write interrupt flag. When these eight bits are FF, it means that the write program is executed after entering the interrupt. When these eight bits are 00, it means that the read interrupt is entered, and the read program is executed after entering the interrupt. Bit 7-0: These eight bits represent the number of read/write at a time. The last 32 bits in the data read and write area are the interrupt enable control word, when all of them are 1, the INT signal becomes low to make the DSP enter the interrupt. When it is all 0, the INT signal goes high. Write corresponding interrupt program in DSP to realize data conversion.

位置与速度区,大小为32*16位用于存放由SSI采集模块和测速模块产生的位置信号和速度信号,其对PCI9054和DSP都为只读。The position and speed area, with a size of 32*16 bits, is used to store the position signal and speed signal generated by the SSI acquisition module and the speed measurement module. It is read-only for both PCI9054 and DSP.

SPI区分为两个SPI每个大小都为2*16位,其中前32位用于与对D/A的控制,最后两个16位存储区位A/D的控制寄数据存器和数据寄存器。此区外带并行转串行功能,当SPI_CS_DA为低电平时将前32并行数据转换成SPI数据输出给调理板上的DA。当SPI_CS_AD为低电平时将控制寄数据存器并行数据转换成SPI数据输出给调理板上的AD并接收器传来的数据转换为并行数据,存在数据寄存器中。此区只对DSP开放,并且最后16位为只读[10-11]。The SPI area is divided into two SPIs, each with a size of 2*16 bits, of which the first 32 bits are used to control D/A, and the last two 16-bit storage areas are A/D control registers and data registers. This area has a parallel-to-serial function. When SPI_CS_DA is low, the first 32 parallel data are converted into SPI data and output to the DA on the conditioning board. When SPI_CS_AD is low level, the parallel data of the control register data register is converted into SPI data and output to the AD on the conditioning board, and the data from the receiver is converted into parallel data and stored in the data register. This area is only open to DSP, and the last 16 bits are read-only [10-11].

由于对双口RAM读写有可能是对同一个16为储存单元操作,所以需要互相屏蔽,并设定优先级。为解决以上问题,在本设计中使用DSP和PCI9054的延时读写功能,在有一端口对双口RAM操作时,将除此端口外的端口的READY信号设为无效状态,表示双口RAM处于‘忙’状态。并且测速模块和SSI检测模块只有在双口RAM‘空闲’状态时才可将数据存入双口RAM中。Since reading and writing to dual-port RAM may be performed on the same 16-bit storage unit, it is necessary to shield each other and set priorities. In order to solve the above problems, the delay reading and writing function of DSP and PCI9054 is used in this design. When one port is operating on the dual-port RAM, the READY signal of the port other than this port is set to an invalid state, indicating that the dual-port RAM is in an invalid state. 'busy' status. And the speed measurement module and the SSI detection module can store data in the dual-port RAM only when the dual-port RAM is in the 'idle' state.

3.2DSP程序设计3.2 DSP program design

TMS320F2812是运行控制算法的核心处理器,各种控制算法可以以C语言编写实现,工控机主要运行用户监控界面,实现用户对当前系统状态的实时监控和参数改写,因此DSP程序设计是体现本发明控制方案的核心所在。本发明为用户编写了用于TMS320F2812上的模块化的数据传输协议,D/A输出函数,通用I/O函数。本发明为用户编写了工控机与运动控制板卡之间通信的驱动程序,方便用户编写TMS320F2812内的控制程序和工控机的监控程序。TMS320F2812 is the core processor of the operation control algorithm. Various control algorithms can be written and implemented in C language. The industrial computer mainly runs the user monitoring interface to realize the real-time monitoring and parameter rewriting of the current system state by the user. Therefore, the DSP program design embodies the present invention. The heart of the control scheme. The invention writes modularized data transmission protocol, D/A output function and general I/O function for users on TMS320F2812. The invention writes the driver program for the communication between the industrial computer and the motion control board for the user, which is convenient for the user to write the control program in the TMS320F2812 and the monitoring program of the industrial computer.

DSP主程序如图9所示。The DSP main program is shown in Figure 9.

图9所示为DSP这程序流程图,包括各功能模块初始化和主循环两部分。在主循环中又包括四个主要功能模块,分别是:AD数据采集及格式转换模块、DA数据格式转换及输出模块、控制算法运行模块和DSP与FPGA的中断数据通讯模块。以下对各功能模块进行说明:Figure 9 shows the program flow chart of DSP, including the initialization of each function module and the main loop. The main loop also includes four main functional modules, namely: AD data acquisition and format conversion module, DA data format conversion and output module, control algorithm operation module and DSP and FPGA interrupt data communication module. Each functional module is described as follows:

(1)AD数据采集及格式转换模块(1) AD data acquisition and format conversion module

AD数据采集电路将输入系统的模拟量信号转变为12位高精度数字信号,同SPI串行总线的方式输入FPGA,进而转变成为并行数据信号,DSP通过中断数据通讯子程序获取FPGA存储区中的数据,并按规定数制变换将其变换为控制算法运行可用的数据格式。The AD data acquisition circuit converts the analog signal of the input system into a 12-bit high-precision digital signal, which is input into the FPGA in the same way as the SPI serial bus, and then converted into a parallel data signal. The DSP obtains the data in the FPGA storage area by interrupting the data communication subroutine. Data, and transform it into a usable data format for the operation of the control algorithm according to the prescribed number system transformation.

(2)DA数据格式转换及输出模块(2) DA data format conversion and output module

控制系统所需的模拟量输出信号大小来自于控制算法的运算输出,DSP中运行的控制算法根据实际系统的控制要求输出相应的控制信号,如图9所示,通常运算得出的结果为浮点数,通过规定的数值转换将其转换成对应DA芯片的12位数字量,通过FPGA的SPI串行总线传输至DA转换芯片,进而得到所要的模拟量。The size of the analog output signal required by the control system comes from the operation output of the control algorithm. The control algorithm running in the DSP outputs the corresponding control signal according to the control requirements of the actual system, as shown in Figure 9. Usually the result of the operation is floating The points are converted into 12-bit digital quantities corresponding to the DA chip through the specified numerical conversion, and then transmitted to the DA conversion chip through the SPI serial bus of the FPGA to obtain the desired analog quantity.

(3)控制算法运行模块(3) Control algorithm operation module

本系统中,控制算法运行模块为程序设计的核心所在,通常情况下主控制程序要完成的任务有:工作模式的判断、速度计算方法的切换、输出大小阀的切换、偏差的计算、控制量的计算。具体流程如图10所示。In this system, the control algorithm operation module is the core of program design. Usually, the tasks to be completed by the main control program include: judgment of working mode, switching of speed calculation method, switching of output valve, deviation calculation, control amount calculation. The specific process is shown in Figure 10.

当锻造液压机运行在速度较低的状态下时,单杆活塞缸所需油液流量很小。此时,若比例方向阀的口径取的过大,其实际运行时的开口就会关的很小,锻造液压机会产生强烈而刺耳的噪声,而且液压油的温度也会上升的很快。相反比例方向阀的通流口径选的过小,又不能满足锻造液压机高速工作时大流量的要求;同时为了匹配双油液供油回路,控制系统设计了两套比例方向阀系统:大口径阀系统和小口径阀系统。When the forging hydraulic press is running at a low speed, the oil flow required by the single-rod piston cylinder is very small. At this time, if the caliber of the proportional directional valve is too large, the opening will be closed very small during actual operation, the forging hydraulic machine will produce strong and harsh noise, and the temperature of the hydraulic oil will also rise rapidly. On the contrary, the flow diameter of the proportional directional valve is too small, and it cannot meet the requirements of large flow when the forging hydraulic machine works at high speed; at the same time, in order to match the dual oil supply circuit, the control system has designed two sets of proportional directional valve systems: large diameter valve system and small bore valve system.

图10中,大小阀切换部分需要同时控制大阀和小阀,一路为大阀的控制量计算,另一路为小阀的控制量计算,其他情况下只用大阀或只用小阀时只需计算相应的控制量即可。In Figure 10, the switching part of the large and small valves needs to control the large valve and the small valve at the same time. One path is for the calculation of the control amount of the large valve, and the other path is for the calculation of the control amount of the small valve. In other cases, only the large valve or the small valve is used. It is necessary to calculate the corresponding control quantity.

(4)DSP与FPGA的中断数据通讯模块。当工控机发出指令,要读或写某一轴的参数时,首先写入中断控制字,FPGA根据控制字产生中断信号,DSP进入外部中断程序。DSP内外部中断程序识别中断控制字,同时实现FPGA与外部存储的数据交换,然后再读写相关数据,便可读写某一特定参数值。中断控制字设定如下:(4) Interrupt data communication module between DSP and FPGA. When the industrial computer sends an instruction to read or write the parameters of a certain axis, first write the interrupt control word, FPGA generates an interrupt signal according to the control word, and DSP enters the external interrupt program. The DSP internal and external interrupt program recognizes the interrupt control word, realizes the data exchange between the FPGA and the external storage at the same time, and then reads and writes the relevant data to read and write a specific parameter value. The interrupt control word is set as follows:

  31 31   30 30   29 29   28 28   27 27   26 26   25 25   24 twenty four   23 twenty three   22 twenty two   21 twenty one   20 20   19 19   18 18   17 17   16 16

  15 15   14 14   13 13   12 12   11 11   10 10   9 9   8 8   7 7   6 6   5 5   4 4   3 3   2 2   1 1   0 0

定义如下:It is defined as follows:

①31-16位:偏移地址量,用于区分中断后读写的地址区。①Bit 31-16: Offset address, used to distinguish the address area for reading and writing after interruption.

②15-8位:读/写中断标志,当这八位是FF时,进入中断后执行写程序,当这八位是00时,进入读中断,进入中断后执行读程序。②Bit 15-8: read/write interrupt flag, when these eight bits are FF, execute the write program after entering the interrupt, when these eight bits are 00, enter the read interrupt, and execute the read program after entering the interrupt.

③7-0位:这八位是一次要读/写的个数。③7-0 bit: These eight bits are the number of read/write at one time.

4控制算法举例4 Examples of Control Algorithms

在前述80MN液压控制系统设计实例中控制算法采用双闭环同步PID控制在DSP上实现。对于每个缸设计独立的双闭环控制算法,外环PID控制器的入是滑块速度与整定后的给定速度的差值,通过PID控制律计算出给定压差,作为内环的给定输入;内环PID控制器的输入是给定压力与实际压力的差值,通过PID控制律计算出阀的开度,作为被控对象的控制输入。由于液压机再运行时所受的的反抗力矩是非对称的,所以多缸的运行时会产生较大的同步误差,系统将不能正常工作,无法实现高精度加工。为解决以上问题,采用同步补偿的方法来进行控制,即在计算速度偏差之前先根据滑块的位置信息来整定给定速度,并且以一个特定的液压缸所对应的位置为基准位置,对于位置大于此基准位置的,将给定速度适当减小,对于位置小于此基准位置的,将给定速度适当加大。双闭环同步PID控制算法框图如图8所示。其中基准缸的权值为0,其余的根据缸的位置而定。双闭环同步PID控制算法要求对各个滑块位置的采样必须是实时的、同步的。In the aforementioned 80MN hydraulic control system design example, the control algorithm is realized on DSP by using double closed-loop synchronous PID control. An independent double closed-loop control algorithm is designed for each cylinder. The input of the outer loop PID controller is the difference between the slider speed and the set given speed, and the given pressure difference is calculated through the PID control law, which is used as the given pressure of the inner loop. fixed input; the input of the inner loop PID controller is the difference between the given pressure and the actual pressure, and the opening of the valve is calculated through the PID control law as the control input of the controlled object. Since the resistance torque suffered by the hydraulic press is asymmetrical when it is running again, a large synchronization error will be generated when the multi-cylinder is running, the system will not work normally, and high-precision machining cannot be realized. In order to solve the above problems, the method of synchronous compensation is used for control, that is, the given speed is set according to the position information of the slider before calculating the speed deviation, and the position corresponding to a specific hydraulic cylinder is used as the reference position. For the position If the position is greater than this reference position, the given speed will be appropriately reduced; if the position is smaller than this reference position, the given speed will be appropriately increased. The block diagram of double closed-loop synchronous PID control algorithm is shown in Figure 8. Among them, the weight of the reference cylinder is 0, and the rest depends on the position of the cylinder. The double-closed-loop synchronous PID control algorithm requires that the sampling of each slider position must be real-time and synchronous.

5总结5 summary

基于PCI的液压机专用运动控制方法,借助于前述基于PCI的液压机专用运动控制器实现,并包括下列功能:The PCI-based hydraulic machine-specific motion control method is realized by means of the aforementioned PCI-based hydraulic machine-specific motion controller, and includes the following functions:

在TMS320F2812数字信号处理模块上,执行的功能是:主要用来发送指令、接受数据以及完成一些复杂的算法控制并通过其16位并行总线与FPGA相连,此芯片为专为工业控制设计的芯片,带有多种外部接口,其内部时钟高达150MHZ,计算速度快,可减小控制程序的运行时间,以提高控制效果;On the TMS320F2812 digital signal processing module, the functions performed are: mainly used to send instructions, receive data and complete some complex algorithm control and connect to FPGA through its 16-bit parallel bus. This chip is specially designed for industrial control. With a variety of external interfaces, its internal clock is as high as 150MHZ, and the calculation speed is fast, which can reduce the running time of the control program and improve the control effect;

在EQ2C8Q208逻辑转换电路模块上,执行的功能是:主要完成8路SSI信号的采集和时序控制,M法和T法测速、实现了两个SPI总线用于主板与调理板的数据交互,并在其内实现双口RAM为核心的数据中转与控制,完成了各部分数据的整合。On the EQ2C8Q208 logic conversion circuit module, the functions performed are: mainly complete the acquisition and timing control of 8-way SSI signals, M method and T method speed measurement, realize two SPI buses for data interaction between the main board and the conditioning board, and in It realizes data transfer and control with dual-port RAM as the core, and completes the integration of various parts of data.

本发明解决了现有大型液压机控制系统控制器过分依赖于国外几种通用控制器、专用性能差、硬件资源浪费等不足。提供了一种低成本、高可靠性、使用和维护简单的大型液压机运动专用控制器。本发明既可以用一个独立的控制板卡实现对单台液压机的调平调速控制,也可以与工控机搭配共同组成一套完整的控制系统,不单实现基本的性能控制,也能搭建满足用户需要的友好界面,为使用者提供一个简便易操作的环境,具有良好的经济效益和社会效益。The invention solves the problems that the existing large-scale hydraulic machine control system controller relies too much on several foreign general-purpose controllers, has poor special-purpose performance, wastes hardware resources, and the like. The invention provides a low-cost, high-reliability, easy-to-use and maintenance-friendly controller dedicated to the movement of large hydraulic presses. The present invention can not only use an independent control board to realize the leveling and speed regulation control of a single hydraulic machine, but also can be combined with an industrial computer to form a complete control system, which not only realizes basic performance control, but also can be built to satisfy users The necessary friendly interface provides users with a simple and easy-to-operate environment, and has good economic and social benefits.

Claims (5)

1.一种基于PCI的液压机专用运动控制器,其特征是,包括模拟量输入模块、模拟量输出模块、TMS320F2812数字信号处理模块、EQ2C8Q208逻辑电路转换模块、PCI9054总线数据通讯模块、开关量输入电路模块、开关量输出电路模块;Q2C8Q208逻辑转换电路模块分别与前述各模块相连;1. A special motion controller for hydraulic machines based on PCI, characterized in that it includes an analog input module, an analog output module, a TMS320F2812 digital signal processing module, an EQ2C8Q208 logic circuit conversion module, a PCI9054 bus data communication module, and a switch input circuit module, switching value output circuit module; the Q2C8Q208 logic conversion circuit module is connected to the aforementioned modules respectively; EQ2C8Q208逻辑转换电路模块与TMS320F2812数字信号处理模块相连接,通过中断控制方式实现两者之间的数据交换;The EQ2C8Q208 logic conversion circuit module is connected with the TMS320F2812 digital signal processing module, and the data exchange between the two is realized through the interrupt control method; EQ2C8Q208逻辑转换电路模块经PCI9054总线数据通讯模块与工控机相应的PCI插槽连接,实现工控机与EQ2C8Q208逻辑转换电路之间的并行数据交换。The EQ2C8Q208 logic conversion circuit module is connected with the corresponding PCI slot of the industrial computer through the PCI9054 bus data communication module to realize the parallel data exchange between the industrial computer and the EQ2C8Q208 logic conversion circuit. 2.如权利要求1所述的基于PCI的液压机专用运动控制器,其特征是,模拟量输入模块结构为:EQ2C8Q208通过SPI总线将控制字写入AD7928,期间通过芯片TLP117进行电气隔离;外接端子接收变送器输入的0~10V电压信号,通过电阻分压得到0~5V标准电压信号,经再A/D转换芯片AD7928转换为12位高精度数字信号,然后通过数字量隔离芯片IOS721进行数字信号的电气隔离,隔离后的串行数字信号通过SPI总线传输至EQ2C8Q208。2. The special motion controller based on PCI for hydraulic presses as claimed in claim 1 is characterized in that the structure of the analog input module is: EQ2C8Q208 writes the control word into AD7928 through the SPI bus, during which the electrical isolation is carried out by the chip TLP117; the external terminal Receive the 0-10V voltage signal input by the transmitter, and obtain the 0-5V standard voltage signal through resistance division, and then convert it into a 12-bit high-precision digital signal through the A/D conversion chip AD7928, and then carry out the digital signal through the digital isolation chip IOS721. The electrical isolation of the signal, the isolated serial digital signal is transmitted to the EQ2C8Q208 through the SPI bus. 3.如权利要求1所述的基于PCI的液压机专用运动控制器,其特征是,模拟量输出模块结构为:数字信号由EQ2C8Q208通过SPI总线传输至数字量隔离芯片TLP117,在此进行数字信号的电气隔离,串行数字信号通过D/A转换芯片A/D5628将12位高精度数字信号转换为模拟量信号,在经过电压信号放大电路转换为标准0~10电压信号输出。3. The special motion controller based on PCI for hydraulic presses as claimed in claim 1 is characterized in that, the structure of the analog output module is: the digital signal is transmitted to the digital quantity isolation chip TLP117 by the EQ2C8Q208 through the SPI bus, and the digital signal is processed here. Electrically isolated, the serial digital signal converts the 12-bit high-precision digital signal into an analog signal through the D/A conversion chip A/D5628, and then converts it into a standard 0-10 voltage signal output through a voltage signal amplification circuit. 4.如权利要求1所述的基于PCI的液压机专用运动控制器,其特征是,借助于所述各模块及其相互连接关系实现,其中EQ2C8Q208逻辑电路转换模块进一步包括:高速位置(SSI)采集模块、M法和T法速度计算模块、SPI串行数据通讯模块、TMS320F2812中断控制和仲裁模块、PCI并行总线数据通讯模块,TMS320F2812中断控制和仲裁模块和PCI并行总线数据通讯模块包含在双口RAM中。4. the special-purpose motion controller based on PCI for hydraulic press as claimed in claim 1, is characterized in that, realizes by means of described each module and interconnection relation thereof, wherein EQ2C8Q208 logic circuit conversion module further comprises: high-speed position (SSI) acquisition Module, M method and T method speed calculation module, SPI serial data communication module, TMS320F2812 interrupt control and arbitration module, PCI parallel bus data communication module, TMS320F2812 interrupt control and arbitration module and PCI parallel bus data communication module are included in the dual-port RAM middle. 5.如权利要求4所述的基于PCI的液压机专用运动控制器,其特征是,TMS320F2812数字信号处理模块进一步包括:AD数据采集及格式转换模块、DA数据格式转换及输出模块、控制算法运行模块和DSP与FPGA的中断数据通讯模块:5. The special-purpose motion controller for hydraulic press based on PCI as claimed in claim 4, is characterized in that, TMS320F2812 digital signal processing module further comprises: AD data acquisition and format conversion module, DA data format conversion and output module, control algorithm operation module Interrupt data communication module with DSP and FPGA: AD数据采集及格式转换模块用于:将输入的模拟量信号转变为12位高精度数字信号,以SPI串行总线的方式输入EQ2C8Q208逻辑电路转换模块,进而转变成为并行数据信号;通过中断数据通讯子程序获取FPGA存储区中的数据,并按规定数制变换将其变换为控制算法运行可用的数据格式;The AD data acquisition and format conversion module is used to: convert the input analog signal into a 12-bit high-precision digital signal, input it into the EQ2C8Q208 logic circuit conversion module in the form of an SPI serial bus, and then convert it into a parallel data signal; by interrupting the data communication The subroutine obtains the data in the FPGA storage area, and transforms it into a data format available for the operation of the control algorithm according to the specified number system transformation; DA数据格式转换及输出模块用于:将控制信号通过规定的数值转换转换成对应DA 芯片的12位数字量,通过FPGA的SPI串行总线传输至DA转换芯片,进而得到所要的模拟量;The DA data format conversion and output module is used to: convert the control signal into a 12-bit digital quantity corresponding to the DA chip through the specified numerical conversion, and transmit it to the DA conversion chip through the SPI serial bus of the FPGA to obtain the desired analog quantity; 控制算法运行模块用于:工作模式的判断、速度计算方法的切换、输出大小阀的切换、偏差的计算、控制量的计算;The control algorithm operation module is used for: the judgment of the working mode, the switching of the speed calculation method, the switching of the output valve, the calculation of the deviation, and the calculation of the control amount; DSP与FPGA的中断数据通讯模块。Interrupt data communication module between DSP and FPGA.
CN2012103005296A 2012-08-22 2012-08-22 Special PCI (Peripheral Component Interconnect)-based hydraulic machine motion control method and controller Pending CN102806683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012103005296A CN102806683A (en) 2012-08-22 2012-08-22 Special PCI (Peripheral Component Interconnect)-based hydraulic machine motion control method and controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012103005296A CN102806683A (en) 2012-08-22 2012-08-22 Special PCI (Peripheral Component Interconnect)-based hydraulic machine motion control method and controller

Publications (1)

Publication Number Publication Date
CN102806683A true CN102806683A (en) 2012-12-05

Family

ID=47230628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012103005296A Pending CN102806683A (en) 2012-08-22 2012-08-22 Special PCI (Peripheral Component Interconnect)-based hydraulic machine motion control method and controller

Country Status (1)

Country Link
CN (1) CN102806683A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103192545A (en) * 2013-03-29 2013-07-10 天津大学 Controller, control system and control method of hydraulic machine movement on basis of Ethernet
CN103676739A (en) * 2013-12-05 2014-03-26 上海交通大学 DMA data transmission system based on embedded motion control board card and transmission method thereof
CN106773907A (en) * 2016-11-25 2017-05-31 歌尔股份有限公司 A kind of Remote I/O Control System and its controller and I/O module
CN108268002A (en) * 2017-12-14 2018-07-10 深圳市显控科技股份有限公司 A kind of combination HMI and the all-in-one machine and communication means of PLC functions
CN110385884A (en) * 2018-04-16 2019-10-29 金丰机器工业股份有限公司 More piece point type graphically processes the control system and its control method of stroke
CN112731841A (en) * 2020-12-26 2021-04-30 陕西航空电气有限责任公司 Communication circuit of controller of aviation high-voltage brushless direct-current motor
CN113485183A (en) * 2021-07-01 2021-10-08 浙江大学 Serial signal acquisition output control device based on PCI bus protocol
CN113656250A (en) * 2021-08-18 2021-11-16 天津津航计算技术研究所 Method for realizing lower computer board card state monitoring technology
CN114321103A (en) * 2021-12-24 2022-04-12 杭州电子科技大学 A multi-stage pressure flow control method for a permanent magnet synchronous motor hydraulic system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2624254Y (en) * 2003-06-25 2004-07-07 中国人民解放军国防科学技术大学 Multi-axis motion controller
CN200954695Y (en) * 2006-08-31 2007-10-03 东南大学 Computer Numerical Control Device for AC Servo Motor Directly Driven Crank Press
CN201366807Y (en) * 2008-12-29 2009-12-23 中国第一重型机械股份公司 Control system for numerically controlled hydraulic cushion of mechanism press
CN102455697A (en) * 2011-03-25 2012-05-16 扬州亚星客车股份有限公司 Electric bus vehicle control unit based on programmable logic controller (PLC) technology
CN102591250A (en) * 2012-02-28 2012-07-18 杭州电子科技大学 Dual-CPU (central processing unit) combined type motion controller

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2624254Y (en) * 2003-06-25 2004-07-07 中国人民解放军国防科学技术大学 Multi-axis motion controller
CN200954695Y (en) * 2006-08-31 2007-10-03 东南大学 Computer Numerical Control Device for AC Servo Motor Directly Driven Crank Press
CN201366807Y (en) * 2008-12-29 2009-12-23 中国第一重型机械股份公司 Control system for numerically controlled hydraulic cushion of mechanism press
CN102455697A (en) * 2011-03-25 2012-05-16 扬州亚星客车股份有限公司 Electric bus vehicle control unit based on programmable logic controller (PLC) technology
CN102591250A (en) * 2012-02-28 2012-07-18 杭州电子科技大学 Dual-CPU (central processing unit) combined type motion controller

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
石江华: "基于DSP与FPGA的四轴运动控制器设计与研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 08, 15 August 2012 (2012-08-15) *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103192545A (en) * 2013-03-29 2013-07-10 天津大学 Controller, control system and control method of hydraulic machine movement on basis of Ethernet
CN103676739A (en) * 2013-12-05 2014-03-26 上海交通大学 DMA data transmission system based on embedded motion control board card and transmission method thereof
CN103676739B (en) * 2013-12-05 2016-06-01 上海交通大学 A kind of DMA data transmission system based on embedded motion control board card and transmission method thereof
CN106773907A (en) * 2016-11-25 2017-05-31 歌尔股份有限公司 A kind of Remote I/O Control System and its controller and I/O module
CN108268002A (en) * 2017-12-14 2018-07-10 深圳市显控科技股份有限公司 A kind of combination HMI and the all-in-one machine and communication means of PLC functions
CN110385884A (en) * 2018-04-16 2019-10-29 金丰机器工业股份有限公司 More piece point type graphically processes the control system and its control method of stroke
CN112731841A (en) * 2020-12-26 2021-04-30 陕西航空电气有限责任公司 Communication circuit of controller of aviation high-voltage brushless direct-current motor
CN113485183A (en) * 2021-07-01 2021-10-08 浙江大学 Serial signal acquisition output control device based on PCI bus protocol
CN113656250A (en) * 2021-08-18 2021-11-16 天津津航计算技术研究所 Method for realizing lower computer board card state monitoring technology
CN113656250B (en) * 2021-08-18 2024-04-05 天津津航计算技术研究所 Method for implementing lower computer board card state monitoring technology
CN114321103A (en) * 2021-12-24 2022-04-12 杭州电子科技大学 A multi-stage pressure flow control method for a permanent magnet synchronous motor hydraulic system
CN114321103B (en) * 2021-12-24 2024-02-06 杭州电子科技大学 Multistage pressure flow control method for permanent magnet synchronous motor hydraulic system

Similar Documents

Publication Publication Date Title
CN102806683A (en) Special PCI (Peripheral Component Interconnect)-based hydraulic machine motion control method and controller
CN101266482B (en) Four-axis movement control card based on singlechip
CN103192545B (en) Controller, control system and control method of hydraulic machine movement on basis of Ethernet
CN103676781B (en) A kind of error dynamic compensation system based on Siemens's 840D secondary interface
CN105680735B (en) Four axis servomotor motion control cards and method based on arm processor
CN107695775B (en) Heavy digital control machine tool heat error compensation control system and thermal error compensation method based on CPS
CN101122791A (en) Real-time Compensation Device for Positioning Error of CNC Machine Tool
CN202547697U (en) Airborne sensor data acquisition system based on FPGA (field programmable gate array)
CN103901822A (en) Multi-shaft linkage motion control system
CN1631614A (en) A Real-time Compensator for CNC Machine Tool Errors Based on Offset of External Coordinate System of Machine Tool
CN201163363Y (en) General multi-axis motion control system on numerical control machine
CN202995403U (en) Portable data acquisition instrument based on embedded operation system
CN102478820A (en) Novel real-time compensation of digit control machine tool positioning error device
CN203849591U (en) Multi-shaft linkage motion control system
CN104503302A (en) Precision motion control system and control method thereof
CN106863895A (en) A kind of multicylinder hydraulic servo-control system based on PCI
CN201945855U (en) Thermal error compensating device based on numerical controlling working table
CN207764593U (en) Electro-hydraulic bender digital control system
CN201167335Y (en) Profibus-DP bus serial port server
CN201471700U (en) Injection molding machine PROFIBUS-DP network slave station interface circuit
CN207503220U (en) A kind of circuit for extending microcontroller serial port and Modbus buses
CN203133570U (en) ARM and FPGA-based control apparatus for numerical control machine tool
CN201579650U (en) A device for controlling combined machine tools by multiple sets of numerical control systems
CN202066742U (en) Dynamic test card
CN102968117B (en) Based on the AGV interface board of FPGA

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121205