[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testing octave-instrument-control-toolbox

From: Hugo Coolens
Subject: Re: testing octave-instrument-control-toolbox
Date: Wed, 12 Dec 2012 10:12:27 +0100

2012/12/11, Stefan Mahr <address@hidden>:
>> usbtmc_write(fd,"MEAS:VOLT?");
>> resultvolt = char(usbtmc_read(fd,readbytes))
> Usually, you have to start a request (in this case "MEAS:VOLT?") and the
> instrument puts the answer to its return queue. Now the answer can be
> read out with usbtmc_read. That's why your first solution works.
>> warning: range error for conversion to character value
>> resultcurr =
> Within the second example I do not see a request, so the instrument
> output buffer may be empty - therefore
>    resultcurr = char(usbtmc_read(fd,readbytes))
> returns empty [].
> Are you sure your command sequence works as expected? I would expect at
> least a 'write' of a command like "MEAS:VOLT?" before 'read'.
The second example is in fact a copy of a working Python-script for
another Keithley which uses rs232 not usbtmc. It's not necessary to
put in a command  like "MEAS:VOLT?" before 'read' here because the
measurements are started once you give the the OUTP ON command, then
the staircase is formed and after 5 values (trigger count 5) the
results are sent back to the computer. I have the impression that
something is sent back
put the program can't cope with the data format sent back.

>> In fact I just would like to dump everything which is sent
>> back in a binary format which I then could inspect closer to see
>> what's in it an how to get usefull data out of it.
> Please check the manual of the instrument.
I'll have a closer look there too, but most information is for windows
and NI-VISA which I fear will add even more complexity to the problem
>> When I run the
>> script as it is now I get the following response after which I have to
>> reset the Keithley sometimes even resulting in a kernel crash...
> Please try an actual distro/kernel. I test with Ubuntu 12.04 and 12.10.
I have Debian Squeeze installed, I guess it's rather got to do with
the usbtmc kernel module which is not 100% stable, this is certainly
not meant as criticism to the writer of that module because without
that module I just can't do anything under Linux with our new Keithley
and now I can do at least some measurement using Octave.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]