发表于:2006/1/19 15:21:00
#0楼
我原来用S7-200 EM231采集管道温度0--199度,共16路,并在台达触摸屏上显示,现在想将其中一路改为测量室外温度,大约-20度到140度,可是不知道怎么将这个负数写进去,原来的程序是带参数调用子程序,是别人写的,所带的温度上下限参数不能写入负数,不知该怎办,难道要重新编写么,刚开始学习,不大会,清高手赐教,不胜感谢
XIAOHUZI8341@56.COM
TITLE=模拟量采集
Network 1
// VD300组态王,VD600触摸屏
LD SM0.0
CALL SBR3, AIW0, 0.0, 1.6, VD300, VD600
Network 2
LD SM0.0
CALL SBR3, AIW2, 0.0, 1.0, VD304, VD604
Network 3
LD SM0.0
CALL SBR3, AIW4, 0.0, 1.0, VD308, VD608
Network 4
LD SM0.0
CALL SBR3, AIW6, 0.0, 1.0, VD312, VD612
Network 5
LD SM0.0
CALL SBR3, AIW10, 0.0, 1.0, VD316, VD616
Network 6
LD SM0.0
CALL SBR3, AIW12, 0.0, 1.0, VD320, VD620
Network 7
LD SM0.0
CALL SBR3, AIW16, 0.0, 199.0, VD324, VD624
Network 8
LD SM0.0
CALL SBR3, AIW18, 0.0, 199.0, VD328, VD628
Network 9
LD SM0.0
CALL SBR3, AIW20, 0.0, 100.0, VD332, VD632
Network 10
LD SM0.0
CALL SBR3, AIW22, 0.0, 50.0, VD336, VD636
Network 11
LD SM0.0
CALL SBR3, AIW24, 0.0, 199.0, VD340, VD640
Network 12
LD SM0.0
CALL SBR3, AIW26, 0.0, 199.0, VD344, VD644
Network 13
LD SM0.0
CALL SBR3, AIW28, 0.0, 100.0, VD348, VD648
Network 14
LD SM0.0
CALL SBR3, AIW30, 0.0, 50.0, VD352, VD652
Network 15
LD SM0.0
CALL SBR3, AIW34, 0.0, 800.0, VD356, VD656
Network 16
LD SM0.0
CALL SBR3, AIW26, 0.0, 200.0, VD364, VD664
Network 17
LD SM0.1
MOVR 10.0, VD376
Network 18
LD SM0.0
MOVR VD324, VD384
-R VD328, VD384
Network 19
// SUB_R实数加法指令,DIV_R实数除法指令,
LD SM0.0
MOVR VD340, VD388
AENO
-R VD344, VD388
AENO
MOVR VD388, VD392
/R 100.0, VD392
Network 20
LD SM0.0
CALL SBR3, AIW12, 0.0, 2.0, VD368, VD668
Network 21
XIAOHUZI8341@56.COM
TITLE=模拟量采集
Network 1
// VD300组态王,VD600触摸屏
LD SM0.0
CALL SBR3, AIW0, 0.0, 1.6, VD300, VD600
Network 2
LD SM0.0
CALL SBR3, AIW2, 0.0, 1.0, VD304, VD604
Network 3
LD SM0.0
CALL SBR3, AIW4, 0.0, 1.0, VD308, VD608
Network 4
LD SM0.0
CALL SBR3, AIW6, 0.0, 1.0, VD312, VD612
Network 5
LD SM0.0
CALL SBR3, AIW10, 0.0, 1.0, VD316, VD616
Network 6
LD SM0.0
CALL SBR3, AIW12, 0.0, 1.0, VD320, VD620
Network 7
LD SM0.0
CALL SBR3, AIW16, 0.0, 199.0, VD324, VD624
Network 8
LD SM0.0
CALL SBR3, AIW18, 0.0, 199.0, VD328, VD628
Network 9
LD SM0.0
CALL SBR3, AIW20, 0.0, 100.0, VD332, VD632
Network 10
LD SM0.0
CALL SBR3, AIW22, 0.0, 50.0, VD336, VD636
Network 11
LD SM0.0
CALL SBR3, AIW24, 0.0, 199.0, VD340, VD640
Network 12
LD SM0.0
CALL SBR3, AIW26, 0.0, 199.0, VD344, VD644
Network 13
LD SM0.0
CALL SBR3, AIW28, 0.0, 100.0, VD348, VD648
Network 14
LD SM0.0
CALL SBR3, AIW30, 0.0, 50.0, VD352, VD652
Network 15
LD SM0.0
CALL SBR3, AIW34, 0.0, 800.0, VD356, VD656
Network 16
LD SM0.0
CALL SBR3, AIW26, 0.0, 200.0, VD364, VD664
Network 17
LD SM0.1
MOVR 10.0, VD376
Network 18
LD SM0.0
MOVR VD324, VD384
-R VD328, VD384
Network 19
// SUB_R实数加法指令,DIV_R实数除法指令,
LD SM0.0
MOVR VD340, VD388
AENO
-R VD344, VD388
AENO
MOVR VD388, VD392
/R 100.0, VD392
Network 20
LD SM0.0
CALL SBR3, AIW12, 0.0, 2.0, VD368, VD668
Network 21