Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing
Post Reply
hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Barnett wrote:Hey Aaron,
It is not making the graph and gives the following error message.
PLplot error generating Bode plot: Unable to either (1) open/find or (2) allocate memory for the font file.
Any idea on how to fix it?
Thanks / Charles
Hmmm. When I tried to debug this on my Win10 Pro machine, I see the same results. I guess some windows update broke something. I'll start to look into it. Thanks for reporting it.

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Barnett wrote:Hey Aaron,
It is not making the graph and gives the following error message.
PLplot error generating Bode plot: Unable to either (1) open/find or (2) allocate memory for the font file.
Any idea on how to fix it?
Thanks / Charles
This is an error message from the plotting library telling you that a font file wasn't found where it was expected to be. In my debug build on my machine they had been removed - though I'm not sure why. My antivirus logs don't show any removal.

In your case, could you please check something for me. You should have three files in your application installation folder (C:\Program Files (x86)\FRA4PicoScope) named: cmap0_default.pal, cmap1_default.pal, and plxtnd5.fnt. Are those files still present?

Barnett
Newbie
Posts: 0
Joined: Mon Nov 07, 2016 5:20 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Barnett »

Hello Aaron, All 3 of these files are there. Thanks, Charles

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Barnett wrote:Hello Aaron, All 3 of these files are there. Thanks, Charles
Charles,

Thank you for checking. The only other thing that comes to mind would be anti-virus SW interfering. If you're comfortable doing so could you temporarily disable your anti-virus software and try again? Or if your AV software supports the ability to mark files as safe, you could try that too. If you can try that out, I'd advise marking all the whole folder "C:\Program Files (x86)\FRA4PicoScope" safe.

Thanks,

Aaron

mnni
Newbie
Posts: 1
Joined: Mon Oct 09, 2017 7:33 am

Re: Frequency Response Analyzer with Bode Plots

Post by mnni »

Hey Aaron

I just tested the libs you provided and they works no problem - anyhow I did find my way, spending quite a few tries making the libs my self before I got it working :) but they take op more space than the once you provided
Thanks

Barnett
Newbie
Posts: 0
Joined: Mon Nov 07, 2016 5:20 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Barnett »

Hello Aaron, thanks for your help. I turned off the security settings, marked the FRA directory as safe exclusion. Uninstalled FRA, SDK and reinstalled. Still getting same error.

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Barnett wrote:Hello Aaron, thanks for your help. I turned off the security settings, marked the FRA directory as safe exclusion. Uninstalled FRA, SDK and reinstalled. Still getting same error.
Charles,

Can you tell me what build number of Windows 10 you are using?

Thank you,

Aaron

Barnett
Newbie
Posts: 0
Joined: Mon Nov 07, 2016 5:20 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Barnett »

Hello Aaron,
2017 Windows 10 Pro / Version 1709 (OS Build 16299.192)
It started working last night. The only thing I may have done wrong is I made a shortcut from an older install. During the uninstall it left the old icon on the desktop. Then I installed the next version. When I used the old icon to start it I would get the plot error. If starting it from the FRA folder it would work.

Barnett
Newbie
Posts: 0
Joined: Mon Nov 07, 2016 5:20 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Barnett »

