Abstract :
In the hydraulic cylinder test bed, several motors and electromagnetic valves should be controlled, and some analogues, such as, pressure, temperature and drift, are needed to deal with. After experiments, the results of experiments are automatically printed in the tables. The conditions of PLC´s COM ports which controlled by industrial PC are necessary for programming convenience and experiment status. Combined with C++ language´s object-oriented programming and high computing speed´s advantages, the real-time controlling of input and output situations by Siemens PLC is researched. PLC is virtual into a facility in the upper computer through using object-oriented programming idea. When refreshing, the state of virtual facility is copied to PLC. This method is proved to realize real-time control on monitoring the condition of PLC´s COM ports, through continuous and stable experiments.