¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Simple example of interfacing Octave with nanoVNA #octave


 

Using the matlab script from QRP I created a rough Octave script.

The script can send commands to the nanoVNA and read S11 and S21
Nothing special but it works.....

--
NanoVNA Wiki: /g/nanovna-users/wiki/home
NanoVNA Files: /g/nanovna-users/files
Erik, PD0EK


 

Hi Erik , I tried to use the Octave code , but i'snt works.
Wich version of Octave are you using , and wich OS.
May be my version of Octave 5.1.0.0 on win7 is not supporting the serial function.
any suggestion ?
Many thanks
73 de IZ1MDJ
Maurizio F.


 

You need to load the instrumentation library
I am running latest Octave on W10

--
NanoVNA Wiki: /g/nanovna-users/wiki/home
NanoVNA Files: /g/nanovna-users/files
Erik, PD0EK


 

Hi , many thanks I reinstalling the Octave , and I will check the version of the instrument control pakage.
In my previus installation I've the 3.0 version.
My nanovna is using COM14 , there is special instruction to employ a number port more than 9 ?
Maurizio IZ1MDJ


 

On Mon, Dec 16, 2019 at 02:17 PM, <erik@...> wrote:


You need to load the instrumentation library
To clarify how to load the instrumentation library use the Octave command:

"pkg load instrument-control" from the Octave command-line prompt. But don't use the quote marks.

--
Bryan, WA5VAH


 

On Mon, Dec 16, 2019 at 08:57 PM, <bryburns@...> wrote:

,,, To clarify how to load the instrumentation library use the Octave command:

"pkg load instrument-control" from the Octave command-line prompt. But don't use the quote marks.,,,
=================================================================================

You can also let your script load the instrumentation library by entering, pkg load instrument-control, at the beginning of the script. Refer to: .

- Herb


 

On Tue, Dec 17, 2019 at 05:57 AM, <bryburns@...> wrote:


On Mon, Dec 16, 2019 at 02:17 PM, <erik@...> wrote:


You need to load the instrumentation library
To clarify how to load the instrumentation library use the Octave command:

"pkg load instrument-control" from the Octave command-line prompt. But don't
use the quote marks.

--
Bryan, WA5VAH
Hi to all , I've solved the problem . The instrument-control pakage was installed.
The mistake is that I was using the COM14 , that need a different sintax like
hCom = nanoOpen("\\\\.\\COM14")
instead of original sintax
hCom = nanoOpen("COM14:")
To avoid this problem , I cleaned the register to free the not used COM port.
Many thanks for the support
Maurizio IZ1MDJ


 

On Tue, Dec 17, 2019 at 01:29 AM, Maurizio IZ1MDJ wrote:


hCom = nanoOpen("\\\\.\\COM14")
I will add this as comment to the code

--
NanoVNA Wiki: /g/nanovna-users/wiki/home
NanoVNA Files: /g/nanovna-users/files
Erik, PD0EK


 

Looks ok but as I do not use Octave on Linux I suggest you use google to find the documentation for the instrumentation-control package

--
NanoVNA Wiki: /g/nanovna-users/wiki/home
NanoVNA Files: /g/nanovna-users/files
Erik, PD0EK


 

I am trying to run the K1YBE script on octave version 8.4.0 under debian testing. instrument-control version 0.9.3.

The script starts, but after several seconds it quits and throws a message on the console:

npts = -1
error: =: nonconformant arguments (op1 is 1x1, op2 is 0x0)
error: called from
ReadToTermination at line 59 column 26
band at line 97 column 23
NanoVNA at line 158 column 28

How to fix it?