CN102636997A - Simulation method for analog input and switch output module - Google Patents

Simulation method for analog input and switch output module Download PDF

Info

Publication number
CN102636997A
CN102636997A CN2012101459557A CN201210145955A CN102636997A CN 102636997 A CN102636997 A CN 102636997A CN 2012101459557 A CN2012101459557 A CN 2012101459557A CN 201210145955 A CN201210145955 A CN 201210145955A CN 102636997 A CN102636997 A CN 102636997A
Authority
CN
China
Prior art keywords
module
emulation module
state
output switch
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012101459557A
Other languages
Chinese (zh)
Inventor
马玉春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN2012101459557A priority Critical patent/CN102636997A/en
Publication of CN102636997A publication Critical patent/CN102636997A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention provides a simulation method for an analog input and switch output module, and relates to the technical field of communication and computer application, in particular to a serial communication and computer monitoring technology. An output switch of a simulation module designed by using the method can be controlled by a master controller; the state of the output switch and the value of input analog can be queried by the master controller; hardware cost is not required for the simulation module; a communication protocol is directly displayed on a main interface of the simulation module without turning over a manual; the address of the simulation module, the state of an RS-232 interface, the state of the output switch, the value of input analog, the data receiving and transmitting state and transmitted data are all displayed on the main interface of the simulation module; and data communication and processing have the same effect as a real object module.

Description