Hello Aaron,
Decided to put computer back like it was 4 days back using restore. The original problem came back to where if I opened FRA using the desktop icon it would not make the plot and give the error: PLplot error generating Bode plot: Unable to either (1) open/find or (2) allocate memory for the font file. If I opened FRA using Windows Start or the .exe in the FRA folder it would work just fine. I will leave the computer like this for a few days if you need any info. Maybe in an upgrade you could make it put an icon on the desktop and also to remove it during an uninstall. I have also found that if I uninstall and then reinstall it remembers the last settings. Thanks / Charles

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Barnett wrote:Hello Aaron,
Decided to put computer back like it was 4 days back using restore. The original problem came back to where if I opened FRA using the desktop icon it would not make the plot and give the error: PLplot error generating Bode plot: Unable to either (1) open/find or (2) allocate memory for the font file. If I opened FRA using Windows Start or the .exe in the FRA folder it would work just fine. I will leave the computer like this for a few days if you need any info. Maybe in an upgrade you could make it put an icon on the desktop and also to remove it during an uninstall. I have also found that if I uninstall and then reinstall it remembers the last settings. Thanks / Charles
Thanks for your help, Charles. I had a similarly strange thing happen on my PC. Earlier I mentioned that I got the same error you did in my VS Debug environment, then "fixed" it by putting the font and color maps in the same directory as the debug executable. Since then I did some more debugging and realized that my font and color map files had not been deleted - they were never there in the first place. Later when I removed them the problem was still fixed. So I'm thinking I must have experienced the same Windows anomaly you did. Maybe a Microsoft patch broke something about the way the FRA app accesses these files. I'm still at a loss as to what broke it. And though I'm very curious, I don't really want to to restore my PC to go find out :) No need to keep your computer reverted.

PLplot looks for the files in many places, but the following are the ones in order relevant to the FRA app:

1) From the environment variable PLPLOT_LIB, which I set to be the same directory as the executable: This is the normal way the Released app finds the files.
2) From the current working directory, which in a debug session with VS is the main source code directory. Since the font and color map files are in the main source directory it finds them there.

I could see the launching method affecting #2, but #1 should still work. I don't think launch method would affect the results of GetModuleFileName which is what I use to set the PLPLOT_LIB variable.

Barnett
Newbie
Posts: 0
Joined: Mon Nov 07, 2016 5:20 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Barnett »

Hello Aaron, Thanks for helping me get the FRA going. Would you say this program is a VNA (vector network analyzer) due the the real and imaginary numbers it uses in the Goertzel math? Thanks / Charles

Barnett
Newbie
Posts: 0
Joined: Mon Nov 07, 2016 5:20 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Barnett »

Hello Aaron, ran a bunch of Bode plots on a guitar amp over the weekend. FRA ran really well. Thanks / Charles

Miq
Newbie
Posts: 0
Joined: Fri Sep 28, 2018 2:03 am

Re: Frequency Response Analyzer with Bode Plots

Post by Miq »

Hi Hexamer,

I have a 4262 and as others have mentioned it freezes when it tries to execute the first measurement point.

Status: 4262 S/N: XX034/017 successfully initialized.
Status: Starting frequency step 1 (2000.000 Hz)
Status: Starting frequency step 1, range try 1
Status: Setting signal generator frequency to 2000.000 Hz
Status: Setting input channel range to ± 1 V
Status: Setting output channel range to ± 10 mV
Status: Capturing 1026 samples (16 cycles) at 1.28e+05 Hz takes 0.0 sec.
Status: Transferring and processing 1026 samples

Im running Windows 10 64bit. I installed the 32 bit SDK and Pico 6. When it freezes I have to end the FRA task in the task mgr to reset it.


Can you please help me get your useful tool working on my 4262 and Windows 10 machine?


Regards,


Miq

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Hello Miq,

Thank you for your interest in the FRA application. I assume this is one of the posts to which you're referring:

topic14311-210.html#p102661

I had made a stripped down test application to confirm whether the problem was with the call to GetPeakValues, but I don't think anyone ever attempted to confirm it could reproduce the problem.

Since then, I added an API tracing feature to the application (though not in any released version yet). With that version I should be able to use the output from a failed attempt on PS4262 to construct a test application. Would you mind trying that version out?

I really would love to get this working for the 4262!

Thank you,

Aaron.

Miq
Newbie
Posts: 0
Joined: Fri Sep 28, 2018 2:03 am

Re: Frequency Response Analyzer with Bode Plots

Post by Miq »

Hi Aaron,

I would like to help you get this running on the 4262 in any way I can. Should I try to install the test build you linked to in the original 4262 post or can you point me to the newer non-released version that can record the call issue?

Thank you for continuing to work on this,

Mike

Post Reply