驱动
MPI驱动,支持西门子的S7-300/400,使用协议是MPI;
□PLC必须是S7-300/400,要提供MPI口;
□台式机中可使用CP5611/CP5613/CP5621;
□笔记本中可使用CP5512;
□如果使用串口,也支持适配器,但不建议使用;
□使用CP5611/5512最多可连接2台PLC;
□使用CP5613最多可连接4台PLC;
□PLC设定
□使用STEP7,把CPU的MPI地址设为2或者3,波特率必须为187.5k;
□打开"控制面板"中的"SetPC/PGInterface",使"S7ONLINE"对应为"CP5512(MPI)";

同,此例为0,波特率必须为187.5K,必须选择"√□PG/PCistheonlymasteronthebus",
否则PLC断电后不能自动连通;


□如果没有出现"OK",或不能查询到PC和PLC的站号,请检查PC和PLC的MPI参数是否一致、
网线是否接好;
□直到能查询到PC和PLC的站号,说明通讯接通;
□通讯设定
□选择设备通讯功能,执行安装驱动任务,出现对话框:

□选择MPI驱动程序,进行安装;
□选择设备通讯功能,执行启动驱动任务,出现对话框,选择MPI:

□选择设备通讯功能,执行定义设备数据表任务,在设备数据表中定义某个设备号:

□访问点名称必须为S7ONLINE;
□PLC站号为PLC的MPI地址(0-31),CPU的槽号为1-18,S7-300总为2,S7-400可选;
□各种数据类型的在每个设备号中的最大数据长度:

□应选用的处理方式:

□错误代码:
00CA:noresourcesavailable
00CB:configurationerror
00CD:illegalcall
00CE:modulenotfound
00CF:drivernotloaded
00D0:hardwarefault
00D1:softwarefault
00D2:memoryfault
00D7:nomessage
00D8:storagefault
00DB:internaltimeout
00E1:toomanychannelsopen
00E2:internalfault
00E7:hardwarefault
00E9:sin_
00EA:protected
00F0:scpdbfiledoesnotexist
00F1:noglobaldosstorageavailable
00F2:errorduringtransmission
00F2:errorduringreception
00F4:devicedoesnotexist
00F5:incorrectsubsystem
00F6:unknowncode
00F7:buffertoosmall
00F8:buffertoosmall
00F9:incorrectprotocol
00FB:receptionerror
00FC:licenceerror
0101:connectionnotestablished/parameterised
010A:negativeacknowledgementreceived/timeouterror
010C:datadoesnotexistordisabled
012A:systemstoragenolongeravailable
012E:incorrectparameter
0132:nomemoryinDPRAM
0201:incorrectinterfacespecified
0202:maximumamountofinterfacesexceeded
0203:PRODAVEalreadyinitialised
0204:wrongparameterlist
0205:PRODAVEnotinitialised
0206:handlecannotbeset
0207:datasegmentcannotbedisabled
0300:initialisiationerror
0301:initialisiationerror
0302:blocktoosmall,DWdoesnotexist
0303:blocklimitexceeded,correctamount
0310:noHWfound0311:HWdefective
0312:incorrectconfigparam
0313:incorrectbaudrate/interruptvector
0314:HSAparameterisedincorrectly
0315:MPIaddresserror
0316:HWdevicealreadyallocated
0317:interruptnotavailable
0318:interruptoccupied
0319:sapnotoccupied
031A:noremotestationfound
031B:internalerror
031C:systemerror
031D:errorbuffersize
0320:hardwarefault
0321:DLLfunctionerror
0330:versionconflict
0331:errorcomconfig
0332:hardwarefault
0333:comnotconfigured
0334:comnotavailable
0335:serialdrvinuse
336:noconnection
0337:jobrejected
0380:internalerror
0381:hardwarefault
0382:nodriverordevicefound
0384:nodriverordevicefound
03FF:systemfault
0800:toolboxoccupied
4001:connectionnotknown
4002:connectionnotestablished
4003:connectionisbeingestablished
4004:connectionbrokown
8000:functionalreadyactivelyoccupied
8001:notallowedinthisoperatingstatus
8101:hardwarefault
8103:objectaccessnotallowed
8104:contextisnotsupported
8105:invalidaddress
8106:type(datatype)notsupported
8107:type(datatype)notconsistent
810A:objectdoesnotexist
8301:memoryslotonCPUnotsufficient
8404:graveerror
8500:incorrectPDUsize
8702:addressinvalid
D201:syntaxerrorblockname
D202:syntaxerrorfunctionparameter
D203:syntaxerrorblocktype
D204:nolinkedblockinstoragemedium
D205:objectalreadyexists
D206:objectalreadyexists
D207:blockexistsinEPROM
D209:blockdoesnotexist
D20E:noblockavailable
D210:blocknumbertoobig
D241:protectionleveloffunctionnotsufficient
D406:informationnotavailable
EF01:incorrectID2
FFFB:TeleServiceLibrarynotfound
FFFE:unknownerrorFFFEhex
FFFF: