CN103901804A - Servo system real-time motion controller based on DSP and FPGA and control method - Google Patents
Servo system real-time motion controller based on DSP and FPGA and control method Download PDFInfo
- Publication number
- CN103901804A CN103901804A CN201410166049.4A CN201410166049A CN103901804A CN 103901804 A CN103901804 A CN 103901804A CN 201410166049 A CN201410166049 A CN 201410166049A CN 103901804 A CN103901804 A CN 103901804A
- Authority
- CN
- China
- Prior art keywords
- pin
- chip
- model
- fpga
- interface
- 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
Links
Images
Landscapes
- Control Of Electric Motors In General (AREA)
Abstract
基于DSP和FPGA的伺服系统实时运动控制器及控制方法,涉及伺服系统运动控制领域。本发明是为了解决现有的运动控制器不能达到较高实时通信的问题。本发明所述的RS422与FPGA进行通信,时钟电路的输出端同时连接FPGA的输入端和DSP的输入端,DSP与内存空间配置模块进行通信,内存空间配置模块与FPGA进行通信,DA转换模块、DSP和FPGA通过EMIF数据总线进行数据交互,FPGA的输出端连接DA转换模块的输入端,DA转换模块的输出端连接电机的输入端,码盘信号接入电路的输出端连接FPGA的输入端,FPGA的输入或输出端连接电机控制端子驱动接口的输出或输入端。它可用于电机控制系统中。
A real-time motion controller and control method for a servo system based on DSP and FPGA relate to the field of motion control of a servo system. The invention aims to solve the problem that the existing motion controller cannot achieve higher real-time communication. The RS422 of the present invention communicates with the FPGA, the output end of the clock circuit is connected to the input end of the FPGA and the input end of the DSP at the same time, the DSP communicates with the memory space configuration module, the memory space configuration module communicates with the FPGA, the DA conversion module, DSP and FPGA perform data interaction through the EMIF data bus. The output end of the FPGA is connected to the input end of the DA conversion module, the output end of the DA conversion module is connected to the input end of the motor, and the output end of the code disc signal access circuit is connected to the input end of the FPGA. The input or output end of the FPGA is connected to the output or input end of the drive interface of the motor control terminal. It can be used in motor control systems.
Description
技术领域technical field
本发明涉及一种基于DSP和FPGA的伺服系统实时运动控制器及控制方法。属于伺服系统运动控制领域。The invention relates to a real-time motion controller and control method of a servo system based on DSP and FPGA. It belongs to the field of servo system motion control.
背景技术Background technique
随着运动控制技术的不断进步和完善,运动控制器作为一个独立的工业自动化控制类产品,已经广泛应用于越来越多的产业领域,尤其在自动化控制领域更是占有主导地位。作为一种控制装置,运动控制器以中央逻辑控制单元为核心,以传感器为信号敏感元件,以电机或动力装置和执行单元为控制对象。它的主要任务是根据运动控制的要求和传感器件的信号进行必要的逻辑、数学运算,为电机或其它动力和执行装置提供正确的控制信号。With the continuous progress and improvement of motion control technology, motion controller, as an independent industrial automation control product, has been widely used in more and more industrial fields, especially in the field of automation control. As a control device, the motion controller takes the central logic control unit as the core, the sensor as the signal sensitive element, and the motor or power unit and the execution unit as the control objects. Its main task is to perform necessary logic and mathematical operations according to the requirements of motion control and the signals of sensor devices, and provide correct control signals for motors or other power and actuators.
伺服系统又称随动系统,是用来精确地跟随或复现某个过程的反馈控制系统。随着生产力的不断发展,要求伺服系统向高精度、高速度、大功率方向发展,这就对其控制器提出了要求。有些伺服系统中,运动控制器需要实时的进行伺服控制,这需要以DSP和FPGA作为核心处理器,充分利用DSP高速精确和FPGA灵活的优势对控制器进行优化。The servo system, also known as the servo system, is a feedback control system used to accurately follow or reproduce a certain process. With the continuous development of productivity, the servo system is required to develop in the direction of high precision, high speed and high power, which puts forward requirements for its controller. In some servo systems, the motion controller needs to perform servo control in real time, which requires DSP and FPGA as the core processors to optimize the controller by making full use of the advantages of high-speed precision of DSP and flexibility of FPGA.
发明内容Contents of the invention
本发明是为了解决现有的运动控制器不能达到较高实时通信的问题。现提供基于DSP和FPGA的伺服系统实时运动控制器及控制方法。The invention aims to solve the problem that the existing motion controller cannot achieve higher real-time communication. A real-time motion controller and control method for a servo system based on DSP and FPGA are now provided.
基于DSP和FPGA的伺服系统实时运动控制器,它包括FPGA、DSP、电机、时钟电路、DA转换模块、码盘信号接入电路、内存空间配置模块、RS422通信接口和电机控制端子驱动接口,Servo system real-time motion controller based on DSP and FPGA, which includes FPGA, DSP, motor, clock circuit, DA conversion module, code disc signal access circuit, memory space configuration module, RS422 communication interface and motor control terminal drive interface,
所述RS422通信接口的数据信号输入或输出端连接FPGA的数据信号输出或输入端,时钟电路的时钟信号输出端同时连接FPGA的时钟信号输入端和DSP的时钟信号输入端,DSP通过EMIF数据总线与内存空间配置模块进行数据交互,内存空间配置模块的内存空间配置信号输入或输出端连接FPGA的内存空间配置信号输出或输入端,DA转换模块、DSP和FPGA通过EMIF数据总线进行数据交互,FPGA的数字信号输出端连接DA转换模块的数字信号输入端,DA转换模块的模拟信号输出端连接电机的模拟信号输入端,码盘信号接入电路的电机码盘信号输出端连接FPGA的电机码盘信号输入端,FPGA的驱动信号输入或输出端连接电机控制端子驱动接口的驱动信号输出或输入端。The data signal input or output end of the RS422 communication interface is connected to the data signal output or input end of the FPGA, and the clock signal output end of the clock circuit is connected to the clock signal input end of the FPGA and the clock signal input end of the DSP at the same time, and the DSP passes the EMIF data bus Data interaction with the memory space configuration module, the memory space configuration signal input or output of the memory space configuration module is connected to the memory space configuration signal output or input of the FPGA, the DA conversion module, DSP and FPGA perform data interaction through the EMIF data bus, and the FPGA The digital signal output end of the DA conversion module is connected to the digital signal input end of the DA conversion module, the analog signal output end of the DA conversion module is connected to the analog signal input end of the motor, and the motor code disc signal output end of the code disc signal access circuit is connected to the motor code disc of the FPGA The signal input terminal, the drive signal input or output terminal of the FPGA is connected to the drive signal output or input terminal of the drive interface of the motor control terminal.
基于DSP和FPGA的伺服系统实时运动控制器实现的控制方法,该方法包括以下步骤:The control method realized by the real-time motion controller of the servo system based on DSP and FPGA, the method comprises the following steps:
步骤一、上位机通过RS422通信接口发送指令给FPGA7,同时,FPGA7接收电机控制端子驱动接口的采集信号;并择一执行步骤二或步骤三;
步骤二、FPGA将接收到的指令通过DSP的外部存储器接口EMIF数据总线传输给DSP,由DSP进行处理指令并将处理结果通过EMIF数据总线送至内存空间配置模块,同时,FFPGA7与内存空间配置模块4进行通信;DA转换模块通过EMIF数据总线接收DSP的数字信号进行数模转换得到电压模拟信号,以此控制电机,执行步骤四;
步骤三、DA转换模块将FPGA接收电机控制端子驱动接口的驱动信号进行数模转换后对电机进行控制,执行步骤四;
步骤四、采用码盘信号接入电路接收电机码盘的信号后转换为TTL电平信号接入到FPGA中,DSP按照时钟电路内的时钟信号定时通过EMIF总线读取FPGA中缓存的码盘信息并对数据进行处理,DSP处理后的数据传给FPGA,FPGA接收到的信号通过RS422通信接口回传给上位机。
本发明利用DSP和串口丰富FPGA与外部进行通信,二者之间通过DSP的EMIF总线进行通信且共同组成运动控制器的核心处理器,RS422通信接口将上位机命令传递给核心处理器,核心处理器的命令信号经过DA转换模块后得到模拟电压,用它来控制电机;电机码盘信号接入电路将电机的码盘信息传递给处理器,由DSP进行处理并发出控制信号,同时FPGA与电机控制端子驱动接口通信,组成控制回路。运动控制器作为下位机通过RS422通信接口高速接收上位机位置指令信息,实现了运动控制器实时通信的功能,同比现有的运动控制器实时通信的效率快了一倍以上。它可用于电机控制系统中。The present invention utilizes DSP and serial ports to enrich the FPGA to communicate with the outside, and the two communicate through the EMIF bus of the DSP and jointly form the core processor of the motion controller. The RS422 communication interface transmits the upper computer command to the core processor, and the core processes The command signal of the device is passed through the DA conversion module to obtain an analog voltage, which is used to control the motor; the motor code disc signal is connected to the circuit to transmit the motor code disc information to the processor, which is processed by the DSP and sends out a control signal. At the same time, the FPGA and the motor The control terminal drives the interface communication to form a control loop. As the lower computer, the motion controller receives the position command information of the upper computer at high speed through the RS422 communication interface, realizing the real-time communication function of the motion controller, which is more than twice as fast as the real-time communication efficiency of the existing motion controller. It can be used in motor control systems.
附图说明Description of drawings
图1为具体实施方式一所述的基于DSP和FPGA的伺服系统实时运动控制器的原理示意图,Fig. 1 is the principle schematic diagram of the real-time motion controller of the servo system based on DSP and FPGA described in specific embodiment one,
图2为具体实施方式二所述的DA转换模块的原理示意图,Fig. 2 is a schematic diagram of the principle of the DA conversion module described in the second specific embodiment,
图3为具体实施方式三所述的时钟电路的原理示意图,FIG. 3 is a schematic diagram of the principle of the clock circuit described in
图4为具体实施方式四所述的4路模拟开关的原理示意图,FIG. 4 is a schematic diagram of the principle of the 4-way analog switch described in
图5为具体实施方式五所述的码盘信号接入电路的原理示意图,Fig. 5 is a schematic diagram of the principle of the code wheel signal access circuit described in the fifth embodiment,
图6为具体实施方式六所述的内存空间配置模块的原理示意图,FIG. 6 is a schematic diagram of the principle of the memory space configuration module described in
图7为具体实施方式七所述的RS422通信接口的原理示意图,7 is a schematic diagram of the principle of the RS422 communication interface described in
图8为具体实施方式八所述的电机控制端子驱动接口的原理示意图。FIG. 8 is a schematic diagram of the principles of the motor control terminal drive interface described in
具体实施方式Detailed ways
具体实施方式一:参照图1具体说明本实施方式,本实施方式所述的基于DSP和FPGA的伺服系统实时运动控制器,它包括FPGA7、DSP8、电机9、时钟电路1、DA转换模块2、码盘信号接入电路3、内存空间配置模块4、RS422通信接口5和电机控制端子驱动接口6,Specific embodiment one: with reference to Fig. 1 concrete description present embodiment, the servo system real-time motion controller based on DSP and FPGA described in this embodiment, it comprises FPGA7, DSP8,
所述RS422通信接口5的数据信号输入或输出端连接FPGA7的数据信号输出或输入端,时钟电路1的时钟信号输出端同时连接FPGA7的时钟信号输入端和DSP8的时钟信号输入端,DSP8通过EMIF数据总线与内存空间配置模块4进行数据交互,内存空间配置模块4的内存空间配置信号输入或输出端连接FPGA7的内存空间配置信号输出或输入端,DA转换模块2、DSP8和FPGA7通过EMIF数据总线进行数据交互,FPGA7的数字信号输出端连接DA转换模块2的数字信号输入端,DA转换模块2的模拟信号输出端连接电机9的模拟信号输入端,码盘信号接入电路3的电机码盘信号输出端连接FPGA7的电机码盘信号输入端,FPGA7的驱动信号输入或输出端连接电机控制端子驱动接口6的驱动信号输出或输入端。The data signal input or output end of described
具体实施方式二:参照图2具体说明本实施方式,本实施方式与具体实施方式一所述的基于DSP和FPGA的伺服系统实时运动控制器的不同点在于,DA转换模块2包括4路DA转换芯片2-1、4路DA二次输出缓存区2-2、4路模拟开关2-3和4路电机控制电压2-4,Specific embodiment two: this embodiment is described in detail with reference to Fig. 2, the difference between this embodiment and the servo system real-time motion controller based on DSP and FPGA described in specific embodiment one is that
所述4路DA转换芯片2-1、DSP8和FPGA7通过EMIF数据总线进行数据交互,FPGA7的数字信号输出端同时连接4路DA转换芯片2-1的数字信号输入端和4路模拟开关2-3的数字信号输入端,4路DA转换芯片2-1的缓存信号输出端连接4路DA二次输出缓存区2-2的缓存信号输入端,4路DA二次输出缓存区2-2的模拟信号输出端连接4路模拟开关2-3的模拟信号输入端,4路模拟开关2-3的控制信号输出端连接4路电机控制电压2-4的控制信号输入端,4路电机控制电压2-4的控制信号输出端连接电机的控制信号输入端。The 4-way DA conversion chip 2-1, DSP8 and FPGA7 perform data interaction through the EMIF data bus, and the digital signal output end of the FPGA7 is connected to the digital signal input end of the 4-way DA conversion chip 2-1 and the 4-way analog switch 2-1 at the same time. The digital signal input terminal of 3, the cache signal output terminal of the 4-way DA conversion chip 2-1 is connected to the buffer signal input terminal of the 4-way DA secondary output buffer area 2-2, and the buffer signal input end of the 4-way DA secondary output buffer area 2-2 The analog signal output end is connected to the analog signal input end of the 4-way analog switch 2-3, the control signal output end of the 4-way analog switch 2-3 is connected to the control signal input end of the 4-way motor control voltage 2-4, and the 4-way motor control voltage The control signal output terminal of 2-4 is connected with the control signal input terminal of the motor.
本实施方式中,4路DA转换芯片2-1和4路DA二次输出缓存区2-2在同一片芯片上,同在型号为ADG5236BRUZ的芯片U10上。In this embodiment, the 4-way DA conversion chip 2-1 and the 4-way DA secondary output buffer area 2-2 are on the same chip, and are also on the chip U10 whose model is ADG5236BRUZ.
本实施方式中,4路DA转换芯片采用型号为AD669BR的4路16bit的DA芯片实现,其输出信号作为电机的控制输出信号,芯片自带4路DA二次输出缓冲区,输出的范围是负10V到正10V,用于对电机进行控制,其数据总线挂载在EMIF数据总线上,而控制总线则由FPGA进行控制;同时为了防止启动的时候,DA出现漂移,对电机造成影响,采用4路模拟开关ADG5236BRUZ对最终的输出电压进行选择输出。In this embodiment, the 4-way DA conversion chip is implemented by a 4-way 16-bit DA chip of the model AD669BR, and its output signal is used as the control output signal of the motor. The chip has a 4-way DA secondary output buffer, and the output range is negative 10V to positive 10V is used to control the motor. Its data bus is mounted on the EMIF data bus, and the control bus is controlled by FPGA; at the same time, in order to prevent the DA from drifting during startup and affect the motor, 4 Road analog switch ADG5236BRUZ selects the output of the final output voltage.
具体实施方式三、参照图3具体说明本实施方式,本实施方式与具体实施方式一所述的基于DSP和FPGA的伺服系统实时运动控制器的不同点在于,所述时钟电路1采用型号为SN74HC125D的总线缓冲闸芯片U1实现的,该电路包括:电容C1、电容C2、电容C3、电阻R1、电阻R2和有源晶振OS1,Specific embodiment three, with reference to Fig. 3 specifically illustrate this embodiment, the difference between this embodiment and the servo system real-time motion controller based on DSP and FPGA described in specific embodiment one is that described
所述型号为SN74HC125D的总线缓冲闸芯片U1的2号引脚连接电阻R1的一端,电阻R1的另一端同时连接有源晶振OS1的3号引脚和电阻R2的一端,电阻R2的另一端连接型号为SN74HC125D的总线缓冲闸芯片U1的5引脚,有源晶振OS1的4号引脚同时连接电容C2的一端、电容C1的一端和3.3V供电电源的正极+3.3V,有源晶振OS1的2号引脚连接同时电容C2、电容C1和3.3V供电电源的电源地,型号为SN74HC125D的总线缓冲闸芯片U1的14号引脚同时连接电容C3的一端和3.3V供电电源的正极+3.3V,电容C3的另一端同时连接3.3V供电电源的电源地、型号为SN74HC125D的总线缓冲闸芯片的1号引脚、型号为SN74HC125D的总线缓冲闸芯片U1的4号引脚、型号为SN74HC125D的总线缓冲闸芯片U1的10号引脚和型号为SN74HC125D的总线缓冲闸芯片的13号引脚,型号为SN74HC125D的总线缓冲闸芯片U1的7号引脚连接3.3V供电电源的电源地,型号为SN74HC125D的总线缓冲闸芯片U1的3号引脚作为时钟电路1的时钟信号输出端。The No. 2 pin of the bus buffer gate chip U1 whose model is SN74HC125D is connected to one end of the resistor R1, and the other end of the resistor R1 is connected to the No. 3 pin of the active crystal oscillator OS1 and one end of the resistor R2 at the same time, and the other end of the resistor R2 is connected to The 5th pin of the bus buffer gate chip U1 whose model is SN74HC125D, and the 4th pin of the active crystal oscillator OS1 are simultaneously connected to one end of the capacitor C2, one end of the capacitor C1 and the positive pole of the 3.3V power supply +3.3V, and the active crystal oscillator OS1 Pin No. 2 is connected to capacitor C2, capacitor C1 and the power ground of the 3.3V power supply. Pin No. 14 of the bus buffer gate chip U1 of model SN74HC125D is connected to one end of capacitor C3 and the positive pole of the 3.3V power supply +3.3V at the same time. , the other end of the capacitor C3 is connected to the power ground of the 3.3V power supply, the No. 1 pin of the bus buffer gate chip of the model SN74HC125D, the No. 4 pin of the bus buffer gate chip U1 of the model SN74HC125D, and the bus bus of the model SN74HC125D The 10th pin of the buffer gate chip U1 and the 13th pin of the bus buffer gate chip of the model SN74HC125D, the 7th pin of the bus buffer gate chip U1 of the model SN74HC125D is connected to the power ground of the 3.3V power supply, and the model is SN74HC125D The No. 3 pin of the bus buffer gate chip U1 is used as the clock signal output end of the
本实施方式中,时钟电路通过有源晶振OS1产生25MHz的时钟信号,经过总线缓冲闸连接到DSP和FPGA上,DSP和FPGA通过各自的PLL模块决定使用的时钟频率,DSP通过PLL模块对时钟进行倍频,通过倍频后,DSP内核时钟是200MHz,DSP外围时钟是50MHz,DSP的外部存储器接口总线EMIF时钟是12.5MHz,在FPGA中,没有对时钟进行倍频,直接使用了有源晶振的时钟25MHz。In this embodiment, the clock circuit generates a 25MHz clock signal through the active crystal oscillator OS1, and is connected to the DSP and the FPGA through the bus buffer gate. The DSP and the FPGA determine the clock frequency to be used through their respective PLL modules, and the DSP controls the clock through the PLL module. Frequency multiplication, after frequency multiplication, the DSP core clock is 200MHz, the DSP peripheral clock is 50MHz, and the DSP external memory interface bus EMIF clock is 12.5MHz. In the FPGA, the clock is not multiplied, and the active crystal oscillator is directly used. Clock 25MHz.
具体实施方式四、参照图4具体说明本实施方式,本实施方式与具体实施方式二所述的基于DSP和FPGA的伺服系统实时运动控制器的不同点在于,4路模拟开关2-3采用型号为ADG5236BRUZ的芯片U10实现的,所述型号为ADG5236BRUZ的芯片U10的2号引脚连接+15V供电电源的电源地,型号为ADG5236BRUZ的芯片U10的10号引脚连接+15V供电电源的电源地,型号为ADG5236BRUZ的芯片U10的13号引脚连接15V供电电源的正极+15V,型号为ADG5236BRUZ的芯片U10的5号引脚连接15V供电电源的负极-15V,型号为ADG5236BRUZ的芯片U10的6号引脚连接-15V供电电源的电源地,型号为ADG5236BRUZ的芯片U10的1号引脚和9号引脚均作为4路模拟开关2-3的数字信号输入端,型号为ADG5236BRUZ的芯片U10的4号引脚和12号引脚均作为4路模拟开关2-3的模拟信号输入端,型号为ADG5236BRUZ的芯片U10的3号引脚和11号引脚均作为4路模拟开关2-3的控制信号输出端。Specific embodiment four, this embodiment is specifically described with reference to Fig. 4, the difference between this embodiment and the servo system real-time motion controller based on DSP and FPGA described in specific embodiment two is that 4 road analog switches 2-3 adopt model It is implemented for the chip U10 of ADG5236BRUZ, the No. 2 pin of the chip U10 of the model ADG5236BRUZ is connected to the power ground of the +15V power supply, and the No. 10 pin of the chip U10 of the model ADG5236BRUZ is connected to the power ground of the +15V power supply. The 13th pin of the chip U10 whose model is ADG5236BRUZ is connected to the positive pole +15V of the 15V power supply, and the 5th pin of the chip U10 whose model is ADG5236BRUZ is connected to the negative pole of the 15V power supply The pin is connected to the power ground of the -15V power supply. The No. 1 and No. 9 pins of the chip U10 of the model ADG5236BRUZ are used as the digital signal input terminals of the 4-way analog switch 2-3, and the No. 4 of the chip U10 of the model ADG5236BRUZ Both pin and
本实施方式中,4路模拟开关2-3ADG5236BRUZ由控制信号IN1和IN2分别控制当前选取的输出,IN1=0时B=ON,IN1=1时A=ON,IN信号用FPGA控制,上电的时候默认是高阻态1。In this embodiment, the 4-way analog switch 2-3ADG5236BRUZ is controlled by the control signals IN1 and IN2 to control the currently selected output, B=ON when IN1=0, A=ON when IN1=1, the IN signal is controlled by FPGA, and the power-on The default is high-
具体实施方式五、参照图5具体说明本实施方式,本实施方式与具体实施方式一所述的基于DSP和FPGA的伺服系统实时运动控制器的不同点在于,码盘信号接入电路3采用型号为AM26LS32AC的差分转换芯片U8实现的,该电路包括:电容C22、电容C23和电容C24,Specific embodiment five, with reference to Fig. 5, specifically illustrate this embodiment, the difference between this embodiment and the servo system real-time motion controller based on DSP and FPGA described in specific embodiment one is that the code disc
所述型号为AM26LS32AC的差分转换芯片U8的3号引脚连接电容C22的一端,电容C22的另一端连接+5V供电电源的电源地,型号为AM26LS32AC的差分转换芯片U8的5号引脚连接电容C23的一端,电容C23的另一端连接+5V供电电源的电源地,型号为AM26LS32AC的差分转换芯片U8的11号引脚连接电容C24的一端,电容C24的另一端连接+5V供电电源的电源地,型号为AM26LS32AC的差分转换芯片U8的4号引脚连接5V供电电源的正极+5V,型号为AM26LS32AC的差分转换芯片U8的12号引脚连接+5V供电电源的电源地,型号为AM26LS32AC的差分转换芯片U8的16号引脚连接5V供电电源的正极+5V,型号为AM26LS32AC的差分转换芯片U8的8号引脚连接+5V供电电源的电源地,型号为AM26LS32AC的差分转换芯片U8的13号引脚作为码盘信号接入电路3的码盘信号输出端。The No. 3 pin of the differential conversion chip U8 whose model is AM26LS32AC is connected to one end of the capacitor C22, the other end of the capacitor C22 is connected to the power ground of the +5V power supply, and the No. 5 pin of the differential conversion chip U8 whose model is AM26LS32AC is connected to the capacitor One end of C23, the other end of capacitor C23 is connected to the power ground of +5V power supply, the 11th pin of the differential conversion chip U8 of model AM26LS32AC is connected to one end of capacitor C24, and the other end of capacitor C24 is connected to the power ground of +5V power supply , the 4th pin of the differential conversion chip U8 of the model AM26LS32AC is connected to the positive pole +5V of the 5V power supply, the 12th pin of the differential conversion chip U8 of the model AM26LS32AC is connected to the power ground of the +5V power supply, and the differential conversion chip of the model is AM26LS32AC The No. 16 pin of the conversion chip U8 is connected to the positive pole +5V of the 5V power supply, the No. 8 pin of the differential conversion chip U8 of the model AM26LS32AC is connected to the power ground of the +5V power supply, and the No. 13 of the differential conversion chip U8 of the model AM26LS32AC The pin is connected to the output end of the code wheel signal of the circuit 3 as the code wheel signal.
本实施方式中,码盘信号接入电路3采用4片差分转换芯片AM26LS32AC将4路电机的12个码盘的差分信号转换为TTL电平信号,每个码盘的两路差分信号分别接入型号为AM26LS32AC的差分转换芯片U8的A、B端,输出端Y与FPGA相连,在FPGA内将电机码盘输出的10bit信号进行4倍频转换为12bit的码盘信号进行输出。In this embodiment, the code disc
具体实施方式六、参照图6具体说明本实施方式,本实施方式与具体实施方式一所述的基于DSP和FPGA的伺服系统实时运动控制器的不同点在于,内存空间配置模块4包括SDRAM4-1、NANDFLASH4-3和NORFLASH4-2,所述SDRAM4-1、NANDFLASH4-2和NORFLASH4-3均与DSP8通过EMIF数据总线进行数据交互,NANDFLASH4-3的内存空间配置信号输入或输出端与FPGA7的内存空间配置信号输出或输入端相连接。Specific embodiment six, with reference to Fig. 6 specifically illustrate this embodiment, the difference between this embodiment and the servo system real-time motion controller based on DSP and FPGA described in specific embodiment one is that memory
本实施方式中内存空间配置模块4包括SDRAM、NANDFLASH和NORFLASH,此外FPGA也用作DSP的EMIF外部内存,SDRAM、NANDFLASH、NORFLASH和FPGA都通过EMIF总线与DSP相连,所有DSP的EMIF内存空间地址以DSP为基准设计,使用电容延迟DSP启动使FPGA先于DSP配置完成,FPGA将信号分配给SDRAM、NANDFLASH和NORFLASH,所有的EMIF外部空间片选信号都经过FPGA进行译码。系统内存空间分配如表1所示。Memory
表1系统内存空间分配表Table 1 System memory space allocation table
具体实施方式七、参照图7具体说明本实施方式,本实施方式与具体实施方式一所述的基于DSP和FPGA的伺服系统实时运动控制器的不同点在于,RS422通信接口5采用型号为MAX488ESA的接口芯片U422_1和U422_2实现的,该电路包括电容C422_1、电容C422_2、电阻R422_1、电阻R422_2、电阻R422_3、电阻R422_4和接口J422,The specific embodiment seven, with reference to Fig. 7 specifically illustrate this embodiment, the difference between this embodiment and the servo system real-time motion controller based on DSP and FPGA described in the specific embodiment one is that the
所述型号为MAX488ESA的接口芯片U422_1的4号引脚连接+5V供电电源的电源地,型号为MAX488ESA的接口芯片U422_1的1号引脚同时连接电容C422_1的一端和5V供电电源的正极+5V,电容C422_1的另一端连接+5V供电电源的电源地,型号为MAX488ESA的接口芯片U422_1的8号引脚连接电阻R422_1的一端,电阻R422_1的另一端连接型号为MAX488ESA的接口芯片U422_1的7号引脚,型号为MAX488ESA的接口芯片U422_1的6号引脚连接电阻R422_2的一端,电阻R422_2的另一端连接型号为MAX488ESA的接口芯片U422_1的5号引脚,型号为MAX488ESA的接口芯片U422_1的8号引脚连接接口J422的1号引脚,型号为MAX488ESA的接口芯片U422_1的7号引脚连接接口J422的6号引脚,型号为MAX488ESA的接口芯片U422_1的6号引脚连接接口J422的2号引脚,型号为MAX488ESA的接口芯片U422_1的5号引脚连接接口J422的7号引脚,The No. 4 pin of the interface chip U422_1 whose model is MAX488ESA is connected to the power ground of the +5V power supply, and the No. 1 pin of the interface chip U422_1 whose model is MAX488ESA is connected to one end of the capacitor C422_1 and the positive pole +5V of the 5V power supply at the same time. The other end of the capacitor C422_1 is connected to the power ground of the +5V power supply, the No. 8 pin of the interface chip U422_1 of the model MAX488ESA is connected to one end of the resistor R422_1, and the other end of the resistor R422_1 is connected to the No. 7 pin of the interface chip U422_1 of the model MAX488ESA , the No. 6 pin of the interface chip U422_1 whose model is MAX488ESA is connected to one end of the resistor R422_2, the other end of the resistor R422_2 is connected to the No. 5 pin of the interface chip U422_1 whose model is MAX488ESA, and the No. 8 pin of the interface chip U422_1 whose model is MAX488ESA Connect to pin 1 of interface J422, connect
所述型号为MAX488ESA的接口芯片U422_2的4号引脚连接+5V供电电源的电源地,型号为MAX488ESA的接口芯片U422_2的1号引脚同时连接电容C422_2的一端和5V供电电源的正极+5V,电容C422_2的另一端连接+5V供电电源的电源地,型号为MAX488ESA的接口芯片U422_2的8号引脚连接电阻R422_3的一端,电阻R422_3的另一端连接型号为MAX488ESA的接口芯片U422_2的7号引脚,型号为MAX488ESA的接口芯片U422_2的6号引脚连接电阻R422_4的一端,电阻R422_4的另一端连接型号为MAX488ESA的接口芯片U422_2的5号引脚,型号为MAX488ESA的接口芯片U422_2的8号引脚连接接口J422的8号引脚,型号为MAX488ESA的接口芯片U422_2的7号引脚连接接口J422的4号引脚,型号为MAX488ESA的接口芯片U422_2的6号引脚连接接口J422的9号引脚,型号为MAX488ESA的接口芯片U422_2的5号引脚连接接口J422的5号引脚,接口J422的3号引脚连接+5V供电电源的电源地,The No. 4 pin of the interface chip U422_2 whose model is MAX488ESA is connected to the power ground of the +5V power supply, and the No. 1 pin of the interface chip U422_2 whose model is MAX488ESA is connected to one end of the capacitor C422_2 and the positive pole +5V of the 5V power supply at the same time. The other end of the capacitor C422_2 is connected to the power ground of the +5V power supply, the No. 8 pin of the interface chip U422_2 of the model MAX488ESA is connected to one end of the resistor R422_3, and the other end of the resistor R422_3 is connected to the No. 7 pin of the interface chip U422_2 of the model MAX488ESA , the No. 6 pin of the interface chip U422_2 of the model MAX488ESA is connected to one end of the resistor R422_4, the other end of the resistor R422_4 is connected to the No. 5 pin of the interface chip U422_2 of the model MAX488ESA, and the No. 8 pin of the interface chip U422_2 of the model MAX488ESA Connect to pin 8 of the interface J422, connect
型号为MAX488ESA的接口芯片U422_1的2号引脚和3号引脚与型号为MAX488ESA的接口芯片U422_2的2号引脚和3号引脚均作为RS422通信接口5的数据信号输入或输出端。The No. 2 and No. 3 pins of the interface chip U422_1 whose model is MAX488ESA and the No. 2 pins and No. 3 pins of the interface chip U422_2 whose model is MAX488ESA are both used as the data signal input or output ends of the
本实施方式中,RS422通信接口5通过接口芯片MAX488ESA实现串口通信,在实际设计中设计了两路RS422接口,只有一路应用到系统中,另一路备用,需要使用时在FPGA和DSP中进行编程。图7中同样展示了两路接口芯片与硬件接口的连接关系,这样可以实现上位机与处理器的实时通信。In this embodiment, the
具体实施方式八、参照图8具体说明本实施方式,本实施方式与具体实施方式一所述的基于DSP和FPGA的伺服系统实时运动控制器的不同点在于,电机控制端子驱动接口6包括电阻R_DA11、电阻R_DA12、一号继电器KDA1和二号继电器KDA2,
所述24V供电电源的正极+24V连接电阻R_DA11的一端,电阻R_DA11的另一端连接电阻R_DA12的一端,电阻R_DA12的另一端连接+24V供电电源的电源地,The positive pole +24V of the 24V power supply is connected to one end of the resistor R_DA11, the other end of the resistor R_DA11 is connected to one end of the resistor R_DA12, and the other end of the resistor R_DA12 is connected to the power ground of the +24V power supply,
一号继电器KDA1的1号引脚连接+24V供电电源的电源地,一号继电器KDA1的4号引脚连接+24V供电电源的电源地,二号继电器KDA2的1号引脚连接+24V供电电源的电源地,二号继电器KDA2的4号引脚连接+24V供电电源的电源地,电阻R_DA12的一端、一号继电器KDA1的2号引脚和二号继电器KDA1的2号引脚分别作为电机控制端子驱动接口6的三个驱动信号输出或输入端。The No. 1 pin of the No. 1 relay KDA1 is connected to the power ground of the +24V power supply, the No. 4 pin of the No. 1 relay KDA1 is connected to the power ground of the +24V power supply, and the No. 1 pin of the No. 2 relay KDA2 is connected to the +24V power supply The power ground of the second relay KDA2, the No. 4 pin of the second relay KDA2 is connected to the power ground of the +24V power supply, one end of the resistor R_DA12, the No. 2 pin of the No. 1 relay KDA1 and the No. 2 pin of the No. The three drive signal output or input terminals of the
本实施方式中,电机控制端子驱动接口通过继电器来实现对电机控制端子的驱动,每一路电机都有3个控制端子,其中两个用于输出信号给电机,分别连接到电机的CONT1和CONT2控制端子上,这两个端子的具体功能可以通过富士自带的配置软件进行配置,另外一个端子用于接收电机的输出信号,连接到电机的OUT1上,也可以通过电机的配置软件进行配置指定;四路电机的CONT1和CONT2信号分别通过继电器ALQ305进行驱动,当继电器接通时,CONT1和CONT2便连接到地上,该控制线路构成回路,从而控制信号有效;电机的OUT1为一个24V输出信号,为了使得FPGA能够对这个信号进行读取,采用电阻分压的形式实现。In this embodiment, the motor control terminal drive interface realizes the drive of the motor control terminal through a relay. Each motor has three control terminals, two of which are used to output signals to the motor, and are respectively connected to the CONT1 and CONT2 control terminals of the motor. On the terminal, the specific functions of these two terminals can be configured through the configuration software that comes with Fuji, and the other terminal is used to receive the output signal of the motor, connected to the OUT1 of the motor, and can also be configured through the configuration software of the motor; The CONT1 and CONT2 signals of the four-way motor are respectively driven by the relay ALQ305. When the relay is turned on, CONT1 and CONT2 are connected to the ground. The control circuit forms a loop, so that the control signal is valid; the OUT1 of the motor is a 24V output signal. This enables the FPGA to read this signal, which is realized in the form of resistor division.
具体实施方式九、采用具体实施方式一所述的基于DSP和FPGA的伺服系统实时运动控制器实现的控制方法,该方法包括以下步骤:Specific embodiment nine, adopt the control method that the servo system real-time motion controller based on DSP and FPGA described in specific embodiment one realizes, the method may further comprise the steps:
步骤一、上位机通过RS422通信接口发送指令给FPGA7或者FPGA7接收电机控制端子驱动接口的采集信号;并择一执行步骤二或步骤三;
步骤二、FPGA7将接收到的指令通过DSP8的外部存储器接口EMIF数据总线传输给DSP8,由DSP8进行处理指令并将处理结果通过EMIF数据总线送至内存空间配置模块4,同时,FPGA7与内存空间配置模块4进行数据通信;DA转换模块2通过EMIF数据总线接收DSP8的数字信号进行数模转换得到电压模拟信号,以此控制电机,执行步骤四;
步骤三、DA转换模块2将FPGA7接收电机控制端子驱动接口6的驱动信号进行数模转换后对电机进行控制,执行步骤四;
步骤四、采用码盘信号接入电路3接收电机码盘的信号后转换为TTL电平信号接入到FPGA7中,DSP8按照时钟电路1内的时钟信号定时通过EMIF总线读取FPGA中缓存的码盘信息并对数据进行处理,DSP8处理后的数据传给FPGA7,FPGA7接收到的信号通过RS422通信接口5回传给上位机。Step 4: Use code disc
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410166049.4A CN103901804A (en) | 2014-04-23 | 2014-04-23 | Servo system real-time motion controller based on DSP and FPGA and control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410166049.4A CN103901804A (en) | 2014-04-23 | 2014-04-23 | Servo system real-time motion controller based on DSP and FPGA and control method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103901804A true CN103901804A (en) | 2014-07-02 |
Family
ID=50993197
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410166049.4A Pending CN103901804A (en) | 2014-04-23 | 2014-04-23 | Servo system real-time motion controller based on DSP and FPGA and control method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103901804A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104181938A (en) * | 2014-08-14 | 2014-12-03 | 哈尔滨工业大学 | Multi-shaft rotating table controlling and displaying system |
CN106773965A (en) * | 2016-12-19 | 2017-05-31 | 哈尔滨工业大学 | A kind of DC motor controller |
CN106774175A (en) * | 2015-11-19 | 2017-05-31 | 发那科株式会社 | The numerical control device of the external signal of input and output servo control portion at high speed |
CN105160176B (en) * | 2015-09-01 | 2018-03-27 | 华北电力大学(保定) | A kind of device and its monitoring method of the capacitor on-line monitoring based on wireless sensing |
CN111446892A (en) * | 2020-03-20 | 2020-07-24 | 福州伊柯达信息技术有限公司 | Six drive accuse all-in-one |
CN115729153A (en) * | 2022-11-23 | 2023-03-03 | 无锡信捷电气股份有限公司 | Unbalance-loading emergency stop control method for double-drive gantry platform in high-speed state |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060100723A1 (en) * | 2004-10-29 | 2006-05-11 | Dynacity Technology (Hk) Limited | Modular multi-axis motion control and driving system and method thereof |
CN101819427A (en) * | 2010-03-29 | 2010-09-01 | 哈尔滨工业大学 | On-chip control system of digital articulation based on FPGA (Field Programmable Gate Array) |
CN201945835U (en) * | 2010-12-20 | 2011-08-24 | 广东工业大学 | Embedded control system used for carton proofing machine |
CN103286784A (en) * | 2013-06-17 | 2013-09-11 | 北方工业大学 | Control system of under-actuated self-adaption multi-fingered dexterous hand |
CN103389685A (en) * | 2012-05-11 | 2013-11-13 | 四川优的科技有限公司 | Embedded motion control system |
CN203434899U (en) * | 2013-09-22 | 2014-02-12 | 四川九洲电器集团有限责任公司 | High-precision servo controller used for multiple motors |
-
2014
- 2014-04-23 CN CN201410166049.4A patent/CN103901804A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060100723A1 (en) * | 2004-10-29 | 2006-05-11 | Dynacity Technology (Hk) Limited | Modular multi-axis motion control and driving system and method thereof |
CN101819427A (en) * | 2010-03-29 | 2010-09-01 | 哈尔滨工业大学 | On-chip control system of digital articulation based on FPGA (Field Programmable Gate Array) |
CN201945835U (en) * | 2010-12-20 | 2011-08-24 | 广东工业大学 | Embedded control system used for carton proofing machine |
CN103389685A (en) * | 2012-05-11 | 2013-11-13 | 四川优的科技有限公司 | Embedded motion control system |
CN103286784A (en) * | 2013-06-17 | 2013-09-11 | 北方工业大学 | Control system of under-actuated self-adaption multi-fingered dexterous hand |
CN203434899U (en) * | 2013-09-22 | 2014-02-12 | 四川九洲电器集团有限责任公司 | High-precision servo controller used for multiple motors |
Non-Patent Citations (1)
Title |
---|
沈阳: "交流伺服电机驱动器及其通讯技术的研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104181938A (en) * | 2014-08-14 | 2014-12-03 | 哈尔滨工业大学 | Multi-shaft rotating table controlling and displaying system |
CN105160176B (en) * | 2015-09-01 | 2018-03-27 | 华北电力大学(保定) | A kind of device and its monitoring method of the capacitor on-line monitoring based on wireless sensing |
CN106774175A (en) * | 2015-11-19 | 2017-05-31 | 发那科株式会社 | The numerical control device of the external signal of input and output servo control portion at high speed |
CN106773965A (en) * | 2016-12-19 | 2017-05-31 | 哈尔滨工业大学 | A kind of DC motor controller |
CN111446892A (en) * | 2020-03-20 | 2020-07-24 | 福州伊柯达信息技术有限公司 | Six drive accuse all-in-one |
CN111446892B (en) * | 2020-03-20 | 2023-05-26 | 福州伊柯达信息技术有限公司 | Six-axis driving and controlling integrated machine |
CN115729153A (en) * | 2022-11-23 | 2023-03-03 | 无锡信捷电气股份有限公司 | Unbalance-loading emergency stop control method for double-drive gantry platform in high-speed state |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103901804A (en) | Servo system real-time motion controller based on DSP and FPGA and control method | |
CN103984275B (en) | A kind of universal industrial kinetic control system based on FPGA and control method based on this kinetic control system | |
CN103676739B (en) | A kind of DMA data transmission system based on embedded motion control board card and transmission method thereof | |
CN105260339A (en) | Large-scale PLC (Programmable logic Controller) system based on Xilinx Zynq technology | |
CN108153686B (en) | Multi-interface CPU module | |
CN105681145A (en) | FPGA-based FlexRay communication module | |
CN102445924B (en) | Integrated numerical control system and integrated numerical control machine | |
CN202041823U (en) | A general control platform for cascaded power electronic converters | |
CN201259629Y (en) | Configurable I/O module for multiple bus interface | |
CN101738987A (en) | Five-axis motion control card | |
CN105528319A (en) | FPGA-based accelerator card and acceleration method thereof | |
CN102610188B (en) | Based on the multinuclear LED display controller of SOPC | |
CN202548601U (en) | Integrated numerical control system and integrated numerical control machine | |
CN203502767U (en) | A reconfigurable touch-type integrated universal industrial controller | |
CN103135495A (en) | Control system for numerical control cutting machine | |
CN105892413B (en) | A kind of modular Multi-axis motion control device | |
CN100525064C (en) | Full digital intelligent control module of DC motor | |
CN202904319U (en) | PCI bus multi-shaft motor control card developed based on CPLD | |
CN203324763U (en) | Multi-axis motion controller | |
CN204536861U (en) | For the digital control system of numerically-controlled machine | |
CN204613641U (en) | Power Unit Control System Based on FPGA Chip | |
CN103218334A (en) | Computer peripheral cascade device based on USB (Universal Serial Bus) and RS485 bus | |
CN105955205A (en) | Motion simulator embedded real-time control system | |
CN203350652U (en) | Arbitrarily extensible multi-relay circuit control system | |
CN201184970Y (en) | Embedded board for acquiring data of watercraft engine compartment |
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: 20140702 |