CN1297192A - In-situ implementation method for site software of bus peripherals - Google Patents

In-situ implementation method for site software of bus peripherals Download PDF

Info

Publication number
CN1297192A
CN1297192A CN 00136275 CN00136275A CN1297192A CN 1297192 A CN1297192 A CN 1297192A CN 00136275 CN00136275 CN 00136275 CN 00136275 A CN00136275 A CN 00136275A CN 1297192 A CN1297192 A CN 1297192A
Authority
CN
China
Prior art keywords
slave station
data
correct
main website
profibus
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
CN 00136275
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.)
Beijing Hollysys Co Ltd
Original Assignee
Beijing Hollysys 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 Hollysys Co Ltd filed Critical Beijing Hollysys Co Ltd
Priority to CN 00136275 priority Critical patent/CN1297192A/en
Publication of CN1297192A publication Critical patent/CN1297192A/en
Pending legal-status Critical Current

Links

Images

Abstract

A method for in-situ implementing the bus-type peripheral slave site with software features that a single-chip computer is connected to bus interface and driver while to the encoding switches, the PROFIBUS-DP slave site protocol is integrated in said single-chip computer, and the program of single-chip computer is running to implement the PROFIBUS-DP protocol. Its advantages are no need of protocol ASIC and low development cost.

Description

