[Top][All Lists]

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

Re: testing octave-instrument-control-toolbox

From: Stefan Mahr
Subject: Re: testing octave-instrument-control-toolbox
Date: Tue, 11 Dec 2012 22:55:21 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0

> 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'.

> 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.

> 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.


reply via email to

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