CN100565401C - Single Chip Microcomputer (SCM) system receive the IRIG-B sign indicating number to the time signal implementation method - Google Patents

Single Chip Microcomputer (SCM) system receive the IRIG-B sign indicating number to the time signal implementation method Download PDF

Info

Publication number
CN100565401C
CN100565401C CNB2008101021071A CN200810102107A CN100565401C CN 100565401 C CN100565401 C CN 100565401C CN B2008101021071 A CNB2008101021071 A CN B2008101021071A CN 200810102107 A CN200810102107 A CN 200810102107A CN 100565401 C CN100565401 C CN 100565401C
Authority
CN
China
Prior art keywords
time
irig
chip microcomputer
sign indicating
indicating number
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
CNB2008101021071A
Other languages
Chinese (zh)
Other versions
CN101251755A (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.)
Beijing Sifang Automation Co Ltd
Beijing Sifang Engineering Co Ltd
Original Assignee
BEIJING SIFANG BONENG AUTOMATION EQUIPMENT Co Ltd
Sifang Electric (Group) Co Ltd
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 BEIJING SIFANG BONENG AUTOMATION EQUIPMENT Co Ltd, Sifang Electric (Group) Co Ltd filed Critical BEIJING SIFANG BONENG AUTOMATION EQUIPMENT Co Ltd
Priority to CNB2008101021071A priority Critical patent/CN100565401C/en
Publication of CN101251755A publication Critical patent/CN101251755A/en
Application granted granted Critical
Publication of CN100565401C publication Critical patent/CN100565401C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The present invention relates to the setting means of the automation equipment that constitutes by Single Chip Microcomputer (SCM) system in the automation control system, disclose by single-chip microcomputer UART interface receive the IRIG-B sign indicating number to the time signal implementation method.This method only need a UART mouth of RS485 chip and single-chip microcomputer can finish to the time function.In the method IRIG-B coded signal seen as serial asynchronous communication message (the message baud rate is 1000bps, and message format is 1 start bit, 8 bit data positions, 1 position of rest, no parity check).By the RS485 chip IRIG-B sign indicating number level signal is converted into the Transistor-Transistor Logic level signal, this signal is connected to the UART interface of single-chip microcomputer, then the data that communicating interrupt is received carry out software decoding finish to the time function.This method to the time precision height, improved economy and high integration that the device time setting circuit is realized.

Description

