LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run several Keithley 2000 simultaneous

Solved!
Go to solution

Hi, 

 

I made a VI, which is running 3 Keithley 2000 simultaneous. It works perfect If just one keithley is running. But as soon as i connect two Keithleys, the program freezes from time to time.

I enabled the "Shared clone reentrant execution", but it didn't help.

Has somebody a suggestion to solve this problem?

 

Thanks in advance 

0 Kudos
Message 1 of 6
(4,801 Views)

There are several issues with your VI:

  1. You did not share the subVIs, so we cannot see your whole code. I hope you use a LabVIEW project to accommodate all your VIs and controls? If not, do so! EDIT: sorry, I did not see that these are the driver VIs, I download the driver pack, and have a new look. EDit2: still lots of missing subVIs and controls.
  2. That Case structure usage is just silly. Do you run this VI just once, or you use the "Run Continuously" button? Do not do that if so!
  3. I just do not understand what you do with those property nodes and hidden control references. I suspect serious race condition problems in your code!

I recommend a full rewrite of your code. Could you detail what is the task of this code? You should use a State Machine if you want a flexible application with options to (re)initialize and close hardware interfaces...

0 Kudos
Message 2 of 6
(4,756 Views)
Solution
Accepted by topic author Entgase

This simple example shows how to read DC voltages from 3 Keithley 2000 (the error handling should be checked, etc.). If you need to do lots of data analysis/file logging, I recommend to use a Producer/Consumer design pattern.

 

kkkkkkkk.png

 

Edit..:

"But as soon as i connect two Keithleys, the program freezes from time to time."

This is an expected behavior, if you disconnect a hardware element, LabVIEW cannot communicate with it anymore. If you need a "hot-swap" feature, you need to use proper time-out and error handling in your code. You can capture when a device was disconnected, or if connected to the PC during runtime. But you need to learn about State Machines and shift registers first...

0 Kudos
Message 3 of 6
(4,747 Views)

Hi,

 

you are not reading/acquiring data  simultaneously. If you want to do so, you have to use a trigger input. If I remember, a Kethley 2000 did have a Trigger Link on the rear. Maybe you can use a digital output from an additional card?

 

Regards

Kay

 

Message 4 of 6
(4,740 Views)
Solution
Accepted by topic author Entgase

@kaba2005 wrote:

Hi,

 

you are not reading/acquiring data  simultaneously. If you want to do so, you have to use a trigger input. If I remember, a Kethley 2000 did have a Trigger Link on the rear. Maybe you can use a digital output from an additional card?

 

Regards

Kay

 


Correct, if the OP needs simultaneous reading at the HW level, a trigger should be used.

There are trigger functions in the driver to do so.

But we need to know if the OP really need such sync between readings? If not, I would just read out the three values sequentially, simple.

 

0 Kudos
Message 5 of 6
(4,735 Views)

Thank you for your help

I changed the code to read the values out  sequentially.

It's  enough for my purpose.

 

 

0 Kudos
Message 6 of 6
(4,719 Views)