摘要随着科技的不断发展,PLC在工程中的应用大家有目共睹,PLC在各个领域已占得一席之地,并将有更好的发展。
我国人口数量庞大,自动售货机在人们的生活中扮演越来越重要的角色,从长远来看其具有广阔的发展空间。
本次设计的自动售货机为饮料自动售货机,贩卖的商品性质明确,适于放置在短时间人口流动比较大的地方,比如餐厅。
首先通过与单片机和液压等控制的对比,确定采用PLC来控制自动售货机,然后分析自动售货机的结构和工作原理,明白自动售货机的贩卖过程,以便为硬件的选择做准备。
通过自动售货机的功能分析作出硬件框图,根据硬件框图选择所需要的PLC、货币识别器、电动机和接触器。
根据I/O分配表对PLC选型,并画出外部接线图。
根据控制系统流程图编写符合自动售货机功能的程序。
如果购物后有剩余金额,则可按退币按钮退币。
梯形图的编写通过GX Developer来完成,完成梯形图后可以在三菱PLC仿真软件 GX Simulator 6c进行调试和仿真。
最后用MCGS作出组态效果。
组态仿真图中自动售货机包括按钮、指示灯、投币口、取物口、退币口等部分。
关键词:自动售货机;PLC;梯形图; MCGSABSTRACTWith the development of science and technology, the application of PLC in engineering everybody be obvious to people, PLC has occupied a space for one person in every field, and will have a better development. Because of the large number of population, the vending machine is playing a more and more important role in people's life, in the long run it has broad space for development. The design of the automatic vending machine for beverage vending machine, the nature of the goods sold in the clear, adapted to be placed in a short time population flow of relatively large areas, such as restaurant. First, by comparing with the single chip microcomputer and hydraulic control, and adopt PLC to control the vending machine, then analyzes the structure and working principle of automatic vending machines selling process, understand the vending machine, to prepare for the selection of hardware. Through vending machine function analysis to make the hardware block diagram, according to the hardware block diagram, select the desired PLC currency recognizer, motor and contactor. According to the I/O distribution list on the PLC selection, and draw the external wiring diagram. According to the flow chart of control system prepared with vending machine program. If the shopping after the remaining amount, then press the coin button coin. Trapezoidal chart compilation done by GX Developer, complete ladder diagram can be debugged and simulated in Mitsubishi PLC simulation software GX Simulator 6c. Finally, MCGS made the configuration effect. Configuration simulation diagram of the vending machine comprises a button, indicator light, the slot, fetching port, a coin refund part.Keywords: vending machine; PLC; ladder diagram; MCGS目录1 绪论51.1 自动售货机的研究背景与意义51.2 研究自动售货机的目的61.3 本设计研究的容62 自动售货机的功能分析72.1 自动售货机主控单元的确定72.1.1 PLC的部分功能72.1.2 确定自动售货机的主控单元为PLC82.2 自动售货机的售货方法92.3 自动售货机的空间结构102.4 自动售货机的功能102.5 自动售货机的购物使用流程123 自动售货机的硬件部分133.1 控制电路硬件组成框图133.2 确定自动售货机使用的PLC类型143.3 货币识别器选型163.3.1 硬币的识别原理173.3.2 纸币的识别原理173.4 自动售货机电机与其它选择184 自动售货机的软件设计204.1 自动售货机的控制系统流程图204.2 自动售货机的程序部分214.2.1 程序中用到的部分指令214.2.2 自动售货机的控制程序224.3 程序的调试部分304.3.1 GX Developer304.3.2 程序调试304.4 基于MCGS组态的自动售货机仿真324.4.1 建立组态画面324.4.2 设置各元件的参数33结论38参考文献39致39附录系统硬件连接图411 绪论1.1 自动售货机的研究背景与意义自动售货机最早出现在20世纪60年代的欧美,当时在美国的地铁系统中。