The emulation mode of a kind of analog quantity input and switching value output module
Technical field
The present invention relates to communication and Computer Applied Technology field, relate in particular to serial communication and computer monitoring technology.
Background technology
Computer supervisory control system is widely used in various fields, and data acquisition and output control module are the indispensable input/output modules that computer supervisory control system is directly followed monitored object association, and; The module that adopts serial line interface (RS-232) to communicate by letter with main control computer is more; This module is used for the real standard practice of engineering project of colleges and universities' computer-related speciality, can let students understand and experience agreement, puts into practice the method for RS-232 interface communication; Can adopt assembly language, Turbo C language, Java language and .NET language that module is inquired about and controlled; Can preserve data (like alarm logging) with database, also can send warning message through computer network, thereby; Can put into practice the integrated application of multi-door computer studies, the comprehensive application ability of check knowledge.
" Ministry of Education is about some suggestions of comprehensive raising higher education quality " (high [2012] No. 4 of religion) the 8th proposition of file " strengthened and put into practice the link of cultivating talent ", and the 9th proposition will " strengthen innovating start an undertaking education and careers guidance service ".But enterprise recruits less than the computer supervisory control system research and development talent that engineering experience is arranged on the one hand, and colleges and universities are because the equipment insufficient investment also is difficult to cultivate the computer supervisory control system research and development talent on the other hand.The analog quantity input and switching value output emulation module (hereinafter referred emulation module) that utilize method provided by the invention to design; Can be used for zero cost (except the serial communication cable) builds computer supervisory control system simulating developer platform at the computer house of colleges and universities; In order to the core technology of practice and study computer supervisory control system, thus effectively improve the student put into practice technical ability and employment rate.
Summary of the invention
The invention has the beneficial effects as follows that compare with module in kind, the effect of visualization of emulation module is better; Its major technique is characterized as: the emulation module serviceability temperature is as analog quantity; During the output switch closure, exhibit red line between two terminals of output switch, circuit is connected; Heating lamp is bright, and this moment, temperature rose automatically; The output switch opens is then hidden red line, and circuit breaks off, and heating lamp goes out, and this moment, temperature descended automatically; During temperature variation, represent that to upward arrow temperature rises with red on the temperature sensor next door, represent that with blue arrow downwards temperature descends, the arrow next door shows 16 system Temperature numerical; Communication protocol and explanation thereof are shown in the main interface of emulation module, need not to consult instructions, and support several data verification mode (module in kind is generally only supported a kind of verification mode); The data that emulation module receives and sends directly are shown in the main interface of emulation module; The beat unification of the address of RS-232 Interface status, emulation module and temperature sensor numerical value change shows with status bar.
Description of drawings
Fig. 1 is the abstract model of the emulation module that designs of the present invention;
Fig. 2 is the communication protocol of the emulation module that designs of the present invention;
Fig. 3 is the visualizing application software model of the emulation module that designs of the present invention.
Embodiment
Fig. 1 is the abstract model of emulation module, and " module represent district " at Fig. 3 shows as a setting, is used for the module of artificial actual, and adds the dynamic and visual effect.Fig. 1 the latter half connection terminal function from left to right is followed successively by: S2+ is connected temperature sensor 2 with S2-, and S1+ is connected temperature sensor 1 with S1-, Vs+ and Vs-link block power supply, and GND is a module ground connection; Fig. 1 the first half connection terminal function from left to right is followed successively by: OUT1 is connected output switch 1 with COM1; OUT0 is connected output switch 0 with COM0, Tx, Rx and GND are the splicing ear of the transmission pin of RS-232 interface, the splicing ear and the ground wire of reception pin.
The state of two output switches is controlled through the communication protocol shown in Fig. 2; When the output switch closure; Between pair of output (like OUT1 and COM1), show a red line; Form an active circuit loop, corresponding simultaneously heating lamp bright (at the position display red light picture of this loop heating lamp); Otherwise, hide connecting the red line between the lead-out terminal, circuit breaks off, heating lamp go out (hiding the red light picture).
A text box is placed on each temperature sensor (temperature sensor that is connected down like S2+ and S2-terminal) next door, is used for numerical value with 16 system form displays temperature sensors, and this numerical value need pass through conversion could represent actual temperature; Place an arrow again,, just represent ascendant trend to upward arrow,, just represent downtrending with blue arrow downwards if temperature descends with red if temperature rises.The S1 temperature sensor is corresponding with OUT0 output switch, and the S2 temperature sensor is corresponding with OUT1 output switch.If corresponding heating lamp is bright, then the numerical value in the text box rises (being 0xFF to the maximum), simultaneously the exhibit red arrow; Otherwise numerical value descends (minimum is 0), shows blue arrow.
Power supply (Power) pilot lamp is red, and this moment, the RS-232 interface was closed, and emulation module is not worked; Click power light, green by red stain, this moment, the RS-232 interface was opened, and when emulation module is received the control command that main control computer sends, upgraded the state of output switch, simultaneously the numerical value of temperature sensor was adjusted; When emulation module is received querying command, then return the numerical value of temperature sensor and the state of output switch.Emulation module is not worked or when idle, Rx and Tx pilot lamp are redness, and when receiving data, the Rx pilot lamp turns green, and during the transmission data, the Tx pilot lamp turns green.
Fig. 2 is the communication protocol of operational simulation module, shows in Fig. 3 " protocol description district ".The identical leading character of the general employing of the module of same type, EOT is a special ascii character (0x04), often is used as control character, the emulation module here adopts EOT as leading character.
The I/O module that computing machine connected is many; CPU is in order to communicate with each other with the module that is connected; Must a numbering be set to module, thereby CPU can be linked up through the unique numbering of each module and this module, this numbering is exactly the address; Represent that with ID the address takies a byte.
Function code mainly comprises to be read function code (representing with RD) and writes function code (representing with WT).RD representes (0x52) that with character " R " WT (0x57) representes with character " W ".Because the state of this emulation module is less, so, need not to be provided with the internal data address that emulation module is read and write.
BCC (Block Check Code) is the data block check code, and several kinds of Xor, Add, CRC, CheckSum are generally arranged.Xor and Add be respectively XOR with add up with, account for the length of a byte; CRC and CheckSum are respectively the employed supplement check codes that adds up in CRC and the TCP/IP protocol family, account for two bytes respectively.Emulation module provides this 4 kinds of data block verification modes, and check code is optional.
Many modules indicate EM (End Message) with carriage return CR (0x0d) as ending; And the TCP/IP protocol family is (like HTTP; POP3 etc.) adopt CRLF (0x0d0a) as the ending sign morely; Emulation module provides these two kinds ending signs, and is same, and the ending sign also is optional.
Represent switch closure with 1, represent switch opens with 0.Emulation module has 2 switching value output DO (Digital Output), thereby, can use 1 its state of byte representation, wherein, does not use this position of " * " expression.
Can know that according to above design and analysis read the bidding protocol (Read also is a querying command) of emulation module state, wherein, the scope of ID is 1 to 255, can be provided with that like this, a main control computer can connect nearly 255 emulation modules by program.The kind of BCC and EM also can be provided with by program as required.
Emulation module read response protocol (Reply); Wherein, " STX " (Start of message, 0x02) expression begins main control computer is responded, and " DT1 " representes the numerical value of first temperature sensor; The numerical value of second temperature sensor of " DT2 " expression, the state of two output switches of minimum two (other are invalid) expression in " DO ".BCC calculates according to the check code kind that adopts, and whole agreement generates automatically and sends response to main control computer.For the misdata bag that main control computer sends, emulation module is all ignored, and does not respond.
Write order agreement (Write also is a control command), for the data (being DO) of 1 byte that writes, have only last two effectively.Here, write order is not provided with response protocol.
Fig. 3 is the visualizing application software model of emulation module, and " function button district " arranged system that button and bolt down procedure button are set.System is provided with parameters such as port numbers that the RS-232 interface mainly is set and baud rate; And the communication protocol of operational simulation module, comprise address code, check code, terminating code, the temperature sensor time that beat experienced of emulation module and the stride of variation.If the time of a beat is 2 seconds, changing stride is 5, and when then representing certain output switch closure, the numerical value of 2 seconds corresponding temperature sensors of every mistake increases progressively 5, and vice versa.
" Data Receiving district " shows the raw data packets of the main control computer transmission that receives, and shows with the byte form; The corresponding response packet that " data response district " then sends for emulation module also shows with the byte form.In addition, also be provided with status bar, be used for showing RS-232 Interface status and parameter, and the beat and the stride of the address of emulation module, temperature sensor numerical value change.
Utilize the emulation module of this visualizing application software modelling; Easy to use; Dynamic effect is good, and the data homogeneous order of numerical value, data transmit-receive state and the transmission of the address of emulation module, RS-232 Interface status, output on off state, temperature sensor is clear.Compare with module in kind, need not the physical connection of power supply and peripheral circuit, also need not signal generator and multimeter and produce simulating signal and measurement switch state; For communication protocol; Also need not to browse handbook, still, data communication but has identical effect with module in kind with processing.

