Intellgent control system for computer peripheralsThe present invention relates to the control device of digital machine, relate in particular to a kind of Intellgent control system for computer peripherals.
Widespread use along with robot calculator, the computer peripheral of various functions is on the increase, and separate unit external unit that main frame is with is limited in one's ability, general every main frame has only a serial line interface and a parallel interface, when another external unit of reconfiguration, could change the external unit connector after closing tester in power-down state, otherwise, fragile main frame of warm swap or external unit, use is made troubles to computing machine, on the other hand, some external unit costs an arm and a leg, as laser printer and plotting apparatus etc., the user connects one, the spend substantial contribution as giving every main frame.
The present invention is intended to propose a kind ofly to advance switching with stored program control system and switch at above-mentioned present situation, and master routine provides menu to select, and does not influence the continue Intellgent control system for computer peripherals of control stiffness and accuracy of main frame and external unit.
The present invention is by microcomputer, program storage, three groups of multi-channel electronic switch, isolate and electronic commutator with one group of photoelectricity of main frame equal number, isolate and electronic commutator with another group photoelectricity of serial external unit equal number, pool of buffer amplifier with parallel external unit equal number, provide time-controlled switching value to export another group buffer amplifier and pilot relay that way is an external unit equal number to be accessed with needs, and be used for serial main frame, the multicore D type socket of parallel interface and external unit drawing-in system and private cable are formed.
One group of photoelectricity of the serial output of main frame, input port is isolated with electronic commutator and is divided two-way, and one the tunnel is connected with input, the delivery outlet of microcomputer through one group of multi-channel electronic switch; Another road is connected to another group multi-channel electronic switch, and the output lead of this group multi-channel electronic switch is connected respectively to corresponding serial external unit through another group photoelectricity isolation with electronic commutator again.
The 3rd group of multi-channel electronic switch directly received in also line output, the input port of main frame, and the output lead of this group multi-channel electronic switch is connected respectively to corresponding parallel external unit through the pool of buffer amplifier again.
The output lead of program storage is received microcomputer, one group of output lead in four groups of output leads of microcomputer drives one group of pilot relay respectively through another group buffer amplifier, the normally opened contact of this group pilot relay is connected with corresponding external unit to be accessed, and other three groups of output leads are connected with three groups of multi-channel electronic switch respectively.
The control program of system of the present invention comprises two parts, a part is in the program storage of microsystem of the present invention, work out with the single-chip microcomputer assembly language, its function is to get in touch with main frame, receive the choosing mouth order that main frame is sent, finish the switching of each external apparatus interface and main frame, another part is in floppy disk or each host hard drive, its source program is compiling BASIC, an external command that can be used as operating system is used, various choice menus and relevant prompting are provided, and send various relevant choosing mouthful orders to the microcomputer of intelligence control system, data file and relevant intermediate result etc.
The present invention does not need the hardware of main frame and operating system are done any change, with the stored program control system switching of transferring, master routine provides menu to select, and is directly perceived flexibly, easy to use, reliable operation can realize that multiple host shares string, parallel port and switching value output, promptly shares many external units, improve plant factor, reduce and acquire cost of equipment, in some dedicated telephone line road, adopt the present invention, can also accomplish many microcomputer timesharing communications.
Accompanying drawing is a composition overall block-diagram of the present invention.
Also the invention will be further described in conjunction with the embodiments for the contrast accompanying drawing below:
Microcomputer 1 adopts the MCS-51 series monolithic oftape program storer 2 among the embodiment, each built-up circuit all is the typical general circuit, comprise three groups of multi-channelelectronic switch 3,4,5, two groups of photoelectricity are isolated and 6,7,8,9 and 10,11, two groups of buffer amplifiers 12,13 of electronic commutator and 14,15.Adapted four host computer PC1, PC2, PC3 and PC4 are IBM-PC and compatible thereof, serial external unit S1, the S2 of two RS-232C standards, parallel external unit P1, the P2 of two Centronics standards and two external unit Y1, Y2 that need timing controlled to insert or cut off, pilot relay J1, J2 adopt JRX-14F type DC relay.
The course of work of present embodiment is as follows:
After energized or this system reset, automatically this system initialization is set up under the software-driven of microcomputer 1 inprogram storage 2 for: the serial ports of microcomputer PC1 is received serial device S1, LPT device P1 is received in the parallel port, the serial ports of microcomputer PC2 is received serial device S2, LPT device P2 is received in the parallel port, microcomputer PC1, PC2 utilize the serial that connects, parallel external unit work, as serial communication, print file etc.Connect the not adhesive of pilot relay J1, J2 of double switch amount mouth, double switch amount mouth is a dissengaged positions, and the string of microcomputer PC3, PC4, parallel port all do not connect external unit.
If there are any needs to change the external unit configuration state among 4 host PC 1~PC4, as long as start the Control Software that is stored in floppy disk or the host hard drive, the microcomputer 1 of this software in intelligence control system sends calling, promptly send cue, and microcomputer 1 ceaselessly scans the output line of 4 main frames constantly by multi-channelelectronic switch 3, in case receive calling, it is the cue of main frame, answer signal of loopback immediately, and stop scanning, continue next step order of waiting for that this main frame sends.This main frame that need change external unit for example PC3 after obtaining the answer signal that microcomputer 1 sends, issue in the prompting of on-screen menu and to send to be elected mouthful order or to set time-controlled time parameter, microcomputer 1 receive thathost PC 3 sends for information about after, by control multi-channelelectronic switch 4,5, external unit is reconfigured, relevant external unit is connected to finishes choosing mouthful work on the serial ports ofhost PC 3 or the parallel port, perhaps the regular time parameter of receiving is stored among the RAM of microcomputer 1, and start internal clocking and pick up counting so that by the timing of setting to two external unit Y1 that need timing controlled to insert or cut off, Y2 is by pilot relay J1, the normally opened contact J of J21-1, J2-1The operation of connecting and cutting off the electricity supply.When host PC 3 is given an order, other host PC 1, PC2 and PC4 such as calling intelligent control system, intelligence control system will not be managed and be adopted, and host PC 1, PC2 and PC4 are in waiting status.After host PC 3 distributed order, intelligence control system continued 4 main frames of scanning.
In order to make intelligence control system can receive and send the RS-232C fiduciary level, host PC 1~PC4 serial port enters the signal wire of intelligence control system all isolates andlevel translator 6,7,8,9 through photoelectricity respectively, RS-232C level and Transistor-Transistor Logic level are changed mutually, equally, also having added photoelectricity between multi-channelelectronic switch 4 and serial device S1, the S2 respectively isolates and level translator 10,11, Transistor-Transistor Logic level and RS-232C level are changed mutually, and photoelectric isolating circuit wherein can also ensure the safety of intelligence control system and external unit thereof.
The parallel port signal is behind multi-channel electronic switch 5, in order to strengthen driving force, between multi-channel electronic switch 5 and LPT device P1, P2, increased buffer amplifier 12,13 respectively, simultaneously, also setting upbuffer amplifier 14,15 respectively with the interface of two pilot relay J1, J2.