From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using Daqmx write twice

Solved!
Go to solution

Hi,

I want to write a labview program where I can do analog voltage output with amplitude controlled by user.

I am not using Auto start here for Daqmx write.

This works fine unless I exit first loop with STOP button and the program executes the outer loop.

This time when it attempts Daqwrite, it gives error 200547.

Shouldn't  "clear task"  do its job and allow me to use Daqwrire again in this case?

 

T

 

0 Kudos
Message 1 of 4
(932 Views)
Solution
Accepted by topic author maccapple

You are not starting the task the second time the inner loop is called since First Call will return a FALSE.  You should instead start the task if i = 0.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(922 Views)

Hi maccapple,

 

you start your DAQmx task only once - due to the use of the "First Call?" primitive!

 

Why do you need to init and clear that task in each iteration of the outer loop at all?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(920 Views)

 

This is a test program to test the concept in a bigger project where , user runs multiple vi s one by one with radio button selection available and if results are unfavorable, then user can select and 1)run either the same vi , or 2)any other vi  or 3)quit and execute next code if everything is fine. This happens repeatedly until user wants to quit and run next code thro' radio button selection. .The issue happening here is, a vi runs fine for the first run ,but when user wants to run it again , it gives me similar error as in the case of this vi here.

0 Kudos
Message 4 of 4
(890 Views)