怎么用vc采集ni卡数据_我想问一下关于NI-PCI5152数据采集卡在VC ++环境下的数据采集功能。...

该博客介绍了如何在VC++环境下使用NI-PCI5152数据采集卡进行数据采集。通过包含必要的头文件,设置模拟参数,配置垂直和水平参数,触发类型以及进行数据获取和测量,展示了完整的采集流程。
摘要由CSDN通过智能技术生成

#include

#include"GenericSimulatedAcquisition.h"

ViStatus _VI_FUNC niScope_GenericSimulatedAcquisition (void)

{

ViStatus error = VI_SUCCESS;

ViChar errorSource[MAX_FUNCTION_NAME_SIZE];

ViChar errorMessage[MAX_ERROR_DESCRIPTION] = "";

ViSession vi;

//Variables used to get values from the GUI

ViChar resourceName[MAX_STRING_SIZE];

ViChar channelName[MAX_STRING_SIZE];

ViChar model[MAX_STRING_SIZE];

ViChar type[MAX_STRING_SIZE];

ViChar triggerSource[MAX_STRING_SIZE];

ViChar tempStr[MAX_STRING_SIZE];

ViChar optionString[MAX_STRING_SIZE*2]; //Twice as big since we concatenate various strings;

ViReal64 verticalRange;

ViInt32 verticalCoupling;

ViReal64 probeAttenuation;

ViReal64 verticalNoise;

ViReal64 inputImpedance;

ViReal64 maxInputFrequency;

ViReal64 minSampleRate;

ViInt32 minRecordLength;

ViBoolean enforceRealTime;

ViInt32 numRecords;

ViReal64 refPos;

ViInt32 triggerType;

ViInt32 triggerSlope;

ViReal64 triggerLevel;

ViInt32 measurement;

//Default values used in this example

ViReal64 verticalOffset = 0.0;

ViReal64 triggerHoldoff = 0.0;

ViReal64 triggerDelay = 0.0;

ViInt32 triggerCoupling = NISCOPE_VAL_DC;

ViReal64 timeout = 5.0;

ViInt32 stop = NISCOPE_VAL_FALSE;

ViInt32 numWaveform;

ViInt32 actualRecordLength;

Vi

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值