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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error with Write to Measurement File express VI

Solved!
Go to solution

Who's surprised? not me. 

 

I'm trying to write an extremely easy-to-use VI to control a large linear actuator. The objective here is to get it done and ready to use in as little time as possible. I am having an error show up on the Write to Measurement File express VI whenever I try to collect data that is as follows:

error.png

It does not appear that I am adding multiple data types to the file, though with express VIs I usually have to do some voodoo magic to make them work. Any thoughts on how I could fix this?

 

Thanks!

0 Kudos
Message 1 of 6
(3,680 Views)

If you are not starting from a non-existent file, try deleting the old one first.  Perhaps it has data that is not compatible what what you are writing.

 


GCentral
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 6
(3,659 Views)

The idea is to start from a new file each time, that's what the pop-up is for. This time I got a different error, maybe that helps?

 

error.png

0 Kudos
Message 3 of 6
(3,651 Views)

Invalid reference going into your Dequeue element.

 

Either you didn't obtain a reference for the queue, or you didn't wire the queue reference through all of your case structures and loops.

0 Kudos
Message 4 of 6
(3,645 Views)

I get both errors every time I run the VI. Here it is with some shift registers added 

0 Kudos
Message 5 of 6
(3,642 Views)
Solution
Accepted by topic author try_guy90

You will get an error on your Dequeue when you stop the application because you are destroying the queue as soon as the producer stops.  You should be doing that when the consumer stops.  And to be more correct, you should send a command through the queue telling the consumer to stop.  This would eliminate that local variable and make sure you actually log everything you are supposed to.

 

I would also recommend you create the file before the consumer loop and just use the TDMS functions for writing your data.  Makes things more efficient and easier to understand.

 

See it the attached update helps.


GCentral
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
Message 6 of 6
(3,626 Views)