Am 25.10.2011 19:22, schrieb spintronic:
On Oct 25, 6:29 pm, Nick Dokos<nicholas.do...@hp.com> wrote:
Shot in the dark: could it be that you have to add delays to give the
instrument time to adjust? When you do it from the python shell, line by
line, there is a long delay between one line and the next.
Thanks! You are right but it was the first thing I thought about. So I
have tried to delay using sleep(t) from the time module (I also sent
"*OPC?" or "*WAI" commands to a device for synchronization). However,
it does not help ...
RST is resetting all data and CALC is somehow calculating and returning
data. Without a trigger between RST and CALC, I would not expect any
data...
Maybe the equipment is triggering continuously e.g. every second.
When you were using the shell, you had a good chance to see a trigger
between RST and CALC. With a script, it's not so likely.
OPC won't help, as it would wait for completion of a measurement, but if
you don't trigger, it won't wait.
What kind of instrument are you using? Check for the trigger command.
It may be something like INIT:IMM
Regards,
Dietmar
--
http://mail.python.org/mailman/listinfo/python-list