RetCode result;
int exit_cmd = 0;
UINT32 axisIndex = 0;
UINT32 axisIndex = 0; //库加载
result = YKM_LoadLib();
YKM_BusInfo busInfo;
//等待系统初始化完成
while (!exit_cmd)
{
result = YKM_GetBusInfo(&busInfo);
if (busInfo.running)
break;
Sleep(100);
} //锁存器设置配置参数
YKM_CaptureConfig captureConfig;
memset(&captureConfig, 0, sizeof(YKM_CaptureConfig));
captureConfig.edge = 0;
captureConfig.source_type = 0;
result = YKM_SetCaptureConfigPCI(0, chlCap, captureConfig); //启动锁存器
result = YKM_StartCapturePCI(0, 0);
//获取锁存器状态及值
while (!exit_cmd)
{
UINT32 cardIndex = 0, channel = 0, status = 0;
INT32 value = 0;
YKM_GetCaptureStatusPCI(cardIndex, channel, &status);
if (status != 0)
{
YKM_GetCaptureValuePCI(0, channel, &value);
printf("CaptureValue: %d\t", value);
}
Sleep(10);
}
|