NanoVNA-Saver / nanovna-saver

A tool for reading, displaying and saving data from the NanoVNA
GNU General Public License v3.0
877 stars 271 forks source link

Marker settings #230

Closed PA3CCE closed 4 years ago

PA3CCE commented 4 years ago

Describe the bug Strange behaviour after having fllled the markers tn the main window of NanoVNA-Saver 3.4..

To Reproduce Steps to reproduce the behavior:

  1. Connect your 2-port device , switchon NanoVNA and startup NanoVNA-Saver.

  2. Click on ''Connect to Device" Wait unti;l the sweep has finished. The marker data- AND start/stop area in the main window have been filled with erratic data.

  3. Fill in the sweep range I used 50M to 900M Fill the marker frequency 1 to 6 bars, I used 50M, 100M 200M 300M 500M, 900M

  4. Start the sweep, I had set for 20 Segments in NanoVNMA-Saver.

  5. The sweep starts and fills all marker areas wiith data of MARKER 1

Expected behavior Marker areas have to be filled wit data. of markers being set

zarath commented 4 years ago

Confirmed, but they data isn't set to marker one, it's reset to the lowest frequence in sweep range.

zarath commented 4 years ago

Seems it only occurs in multi segment sweep

PA3CCE commented 4 years ago

OK, I have seen many more strange data !

zarath commented 4 years ago

Why do you have closed this bug? It'a problem, that the position of the marker is invalid, as in segmented scan only the first of the segments is valid. After scan of that segment, it updates already some data, which triggers the markers to update. I have to investigate a clean solution for that.

PA3CCE commented 4 years ago

Sorry, I closed this unintentially.

zarath commented 4 years ago

@PA3CCE can you try my latest development update https://github.com/zarath/nanovna-saver/tree/development

PA3CCE commented 4 years ago

Yes I would like to, can you please send me the executable to my home address jrs@xs4all.nl, I'm not familiar to compiling in Python, sorry I should.. Jos

zarath commented 4 years ago

I'll tell you when I've made new binaries

zarath commented 4 years ago

https://github.com/NanoVNA-Saver/nanovna-saver/releases/tag/v0.3.5

PA3CCE commented 4 years ago

Hi Zarath, I downloaded and installed the new version 3.5, but sorry I can't get it connected Istarts up but when I click "Connect the device" the program aborts, the COM port is shown correctly (COM11). Version 3.4 still connects flawslesly.

zarath commented 4 years ago

Can you look at the debug output? Nanovna-saver.exe -D debug.txt

PA3CCE commented 4 years ago

Commandline window says : NanoVNASaver.Hardware-Warning-Did not regognize NanVNA type from firmware. NsanoVNA-Saver window says : "Unable to parse frequency from input start and stop fields".

PA3CCE commented 4 years ago

This is the complete debug .txt debug.txt

zarath commented 4 years ago

I have uploaded fresh binaries. If this still fails. Please post the debug.txt again.

PA3CCE commented 4 years ago

OK

PA3CCE commented 4 years ago

I downloaded the executable from the same link and executed it. The program loaded with the same error "could not parse Start and Stop frequency". I saw that the start frequency was 50k and the stop freq 50.2k so a span of 200 Hz, Segments was set to 20, since the program on a H4 sets to ro 201 points it calculates correctly a step of (200/20)/201 = 49.75 mHz, imho THIS IS THE PROBLEM. !! I attached the new debug.txt debug.txt

PA3CCE commented 4 years ago

I downloaded the file from the old link (above) did I realy get the updated version ? the warning in the command window is still the same also ! The program still aborts when I fill in more reasonable frequencies.

zarath commented 4 years ago

if it detects -H4 as NanoVNA it is the right one.. Technically it is impossible to run steps below 1 Hz, as Frequencies are transfered as integers. Can you try Span of 100M or so?

PA3CCE commented 4 years ago

A setting for mHz per step is impossaible ofcourse, so this must be prohibited I think. Before dinner I had set for a sweep 50MHz to 2GHz, when I pressed "Sweep"the program aborted. When I came back the program starts up normally, no error messages, when I press "Connect to device" the program aborts after 1 or 2 seconds as before.

PA3CCE commented 4 years ago

The last message was when I started NanoVNA-Saver normally. Now I started NanoVNA-Saver from the command prompt and got the errormessage from NanoVNA-Saver "Unable to parse frequencies" again, no error- or warning messages in the command window..... Then when I set for 50M to 2G sweep the program aborts after pressing sweep.

zarath commented 4 years ago

Is the -H4 really capable of 2GHz?

PA3CCE commented 4 years ago

Yes can go upto 2.7GHz

PA3CCE commented 4 years ago

Much more noise ofcourse, but it accepts.

PA3CCE commented 4 years ago

On the high end you'd better use 10 Hz bandwidth and averaging, taking much time. But can be done. (less accurate ofcouse).

igor-m commented 4 years ago

There is a difference v034 vs. v035 - it seems there is a bug in v035 calculation somewhere. Here is the v034 and v035 with the same settings and connected to an H4 terminated with stock coax and stock 50ohm load (continual sweep). v034 v035

PA3CCE commented 4 years ago

Hi igor-m, How did you manage to run NanoVNA-Saver v 3.5 ? With me it aborts when pressing "Connect to device". My system Windows 10.

PA3CCE commented 4 years ago

Igor-m, I think you are not using NanoVNA-H4.

zarath commented 4 years ago

@PA3CCE i have changed the binaries again. At least the crash should now be recorded in debug log so nanovna-saver.exe -D debug.txt should give more information why ...

igor-m commented 4 years ago

@PA3CCE - indeed, I've been using H4. Now freshly flashed with DiSlord's 0847 fw (works great on the first glance, the latest fw release before the 09xx "SDcard" ones fws). The saver v035 was broken somehow (crashes, broken data), now the new v036-pre seems to work better. Zarath does a great job!

PA3CCE commented 4 years ago

OK Zarath and and igor-m, I will have dinner first and then will download and run the new upload..... igor-m I'm using latest firmware from DiSlord V0.9.3.1.

PA3CCE commented 4 years ago

I downloaded and ran the new uploaded version 3.5. The program still aborts when I press "Connect to device". Attached the new debug.txt. debug.txt

PA3CCE commented 4 years ago

The problem appears to be in statement exec_command(data 0), after reading VNA data 0.

igor-m commented 4 years ago

@PA3CCE - the 09xx fw is for H4 with SDcard mounted, afaik. Also you want the saver "version 0.3.6-pre" or later to get somehow better results, as I wrote above..

PA3CCE commented 4 years ago

@ igor-m......Yes I have installed a SDcard slot and a clock X-tal and it works very well stand-alone on my NanoVNA-H4.....I just found that there is a version 0.9.3.4 firmware by DiSlord,......I missed that....I just downloaded it and will flash it, will see what happens....I think it has minor updates.....On the link Zarath gave me I do not find version 0.3.6-pre of NanoVNA-Saver.

PA3CCE commented 4 years ago

Just flashed the latest firmware 0.9.3.4 by DiSlord and ran NanoVNA-Saver from command prompt, same problem NanoVNA-Saver latest version 3.5 aborts after "Connect to device" . debug.txt

RandMental commented 4 years ago