Claims (2)

1. the emulation mode of analog quantity input and switching value output module utilizes the output switch of the emulation module that this method designs to be controlled by main control computer, and the state of output switch and the numerical value of input analog amount can be inquired about by main control computer.
2. according to the described emulation module of claim 1, it is characterized in that: emulation module need not hardware cost, and communication protocol is directly in the main interface display of emulation module, need not to browse handbook; The data of the state of the address of emulation module, RS-232 Interface status, output switch, numerical value, data transmit-receive state and the transmission of input analog amount are all in emulation module master interface display, and data communication but has identical effect with module in kind with processing.
CN2012101459557A 2012-05-13 2012-05-13 Simulation method for analog input and switch output module Pending CN102636997A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012101459557A CN102636997A (en) 2012-05-13 2012-05-13 Simulation method for analog input and switch output module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012101459557A CN102636997A (en) 2012-05-13 2012-05-13 Simulation method for analog input and switch output module

Publications (1)

Publication Number Publication Date
CN102636997A true CN102636997A (en) 2012-08-15

Family

ID=46621416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012101459557A Pending CN102636997A (en) 2012-05-13 2012-05-13 Simulation method for analog input and switch output module

Country Status (1)

Country Link
CN (1) CN102636997A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2295480A (en) * 1994-11-25 1996-05-29 Drilling Syst Ltd Well control simulation system
US6308224B1 (en) * 1996-03-29 2001-10-23 International Business Machines Corporation Method of generating an implementation of a workflow process model in an object environment
EP1168117A1 (en) * 2000-06-21 2002-01-02 ALSTOM Power N.V. Method for presenting and processing of process flows and computer programm for simulating the same
CN101557102A (en) * 2009-05-15 2009-10-14 江苏省电力公司金湖县供电公司 General-purpose simulation device for microcomputer protection
CN101867192A (en) * 2009-12-24 2010-10-20 浙江省电力试验研究院 Reactive compensation control simulation test system
CN202049353U (en) * 2011-01-28 2011-11-23 金华职业技术学院 Virtual measurement and control system for electric car

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2295480A (en) * 1994-11-25 1996-05-29 Drilling Syst Ltd Well control simulation system
US6308224B1 (en) * 1996-03-29 2001-10-23 International Business Machines Corporation Method of generating an implementation of a workflow process model in an object environment
EP1168117A1 (en) * 2000-06-21 2002-01-02 ALSTOM Power N.V. Method for presenting and processing of process flows and computer programm for simulating the same
CN101557102A (en) * 2009-05-15 2009-10-14 江苏省电力公司金湖县供电公司 General-purpose simulation device for microcomputer protection
CN101867192A (en) * 2009-12-24 2010-10-20 浙江省电力试验研究院 Reactive compensation control simulation test system
CN202049353U (en) * 2011-01-28 2011-11-23 金华职业技术学院 Virtual measurement and control system for electric car

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马玉春等: "《计算机监控系统开发与实战》", 30 April 2012, 机械工业出版社 *

