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: 

Failed to create files with write to measure.vi

PS I am still having issues with the data transfer Smiley Mad and my cRIO's are all tied up at the moment.

 

If everything is working fine as it is using the network variables then carry on.

 

However you may find as you start building applications around it things start to fall apart a bit.

 

I'll keep looking back at the transfer code when I can and put up a solution if I get one sorted before my cRIO's go to sea for the rest of their lives.

 

Dom

0 Kudos
Message 71 of 77
(565 Views)

I am super rubbish at remembering what release of LV people are using!!!

 

 

0 Kudos
Message 72 of 77
(563 Views)

Hi Dom,

 

Thanks! It has solved the problem! However after implementing the changes, it somehow stuffs up the sampling rate, pressing the radio button would fail to change the sampling rate. So what i did instead is to implement the case structure only inside one of the botton while loop and leave the stop variable in the timed loop the same and this has solved the problems. I jus did it out of gut feelings so can you explain why that happens and what does that case structure actually do to the stop variable?

0 Kudos
Message 73 of 77
(554 Views)

What the case structure does is to allow you to ignore the network variable for that first iteration.

 

What I thought was happening is that the cRIO had previous values stored in the network variable, like the network variable is not refreshed to a default case when you stop the cRIO.  I would expect that if you did a power down then it would clear the problem.  If it doesn't then I would assume the stored value is "somewhere" on the network, no idea where though.

 

It seems I was right.  However I have to admit I don't understand why it would affect the sampling rate change.

 

I haven't got time to look now until after the weekend but I'll try and have a look around and see what I can surmise.  I have to admit, that could all have been complete tosh and we struck it lucky!!!!

 

I'll wait for one of the more experienced guys to come and correct me though Smiley Very Happy

 

Dom

0 Kudos
Message 74 of 77
(550 Views)

Hi Gregor and Dom,

 

This is strange. While I tested it out on friday it solved the problem (having to run the cRIO twice all the time because of the true default value of stop variable), I came back and worked on it again today and the problem re appears!! And just like last time If I implemenet two case structures Dom suggested onto the timed loop and while loop, the sampling rate stays very slow 😞

0 Kudos
Message 75 of 77
(522 Views)

One more question, is it common practice to make sure that the two VIs are started at the same time? In my application, is it better for me to make sure at least cRIO.vi starts before computer.vi? Like Gregor has pointed out before, the network variable is still running even though the Vi's are stopped. If I run computer.vi first, unexpected data will be written into the computer which is not good I supposed.

0 Kudos
Message 76 of 77
(513 Views)

Hmmm...

 

Good question, in all honesty I don't think it should matter.

 

What you could do, which may mitigate the problem, is to write a case structure which applies Null / startup values to all of the network variables before stopping the VI, but after sending the stop command to the cRIO.

 

I have put two pictures which I think would do what I am suggesting.  The added bonus is the array of zeros will also add a marker to the end (Maybe the beginning) of your files.  Always useful!

 

Dom

 

 

Download All
0 Kudos
Message 77 of 77
(495 Views)