Nowadays,with the scale of industrial production increasing everyday,the Distributed Control System(DCS)has been applied more and more widely and has become the mainstream in the control field.As a developing system,applications of every new technology promote the development of DCS.Along with the rapid development and applications of field bus technology and industrial Ethernet,there is a new structure for DCS.That is,DCS combines with fieldbus and industrial Ethernet technology,and becomes a new type of DCS which brings a new competition.Under this background,the thesis researched and developed the running software of the master module in DCS field control station,which was based on industry Ethernet and fieldbus technology.The core of the control station was master module, which corresponds the connection of its software and hardware,and every control assignment.It adopted CAN bus communication protocol to collect data from every I/O module,and adopted Ethernet interface to communicate with engineer station and operator station.Its function and capability will directly affect usability,real-time capability,maintainability and reliability of the system.Based on the review of the current status of DCS both at home and abroad,the thesis explained the concept of field bus and TCP/IP technology,summarized and put forward the whole structure of new DCS,and then analyzed the basic function of master module in field control station.A scheme for running software of master module was presented,and all the tasks in the software ware classified clearly.At the same time,the relationship between the tasks was explained in detail.Then the real-time capability of the system was tested and analysed,which contained the interrupt answer time,task context switch time,CAN ISR time and the switch times of tasks in per second.On this base,the thesis computed and analyzed the additional cost as a result of scheduleing and interrupting,by which the real-time capability was determined.The running software of the master module was based on the embedded realtime operating systemμC/OS-Ⅱ.This thesis ported embedded TCP/IP stackμIP1.0 toμC/OS-Ⅱ,wrote the RTL8100 driver programm to realize the TCP/IP communication, made use of the multitask and rendezvous mechanism to write CAN bus driver,which realized the communication between the master module and the intelligent measuring and controlling modules,and established the communication format between master module,PC,and the intelligent measuring.This thesis made use of the multitask and semaphore mechanism to realize the realtime data collection and treatment in the field control station,and used the memory management,task management,and semaphores management mechanism to realize the control algorithmic on the master module,which included the algorithmic building,deleting,and modifying.The thesis also established the data structure of the configuration information,which was the base for the online modifying of the control algorithmic.To increase the reliability and security of DCS,this thesis designed the redundancy of two control cards,analyzed the function of the main card and the assistant card.The whole software of redundancy was presented and the design of the redundance software on the base ofμC/OS-Ⅱwas analyzed. |