基于C-MISA的App开发
2018-08-23 本文已影响0人
ww4u
控制两台T4进行协作,测量主板
结构
- C++: UI实现
- C-MISA: MISA的C接口
- MISA
- CAN
- T4
- MRQ
- motor
步骤
- 引用C-MISA源码
visa_adapter.c
midevice.c
sinanju.c
mrq.c
megarobo.c
C_MRQ.c
mimgr.c
- 添加VISA include
INCLUDEPATH += "C:/Program Files (x86)/IVI Foundation/VISA/WinNT/Include"
- 添加VISA lib
LIBS += -L"C:/Program Files (x86)/IVI Foundation/VISA/WinNT/lib/msc"
LIBS += -lvisa32
控制
打开设备
foreach_vi()
{
mVis[i] = miOpen( rsrcs.at(i).toLatin1().data() );
}
编程
foreach_vi()
{
robo_program( mVis[i], 0,0, rsrcs.at(i).toLatin1().data() );
}
运行
foreach_vi()
{
robo_call( mVis[i], 0,0,ui->spinLoop->value(),-1 );
}
停止
ViSession viMgr = miOpen( "localhost" );
miMgr_StopDevice( viMgr );
miClose( viMgr );
deviceDisconnect();
代码统计
项目 | lines |
---|---|
app | 464 |
c-misa | 8030 |