CN201886331U - Device for reading and configuring serial communication data of programmable logic controller (PLC) - Google Patents
Device for reading and configuring serial communication data of programmable logic controller (PLC) Download PDFInfo
- Publication number
- CN201886331U CN201886331U CN2010206432148U CN201020643214U CN201886331U CN 201886331 U CN201886331 U CN 201886331U CN 2010206432148 U CN2010206432148 U CN 2010206432148U CN 201020643214 U CN201020643214 U CN 201020643214U CN 201886331 U CN201886331 U CN 201886331U
- Authority
- CN
- China
- Prior art keywords
- data
- serial port
- plc
- port module
- serial
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Programmable Controllers (AREA)
Abstract
The utility model relates to a device for reading and configuring the serial communication data of a programmable logic controller (PLC), which comprises the PLC, an RS 232 serial port module and an RS 485 serial port module, wherein the RS 232 serial port module and the RS 485 serial port module are connected with a data interface of the PLC; a remote terminal system (RTS) of the RS 232 serial port module is in a pin short circuit with a central terminal system (CTS); transmit data (TxD) of the RS 485 serial port module is in a pin short circuit with receive data (RxD); and - TxD of the RS 485 serial port module is in a pin short circuit with -RxD. The device solves the problem of hardware connection of a non-handshake signal waiting type serial communication device which is widely used on the existing market, and the real-time property of communication is guaranteed.
Description
Technical field
The utility model relates to a kind of logic controller serial communication data processing technique, the reading, dispose and install of a kind of specifically PLC logic controller serial communication data.
Background technology
PLC is the opertaing device that automation field often uses, and PLC has that good stability, I/O port kind are complete, advantage such as autoscan port in the performance period.The serial port function module is different from general I/O port, and its implementation is independent of the scan period of PLC, and data handling procedure has singularity, acquires a certain degree of difficulty in the use.The PLC logic controller has a variety of agreements, and CanOpen is wherein a kind of.The CanOpen agreement has advantages such as slave station number many (maximum 110), communication speed fast (can reach 1MBps), communication robust are good, is widely used in the automation field of integrated level height, control complexity.
CanOpen is the framework mode of a plurality of slave stations of main website, and main website generally is the main website card that industrial computer carries, the control program that run user designs voluntarily; PLC can be used as the CanOpen slave station.General I/O port data can directly read from main website, data are transparent for the user, be equivalent to directly by the main website image data, but the data of the serial port module of PLC slave station are difficult to directly read from main website, main cause is: the serial communication device category difference that serial port module is external, cause the parameter difference such as length, form of data; Moreover, the frame data that serial communication equipment is complete are very long usually, and as tens or dozens or even hundreds of byte, PLC can't all read in a scan period, promptly allow to once read, also can not find the data type that is complementary with it in the CanOpen main website.For the user, how under principal and subordinate's framework of CanOpen, from as the serial port module of the PLC of slave station with data reasonable disposition and be sent to main website and just become a difficult problem in main website, this is the technical problems to be solved in the utility model just also.
The utility model content
At the PLC that exists in the prior art as the CanOpen slave station and when carrying the serial communication module, serial port module is how from external unit or terminal collects data and how data transfer to this technical barrier of CanOpen main website, and the utility model provides the reading of a kind of PLC logic controller serial port module data that can handle the data acquisition of PLC serial port module, inking device.
For solving the problems of the technologies described above, the technical solution adopted in the utility model is:
The reading of the utility model PLC logic controller serial communication data, inking device comprise: PLC logic controller, RS232 serial port module and RS485 serial port module, wherein, RS232 serial port module and RS485 serial port module link to each other with the data-interface of PLC logic controller, RTS in the RS232 serial port module and CTS pin short circuit, the TxD of RS485 serial port module and RxD pin short circuit; The RS485 serial port module-TxD and-RxD pin short circuit.
The utlity model has following beneficial effect and advantage:
1, by to the entrained RS232 module of PLC and the improvement of RS485 module wiring, solved and used in the market the hardware connectivity problem of the serial communication equipment that does not have the waiting signal type of shaking hands widely.
2. utility model will meet PLC and receive the serial communication data by RS232 and RS485 module and split, be divided into a plurality of data that can represent the complete physical meaning, coupling is in data field that QW256 begins, owing to split, data byte shortens, make the CanOpen main website can find the data type of size coupling with it, make uploading of data become possibility;
3. serial communication often needs real-time, Gu make PLC continual and external connection apparatus or terminal switch data by dual timer method of the present utility model, has guaranteed the real-time of communication.
Description of drawings
Fig. 1 is PLC logic controller and a serial port function module combinations connection layout in the utility model;
Fig. 2 is RS232 serial port function module and an external unit connection layout in the utility model;
Fig. 3 is RS485 serial port function module and an external unit connection layout in the utility model;
Fig. 4 is the utility model embodiment electrical connection diagram;
Fig. 5 is the connection layout of the utility model and attitude sensor;
Fig. 6 is the connection layout of the utility model and leakage sensor.
Embodiment
Reading, disposing of the utility model PLC logic controller serial port module data realizes its control by the following method:
With the RTS and the CTS short circuit of RS232 serial port module, its communication waiting signal of shaking hands is forbidden;
With the TxD of RS485 serial port module and RxD short circuit data+ signal as the RS485 communication;
With the RS485 serial port module (TxD) and (RxD) short circuit is as the data-of RS485 communication;
By the periodically uninterrupted exchanges data that triggers PLC and serial communication equipment of the method for dual timer coupling, make the continuously uninterrupted communication of PLC and serial communication equipment;
With serial data arrangement and leave the buffer zone that %QW256 begins in,, in the CanOpen main website, be configured and read as the PLC output variable;
After reading one group of data,, make each all to begin reading of data at every turn, avoided loaded down with trivial details processing index from the index of zero of buffer zone with PLC serial data buffer zone index and all zero clearings of data.
Figure 1 shows that PLC logic controller and serial port function module be connected and wiring is handled, the wherein RTS of RS232 serial port module and CTS short circuit, the TxD of RS485 serial port module and RxD short circuit ,-TxD and-the RxD short circuit.RS232 serial port module and RS485 serial port module are connected shown in Fig. 2,3 with external unit, and wherein, the TxD of RS232 module is connected with the RxD of external unit, and the RxD of RS232 module is connected with the TxD of external unit, and the Common of the two connects together; The RxD of RS485 module end is connected with the data+ of external unit, the RS485 module-RxD holds and is connected with the data-of external unit.
Serial communication equipment often requires the continual exchanges data of carrying out, the acquisition serial data information that the system that makes did not stop in the continuous time period, and the utility model communication uses two built-in timers of PLC to address this problem.Two timers are that rising edge triggers type, first timer enable the output signal that input signal is second timer, the input signal that enables of second timer is the output signal of first timer, and the input signal of first timer carries out inversion operation, like this, connect the circulation that does not the stop triggering that a timer can intercouple, till PLC outage power cut-off.Like this, the exchanges data of PLC and serial communication equipment is a continuous uninterrupted.
The PLC data buffer that has been the serial communication module assignment, this buffer zone has two parameters, be respectively index (Index) and data (data), index is 255 to the maximum, PLC has taked index to follow the data number not stop to increase, when index is maximal value 255, with index zero setting, Ji Shuo mode again.This mode has brought difficulty for the intercepting of complete one group of data.The utility model has been taked to read after one group of data the mode with index and the whole zero clearings of data, if only with the index zero clearing, one group of new data still come after the last group of data, with data (data) also zero clearing simultaneously, like this, can guarantee that each reading of data all leaves the data buffer that index of zero begins in, bring very big convenience for the subsequent treatment of data.
Because the data of serial communication equipment are often long, the data type that the data type of CanOpen main website is not complementary with its length, this has brought difficulty to the data that CanOpen reads serial communication equipment.The utility model earlier becomes 2 byte datas with the data deconsolidation process of serial communication equipment, leaves in the data field that QW256 begins, and can find the data type that is complementary with it in this regional inherent CanOpen main website.Like this, the data of serial communication equipment just can read in the CanOpen main website.
Present embodiment with ten thousand can 750-837 as CanOpen slave station and PLC logic controller, connect RS232 serial port function module 750-650 and RS485 serial port function module 750-653 thereafter.
As shown in Figure 4, with RTS and the CTS short circuit of 750-650, with TxD and the RxD short circuit of 750-653, with 750-653-TxD and-RxD short circuit.
There is timer 750-837 inside, can be used as dual timer coupling trigger data communication function described in the utility model and uses.TP type timer tp1 and tp2 are set, the input signal IN1 of tp1 is made as the output signal Q2 of tp2, the input signal IN2 of tp2 is made as the output signal Q1 of tp1, and input carried out inversion operation, be IN1=NOTQ2, IN2=NOTQ1 is by above method, the circulation that can realize tp1 and two timers of tp2 triggers the continual read data operation of carrying out.
In PLC inside, with its serial data buffer zone index Index and data equal zero setting, i.e. Index=0 after each reading of data; Be recycled to Index-1 with data data[0 by FOR loop statement from 0] until data data[Index-1] equal zero setting, i.e. PLC statement:
FORi=0TO?Index-1DO
data[i]=0;
END_FOR;
Above-mentioned statement realizes that each reading of data goes buffering to zero clearing, beginning processing from buffer zone zero when the data that next group is new arrive gets final product, removed the loaded down with trivial details manipulation of the position in fact (representing) of one group of new data of loaded down with trivial details searching from, brought great convenience to data processing with index.
RS232 serial communication equipment is attitude sensor, and it is connected as shown in Figure 5 with the PLC serial port module; RS485 serial communication equipment is water leak detectors, and it is connected as Fig. 6 institute not with the PLC serial port module.
The data of attitude sensor are split into 2 groups of data, be respectively deflection, trim angle, roll angle, be configured in QW256, QW257, the QW258 data field of PLC, the equipment 1 of leakage sensor resistance value, equipment 2 resistance value, equipment 3 resistance value of leaking of leaking of leaking is configured in QW259, QW260, the QW261 data field of PLC.The method of configuration is for establishing variable in PLC inside, variable name as outdata0, is configured in region of memory QW256 by statement outdata0AT%QW256 with variable outdata0 from intending, like this, just outdata0 can read in the CanOpen main website.The collocation method of remaining variables is identical.
One group of data of the attitude sensor in the present embodiment are totally 24 bytes, represented the data of deflection, trim angle, three physical significances of roll angle respectively, and data length is considerably beyond the maximum length of all data types of CanOpen main website.By the utility model, 24 bytes are split, three angle-datas that extracting the user needs also mate in the data field that QW256 begins, and are that uploading of data becomes possibility.The current attitude of the demonstration object that attitude sensor need not stop, Gu be the continual and attitude sensor swap data of PLC by dual timer method of the present utility model, the attitude of the grasp object that the person of being to use can be real-time.
Claims (1)
1. the reading of PLC logic controller serial communication data, inking device, it is characterized in that comprising: PLC logic controller, RS232 serial port module and RS485 serial port module, wherein, RS232 serial port module and RS485 serial port module link to each other with the data-interface of PLC logic controller, RTS in the RS232 serial port module and CTS pin short circuit, the TxD of RS485 serial port module and RxD pin short circuit; The RS485 serial port module-TxD and-RxD pin short circuit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010206432148U CN201886331U (en) | 2010-12-04 | 2010-12-04 | Device for reading and configuring serial communication data of programmable logic controller (PLC) |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010206432148U CN201886331U (en) | 2010-12-04 | 2010-12-04 | Device for reading and configuring serial communication data of programmable logic controller (PLC) |
Publications (1)
Publication Number | Publication Date |
---|---|
CN201886331U true CN201886331U (en) | 2011-06-29 |
Family
ID=44183879
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010206432148U Expired - Fee Related CN201886331U (en) | 2010-12-04 | 2010-12-04 | Device for reading and configuring serial communication data of programmable logic controller (PLC) |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN201886331U (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102486639A (en) * | 2010-12-04 | 2012-06-06 | 中国科学院沈阳自动化研究所 | Reading and configuration method and device of serial communication data of PLC (programmable logic controller) |
CN112270147A (en) * | 2020-10-29 | 2021-01-26 | 国核自仪系统工程有限公司 | Board card and control method thereof |
-
2010
- 2010-12-04 CN CN2010206432148U patent/CN201886331U/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102486639A (en) * | 2010-12-04 | 2012-06-06 | 中国科学院沈阳自动化研究所 | Reading and configuration method and device of serial communication data of PLC (programmable logic controller) |
CN102486639B (en) * | 2010-12-04 | 2013-08-28 | 中国科学院沈阳自动化研究所 | Reading and configuration method and device of serial communication data of PLC (programmable logic controller) |
CN112270147A (en) * | 2020-10-29 | 2021-01-26 | 国核自仪系统工程有限公司 | Board card and control method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101710256A (en) | High speed image data acquisition and processing card based on Camera Link interface | |
CN105204395A (en) | Computer room inspection robot data acquisition and processing system, method and chip | |
CN104749949A (en) | PowerPC and x86 based hybrid tri-redundancy UAV flying control computer and core design method | |
CN103984240A (en) | Distributed real-time simulation method based on reflective memory network | |
CN201886331U (en) | Device for reading and configuring serial communication data of programmable logic controller (PLC) | |
CN104135410A (en) | EPA (Ethernet for Plant Automation) communication IP (Intellectual Property) core and system on chip (SOC) based on AMBA (Advanced Microcontroller Bus Architecture) bus structure | |
CN102346453A (en) | Analog data collection module based on industrial Ethernet | |
CN102486639B (en) | Reading and configuration method and device of serial communication data of PLC (programmable logic controller) | |
CN107579913B (en) | Configurable communication gateway and communication method based on same | |
CN104158876A (en) | Double-workpiece-station photo-etching machine control system communication device based on Vxworks operating system | |
CN205004841U (en) | Intelligence substation equipment and data transmission system thereof | |
CN204652436U (en) | Io bus interface circuit | |
CN103777594A (en) | Control method for asphalt mixing station control system with two synchronously online upper computers | |
CN204089850U (en) | A kind of network-type PLC with multi-fieldbus | |
CN101969552A (en) | System and method for parallel processing of video data | |
CN205485449U (en) | DNC information collection system | |
CN204480463U (en) | A kind of Multi-functional data collector | |
CN206114801U (en) | Laboratory automation testing arrangement | |
CN201859346U (en) | Device for monitoring CAN (controller area network) bus communication data | |
CN110083567B (en) | Chip architecture | |
CN204013538U (en) | Meteorological data transmission and display system based on satellite communication | |
CN203522895U (en) | SOPC (system-on-a-programmable-chip)-based binocular video stitching device | |
CN103064316B (en) | Synchronous denoising multichannel ultrasonic signal acquisition system | |
CN206388237U (en) | The displaying of intelligent vegetable and meal ordering system for dining room | |
CN106444535B (en) | A kind of motion controller and control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110629 Termination date: 20151204 |
|
EXPY | Termination of patent right or utility model |