LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous read.vi

I have thid vi for continous data read from keithly 26XX. It is not saving any data in the file. I am unable find the error. Can anyone help me?

 

Thanks

 

Sudipta

Download All
0 Kudos
Message 1 of 6
(2,720 Views)

Have you tried SourceMeter2600 with the various Options in a "reasonable" order, and do they work without giving you errors?  This will tell you (as I'm sure you know) if your GPIB command syntax is correct.

 

The problem with Continuous Read include:

  • You only have a call to the Read function, but no initialization or finalization code.
  • You have a File Open/Create within the loop, which means that you are trying to open the file for every point.  Put it outside the loop and bring the file reference (thin green wire) into the loop for the Write to Text File function to use.  When you exit the loop, bring the reference out and close the file.  You are also writing the entire file each time through the loop.  If you initialize outside, then inside the loop, you only need to write the latest value(s).
  • When you concatenate your strings, are you including any spaces or line breaks, or are all the numbers just running together with no way to tell when one number ends and the next one starts?

Bob Schor

0 Kudos
Message 2 of 6
(2,709 Views)

You are opening the file again and again on every loop iteration.  Move the open file VI to before the loop and pass the reference in through a tunnel.  Also put a close file VI behind the loop so it closes the resource after the loop ends.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 3 of 6
(2,704 Views)

Bob,

 

IUs this what you asked me to modify? May be I am still missing something. I tried to follow your instruction and modified continuos read.vi file

Please have a look and suggest

0 Kudos
Message 4 of 6
(2,651 Views)

NIquist

 

I have tried as you suggested. But where do I put close vi behind lop?

Please have qa look in the program once

 

0 Kudos
Message 5 of 6
(2,648 Views)

560092 wrote:  But where do I put close vi behind lop?

This is a typical setup for a write to disk setup.


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
(2,625 Views)