I ran the latest NanoVNA-Saver last night, also with 0.9.3.4 firmware on the H4, had no problems with the USB  connecting and using Saver.  -------- Original message --------From: PA3CCE notifications@github.com Date: 2020/07/12 00:00 (GMT+02:00) To: NanoVNA-Saver/nanovna-saver nanovna-saver@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [NanoVNA-Saver/nanovna-saver] Marker settings (#230) Just flashed the latest firmware 0.9.3.4 by DiSlord and ran NanoVNA-Saver from command prompt, same problem NanoVNA-Saver latest version 3.5 aborts after "Connect to device" . debug.txt

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/NanoVNA-Saver/nanovna-saver/issues/230#issuecomment-657136602", "url": "https://github.com/NanoVNA-Saver/nanovna-saver/issues/230#issuecomment-657136602", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

zarath commented 4 years ago

@RandMental was it the v0.3.6-pre version from last midnight?

If yes, I've made a binary here, so @PA3CCE can check https://github.com/NanoVNA-Saver/nanovna-saver/releases/tag/v0.3.6

RandMental commented 4 years ago

Hi Holger

Attached is my Debug.txt – I do not have any problems with either 0.3.5 or 0.3.6 Pre to connect and function as required. Could not duplicate the retries seen by PAC

Here is the 0.3.6 debug file – only problem here is that it does not read the Start and End frequencies from the device on start-up, I guess you have hard-code it to 27 and 30MHz

igor-m commented 4 years ago

Marker settings issue with latest 036pre - when I set Markers to certain fixed values (ie M1-30, M2-100, M3-300 MHz) and do sweep (10 segments from START to 500MHz) while changing the START frequency (START always below 30MHz, like 2-15MHz) some Markers (usually Marker1, but others too) change its value off expected range (for example M1-4.2MHz, M3-386MHz). Below a debug.txt from such a session, if that helps. debug_Markers.txt

PS: you may try:

  1. start nanosaver
  2. it gets 27-30MHz and does a sweep (here it does automatically without pressing Sweep)
  3. change STOP to 300MHz (Segments=10 is my default setting, 201points each)
  4. do sweep
  5. set Markers to 30 100 200 MHz
  6. do sweep (result: the markers show "good" freq values)
  7. change START to 2MHz
  8. do sweep
  9. see below the result (the frequencies of the markers are way off).

Markers issue

PA3CCE commented 4 years ago

@Zarath ....I downloaded and installed Nan0VNA-saver V 3.6 pre..... In the mean time I have upgraded to DiSlord's lastest version firmware V 0.9.3.4. ...Sorry, I still have the same problem,....NanoVNA-Saver loads correctly but whe I press "Connect to device" the sweep starts but after a few seconds the program aborts....., I tried in Windows 10 directly and from a command prompt as well (same result). Below the debug.txt file

debug.txt

PA3CCE commented 4 years ago

@Zarath... After reading the debug file I can see that the problom occurs in the first segment of scanning (36 retry's) and processing the data (to many retry's) of a segmented scan.

igor-m commented 4 years ago

The crash with latest 036pre happens here as well sometimes. It seems the success depends on the internal state of the H4. Try to OFF/ON the H4 before you click "Connect to device".

PA3CCE commented 4 years ago

@Zarath....After reading the debug file of RandMental I think the problem is in the sweeprange/segments setting, I used the default setting and 20 sgments... RandMental had set to a different range and 2 segments only.. Nevertheless RandMental had 10 retry's in reading the first data, but could finish the scan.

zarath commented 4 years ago

strange, that it tooks so long to get data from your vna...

After scan command it tooks some time until actual data is delivered... My current retry value was 40 (times 50ms = 2seconds) I've made a 100times retry one (5 seconds)

zarath commented 4 years ago

@PA3CCE heaving retries is normal, I do repetitve reads to get the data as soon as possible. 10 means, that it only took 0.5seconds after the scan started until data was ready.

igor-m commented 4 years ago

FYI - enclosed are some logs where it crashed here (latest 036pre, H4-0847fw, Win10, 10Segments).

debug_ERR1.txt debug_ERR3.txt debug_ERR2.txt

PA3CCE commented 4 years ago

I tryed many times to start normally from windows but program aborted always, even when I had set for a different sweeprange before I pressed "Connect to device". @ Zarath Maybe because I had set to 20 segments Nan0VNA-Saver needed more time ? Just I guess.

PA3CCE commented 4 years ago

I tried many times to set NanoVNA on/off , always crashes".... now I found it crashes when I press "Sweep Settings" as well, not for the other buttons. I can see that Igor-m's scans run much longer, probably there are more criterea for a crash ?

PA3CCE commented 4 years ago

I started NanoVNA-Saver from the command prompt, pressed "Sweep Settings", the command window showed .................................. Traceback ((most recent call last): File "NanoVNASaver\widgets\SweepControl.py", line 92, in File "NanoVNAsAver\NanoVNASaver.py", line 779, in display_window KeyError: ''settings

Attached Debug2.txt debug2.txt

RandMental commented 4 years ago

I have now increased the segments also to 20 and then back to 10.

All works fine on the -H4 0.9.3.4 LSE

It now don’t crash in Calibration anymore, but when I tried to Save the calibration data (10 segments)

regards