04-27-2009 06:10 AM
Hi Everybody.
I'm in trouble with an application that controls this equipment. I have the measurement routine in a while loop that make one scan of trhee channels every second. In other while loop I have a Yokogawa DC source control routine that increases the output with a diferent base time. At the beginning all looks ok, but after a little time, the pogram halts in the Keithley loop and I have to stops Labview from the Windows process control.
I've tried all, and the only change that improved a bit the problem was changing the time delay in the loop by once making by myself with a routine that is always checking a time counter of 1 second. I will try to attach one example of it.
I'm programming in LV 8.6
Thanks for all in advance
04-27-2009 09:37 AM
04-27-2009 10:51 AM
Your loop is garanteed to hang once every 47 weeks.
I promise I won't rant!!!!
04-27-2009 11:34 AM
Ok Dennis, so the only way I have to make this control is in separate loops. I tried first with te two actions in the same loop, but the program halted when made the measure and stopped the time counter. So I tried with two separate loops, first with two diferent time delays, and after that with the routine attached. With the time delays (wait "ms" function) the program hanged in more frequency than with the attached code, I don´t know why.
For this reason I included the code, because the entry program is quiet large.
Otherwise, It would be possible to make a control of two equipment in the same GPIB bus in separate threads, isn´t it? So I dont't know where is the problem.
Jeff, thanks for your explanation, but I don't understand very well your example code. Do you think that's better to use the delay functions of LV?.
04-27-2009 12:10 PM
Since you did not post any of the GPIB code, I hae no idea what it might be doing. What you did post, suggests that the Keithley routines is not inside any loop at all. The code you did post, is just a simple delay function. Do you run this before, after, or during the GPIB code?
I would suggest you try running the GPIB in a single thread - using the error in/out connections to control execution order to see if the error goes away. You could also try switching to synchronous mode for your VISA Read/Writes.
04-27-2009 12:35 PM
Hi Jeff, here is an example of what I'm trying to do. I include the keithley drivers in LLB too.
Thanks in advance.
04-27-2009 03:32 PM
Pelicar,
I would take a look at the error message out of the 27xx read multiple direct.vi I'm betting that you are not getting measurements but I can't tell why. you do have a 30second timeout.
You are correct that VISA should be controlling access to the GPIB buffer. verify that all of your VISA calls are "asynchronous" (with the clock in the VISA vis) it is possible to mask the real culprit when you mix sync and async calls to the same bus.
Pelicar wrote:Hi Everybody.
I'm in trouble with an application that controls this equipment. I have the measurement routine in a while loop that make one scan of trhee channels every second. In other while loop I have a Yokogawa DC source control routine that increases the output with a diferent base time. At the beginning all looks ok, but after a little time, the pogram halts in the Keithley loop and I have to stops Labview from the Windows process control.
I've tried all, and the only change that improved a bit the problem was changing the time delay in the loop by once making by myself with a routine that is always checking a time counter of 1 second. I will try to attach one example of it.
I'm programming in LV 8.6
Thanks for all in advance
Pelicar wrote:Hi Everybody.
I'm in trouble with an application that controls this equipment. I have the measurement routine in a while loop that make one scan of trhee channels every second. In other while loop I have a Yokogawa DC source control routine that increases the output with a diferent base time. At the beginning all looks ok, but after a little time, the pogram halts in the Keithley loop and I have to stops Labview from the Windows process control.
I've tried all, and the only change that improved a bit the problem was changing the time delay in the loop by once making by myself with a routine that is always checking a time counter of 1 second. I will try to attach one example of it.
I'm programming in LV 8.6
Thanks for all in advance
Garanteed to hang once per 47 weeks(my bad its once per 4,294,967,295/1000/60/60/24 = 49.71days)
What happens when you start a 1 second wait when the MS timer value is between 4,294,966,296 and 4,294,967,295 ? (I'm not ranting I'm not I'm not)
04-28-2009 04:11 AM
Hi Jeff, of course I beleive you.
Just in case, I'll change the routine and check for the asincronous setting of the visa functions.
I will tell you with the findings.