CN102902207B - Method, device and system for integrated turntable control based on Matlab/VC - Google Patents

Method, device and system for integrated turntable control based on Matlab/VC Download PDF

Info

Publication number
CN102902207B
CN102902207B CN201210453819.4A CN201210453819A CN102902207B CN 102902207 B CN102902207 B CN 102902207B CN 201210453819 A CN201210453819 A CN 201210453819A CN 102902207 B CN102902207 B CN 102902207B
Authority
CN
China
Prior art keywords
serial
matlab
data bag
parameter
program
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.)
Active
Application number
CN201210453819.4A
Other languages
Chinese (zh)
Other versions
CN102902207A (en
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.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
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 National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN201210453819.4A priority Critical patent/CN102902207B/en
Publication of CN102902207A publication Critical patent/CN102902207A/en
Application granted granted Critical
Publication of CN102902207B publication Critical patent/CN102902207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Programmable Controllers (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The invention discloses a method, a device and a system for integrated turntable control based on Matlab/VC. The method for integrated turntable control based on Matlab/VC comprises the following steps of: obtaining a serial port data packet according to a real-time control parameter generated by a motor control program, wherein the motor control program is a program edited based on Matlab; and transmitting the serial port data packet via the first serial port of virtual serial ports so that a motor drive program controls the turntable according to the valve of a motor drive parameter, wherein the motor drive program is a drive program edited based on VC; and the value of the motor drive parameter is a drive parameter value obtained by decoding the serial port data packet. The problem of high price of the dSPACE real-time simulation system used in the prior art, and the problems of non-flexibility and inconvenience shortcomings of the system in control on the small-sized turntable are solved; and the effect of flexibly controlling the small-sized turntable is achieved.

Description

Based on the turntable integrated control method of Matlab/VC, device and system
Technical field
The present invention relates to computing machine semi-matter simulating system design field, in particular to a kind of turntable integrated control method based on Matlab/VC, device and system.
Background technology
In the process of carrying out semi-matter simulating system design, important problem guarantees that emulator control program can simulated environment residing for Real Time Drive controlled device, the such as three-axle table of virtual space attitude environment, the position of three-axle table be actually by space vertically arranged three motor-driven, so the problems referred to above are actually the problem how utilizing emulator control program Real Time Drive motor.
Servomotor is all with servomotor controller, and the motion control function of motor is distributed to user with the form of dynamic data linking storehouse .dll file by manufacturer, calls for user.Utilize this motion control function, motor can be controlled by servomotor controller and move in any way.But these dynamic link libraries are all write by C language, a support is called with C language related platform.Control imitation program work amount is write large by C language, loaded down with trivial details and very easily make mistakes.Therefore C language related platform is directly used as VC(Microsoft Visual C++) directly to write Electric Machine Control driven by program motor movement be unpractical.
Matlab software is international control circle the recognized standard software for calculation, and the Simulink tool box using it to carry can use graphical module to build control imitation program easily.Utilize the storehouse of Matlab to be loaded into function and can call dynamic link library file, but need to use the mode of Matlab/VC hybrid programming to realize calling Dynamic Link Library Function.Because Matlab is interpreted language, all need to carry out the work such as some explanations, storage allocation to statement before and after each order performs, the requirement that motor driving function sends gating pulse in real time cannot be met, therefore can not directly move with the Electric Machine Control program direct-driving motor of Matlab.
The good method solving above-mentioned contradiction is the real-time emulation system using dSPACE company to produce, and it is the workbench of control system's development based on Matlab/Simulink and test, achieves the seamless link with Matlab/Simulink.But dSPACE real-time emulation system is expensive, also there is dumb, inconvenient shortcoming in the control for small turntable.
Expensive for the dSPACE real-time emulation system used in prior art, and the control of small turntable is also existed to the problem of dumb, inconvenient shortcoming, at present effective solution is not yet proposed.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of turntable integrated control method based on Matlab/VC, device and system, expensive to solve the dSPACE real-time emulation system used in prior art, and the control of small turntable is also existed to the problem of dumb, inconvenient shortcoming.
To achieve these goals, according to an aspect of the present invention, a kind of turntable integrated control method based on Matlab/VC is provided.The method comprises: the real-time controling parameters according to Electric Machine Control Program Generating obtains serial data bag, and Electric Machine Control program is write based on Matlab the program obtained; And by the first serial of virtual serial port, serial data bag is sent, so that motor driver drives the value of parameter to control turntable according to motor, motor driver is write based on VC the driver obtained, wherein, motor drives the value of parameter to be to decode the driving parameter value obtained to serial data bag.
Further, the real-time controling parameters of Electric Machine Control Program Generating is carried out packing to comprise: adopt RS232 coded format to be packed by the real-time controling parameters of Electric Machine Control Program Generating.
Further, by the first serial of virtual serial port, serial data bag is carried out transmission to comprise: serial data bag is sent by serial ports transmission program, serial ports transmission program is Matlab platform counterdie blocking programming realization, and the serial ports number of serial ports transmission program is first serial number.
Further, motor drives parameter at least to comprise following one: low velocity, high speed, acceleration, displacement and kinematic axis.
To achieve these goals, according to a further aspect in the invention, a kind of turntable integrated control method based on Matlab/VC is additionally provided.The method comprises: receive serial data bag by the second serial of virtual serial port, serial data bag is the serial data bag obtained according to the real-time controling parameters of Electric Machine Control Program Generating, and Electric Machine Control program is write based on Matlab the program obtained; Serial data bag is decoded, obtains decoded data; The value that motor drives parameter is extracted from decoded data; Driven by motor so that motor driver drives the value of parameter to control turntable according to motor in the value assignment of parameter to motor driver, motor driver is write based on VC the driver obtained.
Further, receive serial data handbag and draw together: receive serial data bag by serial ports reception program by the second serial of virtual serial port, serial ports reception program is VC platform counterdie blocking programming realization, and the serial ports number of serial ports reception program is second serial number.
Further, motor drives parameter at least to comprise following one: low velocity, high speed, acceleration, displacement and kinematic axis.
To achieve these goals, according to a further aspect in the invention, a kind of turntable integrated control unit based on Matlab/VC is additionally provided.This device comprises: packet generation module, obtains serial data bag for the real-time controling parameters according to Electric Machine Control Program Generating, and Electric Machine Control program is write based on Matlab the program obtained; And sending module, for the first serial by virtual serial port, serial data bag is sent, so that motor driver drives the value of parameter to control turntable according to motor, motor driver is write based on VC the driver obtained, wherein, motor drives the value of parameter to be to decode the driving parameter value obtained to serial data bag.
To achieve these goals, according to a further aspect in the invention, a kind of turntable integrated control unit based on Matlab/VC is additionally provided.This device comprises: packet-receiving module, serial data bag is received for the second serial by virtual serial port, serial data bag is the serial data bag obtained according to the real-time controling parameters of Electric Machine Control Program Generating, and Electric Machine Control program is write based on Matlab the program obtained; Decoder module, for being decoded by serial data bag, obtains decoded data; Extraction module, drives the value of parameter for extracting motor from decoded data; Assignment module, for being driven by motor so that motor driver drives the value of parameter to control turntable according to motor in the value assignment of parameter to motor driver, motor driver is write based on VC the driver obtained.
To achieve these goals, according to a further aspect in the invention, a kind of turntable integral control system based on Matlab/VC is additionally provided.This system comprises: dispensing device, and dispensing device is used for obtaining serial data bag according to the real-time controling parameters of Electric Machine Control Program Generating, and Electric Machine Control program is write based on Matlab the program obtained; By the first serial of virtual serial port, serial data bag is sent; And receiving trap, receiving trap is used for receiving serial data bag by the second serial of virtual serial port; Serial data bag is decoded, obtains decoded data; The value that motor drives parameter is extracted from decoded data; Driven by motor so that motor driver drives the value of parameter to control turntable according to motor in the value assignment of parameter to motor driver, motor driver is write based on VC the driver obtained.
By the present invention, solve the dSPACE real-time emulation system used in prior art expensive, and the problem of dumb, inconvenient shortcoming is also existed for the control of small turntable, and then reach the effect controlling small turntable flexibly.
Accompanying drawing explanation
The accompanying drawing forming a application's part is used to provide a further understanding of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the structural drawing of a kind of turntable integrated control unit based on Matlab/VC according to the embodiment of the present invention;
Fig. 2 is the schematic diagram defined according to the serial ports order format of the embodiment of the present invention;
Fig. 3 is according to the another kind of the embodiment of the present invention structural drawing based on the turntable integrated control unit of Matlab/VC;
Fig. 4 is the process flow diagram rotated according to the driving turntable of the embodiment of the present invention;
Fig. 5 is the structural drawing of a kind of turntable integral control system based on Matlab/VC according to the embodiment of the present invention;
Fig. 6 is the process flow diagram of a kind of turntable integrated control method based on Matlab/VC according to the embodiment of the present invention; And
Fig. 7 is according to the another kind of the embodiment of the present invention process flow diagram based on the turntable integrated control method of Matlab/VC.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
Fig. 1 is the structural drawing of a kind of turntable integrated control unit based on Matlab/VC according to the embodiment of the present invention, and as shown in Figure 1, the turntable integrated control unit based on Matlab/VC of this embodiment comprises:
Packet generation module 11, obtains serial data bag for the real-time controling parameters according to Electric Machine Control Program Generating, and this Electric Machine Control program is write based on Matlab the program obtained.
RS232 coded format can be adopted to be packed by the real-time controling parameters of Electric Machine Control Program Generating.Such as, Simulink tool box constructing modular Electric Machine Control program can be utilized on Matlab platform.The effect of this Electric Machine Control program is by the real-time controling parameters of kinetic model emulation generation to turntable, these controling parameters are according to occurring that sequencing arranges, self-defined packet header, bag tail, adopt RS232 coded format to be packaged into a serial data bag, the definition of this serial ports order format can be as shown in Figure 2.
Sending module 12, for the first serial by virtual serial port, serial data bag is sent, so that motor driver drives the value of parameter to control turntable according to motor, this motor driver is write based on VC the driver obtained, wherein, this motor drives the value of parameter to be to decode the driving parameter value obtained to this serial data bag.
Serial data bag can be sent by serial ports transmission program, serial ports transmission program is Matlab platform counterdie blocking programming realization, and the serial ports number of serial ports transmission program is first serial number.Such as, can install VSPD virtual serial port program, arrange a pair virtual serial port on computers on main control computer, the effect of this virtual serial port realizes the communication on same computing machine between different system software, and communication mode adopts RS232 coded format.This virtual serial port is the information bridge connecting Electric Machine Control program and motor driver.Virtual serial port can be realized by the mode of installing VSPD virtual serial port program on main control computer.Then utilize the PacketOutput module in Real-Time windows Target tool box to set up serial data transmission program, serial ports number is configured to the first serial number in above-mentioned virtual serial port.
Motor drives parameter to comprise: low velocity, high speed, acceleration, displacement, kinematic axis.
Such as, the turntable integrated control unit based on Matlab/VC of the present embodiment can realize in the following manner:
(1) a newly-built SerialPort.mdl file under matlab platform, pull a Packet Output module into, double-click module and eject Block Parameters:Packet Output, click Install new board and select Serial Port in StardardDevices->SerialPort ejection dialog box to select virtual serial port.Have 11 characters according to the regulation instruction of order format, therefore Output packet size is set to 11.Each numerical value sends with character style, is all expressed as int8 type, therefore is set in Output Packet field data types in matlab:
{'1*int8','1*int8','1*int8','1*int8','1*int8','1*int8','1*int8','1*int8','1*int8','1*int8','1*int8'}。
(2) be provided with input in rear Packet Output for metric numerical value, the ASCII character corresponding to decimal value of input, what such as input is 65, and that receive with COM Debug Assistant is exactly A; What input is 48, and what receive is exactly 0.Real time implementation configuration is carried out to the Electric Machine Control program in (1), is generated the RTW program of real time execution by the compiler directive in Matlab.Under operating path, preserve module, input in matlab command: rtwinconfigset (' SerialPort') get back to simulink interface, by ctrl+B, generate RTW program.Click ConnectTo Target.Real-time program brings into operation.
(3) the serial ports reception program write under opening VC platform, is set to the second serial number of virtual serial port by the serial ports of serial ports reception program number, click Start Realtime Code in Simulink interface, turntable is just according to the instruction operation of specifying.
Aforesaid way can adopt the some position motor pattern of metric coded format and motor.In the three-axle table of reality controls, transmission between data adopts 16 scale coding forms usually, the motor pattern of motor is also varied, but principle is identical with above step with method of operating, just sets different coded formats and adopts different motor driving codes.
Electric Machine Control program in the present embodiment and serial ports transmission program can be realized by modularization programming, and both only have Parameter transfer relation.
The turntable integrated control unit based on Matlab/VC that the present embodiment provides can realize in following hardware environment:
Main control computer is winXP operating system, and the model of turntable motor servo driving case is HS11056, and the motor model of three-axle table is SRH1254-12.
Turntable integrated control unit based on Matlab/VC provided by the invention, the Electric Machine Control program of writing based on Matlab and the motor driver write based on VC is connected by virtual serial port, achieve the integration that the modularity control program of being built by Matlab controls in real time to turntable and drive process, make user can when not utilizing other hardware conversion equipment, the Electric Machine Control program Direct driver turntable of establishment on Matlab is utilized to be synchronized with the movement, therefore effectively rotating platform control system manufacturing cost is reduced, facilitate user to control flexibly and personal settings turntable.
The turntable integrated control unit based on Matlab/VC that above-described embodiment provides is for sending serial data bag, and correspondingly, the embodiment of the present invention additionally provides a kind of turntable integrated control unit based on Matlab/VC for receiving serial data bag.
Fig. 3 is the structural drawing of a kind of turntable integrated control unit based on Matlab/VC according to the embodiment of the present invention, and as shown in Figure 3, the turntable integrated control unit based on Matlab/VC of this embodiment comprises:
Packet-receiving module 21, serial data bag is received for the second serial by virtual serial port, this serial data bag is the serial data bag obtained according to the real-time controling parameters of Electric Machine Control Program Generating, and this Electric Machine Control program is write based on Matlab the program obtained.
Can receive serial data bag by serial ports reception program, serial ports reception program is VC platform counterdie blocking programming realization, and the serial ports number of serial ports reception program is second serial number.Such as, can install VSPD virtual serial port program, arrange a pair virtual serial port on computers on main control computer, the effect of this virtual serial port realizes the communication on same computing machine between different system software, and communication mode adopts RS232 coded format.Motor drives parameter to comprise: low velocity, high speed, acceleration, displacement, kinematic axis.Write serial ports reception program, being driven by motor parameter according to occurring that sequencing arranges, self-defined packet header, bag tail, being packaged into a serial data bag.Serial ports number is configured in a pair virtual serial port.The definition of serial ports order format can be as shown in Figure 2.
Decoder module 22, for being decoded by this serial data bag, obtains decoded data.
Extraction module 23, drives the value of parameter for extracting motor from this decoded data.
Assignment module 24, for driving the value assignment of parameter in motor driver so that motor driver drives the value of parameter to control turntable according to motor in this motor, this motor driver is write based on VC the driver obtained.
The effect of this motor driver is reception is sent on the VC platform real-time controling parameters generated in real time by Electric Machine Control program by virtual serial port.By decoding to the serial data bag received, extracting motor and driving parameter, by parameter assignment in turntable driver, drive turntable running.Motor drives parameter to comprise: low velocity, high speed, acceleration, displacement, kinematic axis.
Participate in Fig. 4, serial ports reception program detects whether receive character, if receive character, then the character received is added up, then judge whether character is packet header, if not, then judge whether character is bag tail, after judging that character is bag tail, extract the value that motor drives parameter, then actuating motor driver drives turntable to run.
Turntable motor driver in the present embodiment and serial ports reception program can be realized by modularization programming, and both only have Parameter transfer relation.
The turntable integrated control unit based on Matlab/VC that the present embodiment provides can realize in following hardware environment:
Main control computer is winXP operating system, and the model of turntable motor servo driving case is HS11056, and the motor model of three-axle table is SRH1254-12.
Turntable integrated control unit based on Matlab/VC provided by the invention, the Electric Machine Control program of writing based on Matlab and the motor driver write based on VC is connected by virtual serial port, achieve the integration that the modularity control program of being built by Matlab controls in real time to turntable and drive process, make user can when not utilizing other hardware conversion equipment, the Electric Machine Control program Direct driver turntable of establishment on Matlab is utilized to be synchronized with the movement, therefore effectively rotating platform control system manufacturing cost is reduced, facilitate user to control flexibly and personal settings turntable.
The embodiment of the present invention additionally provides a kind of turntable integral control system based on Matlab/VC, and this turntable integral control system based on Matlab/VC comprises the turntable integrated control unit based on Matlab/VC that above-described embodiment provides.
Fig. 5 is the structural drawing of a kind of turntable integral control system based on Matlab/VC according to the embodiment of the present invention, and as shown in Figure 5, the turntable integral control system based on Matlab/VC of this embodiment comprises:
Dispensing device 31, this dispensing device is used for obtaining serial data bag according to the real-time controling parameters of Electric Machine Control Program Generating, and this Electric Machine Control program is write based on Matlab the program obtained; By the first serial of virtual serial port, serial data bag is sent.
VSPD virtual serial port journey can be installed on main control computer.The effect of this virtual serial port realizes the communication on same computing machine between different system software, and communication mode adopts RS232 coded format.Virtual serial port is realized by the mode of installing VSPD virtual serial port program on main control computer.
Serial ports transmission program can be write under Matlab platform, the serial ports of this serial ports transmission program number is set to the first serial number of virtual serial port.
Receiving trap 32, this receiving trap is used for receiving serial data bag by the second serial of virtual serial port; Serial data bag is decoded, obtains decoded data; The value that motor drives parameter is extracted from decoded data; Driven by motor so that motor driver drives the value of parameter to control turntable according to motor in the value assignment of parameter to motor driver, this motor driver is write based on VC the driver obtained.
Serial ports reception program can be write under VC platform, the serial ports of serial ports reception program number is set to the second serial number of virtual serial port.
Turntable integral control system based on Matlab/VC provided by the invention, the Electric Machine Control program of writing based on Matlab and the motor driver write based on VC is connected by virtual serial port, achieve the integration that the modularity control program of being built by Matlab controls in real time to turntable and drive process, make user can when not utilizing other hardware conversion equipment, the Electric Machine Control program Direct driver turntable of establishment on Matlab is utilized to be synchronized with the movement, therefore effectively rotating platform control system manufacturing cost is reduced, facilitate user to control flexibly and personal settings turntable.
Fig. 6 is the process flow diagram of a kind of turntable integrated control method based on Matlab/VC according to the embodiment of the present invention, and as shown in Figure 6, the turntable integrated control method based on Matlab/VC of this embodiment comprises:
Step 401: the real-time controling parameters according to Electric Machine Control Program Generating obtains serial data bag, this Electric Machine Control program is write based on Matlab the program obtained.
RS232 coded format can be adopted to be packed by the real-time controling parameters of Electric Machine Control Program Generating.Such as, Simulink tool box constructing modular Electric Machine Control program can be utilized on Matlab platform.The effect of this Electric Machine Control program is by the real-time controling parameters of kinetic model emulation generation to turntable, these controling parameters are according to occurring that sequencing arranges, self-defined packet header, bag tail, adopt RS232 coded format to be packaged into a serial data bag, the definition of this serial ports order format can be as shown in Figure 2.
Step 402: serial data bag is sent by the first serial of virtual serial port, so that motor driver drives the value of parameter to control turntable according to motor, this motor driver is write based on VC the driver obtained, wherein, this motor drives the value of parameter to be this to serial data bag to decode the driving parameter value obtained.
Serial data bag can be sent by serial ports transmission program, serial ports transmission program is Matlab platform counterdie blocking programming realization, and the serial ports number of serial ports transmission program is first serial number.Such as, can install VSPD virtual serial port program, arrange a pair virtual serial port on computers on main control computer, the effect of this virtual serial port realizes the communication on same computing machine between different system software, and communication mode adopts RS232 coded format.This virtual serial port is the information bridge connecting Electric Machine Control program and motor driver.Virtual serial port can be realized by the mode of installing VSPD virtual serial port program on main control computer.Then utilize the PacketOutput module in Real-Time windows Target tool box to set up serial data transmission program, serial ports number is configured to the first serial number in above-mentioned virtual serial port.
Motor drives parameter to comprise: low velocity, high speed, acceleration, displacement, kinematic axis.
Turntable integrated control method based on Matlab/VC provided by the invention, the Electric Machine Control program of writing based on Matlab and the motor driver write based on VC is connected by virtual serial port, achieve the integration that the modularity control program of being built by Matlab controls in real time to turntable and drive process, make user can when not utilizing other hardware conversion equipment, the Electric Machine Control program Direct driver turntable of establishment on Matlab is utilized to be synchronized with the movement, therefore effectively rotating platform control system manufacturing cost is reduced, facilitate user to control flexibly and personal settings turntable.
The turntable integrated control method based on Matlab/VC that above-described embodiment provides is for sending serial data bag, and correspondingly, the embodiment of the present invention additionally provides a kind of turntable integrated control method based on Matlab/VC for receiving serial data bag.
Fig. 7 is the process flow diagram of a kind of turntable integrated control method based on Matlab/VC according to the embodiment of the present invention, and as shown in Figure 7, the turntable integrated control method based on Matlab/VC of this embodiment comprises:
Step 501: receive serial data bag by the second serial of virtual serial port, this serial data bag is the serial data bag obtained according to the real-time controling parameters of Electric Machine Control Program Generating, and this Electric Machine Control program is write based on Matlab the program obtained.
Can receive serial data bag by serial ports reception program, serial ports reception program is VC platform counterdie blocking programming realization, and the serial ports number of serial ports reception program is second serial number.Such as, can install VSPD virtual serial port program, arrange a pair virtual serial port on computers on main control computer, the effect of this virtual serial port realizes the communication on same computing machine between different system software, and communication mode adopts RS232 coded format.Motor drives parameter to comprise: low velocity, high speed, acceleration, displacement, kinematic axis.Write serial ports reception program, being driven by motor parameter according to occurring that sequencing arranges, self-defined packet header, bag tail, being packaged into a serial data bag.Serial ports number is configured in a pair virtual serial port.The definition of serial ports order format can be as shown in Figure 2.
Step 502: this serial data bag is decoded, obtains decoded data.
Step 503: extract the value that motor drives parameter from this decoded data.
Step 504: drive the value assignment of parameter in motor driver so that motor driver drives the value of parameter to control turntable according to motor in this motor, this motor driver is write based on VC the driver obtained.
The effect of this motor driver is reception is sent on the VC platform real-time controling parameters generated in real time by Electric Machine Control program by virtual serial port.By decoding to the serial data bag received, extracting motor and driving parameter, by parameter assignment in turntable driver, drive turntable running.Motor drives parameter to comprise: low velocity, high speed, acceleration, displacement, kinematic axis.
Participate in Fig. 4, serial ports reception program detects whether receive character, if receive character, then the character received is added up, then judge whether character is packet header, if not, then judge whether character is bag tail, after judging that character is bag tail, extract the value that motor drives parameter, then actuating motor driver drives turntable to run.
Turntable integrated control method based on Matlab/VC provided by the invention, the Electric Machine Control program of writing based on Matlab and the motor driver write based on VC is connected by virtual serial port, achieve the integration that the modularity control program of being built by Matlab controls in real time to turntable and drive process, make user can when not utilizing other hardware conversion equipment, the Electric Machine Control program Direct driver turntable of establishment on Matlab is utilized to be synchronized with the movement, therefore effectively rotating platform control system manufacturing cost is reduced, facilitate user to control flexibly and personal settings turntable.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1., based on a turntable integrated control method of Matlab/VC, it is characterized in that, comprising:
Real-time controling parameters according to Electric Machine Control Program Generating obtains serial data bag, and described Electric Machine Control program is write based on Matlab the program obtained; And
By the first serial of virtual serial port, described serial data bag is sent, so that motor driver drives the value of parameter to control turntable according to motor, described motor driver is write based on VC the driver obtained, wherein, described motor drives the value of parameter to be to decode the driving parameter value obtained to described serial data bag.
2. method according to claim 1, is characterized in that, the described real-time controling parameters according to Electric Machine Control Program Generating obtains serial data handbag and draws together:
RS232 coded format is adopted to be packed by the real-time controling parameters of Electric Machine Control Program Generating.
3. method according to claim 1, is characterized in that, described serial data bag is carried out transmission and comprises by the described first serial by virtual serial port:
Sent by serial ports transmission program by described serial data bag, described serial ports transmission program is Matlab platform counterdie blocking programming realization, and the serial ports number of described serial ports transmission program is described first serial number.
4. method according to claim 1, is characterized in that, described motor drives parameter at least to comprise following one:
Low velocity, high speed, acceleration, displacement and kinematic axis.
5., based on a turntable integrated control method of Matlab/VC, it is characterized in that, comprising:
Receive serial data bag by the second serial of virtual serial port, described serial data bag is the serial data bag obtained according to the real-time controling parameters of Electric Machine Control Program Generating, and described Electric Machine Control program is write based on Matlab the program obtained;
Described serial data bag is decoded, obtains decoded data;
The value that motor drives parameter is extracted from described decoded data;
Drive the value assignment of parameter in motor driver so that described motor driver drives the value of parameter to control turntable according to described motor in described motor, described motor driver is write based on VC the driver obtained.
6. method according to claim 5, is characterized in that, the described second serial by virtual serial port receives serial data handbag and draws together:
Receive serial data bag by serial ports reception program, described serial ports reception program is VC platform counterdie blocking programming realization, and the serial ports number of described serial ports reception program is described second serial number.
7. method according to claim 5, is characterized in that, described motor drives parameter at least to comprise following one:
Low velocity, high speed, acceleration, displacement and kinematic axis.
8., based on a turntable integrated control unit of Matlab/VC, it is characterized in that, comprising:
Packet generation module, obtains serial data bag for the real-time controling parameters according to Electric Machine Control Program Generating, and described Electric Machine Control program is write based on Matlab the program obtained; And
Sending module, for the first serial by virtual serial port, described serial data bag is sent, so that motor driver drives the value of parameter to control turntable according to motor, described motor driver is write based on VC the driver obtained, wherein, described motor drives the value of parameter to be to decode the driving parameter value obtained to described serial data bag.
9., based on a turntable integrated control unit of Matlab/VC, it is characterized in that, comprising:
Packet-receiving module, serial data bag is received for the second serial by virtual serial port, described serial data bag is the serial data bag obtained according to the real-time controling parameters of Electric Machine Control Program Generating, and described Electric Machine Control program is write based on Matlab the program obtained;
Decoder module, for being decoded by described serial data bag, obtains decoded data;
Extraction module, drives the value of parameter for extracting motor from described decoded data;
Assignment module, for driving the value assignment of parameter in motor driver so that described motor driver drives the value of parameter to control turntable according to described motor in described motor, described motor driver is write based on VC the driver obtained.
10., based on a turntable integral control system of Matlab/VC, it is characterized in that, comprising:
Dispensing device, described dispensing device is used for obtaining serial data bag according to the real-time controling parameters of Electric Machine Control Program Generating, and described Electric Machine Control program is write based on Matlab the program obtained; By the first serial of virtual serial port, described serial data bag is sent; And
Receiving trap, described receiving trap is used for receiving described serial data bag by the second serial of described virtual serial port; Described serial data bag is decoded, obtains decoded data; The value that motor drives parameter is extracted from described decoded data; Drive the value assignment of parameter in motor driver so that described motor driver drives the value of parameter to control turntable according to described motor in described motor, described motor driver is write based on VC the driver obtained.
CN201210453819.4A 2012-11-13 2012-11-13 Method, device and system for integrated turntable control based on Matlab/VC Active CN102902207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210453819.4A CN102902207B (en) 2012-11-13 2012-11-13 Method, device and system for integrated turntable control based on Matlab/VC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210453819.4A CN102902207B (en) 2012-11-13 2012-11-13 Method, device and system for integrated turntable control based on Matlab/VC

Publications (2)

Publication Number Publication Date
CN102902207A CN102902207A (en) 2013-01-30
CN102902207B true CN102902207B (en) 2015-06-17

Family

ID=47574509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210453819.4A Active CN102902207B (en) 2012-11-13 2012-11-13 Method, device and system for integrated turntable control based on Matlab/VC

Country Status (1)

Country Link
CN (1) CN102902207B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104052632B (en) * 2014-05-29 2018-01-02 汉柏科技有限公司 Equipment automatization method of testing and device based on virtual serial port server
CN108897322B (en) * 2018-07-18 2021-02-12 大连海事大学 Unmanned ship autonomous navigation track tracking controller test simulation platform and working method
CN112859757B (en) * 2019-11-27 2022-04-22 宁波舜宇智能科技有限公司 Edge calculation control method, edge calculation control device, edge computer and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101051226A (en) * 2007-02-27 2007-10-10 宁波杉工结构监测与控制工程中心有限公司 Remote online monitor method and device for stayed-cable force
CN101308365A (en) * 2008-07-07 2008-11-19 株洲南车时代电气股份有限公司 Quick control prototype system and realization method
CN101738642A (en) * 2008-11-10 2010-06-16 同济大学 Method for processing ground penetrating radar data
US7865349B2 (en) * 2001-01-19 2011-01-04 National Instruments Corporation Simulation, measurement and/or control system and method with coordinated timing
CN102033739A (en) * 2009-09-24 2011-04-27 宗鹏 Combined programming of MATLAB and OPNET for solving problem of automatic tracking of array antenna in OPNET pipeline
CN102298334A (en) * 2011-08-31 2011-12-28 北京空间飞行器总体设计部 Breakpoint simulation controller and control method for ground simulation system
CN102608922A (en) * 2012-03-27 2012-07-25 中国科学院光电技术研究所 Vega-and-RTW-based real-time visual simulation platform for photoelectric theodolite
CN102629110A (en) * 2012-04-12 2012-08-08 余大利 Pressurized water reactor hardware-in-the-loop simulation system based on physical model

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7865349B2 (en) * 2001-01-19 2011-01-04 National Instruments Corporation Simulation, measurement and/or control system and method with coordinated timing
CN101051226A (en) * 2007-02-27 2007-10-10 宁波杉工结构监测与控制工程中心有限公司 Remote online monitor method and device for stayed-cable force
CN101308365A (en) * 2008-07-07 2008-11-19 株洲南车时代电气股份有限公司 Quick control prototype system and realization method
CN101738642A (en) * 2008-11-10 2010-06-16 同济大学 Method for processing ground penetrating radar data
CN102033739A (en) * 2009-09-24 2011-04-27 宗鹏 Combined programming of MATLAB and OPNET for solving problem of automatic tracking of array antenna in OPNET pipeline
CN102298334A (en) * 2011-08-31 2011-12-28 北京空间飞行器总体设计部 Breakpoint simulation controller and control method for ground simulation system
CN102608922A (en) * 2012-03-27 2012-07-25 中国科学院光电技术研究所 Vega-and-RTW-based real-time visual simulation platform for photoelectric theodolite
CN102629110A (en) * 2012-04-12 2012-08-08 余大利 Pressurized water reactor hardware-in-the-loop simulation system based on physical model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Labview 及Proteus 软件环境下单片机串口通讯的仿真方法;张力等;《电子测量技术》;20100430;第33卷(第4期);论文第87页摘要,引言,第88页第1节,第89页第2节 *
上位机系统中VC、Matlab和LabVIEW程序间的串行通讯;罗建国等;《化工自动化及仪表》;20031231;第30卷(第6期);论文第40页第2-4节,第41页第5节及第42页第7节 *

Also Published As

Publication number Publication date
CN102902207A (en) 2013-01-30

Similar Documents

Publication Publication Date Title
CN102681465A (en) Industrial robot demonstration planner with motion planning function and control method for industrial robot demonstration planner
CN103513992A (en) Universal development platform for education and entertainment robot application software
CN103823467A (en) Control method of industrial robot demonstration planner with motion planning function
EP3628453A1 (en) A control system and method for a robot
CN102708234B (en) Integration platform and method of Matlab (matrix laboratory) simulation model based on HLA (high level architecture)
CN105912339B (en) A kind of exploitation of Application in numerical control (NC) System and integrated approach and system
CN201689302U (en) Integrated intelligent servo driver
CN102087610A (en) Method for performing model simulation and code generation on custom hardware by using Simulink
CN102902207B (en) Method, device and system for integrated turntable control based on Matlab/VC
CN105093963A (en) Modular robot self-repairing simulation system and method
CN110355759A (en) A kind of industrial robot gluing control system of view-based access control model
CN103019702B (en) A kind of visualization of 3 d display and control editing system and method
CN110488764A (en) A kind of engraving machine motion controller and its engraving equipment and method based on FPGA
CN112207829A (en) Robot control method and device and readable storage medium
CN102789206B (en) The centralized safety logic control system mixed with distributed AC servo system in numerical control of machine tools
CN102109835A (en) Motion control system based on PLC (programmable logic controller)
CN109807898B (en) Motion control method, control device, and storage medium
CN109910004B (en) User interaction method, control device and storage medium
CN111213099A (en) Motion control card, motion control system, robot system and numerical control machine tool
CN102567071A (en) Virtual serial port system and communication method for same
KR20100094009A (en) Integrated robot software platform with framework module
CN111954854A (en) Support device and support program
CN104353926B (en) A kind of motion control method being applicable to complex curve device automatic welding
CN105425728A (en) Multi-axis motion serial control teaching programming method
CN103135495A (en) Control system for numerical control cutting machine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant