10-21-2022 04:30 AM
Hi,
Hardware used : cDAQ 9184 with modules NI 9213(thermocouple), 9215( Voltage measurement), 9418(Relay) and 9472(Digital output)
Software : Labview 2021 SP1, DAQmx 21.3
I am using the above mentioned hardware and software for an application. And there are 12 thermocouple measurements and 4 voltage measurements taken at the rate of 1 Hz and logged into a tdms file (2 writes in per second). For each 30 mins the file reference is closed and defragmented.The file is also read concurrently for viewing history data at the press of 'History button'. The program (attached) is crashing presently when run about 33 hours.
Ideally I want to run the code till 50 days at 1 Hz measurement rate and have a single file where the data is logged.
Can you help point me where I should start to solve the issue?
10-21-2022 04:44 AM
Hi Anurag,
@Anurag_NI wrote:
The program (attached) …
Can you help point me where I should start to solve the issue?
We could once you really attach your code…
10-21-2022 05:51 AM
Hi GerdW
Missed the attachement, here you go. The file contains Main.vi in the MEPA.lvproj
Cheers,
Anurag
10-21-2022 01:08 PM
Hi Anurag,
@Anurag_NI wrote:
Ideally I want to run the code till 50 days at 1 Hz measurement rate and have a single file where the data is logged.
Can you help point me where I should start to solve the issue?
Thanks for posting the code!
But: the main VI is way too large. It uses way too much locals. It uses way too many property nodes.
It's written in a "sub-optimal" way (to put it in nice words)…
You really should re-organize the whole program before tackling any other problems.
Examples:
10-25-2022 03:29 AM
Hi Gerdw,
Thanks for looking in and responding, I am making changes in the code and moving the loops to subvi. Use of variables are reduced using notifiers. I will post the code after finishing up these. But still I would need to use property nodes to enable and disable controls for the fuctionality, I don't see a way around this. Also during the run time I tracked RAM usage it seems not to go up even after long time.
- Your "timing engine" loop holds 4 different wait functions: do you really think you will implement reliable timings at all?
The wait funtions are excecuted mutually exclusively, so it should give reliable enough timing.
Best regards,
Anurag
10-28-2022 05:08 AM
Hi,
I have reorganised the code with Funtional global variables. Could you please have a look at it and suggest improvements.
The initial code just replacing the global variable for start and stop with FGV has been put to run and has not crashed for 43 hours and counting. But I am yet to test the attached code here for long time run.
Best Regards,
Anurag