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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with task not writing to file

I have a problem where the file writing from a analog reading task will eventually stop working.  The acquisition will work normally but after a period of time (tens of seconds to tens of minutes) it will stop writing files.

 

The mode of operation is to continuously acquire and periodically switch to a new file.

 

The key functions are 'readTaskConfigure()' and 'AnalogInCallback()'.  The 'ShowWaveforms' flag is set to false.

 

I suspect the problem is with resource usage.  Any suggestions on how to make this more efficient would be greatly appreciated.

 

Thanks,

Lorne Vaasjo

0 Kudos
Message 1 of 5
(4,015 Views)

Hi Lorne.V.,

 

Does the acquisition portion work continuously? For example if you disable the file writes, does it acquire as expected with no issues? Are you noticing any memory leaks or CPU increases? Have you looked at, or tried running, one of the shipping examples yet?

 

Also, you may want to consider posting your questions to one of the text-based programming forums as they may have some helpful insight to add.

 

 

David C
0 Kudos
Message 2 of 5
(3,975 Views)

Thanks for the reply.  I did post the question as well on the text-based programming forum.

 

I do have a memory monitoring function built in and will get the client to check that.  The problem would likely go away if saving to file was disabled but that would defeat the purpose.

 

Thanks.

0 Kudos
Message 3 of 5
(3,964 Views)

Well what I meant by disabling the saving was that it could be a helpful troubleshooting step to determine exactly where the problem was emanating from. I often find that isolating and confirming functionality of separate portions of the code can be helpful in these situations. For example, the problems with the files you are seeing could just be a symptom of a problem with the data acquisition portion.

 

 

David C
0 Kudos
Message 4 of 5
(3,944 Views)

Right.  I've asked the client to try that and waiting for a response.  Unfortunately they are about 6 time zones away.

0 Kudos
Message 5 of 5
(3,942 Views)