Similar Documents

Publication Publication Date Title
RU2011127493A (en) SYSTEM AND METHOD OF REMOTE CONTROL AND FIELD INSTRUMENT MANAGEMENT
CN109286538A (en) Communication protocol conformance test method and terminal device
US20140122177A1 (en) Electric power demand response system and method
CN103778827B (en) A kind of electric energy metrical mutual inductor detection simulation training and checking system
CN201497876U (en) Converter for converting programmable CAN bus message into analog signal
CN105006183A (en) Analog simulation method for practical teaching examination on verification of electric energy meter
CN106250308A (en) A kind of simulation system based on emulation data model and method
CN102546301A (en) Digital signal logic analyzing system
CN103777169A (en) Electric energy metering transformer simulation verification system
CN107257304A (en) Telemechanical is exempted to a configuration testing system
CN209132626U (en) A kind of wisdom classroom management system based on Internet of Things
CN207571223U (en) fan detection system
CN102636997A (en) Simulation method for analog input and switch output module
CN103761895B (en) A kind of method of work of current transformer simulation examination system
CN104270469B (en) Remote-control data processing method and system
US7752558B2 (en) Plant operation supporting apparatus and plant operation supporting method
KR20200067701A (en) A training kit for building a CPS system of a smart factory, and a computer readable medium storing a program to be practiced using the kit
Guo et al. Design of remote real-time measuring system of temperature and humidity based on Raspberry Pi and Java language
CN202939877U (en) Plc test box
CN201859585U (en) Power distribution training device based on PLC (programmable logic controller)
CN103761913A (en) Current transformer simulation training system and working method
CN111882937A (en) Intelligent substation analog system
CN104834587B (en) The method and system of on-line debugging RS-485 bus slave computers
CN110098991B (en) Equipment for accessing EtherCAT bus system to universal Internet of things cloud platform
CN107067940A (en) Pin-connected panel chemical engineering simulation equipment

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: 20120815