下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、ob82 fc2/ fc3/ fc4/fc5/fc300/db2/udt1/0b1 network1 都要拷贝到原程序中。在 db2.dbw12 中有一个fm350 模块地址的设置。要与s7 硬件配置中fm350 的地址一样硬件配置中地址为i:272-287 q:272-287。db2.dbw12=w#16#110=272. 程序说明ob1 network1 call cishan /调用 fc300 程序块cnt2_app :=w#16#2 /背景数据块号db2 quantity :=mw4 /预装载值,为mw4 赋值,当前为零,也可以用w#16#0 load :=m0.2 /装载计数器值,
2、计数器应用时此点为1 gate0_3 :=m0.0 /打开计数器0-3 通道的软件门gate4_5 :=m0.1 /打开计数器4-5 通道的软件门act_val :=m0.3 /开始读当前计数值的触发位channel :=m0.4 /0 为计数器通道0-3 计数 1 为为计数器通道4-7 计数,应置1 rd_err :=m2.2 /读操作的出错提示wr_err :=m2.1 /写操作的出错提示load_done :=m2.0 /装载计数器操作的状态指示state_oflw:=m2.3 /通道 4 测量值上限溢出状态指示state_uflw:=m2.4 /通道 4 测量值下限溢出状态指示fc30
3、0 程序说明network1 l #cnt2_app /application fill unit t #cnt2_db /open counter data block opn db #cnt2_db call cnt2_ctr /control the fm 350-2 调用 fc2 db_no:=#cnt2_db a dbx 36.7 /fm 350-2 parameters assigned? jcn end /no, process no application a dbx 38.4 /lower limit exceeded? = #state_uflw a dbx 39.4 /u
4、pper limit exceeded? = #state_oflw a #gate0_3 /start the fill unit? = dbx 23.0 /yes, sw_gate0 open = dbx 23.1 /yes, sw_gate1 open = dbx 23.2 /yes, sw_gate2 open = dbx 23.3 /yes, sw_gate3 open a #gate0_3 /start the fill unit? a dbx 43.0 /yes, ctrl_dq0 = stat_gate0 = dbx 21.0 /and trigger fill valve a
5、 #gate0_3 /start the fill unit? an dbx 42.0 /yes, invert stat_dq0 = dbx 21.1 /and trigger motor for transport = dbx 22.1 /with ctrl_dq1 and set_dq1 a #gate4_5 /start the frequency measurement? = dbx 23.4 /yes, sw_gate4 open = dbx 23.5 /yes, sw_gate5 open / = dbx 23.6 /yes, sw_gate6 open 想要使用通道6将前面注释
6、符去掉/ = dbx 23.7 /yes, sw_gate7 open 想要使用通道7将前面注释符去掉network2 set /set br for error evaluation save opn db #cnt2_db /open counter data block a dbx 1.0 /load comparator in progress? jc wrdo /yes a dbx 42.1 /new loading only during transport jcn wren a #load /load new quantity? fp m 10.0 /positive edge
7、to #load 注意不能和程序其它地方应用冲突jcn wren /no l #quantity /quantity in counter data block t dbd 116 l 42 /job_no 30 for t dbb 0 /load comparator count channel 0 wrdo: call cnt2_wr /load counter and comparator for fm 350-2 db_no :=#cnt2_db ret_val:=mw6 /注意不能和程序其它地方应用冲突wren: an br /error: job_no unknown, retva
8、l_wr with error or data error = #wr_err an #load /create write job ended r dbx 1.1 /deleted when loading triggered a dbx 1.1 = #load_done network 3 set /set br for error evaluation save opn db #cnt2_db /open counter data block a dbx 3.0 /read actual values in progress? jc rddo /yes an #act_val /reading actual values? jc rden /no l 100 /job_no 100 for count channel 0 to 3 an #channel /for count channel 4 to 7? jc job l 101 /job_no 101 for count channel 4 to 7 job: t dbb 2 /load comparator count channel 0 rddo: call cnt2_rd /load counter and compara
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 昆山停车棚施工方案(3篇)
- 水利护坡盖板施工方案(3篇)
- 浪漫餐厅营销方案(3篇)
- 演艺酒吧营销方案(3篇)
- 电器照明安装施工方案(3篇)
- 结构加固混凝土施工方案(3篇)
- 草籽花播种施工方案(3篇)
- 蟹堡营销方案(3篇)
- 车库入口地面施工方案(3篇)
- 重振汽车营销方案(3篇)
- GB/T 14992-2025高温合金和金属间化合物牌号及化学成分
- 涂布车间安全培训教学课件
- 生产变更管理控制程序操作手册
- 手术室护士考试题(附答案)
- 建筑工程技术服务与支持方案
- HSK三级课件教学课件
- 医药销售季度汇报
- 全钒液流新型储能电站项目实施方案
- 地质资料借阅管理办法
- 车辆存放管理办法及制度
- 门静脉系统超声诊断标准
评论
0/150
提交评论