03-28-2017 03:11 AM
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
Solved! Go to Solution.
03-28-2017 08:57 AM - edited 03-28-2017 09:05 AM
There are several issues with your VI:
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...
03-28-2017 09:21 AM - edited 03-28-2017 09:28 AM
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.
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...
03-28-2017 09:49 AM
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
03-28-2017 09:56 AM
@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.
03-29-2017 03:23 AM
Thank you for your help
I changed the code to read the values out sequentially.
It's enough for my purpose.