Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI9260 输出从从零开始

大家好,我最近在使用C++编程对NI9184+NI9260产生连续的台阶波形。用示波器测试9260实际输出波形如附件图1所示:在台阶切换之间,会有一个归零的过程,这个归零是我不希望有的过程。为了排除我这边软件的问题,我用NI MAX测试:先产生一个正弦波,停止后重新产生,也会出现如图2所示的归零过程。

上面的过程简单总结为:启动生成任务,停止后会保持当前值,但是再次启动,会有短暂时间变成0.

我猜想这款设备默认重新启动任务有个归零的操作。那么有没有什么方法在重新启动任务时不要这个归零操作呢?另外,还没有什么方法在不需要重新启动任务,可以实现我这个台阶波形产生呢?顺便说下:我的应用是需要连续输出信号,变化速率很慢,但是持续时间可能达到2天以上,之前想用单个任务,可能会挤爆内存

Download All
0 Kudos
Message 1 of 4
(708 Views)

Yes, if your rate of voltage change is slow, you can skip configuring sample timing and use software timed, just start the task only once and whenever required write 1 sample to the task and only stop the task after a few days once all your work with the task is done.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 4
(675 Views)

Santhosh,

Thanks for your reply. If we do not configure sample timing, an error will occur. Some errors are as fellows:

 

Write cannot be performed when the auto start input to DAQmx Write is false, task is not running, and timing for the task is not configured or Timing Type is set to On Demand.
Set auto start to true, start the task, or configure timing and specify Timing Type other than On Demand.
Task Name: _unnamedTask<0>

Status Code: -200846

 

Task contains physical channels on one or more devices that require you to specify the Sample Clock rate. Use the Sample Clock Timing function/VI to specify a Sample Clock rate.
You cannot specify a Sample Clock rate if Mode is set to On Demand.
Device: cDAQ9184-1E2E643

Task Name: _unnamedTask<0>

Status Code: -201087

 

please help to check

 

 

0 Kudos
Message 3 of 4
(659 Views)

You can resolve the first error by setting the "AutoStart" parameter of DAQmxWrite API to "True".

 

To understand the reason behind the second error, please share the list of instrument models part of the task.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 4
(648 Views)