您当前的位置:五五电子网电子知识电器控制PLC工业控制西门子S7-300PLC与模拟屏串行通信设计 正文
西门子S7-300PLC与模拟屏串行通信设计

西门子S7-300PLC与模拟屏串行通信设计

点击数:7872 次   录入时间:03-04 11:40:50   整理:http://www.55dianzi.com   PLC工业控制
+1 // increment counter
t db42.dbw0
nop //further user function
nop
nop
be
// check “complete with error”
// p_snd_rk_error=1
cher: an db40.dbx0.5
//check p_snd_rk_error
bec //if no error occurred, jump to end
//“complete with error”
l db42.dbw2
//“complete with error”
+1 //increment counter
t db42.dbw2
l db40.dbw12
t db40.dbw14 //save status
nop //error-handling
nop
nop
be
(3) 数据刷新,程序如下:
an m2.4
l s5t#100ms
sd t0
a t0
jnb _007
l w#16#1
l md4
rrd
t md4
set
save
clr
_007: a br
= l20.0
a l20.0
a(
l md4
l l#0
==d

jnb _008
l 1
t md4
_008: nop 0
a l20.0
bld 102
= m2.4
a(
o m5.0
o m6.4

jnb _003
call fc36
_003: nop 0
a(
o m4.0
o m5.4

jnb _004
call fc38
_004: nop 0

上一页  [1] [2] 


本文关键字:通信  西门子  PLC工业控制电器控制 - PLC工业控制