LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting NI-DAQmx error -200479, any ideas?

Environment

WindowsXP SP3

Labview 7.1

NI-DAQmx 8.7.1

(2) PCI_DIO-96 cards.

 

Trying to get some digital I/O tasks working.  Three attachments; Init.jpg is the init routine for the task that is giving me problems, Write.jpg is the write operation that is failing and Dialog.jpg is the failure.  Channels were set up in MAX.  The channel that is giving problems is set up as a write operation from 82C55 PPI A port A.  Failure occurs later in the main exec when the Write VI is executed.  Possibly the Stop Task is occuring before the task is complete??  Any help will be greatly appreciated.

 

TIA

CharlieD

Download All
0 Kudos
Message 1 of 3
(3,101 Views)

Good Morning CharlieD,

 

So it looks like in your Write.jpg code that you implement your DAQmx Write.vi and then your Start Task.  I believe that you should implement the start task and then the write.  I also found some documentation that stated this error occurs when you put the start task within a while loop.  Do you have you DAQmx Start Task within a loop anywhere?  I hope this helps!

 

-Cody C

0 Kudos
Message 2 of 3
(3,067 Views)

Cody,

 

Thanks for the reply.  I was not aware of the while loop issue, I will keep in in mind.

 

I actually figured out the problem this morning.  I kept thinking about the error saying it could not start because it was already running (or something to that effect).  I went through all of my code to verify that I was stopping the DAQmx Write after execution.  I had done that in all locations.  Then I started thinking about the Write VI again.  DAQmx Write has what is called an auto start function.  The help file for the VI states "Auto start specifies if this VI automatically starts the task if you did not explicitly start it with DAQmx Start Task.vi.  I think I also read somewhere else, not sure where, that auto start (true) is the default if the terminal is unwired.  I tried an experiment and deleted DAQmx Start Task and let DAQmx Write run as auto start and it was happy.  I guess DAQmx Write was not detecting that I had explicitly started the task and was trying to start a second instance.  I just left my code with the auto start in place and all is well.

 

Thanks again for your response, I appreciate you taking time to look at the post.

 

CharlieD

0 Kudos
Message 3 of 3
(3,061 Views)