Single Chip Microcomputer (SCM) system receive the IRIG-B sign indicating number to the time signal implementation method
Technical field
The invention belongs to the industrial automation system field, can be applied in GPA system, the comprehensive automation system of transformer substation, this method specifically use in automated system device to the time interface, be a kind of simplification to the time mode implementation method.
Technical background
Along with improving constantly of development of electronic technology, automatization level, the IRIG-B sign indicating number to the time system also can popularization and application to industrial automation system, especially be embodied in the higher power automation field of automatization level.In a control system scope, often have the GPS receiving trap of a standard, finish the process that receives decoding output pulse from gps satellite signal, in the control system each observing and controlling and automation equipment need received pulse finish the whole network to the time.By analysis to the pulse code stream of GPS receiving trap output, we propose a kind of UART that utilizes Single Chip Microcomputer (SCM) system all to possess (serial communication interface) finish to the time information coding/decoding method, can make automation equipment realize the parsing of IRIG-B sign indicating number pulse easily, and need not use logical devices such as CPLD, improved the product integrated level, realized having reduced cost of products by software function.
Summary of the invention
Automation equipment can realize that the mode of pulse decoding all needs to finish by programmable logic device (PLD) such as CPLD or FPGA at present, need increase logic chip on hardware interface handles, the product complexity rises on the one hand influences device development and production cycle, cause the raising of the whole cost of product on the other hand, be unfavorable for the commercialization and the market competition of device.For the ease of Single Chip Microcomputer (SCM) system realize high precision to the time, the present invention is off the beaten track, the UART communication port that all possesses by Single Chip Microcomputer (SCM) system solved to the time passage Service of Timing.
The technical solution adopted in the present invention is as follows: a kind of by single-chip microcomputer UART interface receive the IRIG-B sign indicating number to the time signal implementation method, this method only need a UART mouth of RS232/485 chip and single-chip microcomputer can finish to the time function, need not use the CPLD logical device, realize automation equipment to the time information IRIG-B sign indicating number pulse parsing, the IRIG-B sign indicating number output signal interface of GPS time service device is the RS232/485 interface, the initial logic l that is output as of IRIG-B sign indicating number output signal, the signal that single-chip microcomputer UART serial communication interface can be discerned is a Transistor-Transistor Logic level, and start bit is a logical zero, therefore the automation equipment input port is arrived in the output signal reversal connection of GPS time service device, it is anti-phase to be about to the IRIG-B sign indicating number output signal that the GPS time service device exported, carry out level modulation by the RS232/485 chip then, IRIG-B sign indicating number output signal after anti-phase is modulated into UART can discerns communication signal, promptly convert the communication packet frame that has start bit and position of rest that the UART mouth is discerned to.
Described IRIG-B sign indicating number is the time string sign indicating number of per second one frame, in the time of one preceding 60 code elements in frame period can represent to comprise second, branch, the time, day, the moon, year information time, the pulsewidth of three kinds of code elements is respectively 2ms, 5ms and 8ms, wherein the 2ms code element is represented binary zero, the 5ms code element is represented binary one, and the 8ms code element is the location recognition sign; It is characterized by: the setting of the UART serial communication interface of single-chip microcomputer is corresponded to baud rate 1000bps, and data layout is 1 start bit, 8 bit data positions, 1 position of rest, no parity check mode.Aspect UART decoding, according to data layout, the data message that reads from the receiving register of UART serial communication interface is 8 bit data that start bit and position of rest are removed, and removes the start bit and the position of rest of head and the tail, according to the serial communication low level preceding, high-order after principle.To the time information the time format frame from the frame witness marker, when the double data that receive are the 8ms code element for 0x80 all, then show startup to the time transmission of Information, complete time format frame is 60 code elements, each code element is 10 milliseconds, complete time frame is finished receiving after, device carries out constantly, clock millisecond number should add promptly 600 milliseconds of this time-delays.
SCM Based hardware device for present industrial automation system extensive application, can by the method that the present invention proposes finish the IRIG-B sign indicating number to the time requirement, do not need to increase extra programmable logic device (PLD), as long as possess 485 communication interfaces, UART by single-chip microcomputer can finish decoding, and then realizes clock synchronization.The present invention can make the robotization hardware device to the time Interface design complexity reduce greatly, effectively reduced hardware cost, improve the competitiveness of product in market.
Description of drawings
Accompanying drawing 1 is that single-chip microcomputer UART mouth receives IRIG-B coded signal synoptic diagram;
Three kinds of symbol signals that accompanying drawing 2 illustrates the IRIG-B sign indicating number after through the RS485 chips situation of change and the corresponding relation of symbol signal and communication data;
Accompanying drawing 3 is for resolving the process flow diagram of time-program(me).
Embodiment
According to Figure of description technical scheme of the present invention is passed through the further detailed presentations of embodiment below.
Fig. 1 shows single-chip microcomputer UART mouth of the present invention and receives IRIG-B coded signal synoptic diagram, and GPS time service device output interface is the RS232/485 interface, is logical one during this pulse output valid data level, and is logical zero during idle condition, and is opposite with serial comm state.According to the serial communication standard, data open and begin to be output as logical zero, bus free time and position of rest output logic 1, so during wiring, the output signal reversal connection of GPS time service device to be arrived the automation equipment input port, be about to the RS485-B port that GPS time service device IRIG-B+ port is connected to the RS485 chip, GPS time service device IRIG-B-port is connected to the RS485-A port of RS485 chip, carry out inserting after the level modulation UART communication port of single-chip microcomputer again by the RS232/485 chip, promptly can become the communication packet frame that has start bit and position of rest that the UART mouth is discerned.
GPS time service device IRIG-B sign indicating number is the time string sign indicating number of per second one frame, and the width of each code element is 10ms, and per 10 code elements have a location recognition sign.In the time of one preceding 60 code elements in frame period can represent to comprise second, branch, the time, day, the moon, year information time.Code element is divided into three kinds, and pulsewidth is respectively 2ms, 5ms and 8ms.Wherein the 2ms code element is represented binary zero, and the 5ms code element is represented binary one, and the 8ms code element is the location recognition sign.So the setting of the UART communication port of single-chip microcomputer corresponds to baud rate 1000bps, data layout is 1 start bit, 8 bit data positions, and 1 position of rest, the no parity check mode, as shown in Figure 2.From the angle of message transmission, three kinds of code elements are all followed the rule of asynchronous serial communication.As above promptly finished the conversion designs implementation method of level aspect.
Implementation method aspect UART decoding is as follows: according to data layout, the data message that reads from the receiving register of UART serial communication interface is 8 bit data that start bit and position of rest are removed, so shown in accompanying drawing 2, remove the start bit and the position of rest of head and the tail, according to the serial communication low level preceding, high-order after principle, the state that symbol level is every can obtain.Wherein the 2ms code element is exactly in fact data 0xFE, and the 5ms code element is exactly in fact data 0xF0, and the 8ms code element is exactly in fact data 0x80.
The time format frame is from the frame witness marker, when the double data that receive all are that 0x80 (8ms code element) then shows the transmission that starts second.Shown in the process flow diagram of accompanying drawing 3 translators, the data of 58 bytes next receiving have then been represented the current time.The time, minute, second, represent with the binary-coded decimal of 8bits every year that low level is preceding, high-order after, individual position is preceding, ten after.It binary-coded decimal with 12bits represents, low level is preceding, high-order after, individual position is preceding, ten occupy, hundred after.Wherein second, branch, the time, day all be absolute time, year be relative time, be radix with 2000.Obviously second, branch, the time, year numerical value can directly draw, day and month numerical value whether be that the numerical evaluation in leap year and sky draws according to this year.The communication data that the UART mouth of single-chip microcomputer whenever receives 1 byte can produce once reception interruption, and single-chip microcomputer is put into message data successively and received buffering, all finishes receiving the clock of back unification refreshing automation equipment self.Because complete time format frame is 60 code elements, each code element is 10 milliseconds, thus complete time frame is finished receiving after, device carries out constantly, clock millisecond number should add this time-delay, is 600 milliseconds.To the time error just the communication port interrupt response time add the time that Data Receiving is judged and calculate, because computing method are fairly simple, ARM7 single-chip microcomputer travelling speed according to present main flow 50MHz is calculated, consumed time can guarantee fully in 100us, reach to the time system the time precision requirement.
With an example concrete computation process is described below.Following table is 58 data values that single-chip microcomputer UART mouth receives.
Figure C20081010210700051
Figure C20081010210700061
As previously mentioned, data 0x80 is that frame begins witness marker and location recognition sign, and the corresponding binary-coded decimal bit of data 0xFE position is 0, and the corresponding binary-coded decimal bit of data 0xF0 position is 1.Then:
Millisecond value=600
Second value=1*1+2*0+4*0+8*0+10*0+20*1+40*0=21
Divide kind of a value=1*1+2*0+4*0+8*1+10*1+20*1+40*0=39
One hour value=1*0+2*0+4*0+8*0+10*1+20*0+40*0=10
It value=1*0+2*0+4*0+8*0+10*1+20*0+40*1+80*0+100*1+200*0=150
Year value=1*1+2*1+4*1+8*0+10*0+20*0+40*0+2000=2007
According to the sky and year numerical value can to calculate the life value be May 30.
By the hardware handles mode and the software implementation method of above-mentioned introduction, in the development and Design of automation equipment, finish like this, can reach receive the IRIG-B sign indicating number to the time requirement, finish the commercialization needs.

