Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout in ke2000 Data Read Single.vi in Keithley 2000 Multimeter

Hallo,

can someone enlighten me?

I have this timeout almost everytime when I run my vi. There will then be no current read by the vi. Below is my error message:

"Error - 1073807339 occurred at VISA Wait on Event in Wait for RQS.vi ->_ke2000 Wait for SRQ.vi ->ke2000 Data Read Single.vi ->my_software.vi

Possible reason(s):
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed."

These are what I have used:
initialize.vi
Configure DC_current.vi
Configure Trigger.vi
Action send Trigger.vi
Data Read Single.vi
close.vi

What must I do or should not do to get rid of this timeout?
0 Kudos
Message 1 of 12
(9,232 Views)
Hello,

can you attach your example?

I'm thinking that problem is in trigger event. Please download IviDmm scpecification from Ivi Foundation ( http://www.ivifoundation.org/Downloads/Class%20Specifications/IVI-4.2_DMM_v3.0.pdf )
and see Figure 4-1 IviDmm Behavior Model.

You should initiate measurement and from this event instrument waits for trigger event. In this case you should call Read data.vi and when this function is executed you should call Send Trigger.vi. Read VI call Initiate.vi and immediately Fetch.vi

If you are using software trigger please try use following sequence:
1) ke2000 Initialize.vi
2) Configure your measurement
3) Configure Trigger to Software Trigger
4) ke2000 Initiate.vi
5) ke2000 Send Software Trigger.vi
6) ke
2000 Fetch.vi

The second way is following:
In your sequence change trigger source from software to Immediate and remove "Action send Trigger.vi". Instrumen should not wait for trigger event, and it should measure value immediately.

Best Regards,
Zdenek
0 Kudos
Message 2 of 12
(9,233 Views)
Hello,

as I have no Ke2k DMM, but NIs 4070, so here are just a few guesses:
* A timeout suggests there is (yet) no data availabel.
* You stated: '..almost everytime I run my VI..'. This implies that sometimes there is data availabel.
* Why not just waiting some time between sending the trigger and reading the value?

BTW, how is this device connected to your machine? Do a estimation on how long it might take to get the trigger to the device, to have it taking its measurements and to transfer those data to LabVIEW.
You might as well just insert a Wait_ms and empirically try to get the proper delay between trigger and read. I'd start with one or more seconds.
Remember, having the device taking its measurements does not mean this data is availabel in LabVIEW!


You may also have a look at the example code provided by Keithley or NI.

HTH and
Greetings from Germany!
0 Kudos
Message 3 of 12
(9,233 Views)
I have attached the vi.

Regarding your first solution, I couldn't find the vi that you mention: initiate, fetch etc. and the Trigger doesn't has software option. But it did has the option of immediate.

Thus I used the second way that you recommended. I remove the Action send Trigger and edit the trigger source to Immediate. However the problem still persists.
0 Kudos
Message 4 of 12
(9,233 Views)
You are right! The multimeter driver works at times and saves the value into an excel file. But I have already implemented the Wait_ms method (=500).

But is it possible that the measurement takes different amount of time? Coz the measurement can take a very short time when there is no timeout error.
0 Kudos
Message 5 of 12
(9,233 Views)
As I said, it depends on the connection.
A simple example: A serial connection with 9.6 kbaud takes about 1 ms to transmit a single byte. Check both the sendtrigger command and the getMeasurement and count for yourself...
Using USB this might be delayed by several 100 ms depending on the transfer mode the driver has chosen. (USB is a packet based protocol. When you are sending just a few bytes a packet is delayed for a maximum period, hoping it would be filled with other data. This depends on the implementation of the USB driver.
0 Kudos
Message 6 of 12
(9,233 Views)
Hello,

My first reply was for IVI driver and you are using LabVIEW VXIpnp driver. I'm thiinking that you should initiate trigger subsystem before you read any measurement. See my example. It's sequence from your code, but I added initiate trigger subsytem.

Instrument starts measurement when trigger event has been occured. But if you don't initialize trigger subsystem all triggers are ignored.

I did not test, but I hope that it'll work.

Zdenek
0 Kudos
Message 7 of 12
(9,233 Views)
I think your LabVIEW ver is 7.1, thus I couldn't open your example with my LabVIEW ver 7 software.

Thus could you explain how you manage to initiate the trigger subsystem? Is it by using ke2000 Action Init Trigger.vi? I have tried using this but it still doesn't work.

Last time, when I used ke2000 to measure voltage, there is no problem with timeout operation at all. Is there any special configuration that I need to do with current measurement?
0 Kudos
Message 8 of 12
(9,233 Views)
I'm using GPIB-USB-B connection.
But I still don't quite understand what you are explaining.
The error has mentioned that it was waiting for event till timeout occurs. If it was due to the delay, why is it that there is successful measurement at times?
0 Kudos
Message 9 of 12
(9,233 Views)
Yes, I used this ke2000 Action Init Trigger.vi before read function. This should be correct sequence. I don't have this instrument so I cannot reproduce your troubles. My last suggestion is. Try use IVI driver instead of LabVIEW VXIpnp driver. IVI driver you can find on idnet http://www.ni.com/idnet

Zdenek
0 Kudos
Message 10 of 12
(9,234 Views)