手册中指出fb250好像是指模拟数据采集块。我看到有些项目图纸中一个模拟量模块有八路通道,由PW128至PW142。
1、FB250里头的BG模块通道指什么?
2、FB250里头的KNKT里头的KN通道号指什么?
最佳答案
1、S5中的FB250和FB251是模拟量输入输出测量模块,对于与S7的FC105\FC106.
例如:
Name:RLG:AE
BG:KF+128
KNKT:KY0,4
OGR:KF+518
UGR:KF+0
EINZ:F0.2
XA:DW51
FB:F250.2
BU:F250.3
TBIT:F253.1
OGR:UpperlimitoftheouTPutASaInteger(KF),即在这里定义上限值。
UGR:LowerlimitoftheoutputasaInteger(KF),即在这里定义下限值。
详见:
《S5-115UProgrammableController》下载:
http://PLC.scetc.net/down/zz/plc/siemens1/SIMATIC.S5%EF%BC%8D115U.pdf
其中,10.9AnalogValueMatchingBlocksFB250andFB251
2、转帖一个实例:
FB250isclearlydescribedwithaexample.
BG:placebehindtheCPU103,STaRTingwith0forthefirstcard(KF=Integervalue)
KNKT:Channelnumber=x(0..3,startcountingwithchannel0)
Channeltype=y,3..6wherebythenumbergivesthetypeofworking(KYaretwobytes)
OGR:UpperlimitoftheoutputasaInteger(KF)
UGR:LowerlimitoftheoutputasaInteger(KF)
EINZ:Singlescan(notneeded,soyoumayplaceamarkerwhichalways"0",forexF0.0
XA:Outputvalue,forexampleFW2oradatawordinafirstopenedDBforthecallofFB250
FB:Errorbit,forexampleF1.3
BU:Rangeviolation,forexampleF1.4
SowhenthecardisstandingdirectlybehindtheCPU103andthefirstchannelofthecardisusedthenthefollowingmightbeprogrammedonFB250:
JUFB250UnconditionalcallFB250
NAME:RLG:AI
BG:0Slot0
KNKT:0,3Channel0,channeltype3=absolut
OGR:5000Upperlimit:50.0degrees(onthiswayaresolutionof0,01)
UGR:0Lowerlimit:0.0degrees
EINZ:F0.0Nomeaning
XA:FW2Make-upquantitystoredinflagword1asfixed-pointnumber
FB:F0.0“1”,ifwirebreak
BU:F0.1“1”,iftanktoofull
提问者对于答案的评价:
谢谢