LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature and Voltage read by Keihtley 2182A

Dear All,

 

Thanks in advance for helping.

 

I am using Ch1  and Ch2  of Keithley 2182 A for voltage and for temperature measurement, respectively. The question is that I wish to measure temperature as soon as voltage measurement is taken. Here is the vi I did.

 

Any advice for update and correction is appriciated.

 

Best.

0 Kudos
Message 1 of 12
(3,400 Views)

Hi,


Is this VI working?   If not, what are the symptoms.

 

In general terms I would put the measure commands, one right after the other, it looks like that is what the one shot VI does.  So you have all the initialization commands first, then the measurement.

 

What is the purpose of the case, is each measurement in a separate case?  If so, put the case in a while loop, use a shift register for the case switch, pass in the first case, and have the first case pass the case switch for the second case into the shift register.  Have the second case pass a T to the while loop condition ( for stop).

 

Just some thoughts based on your description.

 

 

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 12
(3,390 Views)

Dear Mark,

 

This is a sub vi in my program. First case makes voltage measurement from Ch1, and the second case is for temperature measurement from Ch2 after Ch1 measurement. Yes, I make all initializations first and them measuremnt. Is this correct, because the time between these two measurement should be as less as possible.

 

As for advice about shift register, I couldn't get it. Could you please make an example. Also, Could I explain what I mean ?

 

Best.

0 Kudos
Message 3 of 12
(3,381 Views)

Additionally,

 

I used NY Spy, and I got this result. Please check the screen shot. What kind of reason can cause this time delay error.

 

Best.

0 Kudos
Message 4 of 12
(3,376 Views)

Hi,

 

Here is a sample of a two case state machine using a shift register.  Keep all the opening of files and other one time only stuff out of the while loop.

 

So you can run case one than case two in your code.  I assume the time to initialize channel 2 is acceptable, that will be the delay between the two measurements.

 

I don't know that instrument, my first thought to take both measurements as close as possible would be to do all the initializations, then take one measurement and then the other.  I assumed buy the code that you had to initialize & measure each channel is series, thus using a two case state machine.

 

Can this instrument take both measurements and then send you the results, that would most likely be faster.

 

 

-------
Mark Ramsdale
-------
0 Kudos
Message 5 of 12
(3,373 Views)

Hi,

 

sorry but I am using LVv.10. could you please convert it. As far as I know, this device makes measurements in series. Not parallel. So this cause delay. But 3 sec is too much for me. Your advice can be better, mak all initializations first, but first initializations is for voltage and then second initialications for temperature measurement. So the problem is each initializations need to be done respectively.

0 Kudos
Message 6 of 12
(3,370 Views)

I used NY Spy, and I got this result. Please check the screen shot. What kind of reason can cause this time delay error.


Hi,

 

That delay is inside the the driver VI / Sub VI that is making the VISA read.   You would have to look at what is going on in there. How do you know it is taking 3 seconds?

  I see .031 seconds.

 

 

 

-------
Mark Ramsdale
-------
0 Kudos
Message 7 of 12
(3,369 Views)

Version 10

-------
Mark Ramsdale
-------
0 Kudos
Message 8 of 12
(3,368 Views)

As you can see from the pics. In the first, read data is not writen and the time is .031. In the second pic, as you see there is data read but time is the same. Actually, read data is writen in NI Spy 3 sec later. bu time is the same. I used cronometer to see how much it takes.

0 Kudos
Message 9 of 12
(3,356 Views)

Hi,

 

I noticed the order of the VISA commands in the VI don't match the order in NI Spy, not sure if this matters.

 

It seems that the source of the largest delay that you want to get rid of is in the one shot VI.  Have you looked in this driver VI to see what is going on?  You could run the same commands in MAX and see if there is the same delay.

 

As far as the code goes, that is running two states in a row, I think you are set.  Putting the code you posted into state machine format will solve the need to run these two measurements sequentially.  I think the challenge has moved into how to make the instrument more responsive.  In the NI Spy image you showed LabVIEW only sends the read/write commands, the 3 second delay is not in the code but in the instrument.  I'm guessing Spy timestamps the read as soon as it is sent, but then populates the read results after the instrument responds.

-------
Mark Ramsdale
-------
0 Kudos
Message 10 of 12
(3,347 Views)