LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Simultaneous read/write

Say I have two vi's:

* Test.vi runs on one or more computers taking temperature and humidity measurements every 0.5s. Measurements and computer ID are sent to central computer via serial commands

*Display.vi runs on one central computer and receives data via serial. Data is displayed to a user (around 250ms of lag is acceptable, but less would be preferred)

Would it be possible to instead have the instances of Test.vi write to different channel groups inside a TDMS file on a central server while allowing Display.vi to read the data inside the file? If so what, if any, issues occur from this that I should look out for?

0 Kudos
Message 1 of 3
(2,741 Views)

NEVER use a file for communications between applications.  It just leads to all kinds of issues, mostly due to the file being locked by the various processes and it will just slow things down.

 

I would recommend either keeping with the serial communications or change to a TCP connection to send data to the central computer.  That server application can then have sole access to the TDMS file and do whatever it needs to.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,724 Views)

@crossrulz wrote:

NEVER use a file for communications between applications.  It just leads to all kinds of issues, mostly due to the file being locked by the various processes and it will just slow things down. 


Noted. Does this also hold true if I used a database file and LabVIEW's database connectivity toolkit? It was my (limited) understanding that it was safe (or maybe safeER) to have multiple readers/writers with a SQL database.

 


@crossrulz wrote:

I would recommend either keeping with the serial communications or change to a TCP connection to send data to the central computer.  That server application can then have sole access to the TDMS file and do whatever it needs to.


To confirm, if I did this, I would have a Server.vi listening for data over TCP. Server.vi would then write to the TDMS file when data was received and read and display from the file when prompted by the user. 

0 Kudos
Message 3 of 3
(2,707 Views)