发布于 2012-09-17 16:06:45
3楼
Res = load_tool(1, "S7ONLINE", adrTable)
1为指定连接号,一般为1
“S7ONLINE"这个不能改。
adrTable是一个二维数组,指定一系列连接参数,依次为:MPI地址、保留为0、CPU槽号、CPU机架号
Type adrTable
adr As Byte ‘stationsadresse default 2
SEGMENTID As Byte ‘segment id default 0
SLOTNO As Byte ‘slot NO default 2
RACKNO As Byte ‘rack NO default 0
End Type
Res=0,表示连接正常。你的地址都写对了么。206是啥意思
你try catch一下,异常信息是啥。
每天进步一点点