Claims (1)

1, a kind of by single-chip microcomputer UART interface receive the IRIG-B sign indicating number to the time signal implementation method, this method only need a UART mouth of RS232/485 chip and single-chip microcomputer can finish to the time function, need not use the CPLD logical device, just can realize to the time information IRIG-B sign indicating number pulse parsing, the IRIG-B sign indicating number output signal interface of GPS time service device is the RS232/485 interface, the initial logical one that is output as of IRIG-B sign indicating number output signal, the signal that single-chip microcomputer UART serial communication interface can be discerned is a Transistor-Transistor Logic level, and start bit is a logical zero; It is characterized by, this implementation method is as follows:
The automation equipment input port is arrived in the output signal reversal connection of GPS time service device, it is anti-phase to be about to the IRIG-B sign indicating number output signal that the GPS time service device exported, carry out level modulation by the RS232/485 chip then, IRIG-B sign indicating number output signal after anti-phase is modulated into UART can discerns communication signal, promptly convert the communication packet frame that has start bit and position of rest that the UART mouth can be discerned to;
Being provided with of the UART serial communication interface of single-chip microcomputer is as follows: baud rate 1000bps, data layout are 1 start bit, 8 bit data positions, 1 position of rest, no parity check mode;
Aspect UART decoding, according to data layout, the data message that reads from the receiving register of UART serial communication interface is 8 bit data that start bit and position of rest are removed, and removes the start bit and the position of rest of head and the tail, according to the serial communication low level preceding, high-order after principle;
To the time information the time format frame from the frame witness marker, when the double data that receive are the 8ms code element for 0x80 all, then show startup to the time transmission of Information, complete time format frame is 60 code elements, each code element is 10 milliseconds, complete time frame is finished receiving after, automation equipment carries out constantly, clock millisecond number should add 600 milliseconds.
CNB2008101021071A 2008-03-18 2008-03-18 Single Chip Microcomputer (SCM) system receive the IRIG-B sign indicating number to the time signal implementation method Active CN100565401C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2008101021071A CN100565401C (en) 2008-03-18 2008-03-18 Single Chip Microcomputer (SCM) system receive the IRIG-B sign indicating number to the time signal implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2008101021071A CN100565401C (en) 2008-03-18 2008-03-18 Single Chip Microcomputer (SCM) system receive the IRIG-B sign indicating number to the time signal implementation method

Publications (2)

Publication Number Publication Date
CN101251755A CN101251755A (en) 2008-08-27
CN100565401C true CN100565401C (en) 2009-12-02

Family

ID=39955168

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2008101021071A Active CN100565401C (en) 2008-03-18 2008-03-18 Single Chip Microcomputer (SCM) system receive the IRIG-B sign indicating number to the time signal implementation method

Country Status (1)

Country Link
CN (1) CN100565401C (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101545965B (en) * 2009-01-16 2011-07-20 华中科技大学 GPS synchronous IRIG-B time code generator
CN101515187B (en) * 2009-04-07 2011-07-20 上海许继电气有限公司 CPCI-bus-based IRIG-B signal decoding and time correcting card device
CN101871976B (en) * 2009-04-24 2012-06-20 郑州威科姆科技股份有限公司 Power clock detecting device
EP3160072B1 (en) * 2015-10-19 2019-10-02 Yamar Electronics Ltd. Transceiver for asynchronous data transmission over a noisy channel
CN108763141A (en) * 2018-06-05 2018-11-06 成都爱斯顿科技有限公司 A kind of IRIG-B codes symbol is nonpolarity data processing equipment and method
CN109598109B (en) * 2018-12-06 2023-04-11 国网辽宁省电力有限公司锦州供电公司 Random password unlocking method for electric power payment machine based on GPS time synchronization message
CN111193514A (en) * 2019-10-25 2020-05-22 电子科技大学 High-synchronization-precision IRIG-B encoder
CN115237003A (en) * 2021-04-22 2022-10-25 福建福清核电有限公司 IRIG-B signal checking method of nuclear power DCS
CN113515184A (en) * 2021-07-01 2021-10-19 北京华电众信技术股份有限公司 B code decoding and time synchronization method with reduced cost
CN113791533B (en) * 2021-07-02 2023-06-20 中国船舶重工集团公司第七0七研究所 IRIG-B direct current code decoding and time synchronization automatic switching method based on FPGA
CN114415780A (en) * 2021-12-30 2022-04-29 研祥智慧物联科技有限公司 IRIG-B code-based time synchronization method and device
CN114815574A (en) * 2022-04-13 2022-07-29 西安超越申泰信息科技有限公司 System for realizing real-time synchronization of B code

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
B码对时在保护测控装置中的实现. 刘浩,苏理,丁敏.电网技术,第30卷第增刊期. 2006
B码对时在保护测控装置中的实现. 刘浩,苏理,丁敏.电网技术,第30卷第增刊期. 2006 *
在变电站智能设备中实现B码对时. 周斌,黄国方,王耀鑫,张何.电力自动化设备,第25卷第9期. 2005
在变电站智能设备中实现B码对时. 周斌,黄国方,王耀鑫,张何.电力自动化设备,第25卷第9期. 2005 *

Also Published As

Publication number Publication date
CN101251755A (en) 2008-08-27

Similar Documents

Publication Publication Date Title
CN100565401C (en) Single Chip Microcomputer (SCM) system receive the IRIG-B sign indicating number to the time signal implementation method
CN105553600B (en) A kind of IRIG B direct currents code coding and decoding device and its decoding method
CN101738931B (en) IRIG-B (Inter-Range Instrumentation Group-B) code time hack device and time hack method thereof
CN102541799A (en) Method for realizing multi-serial-port extension by using FPGA (field programmable gate array)
US20090103570A1 (en) Time Synchronization in Serial Communications
CN202205069U (en) Analog quantity collecting module for programmable logical controller (PLC) controller
CN102523310A (en) Multifunctional HART (Highway Addressable Remote Transducer) communication interface
CN103346804A (en) IRIG-B (Inter Range Instrumentation Group) encoding and decoding system and method based on FPGA (Field Programmable Gate Array)
CN201828585U (en) Portable transformer substation synchronous time ticking and SOE signal generator
CN206224181U (en) A kind of multiple-axis servo drive system position feedback data interface card based on FPGA
CN104536330A (en) Data communication device for absolute value encoder with SSI
CN201674483U (en) IRIG_B code decoding interface circuit
CN202818360U (en) IRIG-B modem based on FPGA
CN205232236U (en) Pulse code modulation ware based on field programmable gate array
CN201765279U (en) TFT-LCD display-based electric power quality analysis meter
CN202632782U (en) Multi-channel SSI (Small Scale Integration) data acquisition module based on MicroBlaze soft core
CN111193514A (en) High-synchronization-precision IRIG-B encoder
CN203561840U (en) Transformer station GPS time-setting IRIG-B decoder
CN201804254U (en) Multi-channel data centralizer
CN101488016A (en) PLC module-grade time-setting method based on GPS
CN203708281U (en) Multifunctional remote-measurement code type converter
CN202167017U (en) Data receiving circuit based on management control DSP in the internet of things
CN105389155A (en) Method and system for receiving TDM audio data by using SPI interface
CN201562439U (en) Coding circuit
CN206743287U (en) A kind of channel control panel

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
ASS Succession or assignment of patent right

Owner name: BEIJING SIFANG JIBAO AUTOMATIC CO., LTD.

Free format text: FORMER OWNER: SIFANG ELECTRIC (GROUP) CO., LTD.

Effective date: 20100421

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100085 BUILDING 6, YARD 1, NONGDA SOUTH ROAD, HAIDIAN DISTRICT, BEIJING CITY(GUIGUOLIANGCHENG) TO: 100084 BUILDING 6, YARD 1, NONGDA SOUTH ROAD, HAIDIAN DISTRICT, BEIJING CITY(GUIGUOLIANGCHENG)

TR01 Transfer of patent right

Effective date of registration: 20100421

Address after: 100084, No. 6 building, No. 1, Nongda South Road, Beijing, Haidian District (bright city, Silicon Valley)

Co-patentee after: Beijing Sifang Boneng Automation Equipment Co., Ltd.

Patentee after: Beijing Sifang Jibao Automation Co., Ltd.

Address before: 100085, No. 6 building, No. 1, Nongda South Road, Beijing, Haidian District (bright city, Silicon Valley)

Co-patentee before: Beijing Sifang Boneng Automation Equipment Co., Ltd.

Patentee before: Sifang Electric (Group) Co., Ltd.

ASS Succession or assignment of patent right

Free format text: FORMER OWNER: BEIJING SIFANG BONENG AUTOMATION EQUIPMENT CO., LTD.

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100084 HAIDIAN, BEIJING TO: 100085 HAIDIAN, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20110819

Address after: 100085 Beijing city on the base of the information industry on the street, No. four, No. 9, Haidian District

Patentee after: Beijing Sifang Jibao Automation Co., Ltd.

Address before: 100084, No. 6 building, No. 1, Nongda South Road, Beijing, Haidian District (bright city, Silicon Valley)

Co-patentee before: Beijing Sifang Boneng Automation Equipment Co., Ltd.

Patentee before: Beijing Sifang Jibao Automation Co., Ltd.

TR01 Transfer of patent right

Effective date of registration: 20190320

Address after: 100085 9, four street, Shang Di information industry base, Haidian District, Beijing.

Co-patentee after: Beijing Sifang Jibao Engineering Technology Co., Ltd.

Patentee after: Beijing Sifang Jibao Automation Co., Ltd.

Address before: 100085 9, four street, Shang Di information industry base, Haidian District, Beijing.

Patentee before: Beijing Sifang Jibao Automation Co., Ltd.

TR01 Transfer of patent right