摘要
由于串行接口具有连接简单、使用方便、数据传递可靠等优点,在工业实时控制系统中得到了广泛应用。本文探讨了Linux环境下PC机与智能仪器的串行通信,讨论了多线程实现问题,基于本文的通信程序能够实时接收和发送数据。文中给出了相应的程序代码,为日益流行的Linux软件开发提供一个有价值的参考。
<Abstrcat> Serial interface possesses the good qualities of connecting simply ,using conveniently and data transferring credibly ,so it gains abroad appliance in real-time control system .In this paper ,the programming method of serial communication with Kylix in the Linux platform is discussed . Then it discusses the question of thread synchronization .Multi-thread based on serial communication program can receive and send data at the same time .The corresponding programming codes are given .It can be a valuable reference for the increasingly popular Linux software development.
出处
《计算机与现代化》
2005年第7期39-42,共4页
Computer and Modernization
基金
江西省教委科技资助项目(DB200206062)
江西省测控中心资助项目(KG200204011)