Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What causes error -50004

I’m working on an application with approx. 32 inputs (NI-9425). Each input has its own task. The application reads these inputs in several different parallel loops. Sometimes, during execution I get error -50004. After this I have to reconnect my cDAQ device because communication is not possible anymore. Any idea what causes this error?
0 Kudos
Message 1 of 5
(6,339 Views)

Hi Steffan,

 

Good evening and I hope your well today.

 

Thanks for your post - I noticed you hadn't  received any support as of yet.

 

Could you please attach some example code which shows me how your code is designed? and is possible - generates the error?

 

How are you configuring your DI tasks? Continuous..etc and are you using the DAQmx Express VI or the DAQmx API?

 

As this time I wouldn't like to speculate on the cause of the error. 

 

I will take a look back at this post tomorrow morning (UK TIME) and look forward to supporting you further to help you resolve the issue your seeing.

 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 5
(6,322 Views)

Hello James,

 

Thanks for your reply. I attached somes screenshots of the project and the main application. We created approx. 32 digital input DAQ tasks and 32 digital output DAQ tasks in the project. In the main application the lower loop reads the inputs every 200ms. The idea is that this loop constantly shows the status of the machine on the UI. The purple vi's contain mainly DAQmx Read vi's (Digital Bool, 1Line, 1Point) with the DAQ tasks connected to them. The other loops also contain calls to these DAQ inputs to control the machine, also with the DAQmx Read vi's.

 

The problem is that during execution error -50004 pops up spontaneously. In fact we had to disable the lower loop because the error occurred every a few minutes after start of execution. Without this loop the error also occurs now and than but not as much. We have to reset the cDAQ chassis (reconnect USB) because the device does not respond anymore after the error.

 

I hope this explains the situation a bit more.

 

Regards,

Steffan

Download All
0 Kudos
Message 3 of 5
(6,281 Views)

Hi Steffan,

 

Thanks for the update and I hope your well today.

 

This issue has been seen a few times before but has always been resolved it seems by code design changes. 

 

I wonder if your sampling all the inputs at 200ms if you are placing all these Digital Channels (Lines) in the same task.  i.e. reading a whole port and then splitting your signals in a consumer loop. It would appear if your setting it to 1Line, 1 point that you are not. Also if your doing this continously why you can't setup your DAQ tasks to be continous rather than 1 sample. In better ways, create one task and use multiple write/read functions.

 

If you have many DAQmx API on your block diagram I supose it is forseeable that you may have issues.  I wonder what your code flow is like, have you tried isolating your DAQ code. And testing it seperately? I'd be interested to help your further if you can isolate them.

 

Summary, check your code flow and maybe combine all the seperate tasks into one task where you can still access the indiviual lines.

 

Please let me know your thoughts, and I look forward to seeing some code if at all possible.

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 5
(6,275 Views)

We also thougth about using less DAQmx API or even isolating the DAQ calls as you suggested because that seemed to be the problem. Thanks you for the help so far. I will let you know about the progress.

 

Regards,

Steffan

0 Kudos
Message 5 of 5
(6,272 Views)