Background technology
In recent years, subway comprehensive monitoring system (hereinafter to be referred as ISCS) has obtained developing rapidly, and comprehensive monitoring system is realized information sharing by each subsystem specialty of integrated and interconnected access, and specialty merges, and on uniform platform each subsystem is implemented monitoring.
Wherein, for environment and equipment monitoring system (hereinafter to be referred as BAS), ISCS provides the mode that controls to individual equipment control from the time schedule pattern of managing to the operator, the equipment of BAS system is physically located at each station, parking area and running tunnel completely, ISCS has the equipment of technology contact to return together between mutually, is defined as the ring control subsystem.Usually, with the BAS system divides be ventilation and air conditioning system, tunnel system, water system, Lighting System, Escalator system etc.The time schedule function of BAS system can be provided with pattern that all ring control technology subsystems need carry out every day and pattern run up time, and then the equipment by each subsystem of schema management, this way to manage has been simplified the management control to a large amount of electromechanical appliances of BAS system of scheduling at different levels and service personnel greatly.Thereby the BAS system is when normal operation, and every day, the start and stop of all devices realized by the time schedule function.
Comprehensively monitoring BAS time schedule function comprises that mainly time schedule is downloaded and time schedule reads back, and it is to download among the station PLC of BAS system at the good time schedule of comprehensive monitoring system inediting that time schedule is downloaded, and carries out for BAS PLC; It is the time schedule that reads back and carrying out from BAS PLC that time schedule reads back, and is presented on the ISCS man-machine interface.
Summary of the invention
Technical matters to be solved by this invention be from ISCS issue time schedule and two implementation procedures of time schedule of from BAS PLC, reading back in, guarantee the reliability transmission of time schedule content, and make things convenient for ISCS that above-mentioned time schedule control process is implemented overall monitor.
The content design of BAS system time table is the mode number and the run up time thereof of each subsystem.ISCS gives station PLC with the form departure time table content of 16 analog datas (use in pairs, represent mode number and run up time respectively).Each to analog data represent respectively one " mode number " and pattern activation time (since 0: 0 with hour and minute represent that is: 0000 to 2359).The necessary recognition time table of the time schedule control logic of station PLC, and circulation in 0: 0.
For solving the problems of the technologies described above, the invention provides a kind of comprehensively monitoring BAS system time table function implementation method, it is characterized in that, may further comprise the steps:
1) data definition:
11) open up temporary realm and the active region that is used for resting period table in BAS PLC internal memory, described temporary realm is used to accept the time schedule that ISCS issues and deposits time schedule to be read back; Active region is used for the final time schedule of carrying out of PLC;
12) following three zone bits of definition are used for the download of judgement time schedule and read back between ISCS and BAS PLC:
After download complement mark position DCF:ISCS passes through Modbus message download time table, if the message correctly that PLC returns thinks that then downloading process is correct, ISCS is with DCF set, PLC copies time schedule to active region from the temporary realm according to the positive rise of DCF, then DCF is resetted;
Upload time schedule request flag position URF: when needs read back time schedule, ISCS was earlier with URF set, and PLC copies current activation time table to temporary realm and reads back for ISCS according to the positive rise of URF, and PLC resetted URF after copy was finished;
The zone bit RRF:PLC that reads back copies current activation time table to temporary realm according to the URF zone bit, and after URF resetted, with RRF set; ISCS resets RRF then according to the SM set mode of the RRF time schedule that reads back;
13) 4 bytes of end at time schedule are used for resting period Table I D and version number/download order, are copied to the analog data district of PLC by PLC from active region always, for the ISCS periodic polls;
2) utilizing DCF, URF and RRF zone bit to carry out time schedule downloads;
3) utilizing DCF, URF and RRF zone bit to carry out time schedule reads back.
Aforesaid comprehensively monitoring BAS system time table function implementation method is characterized in that: in described step 2) in, the detailed process that time schedule is downloaded is:
21) ISCS judges at first whether DCF, URF and RRF are 0, if ISCS sends the time schedule content to PLC by the Modbus message, otherwise the cancellation downloading process;
22) after time schedule is successfully downloaded to PLC, ISCS uses at first with " DCF " set; After PLC sees " DCF " and becomes 1 by 0, pending time schedule copied in the activation time table carry out, when copy is finished " DCF " resetted, for PLC, the downloading process end;
23) if time schedule can't be downloaded to PLC(as: during message mal that PLC returns), ISCS will cancel process of downloading, this download will finish owing to overtime;
Aforesaid comprehensively monitoring BAS system time table function implementation method, it is characterized in that: in described step 3), the detailed process that time schedule reads back is:
31) judge at first whether DCF, URF and RRF are 0, if issue the order of a URF=1, the time schedule of the PLC that requires to read back, otherwise ISCS cancellation readback process;
32) positive rise of URF copies time schedule in the active region to temporary realm, after copy is finished, URF is resetted; Simultaneously with RRF set;
33) ISCS successfully picks up counting URF set from PLC, do not receive the RRF SM set mode of PLC in the schedule time, then think the PLC fault, the cancellation readback process, receive in the schedule time that RRF SM set mode then issues the order of the time schedule of reading back, PLC receives after the order of reading back that the time schedule content with the temporary realm sends to ISCS;
34) for PLC, by the Modbus message time schedule is successfully sent to ISCS, indicate finishing of readback process.
Aforesaid comprehensively monitoring BAS system time table function implementation method is characterized in that: in described step 33) in, the schedule time is less than the time-out time that reads back.
Aforesaid comprehensively monitoring BAS system time table function implementation method is characterized in that: in described step 34) in, ISCS will read back after the end to receive the criterion of the time schedule of expection as the success of reading back in the time at the time-out time that reads back, and ISCS resets RRF.
Aforesaid comprehensively monitoring BAS system time table function implementation method, it is characterized in that: in described step 22) in, after PLC copies time schedule to active region from the temporary realm, finish the DCF that resets before being copied to the analog data district at the ID and the version number/download order of its active region.
Aforesaid comprehensively monitoring BAS system time table function implementation method is characterized in that: in described step 23) in, ISCS will be with the ID that receives expection in the specific time table and version number/download order as downloading successful criterion.
The beneficial effect that the present invention reached: the present invention from ISCS issue time schedule and two implementation procedures of time schedule of from BAS PLC, reading back in, plant the reliability transmission that guarantees the time schedule contents with three zone bits, make things convenient for ISCS that above-mentioned time schedule control process is implemented overall monitor.
The specific embodiment
1, time schedule downloading process
ISCS allows the operator who meets authority to show by HMI interface editing and download time.ISCS and station PLC only use a complete time schedule in download/readback process, will preserve the up-to-date time schedule that ISCS downloads among the PLC of station, and start execution.
The performing step of time schedule downloading process is as follows:
The first step: ISCS judges at first whether DCF, URF and RRF are 0, if ISCS sends the time schedule content to PLC by the Modbus message, otherwise the cancellation downloading process.
Second step: after time schedule was successfully downloaded to PLC, ISCS used at first with " DCF " set; After PLC sees " DCF " and becomes 1 by 0, pending time schedule copied in the activation time table carry out, when copy is finished " DCF " resetted.(PLC copy time schedule to active region from the temporary realm after, must finish the DCF that resets before being copied to the analog data district) at the ID and the version number/download order of its active region.For PLC, downloading process finishes.
The 3rd step: if time schedule can't be downloaded to PLC(as: during message mal that PLC returns), ISCS will cancel process of downloading, this download will finish owing to overtime.
The 4th step: ISCS will with in the specific time table (tentative 10 seconds) receive that the ID of expection and version number/downloads order are as the successful criterion of download.
2, time schedule readback process
The complete content of activation time table will be read back when ISCS has demand in the PLC.Can the read back time schedule carried out among each station PLC completely and being presented on the ISCS man-machine interface of ISCS.
The performing step of time schedule readback process is as follows:
The first step: with judging at first whether DCF, URF and RRF are 0, if at first issue the order of a URF=1, the time schedule of the PLC that requires to read back, otherwise ISCS cancellation readback process.
Second step: the positive rise of URF copies time schedule in the active region to temporary realm, after copy is finished, URF is resetted; Simultaneously with RRF set.
The 3rd step: ISCS successfully picks up counting URF set from PLC, does not receive the RRF SM set mode of PLC in (tentative, but must less than the time-out time that reads back) in 5 seconds, then thinks the PLC fault, the cancellation readback process.Receive in 5 seconds that RRF SM set mode then issues the order of the time schedule of reading back.PLC receives after the order of reading back that the time schedule content with the temporary realm sends to ISCS.
The 4th step: for PLC, time schedule is successfully sent to ISCS, indicate finishing of readback process by the Modbus message.
The 5th step: ISCS will receive the criterion of the time schedule of expection as the success of reading back (to fix tentatively 10 seconds) in specific time.Read back after the end, ISCS resets RRF.
The aforesaid operations step describes the performing step and the data flow of time schedule download and readback process in detail, and all employings are equal to the technical scheme that form obtained of replacement or equivalent transformation, all drop within protection scope of the present invention.