The software implementation method of bus peripheral slave station
The invention belongs to computer field bus peripherals field, relate in particular to a kind of software implementation method of bus peripheral slave station.
At present bus peripheral slave station is the PROFIBUS-DP slave station, all adopts the specialized protocol chip, mostly is protocol chip SPC3 and SPC4 that SIEMENS makes greatly, in this protocol chip, abides by EN50170, integrated PROFIBUS-DP slave station agreement.But, adopt this kind method to realize the PROFIBUS-DP slave station, operating cost is very high.
The purpose of this invention is to provide and a kind ofly can replace the specialized protocol chip, reduce the software implementation method of the bus peripheral slave station of operating cost.
Technical scheme of the present invention is: a kind of fieldbus disperses the software implementation method of peripherals slave station, it is characterized in that:
(1) single-chip microcomputer is connected with bus interface and drive unit, simultaneously single-chip microcomputer is linked to each other with toggle switch, single-chip microcomputer is integrated bus peripheral slave station agreement, i.e. PROFIBUS-DP slave station agreement;
(2) by the program in the operation single-chip microcomputer, just can reach the function that PROFIBUS-DP realizes from station software, its concrete job step is:
1) by toggle switch tributary address is set, system powers on;
2) slave station place beginningization, for the loop-around data exchange of slave station and PROFIBUS-DP main website is prepared:
1. locate beginningization timer T0, T1 and serial ports, forbid all interruptions;
2. to diagnostic data and configuration data initialize, diagnose simultaneously, parameter setting and configuration inspection;
3. call parameters place beginning beggar's program is checked tributary address and online baud rate, finds correct baud rate;
4. diagnose again,, repeat said process if the transmission data are wrong, if the transmission data are correct, log-on data supervisory routine then;
3) log-on data supervisory routine, slave station enter the loop-around data exchange process with main website;
1. software is at first distinguished the type of main website request message, checks whether this packet issues the verification of the data of this slave station and packet and whether correct;
2. if not the data of issuing this slave station or verification and incorrect, directly withdraw from, do not handle; If above-mentioned check is correct, then carry out data processing according to different messages;
3. if SD1 class message is distinguished its function according to function code, handle respectively; If SD2 class message is then distinguished the main website requested service according to the purpose service access point, handle respectively.
Principle of work of the present invention is: the software of PROFIBUS-DP slave station is realized, does not adopt protocol chip, but adopts software mode, in single-chip microcomputer, the all accord of integrated PROFIBUS-DP slave station can be realized the function at slave station station, fully can the instead of dedicated protocol chip.The core component of software is the slave station automat, and slave station is the request that passive station just responds main website, and not to the main website request msg.After slave station receives the request message of main website, analyze type of message, do corresponding data processing, on corresponding automat, walk the request of corresponding main website according to type of message.According to the slave station automat, slave station will experience diagnosis, parameter setting, configuration inspection, diagnose several stages again.If above-mentioned several steps is correct, slave station enters the loop-around data swap status with main website, otherwise, repeat preceding four of automat and go on foot, entirely true up to locating beginningization.
Effect of the present invention is: adopt software to realize PROFIBUS-DP slave station agreement, can replace the specialized protocol chip, therefore, can reduce cost of development, realize independent development.
The present invention is further illustrated below in conjunction with drawings and Examples.
Fig. 1 is a hardware block diagram of the present invention;
Fig. 2 is a main program flow chart of the present invention;
Fig. 3 is parameter of the present invention place beginning beggar's program program flow diagram;
Fig. 4 is a data management subroutine flow chart of the present invention;
Among Fig. 1,8051 single-chip microcomputers 1 are connected with bus interface and drive unit 2, simultaneously single-chip microcomputer 1 is linked to each other with toggle switch 3, bus interface and drive unit 2 link to each other with main website 4, single-chip microcomputer 1, bus interface and drive unit 2 and toggle switch 3 have constituted slave station module 5, single-chip microcomputer 1 is integrated bus peripheral slave station agreement, i.e. PROFIBUS-DP slave station agreement, program by in the operation single-chip microcomputer just can reach the function that PROFIBUS-DP realizes from station software.
Among Fig. 2, master routine is at first located beginningization timer T0, T1 and serial ports, forbids all interruptions, then to diagnostic data and configuration data initialize, diagnoses simultaneously, parameter setting and configuration inspection; Call parameters place beginning beggar's program is checked tributary address and online baud rate then, finds correct baud rate; Diagnose again,, repeat said process if the transmission data are wrong, if the transmission data are correct, log-on data supervisory routine then; Log-on data supervisory routine, slave station enter the loop-around data exchange process with main website.
Among Fig. 3, the respective value when at first being 500kbps to timer tax transfer rate is carried out the baud rate inspection, if baud rate is correct, then carries out bus and monitors, opens interruption, returns master routine then; If it is incorrect that baud kills, respective value when then being 187.5kbps to timer tax transfer rate, proceeding the baud rate inspection, is to return master routine according to result's decision of checking, still proceeds the baud rate inspection, if baud rate is correct, then return master routine, otherwise, then proceed the baud rate inspection, be performed until and find correct baud rate, seek scope is from 500kbps to 9.6kbps.
Among Fig. 4, software is at first distinguished the type of main website request message, checks whether this packet issues the verification of the data of this slave station and packet and whether correct; If not the data of issuing this slave station or verification and incorrect, directly withdraw from, do not handle; If above-mentioned check is correct, then carry out data processing according to different messages; If SD1 class message, then further check the point of destination address D A whether the station address TS-NR by the toggle switch setting equals to comprise in the message, if the result is not equal to: continue to check type of message then return, if the result equals, then further judge check code CRC correctness, if CRC is incorrect, then return and continue to check type of message, if CRC is correct, then distinguish its function, handle respectively, if func=9. then answer fieldbus data link layer FDL state and return according to function code func, if func=12 or func=13 then further check the main website whether main website is crossed this slave station parametrization; If, then carry out exchanges data, if not, master routine then returned.
If SD2 class message has then further judged whether address extension, if address extension is arranged, then get DA, judge further then whether CRC is correct, if CRC is correct, then distinguish the main website requested service according to purpose service access point DSAP; If CRC is incorrect, then return master routine; If there is not address extension, then getting DA and DSAP, if judge further then whether CRC is correct. CRC is correct, then distinguishes the main website requested service according to purpose service access point DSAP; If CRC is incorrect, then return master routine.Purpose service access point DSAP has represented different service types, DSAP=60, expression diagnosis slave station service (Diag-slave), DASP=61, expression is provided with parameter service (Set-Prm), DSAP=62, configuration service (Chk-Cfg) is checked in expression, DSAP=59, expression request slave station configuration data service (Get-cfg), DSAP=56, slave station input data, services (Rd-Inp) is read in expression.

Claims (1)

