下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年职业倦怠综合测试(职业倦怠预防)试题及答案
- 2026年口腔科(种植牙案例)试题及答案
- 2025年中职(旅游服务与管理)旅游市场实训综合测试题及答案
- 2025年高职(会计)成本会计实训阶段测试题及答案
- 2025年高职(林业技术)森林管护技术试题及答案
- 巴尔蒂斯介绍
- 养老院老人营养膳食制度
- 养老院老人生活娱乐活动组织人员激励制度
- 养老院老人家庭沟通制度
- 养老院紧急情况处理制度
- DB32/T+5311-2025+港口与道路工程+固化土施工技术规范
- DB31T+1661-2025公共区域电子屏播控安全管理要求
- 医疗联合体儿童保健服务模式创新
- 2026年书记员考试题库附答案
- 中国高尿酸血症与痛风诊疗指南(2024更新版)课件
- 2025至2030中国专用车行业发展分析及投资前景与战略规划报告
- DB13∕T 6066.3-2025 国资数智化 第3部分:数据治理规范
- 2025年白山辅警招聘考试题库及答案1套
- 特种设备外借协议书
- 三元股份财务风险控制研究
- DBJ-T 13-417-2023 工程泥浆技术标准
评论
0/150
提交评论