LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Close vi Error -2504

I am using tdms to log data. I have developed vi which saves 2 types of data. One is a String of 2D array. Another is Timestamp and DBL values of 2D array. I have made this vi as a clone because it has to run parallelly for 10 sequences. The data will be logged with a time interval of 10 seconds. Sometimes the above-mentioned error (TDMS Close vi Error -2504) occurs in the sequence randomly so that the data saving is getting stopped. The actual data file is getting updated but the tdms INDEX file is not updating. At the end of the test, the actual data file is showing as updated to the latest time but the Index file is last updated when the error occured. Please find the attached vi for reference.

do_what_you_like
0 Kudos
Message 1 of 6
(1,318 Views)

Hi Pranesh,

 


@Mando_25 wrote:

I have made this vi as a clone because it has to run parallelly for 10 sequences. … Sometimes the above-mentioned error (TDMS Close vi Error -2504) occurs in the sequence randomly so that the data saving is getting stopped.


Why do you need to run this VI 10 times in parallel?

Did you read the error description? The TDMS file couldn't be closed - most probably because of your "parallel calls"!

 

Why do you need to open and close the TDMS file with each call?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,264 Views)

I am saving data of 5 hours test so I thought if I continuously write data to TDMS and sometimes if an error occurs, the data which is collected so far will be lost. So I am closing and opening the tdms each and every time.

 

10 stations are running in parallel. So I thought if 2 or more stations try to execute the same vi at the same time, it will cause an error. So I made it as a clone. 

do_what_you_like
0 Kudos
Message 3 of 6
(1,231 Views)

Hi Mando,

 


@Mando_25 wrote:

10 stations are running in parallel. So I thought if 2 or more stations try to execute the same vi at the same time, it will cause an error. So I made it as a clone. 


So you still call the VI several times in parallel, but you wonder about problems? They all want to access the very same file in parallel so you always will run into problems independently from cloned or not...

 

Are these stations independent computers? Are these stations independent executables? In these cases it doesn't matter when you set the VI to cloned as each instance runs in its own environment! Your shared resource is the file...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(1,228 Views)

The 10 stations are in a single executable and running on one PC only.

do_what_you_like
0 Kudos
Message 5 of 6
(1,225 Views)

Hi Mando,

 

then create just one instance, where you place the file handling!

Then have your stations communicate with this single instance by queues so they will not block each other...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(1,222 Views)