LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File turns out to be blank

Solved!
Go to solution

I have a simple VI which takes certain measurement(temperature in this case) at every particular time period, and then saves it to a text file. As per convention, I used the procedure of open/create file,write, close. All this was inside a while loop. The VI runs, and stops as per whenver I want it to by pressing the switch. However, when I open the file it turns out to be blank.

 

Im attaching a screenshot of the VI.

Thanks, in advance. 

 

0 Kudos
Message 1 of 13
(3,804 Views)
You've apparently made up some GPIB functions that you have not provided and you have no idea what is being read since you don't have an indicator. You have no error connections on the subVIs and that is just poor programming. How can anyone help?

Note that GPIB requires a write before doing a read so it's entirely possible you have nothing being read so an empty file makes sense.
0 Kudos
Message 2 of 13
(3,788 Views)

I tried with the errors, it still showed the same thing. And I have attached a GPIB write outside the loop as shown. 

 

0 Kudos
Message 3 of 13
(3,773 Views)
A GPIB Write outside of the loop is pointless. Since you will not post the subVIs or even explain what is inside or create an indicator on the output of your read, I can only surmise that you are not seriously interested in gettin help.
0 Kudos
Message 4 of 13
(3,765 Views)

Ok, I did as you said. I added a indicator at the output. Replaced my sub-vi's by the standard GPIB functions.  It executes fine at the start, but at the second run of the loop, i get an error. I've enclosed a screen-shot. 
Thanks for the help so far. 

0 Kudos
Message 5 of 13
(3,749 Views)

Attached  is a better picture of the block diagram.

0 Kudos
Message 6 of 13
(3,737 Views)
You aren't paying any attention. You CANNOT just do a read in a loop. It has to be preceded by the write command requesting a measurement. That means putting the write inside of the loop. This is basic GPIB knowledge and not related to LabVIEW.
0 Kudos
Message 7 of 13
(3,735 Views)

Cause pictures seem to tell more than words.

0 Kudos
Message 8 of 13
(3,728 Views)
Please use the error in/out connections to enforce dataflow so the read occurs after the write.
Message 9 of 13
(3,721 Views)

Dear Dennis,

any idea as to what the error I now get means ?

 

0 Kudos
Message 10 of 13
(3,712 Views)