Hi, I am just a hobbyist, I used to fix radio / TV / Hi-Fi and so on early on in my career, I am now a systems administrator working in IT (20 years now).
A large part of my hobby is dedicated to maintaining / building audio amplifiers and DACS.
I needed to store measurements from my PicoScope, so I wrote some software to call "picoscope.com /a Measurements.CSV?" and store the results to file.
My program will poll the 'scope at intervals selected by the end user and can also poll for a preset period.
It will be open sourced once I have cleaned up the code - it is written in vb.net. (VS 2013) and will be available for download soon.
I am not a software developer - this is in fact my first attempt at a vb.net program, although I have written some really simple apps in vb3 and vb6 previously.
I have attached an image of the main screen (everything is done from here).
Having a problem running the application and when starting capture receive an Unhandled Exception message hopefully you can assist with.
Please see below:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at pico_measure.frmMain.ReadScope()
at pico_measure.frmMain.Button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
How do you have the scope set up? I have only tested it with the 2204A but assuming the 'picoscope.com' utility runs with all models of scope there should be no issue.
As it stands, the setup needs to be quite specific (as detailed on my home page) in that you should have two measurements setup, and that the top one (I think that's the first one you setup) should be frequency, and the bottom one true rms.
I am aware of an issue that I fixed today, and have now released version 1.7, which hopefully irons out the problems I saw.
Once I'm back at my 'proper' PC (tomorrow now) I'll see if I can find out what it causing the problem you're having.
"System.IndexOutOfRangeException: Index was outside the bounds of the array." suggests to me that either no (or incorrect for my app) measurement data was returned.
Please try the updated version 1.7 and let me know if you still experience the same issue?
Also - if you still have problems, please post the output of 'picoscope.com /a Measurements.CSV?' from a dos prompt, or alternately save your session in a .psdata file and email that to me.
As stated in my posts above (and on my site) - my app is targeted very specifically at capturing two measurements only (in the current version). If demand warrants it, I can add additional measurement vectors, or possibly make it more customisable in a future version.
I have also upload two .psdata sample files which will (should!) provide the correct settings to use PicoScope with PicoMeasure. They can be download from my home page.