欢迎来到天天文库
浏览记录
ID:46906222
大小:1.52 MB
页数:39页
时间:2019-11-29
《西门子PLC培训编程讲义》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、数据格式十进制BCD数数00000100012001030011401005010160110701118100091001101112131415110011017000000001580128+64841符号位数据类型整型例如205+++十进制值:070158000000000000000000000000000000023163124指数(8位)尾数(23位)数据类型实数例如45.6789符号位数据格式(16位)BCD整数BCD28=256+000000010010100015141312111098765432
2、1025=32+23=8=2960000001010010110296符号(+)1111010000010011413符号(-)W#16#F41327=128+1111111001100011151413121110987654321023=8+22=4=41228=256+24=16+-(412+1)=-413负数整数正数W#16#296+296-413PGCPU数据格式(32位)实数=+1,5*2126-127=0,75DW#16#296L#+296+0.75或+7.5E-10000000100101000000000000000000015
3、141312111098765432103130292827262524232221201918171628=256+25=32+23=8=296整数(32位)=00000000000000000001111110100000实数符号151413121110987654321031302928272625242322212019181716e=指数(8Bit)f=底数(23Bit)实数的通用格式=(Sign)•(1.f)•(2e-127)20212223242526272-232-12-22-4.....2-30000000符号(+)00000
4、010100101102960000000000000BCDDINTREAL定时器:带保持接通延时(SS)STLAI0.7LS5T#35sSST4AI0.5RT4LT4TMW0LCT4TQW6AT4=Q4.5LADT4S_ODTSTVSQBCDBIRI0.7I0.5S5T#35sQ4.5MW0QW6FBDS_ODTSTVQBIRI0.7I0.5S5T#35sMW0QW6T4BCD=Q4.5S例如S处的RLOR处的RLO定时器操作Q定时器:关断延时(SF)STLAI0.7LS5T#35sSFT4AI0.5RT4LT4TMW0LCT4TQW6AT4
5、=Q4.5LADT4S_OFFDTTVSQBCDBIRI0.7I0.5S5T#35sQ4.5MW0QW6FBDS_OFFDTTVQBIRI0.7I0.5S5T#35sMW0QW6T4BCD=Q4.5S例如S处的RLOR处的RLO定时器操作Q定时器:脉冲(SP)FBDS_PULSETVQBIRI0.7I0.5S5T#35sMW0QW6T4BCD=Q4.5SS处的RLOR处的RLO定时器操作Q例如STLAI0.7LS5T#35sSPT4AI0.5RT4LT4TMW0LCT4TQW6AT4=Q8.5MW0LADT4S_PULSETVSQBCDBIRI
6、0.7I0.5S5T#35sQ4.5QW6定时器:扩展脉冲(SE)LADT4S_PEXTTVSQBCDBIRI0.7I0.5S5T#35sQ4.5MW0QW6FBDS_PEXTTVQBIRI0.7I0.5S5T#35sMW0QW6T4BCD=Q4.5SS处的RLOR处的RLO定时器操作Q例如STLAI0.7LS5T#35sSET4AI0.5RT4LT4TMW0LCT4TQW6AT4=Q4.5定时器:位指令I0.0T4SDS5T#5sT4Q4.0I0.1T4RNetwork1:Network2:Network3:LAD&SDT4I0.0S5T#5
7、s&=Q4.0T4&I0.1TVRT4FBDAI0.0LS5T#5sSDT4AT4=Q4.0AI0.1RT4STL练习9.1:测试定时器T4S_PEXTSTVRBIBCDQI0.7S5T#5sI0.5Q4.0I0.7I0.5Q4.0T4S_PULSESTVRBIBCDQI0.7S5T#5sI0.5Q4.0I0.7I0.5Q4.05sT4S_ODTSTVRBIBCDQI0.7S5T#5sI0.5Q4.0I0.7I0.5Q4.0T4S_ODTSSTVRBIBCDQI0.7S5T#5sI0.5Q4.0I0.7I0.5Q4.0I0.7I0.5Q4.0T4
8、S_OFFDTSTVRBIBCDQI0.7S5T#5sI0.5Q4.0设置定时器以下列形式设置时间:常数S5T#43S_200MS输入字
此文档下载收益归作者所有