LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 50202

I'm working on a VI which performs a battery charge / discharge test.  The test is supposed to run for about 6 days total.  However, it is currently crashing before about 12 hours.  The error I'm getting is:

"Error 50202 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).v1:2

Possible Reason(s):
A system call returned an error.  The operation could not be completed as specified

Task Name: _unnamedTask<2>"

The VI uses a state machine, an NI USB-6008 using two analog inputs (measuring battery voltage and current) and a digital output (controlling a relay to control the AC input to the battery charger), and an Array electronic load (which I had to write VI's to control through VISA, as I couldn't find any existing VI's).

I recently upgraded to Labview 8.5 and upgraded the RAM in the PC to 2gig (from 512Meg) in hopes of fixing this problem.

I'm running out of ideas for things to check.  This is a rather large VI, and I'm still at the beginning of my Labview education, so I'm sure it's something I'm doing wrong.
0 Kudos
Message 1 of 7
(5,057 Views)

Have you looked at these threads?

http://forums.ni.com/ni/board/message?board.id=250&message.id=13974

http://forums.ni.com/ni/board/message?board.id=280&message.id=1022  << unlikely (?)

If you notice that it "crashes" after approximately the same amount of time, it would sound as if a counter has wrapped around and you may be sending a negative number. 

I don't think upgrading to LV8.5 and increasing RAM would change anything.  Try writing to a log file all DAQ transactions (commands, etc) and any values from counters (if you are using them <anything that periodically increments a value> ).  You may also want to look at the memory consumption during the run (doesn't hurt).

JLV

0 Kudos
Message 2 of 7
(5,054 Views)
Thanks, Joe.  I did see both of those threads.

There aren't really any counters in the VI.  The flow of the program is completely time-based, and I'm using an "Elapsed Time" VI to control the timing for each step.

I didn't think upgrading to 8.5 would help, but I've noticed the first thing people are told is to upgrade to the newest drivers, so I thought I'd start there.  I wasn't sure about the RAM either, but it needed upgrading, anyway.

How would I go about writing a Log file?

I'll check the memory usage.


Would it help if I attached the VI?  It's over 600K, then there are a few subVI's that go along with it, so that's why I haven't done it yet.
0 Kudos
Message 3 of 7
(5,053 Views)
I checked the memory usage of Labview throughout the day yesterday (while running the VI in question) and it remained constant (around 101636K).

I found a logging option in the menu, but it only appears to log front panel activity.
0 Kudos
Message 4 of 7
(5,040 Views)
You can do your own logging by writing to a text file all the settings and data/control to/from the DAQ device. Something like a "printf" in text-based languages, but to a file.
0 Kudos
Message 5 of 7
(5,033 Views)

HI,

 

There are a couple of issues that could be affecting your system. They are best explained in the following KnowledgeBase articles.
How Do I Handle Error 50202 in LabVIEW or MAX?

AMD Multi-Core/CPU Systems Can Cause Unexpected Behavior in NI Driver Software

You should verify that you do not have any of the effected hardware, and if so perform the recommended fixes. Another test to perform is try running an shipping example which can be found by selecting Help in LabVIEW and going to Find Examples. Once the example finder opens browse to Hardware Input and Output>>DAQmx I would suggest a simple analog acquire for an extended amount of time. If the error is repeated you can more than likely rule out any coding errors. I hope you find this information useful. Please post back if you have any further questions.
JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 6 of 7
(5,020 Views)
Hi All,

The document JaceD posted has been moved to:

KnowledgeBase 4CDAP7QA: Why Do I Get Error 50202?
http://digital.ni.com/public.nsf/allkb/61060FCCEFD2D5EF86257337005B9ED7?OpenDocument

Regards,
John B.
Applications Engineering
National Instruments
Regards,
John Bongaarts
0 Kudos
Message 7 of 7
(4,760 Views)