1, a kind of fieldbus disperses the software implementation method of peripherals slave station, it is characterized in that:
(1) single-chip microcomputer is connected with bus interface and drive unit, simultaneously single-chip microcomputer is linked to each other with toggle switch, single-chip microcomputer is integrated bus peripheral slave station agreement, i.e. PROFIBUS-DP slave station agreement;
(2) by the program in the operation single-chip microcomputer, just can reach the function that PROFIBUS-DP realizes from station software, its concrete job step is:
1) by toggle switch tributary address is set, system powers on;
2) slave station place beginningization, for the loop-around data exchange of slave station and PROFIBUS-DP main website is prepared:
1. locate beginningization timer T0, T1 and serial ports, forbid all interruptions;
2. to diagnostic data and configuration data initialize, diagnose simultaneously, parameter setting and configuration inspection;
3. call parameters place beginning beggar's program is checked tributary address and online baud rate, finds correct baud rate;
4. diagnose again,, repeat said process if the transmission data are wrong, if the transmission data are correct, log-on data supervisory routine then;
3) log-on data supervisory routine, slave station enter the loop-around data exchange process with main website;
1. software is at first distinguished the type of main website request message, checks whether this packet issues the verification of the data of this slave station and packet and whether correct;
2. if not the data of issuing this slave station or verification and incorrect, directly withdraw from, do not handle; If above-mentioned check is correct, then carry out data processing according to different messages;
3. if SD1 class message is distinguished its function according to function code, handle respectively; If SD2 class message is then distinguished the main website requested service according to the purpose service access point, handle respectively.
CN 00136275 2000-12-26 2000-12-26 In-situ implementation method for site software of bus peripherals Pending CN1297192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 00136275 CN1297192A (en) 2000-12-26 2000-12-26 In-situ implementation method for site software of bus peripherals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 00136275 CN1297192A (en) 2000-12-26 2000-12-26 In-situ implementation method for site software of bus peripherals

Publications (1)

Publication Number Publication Date
CN1297192A true CN1297192A (en) 2001-05-30

Family

ID=4597186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 00136275 Pending CN1297192A (en) 2000-12-26 2000-12-26 In-situ implementation method for site software of bus peripherals

Country Status (1)

Country Link
CN (1) CN1297192A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100334604C (en) * 2004-09-28 2007-08-29 北京金自天正智能控制股份有限公司 Depth indicator for mine hoist
CN101438245B (en) * 2004-09-08 2011-01-26 费希尔-罗斯蒙德系统公司 Management of event order of occurrence on a network
CN101099360B (en) * 2005-03-02 2011-10-26 罗德施瓦兹两合股份有限公司 Bus system and method for operating the same
CN101488944B (en) * 2008-01-16 2012-07-11 上海宝信软件股份有限公司 System and method for communication between Ethernet device and BSC serial port device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101438245B (en) * 2004-09-08 2011-01-26 费希尔-罗斯蒙德系统公司 Management of event order of occurrence on a network
CN100334604C (en) * 2004-09-28 2007-08-29 北京金自天正智能控制股份有限公司 Depth indicator for mine hoist
CN101099360B (en) * 2005-03-02 2011-10-26 罗德施瓦兹两合股份有限公司 Bus system and method for operating the same
CN101488944B (en) * 2008-01-16 2012-07-11 上海宝信软件股份有限公司 System and method for communication between Ethernet device and BSC serial port device

Similar Documents

Publication Publication Date Title
CN104345717B (en) Intelligent remote data acquisition system based on Internet of Things
CN100456267C (en) Method and apparatus for monitoring number of lanes between controller and PCI express device
CN101763333B (en) Bus controller and method for realizing multi-host communication
CN111610765B (en) Distributed message control device and method and building control system
CN112055096B (en) Method and device for automatically setting communication address of equipment
CN101055228A (en) K line based electric-control motor fault diagnosis system
CN110789569B (en) Column control DMI data redundancy control method and system
CN101247412B (en) Device and method for double-channel detecting state of physical layer/medium access control layer
CN1562654A (en) Method for calibrating controller of electric automobile in mixing motive power based on CCP protocol
JPH0449181A (en) Group management control device of elevator
CN1297192A (en) In-situ implementation method for site software of bus peripherals
CN113377701B (en) Serial port control system based on complex programmable logic device CPLD and communication method thereof
CN101267350B (en) Debugging method and debugging system
CN1074148C (en) Data processing system with error detecting processing function
CN207209640U (en) A kind of elevator remote monitoring system
CN102955466A (en) Method for operating an automation system
CN110162499A (en) A kind of PECI bus switch device, method and system
CN115408240A (en) Redundant system active/standby method, device, equipment and storage medium
KR20010009477A (en) Automatic control system of projection machine
KR100514104B1 (en) SECS controller and system for networking a semiconductor apparatus using the SECS controller
CN1798113A (en) Profibus bus - bridge of Ethernet network
KR100216580B1 (en) Method for managing communication error status between atm exchanger and operation workstation
CN209250664U (en) Data processing equipment
CN217386201U (en) Distributed Internet of things information acquisition monitoring intelligent management system
CN1987704A (en) Digital intelligent operator based on on-site bus and its control method

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