原先F18电桥是用艾讯公司的AX5488采集卡控制的,初始化设置如下(GPIB地址为4):
Addr1 = 4
Flag = ibinit((2 * 16 ^ 2 + 14 * 16 + 1), 21, 256)
Cmd$ = "ONL"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
Cmd$ = "AU"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
Cmd$ = "SRC2"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
Cmd$ = "G1"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
Cmd$ = "C3"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
Cmd$ = "FRQ1"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
Cmd$ = "CHK0"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
Cmd$ = "MET0"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
Cmd$ = "B0"
Flag = ibwrt(Addr1, Cmd$, Len(Cmd$))
执行后,F18成功响应。
现在换用研华工控的PCI1670采集卡控制,所要执行的操作还是初始化设置,只是语句的格式改了,如下:
Bridge_add = 4
Dev2% = ildev(0, Bridge_add, 0, T3s, 1, 0)
cmd$ = "ONL"
ilwrt Dev2%, cmd$, Len(cmd$)
cmd$ = "AU"
ilwrt Dev2%, cmd$, Len(cmd$)
cmd$ = "FRQ1"
ilwrt Dev2%, cmd$, Len(cmd$)
cmd$ = "C3"
ilwrt Dev2%, cmd$, Len(cmd$)
cmd$ = "G1"
ilwrt Dev2%, cmd$, Len(cmd$)
cmd$ = "SRC2"
ilwrt Dev2%, cmd$, Len(cmd$)
cmd$ = "CHK0"
ilwrt Dev2%, cmd$, Len(cmd$)
cmd$ = "MET0"
ilwrt Dev2%, cmd$, Len(cmd$)
cmd$ = "B0"
ilwrt Dev2%, cmd$, Len(cmd$)
结果F18却没有响应,请教高人这是有什么问题
万分感谢!!
厂家的dll包?我看原来成功的F18的vb程序里面,有一个Module1.bas
我问了一下别人,可能是F18和PCI1670的兼容性问题