roberttidey / FNISR1013DScope

Tool for translating waveform files from tablet scope
14 stars 9 forks source link

wrong formula for data values #1

Open wavoigt opened 3 years ago

wavoigt commented 3 years ago

Hi Robert, thank you for doing a great job. I found an issue on calculating the data values in scopedump.vbs: blockVal = DataBlock(Index + 1) + 256 * DataBlock(Index + 0) must be blockVal = DataBlock(Index + 1) * 256 + DataBlock(Index + 0) regards, Walter

roberttidey commented 3 years ago

Thanks for pointing out an error in the vbscript version I had only really used that for help in developing the python to json version.

The problem was actually really rooted in the block arrays used to hold the values starting from 1 not 0.

I have corrected that and the calculation of the values.

wavoigt commented 3 years ago

Hi Robert, i made a 1013D .wav viewer in Excel: https://github.com/wavoigt/FNIRSI-1013D-WAV-Viewer-in-Excel-VBA regards, Walter

roberttidey commented 3 years ago

That's very good. Useful for further calculations, print outs etc.

I have added a link in my README. I hope that's OK.

Gabryxx commented 1 week ago

And i am working on a PC version in vb.net because Vmaz and Vmin is only for whole data and not for a range of data that i need...i give a screenshot in progress: image

But I have problems importing the measures (Vmax, Vmin etc.) as you can see from the image. I used your Function getMeasure(ch,Index) in Scopedumps.vbs and it returns those 3 numbers for each measure, but then how can I get the value that corresponds to Vmax, Vmin etc? If you are interested I discovered that the value contained in Bytes(12) is an on/off flag of channel 2. I used it to show or hide the data of channel 2, I don't know what the value of channel 1 is, you should make 2 identical files with channel 1 on and one with the channel off and compare the 2 files. The display dedicated to the waveforms is 800x480 so it is slightly larger than that of the oscilloscope, which in the same resolution also includes all the buttons and measures. But anyway I'm developing this program to go with the mouse to see the value at that point of the waveform, or from a selected range. To display the waveform I'm using the data buffer and not the screen buffer, so that I can scroll the waveform left and right (I still have to put the 2 buttons), while clicking right or left on the image changes the value of the time scale as it also happens on the oscilloscope. I await your response that solves the problem of the measurements Thanks and Bye

Igor-kor commented 1 week ago

getMeasure(ch,Index)

I found that the data format there INT32 - Mid-Big Endian (BADC) is used for encoding most likely this function needs to be redone. You can see this description in FileFormat.txt. I also made my own web application for this, you can check the correctness of the data conversions, because there are still some shortcomings.

Gabryxx commented 1 week ago

Thanks for the reply The viewer on the web page you pointed out and the related program on Github that I am now going to examine are very nice. However, to find the minimum and maximum I can do it already when I read the data that are then displayed on the display and not on the entire buffer as the oscilloscope does, in this way I can only consider a certain area. Then I found this site that has a list of parameters but is based on a modified firmware (which I would like to avoid): https://github.com/pecostm32/FNIRSI_1013D_Firmware/blob/main/waveform_file_format.txt and here the bytes of the various offsets are different from those of the original firmware.

Examining my waveform with the web program I see that it signals 863 MHz while they are 863 Hertz (measured both on the oscilloscope with the vertical bars and with an ESP32 + ADS1115). Nice the possibility to move the mouse cursor over the various points of the wave, too bad that the time and raw values are displayed and not the volts at that point. Thanks again and bye

Il giorno sab 26 ott 2024 alle ore 15:59 Igor Sharangiya < @.***> ha scritto:

getMeasure(ch,Index)

I found that the data format there INT32 - Mid-Big Endian (BADC) is used for encoding most likely this function needs to be redone. You can see this description in FileFormat.txt https://github.com/roberttidey/FNISR1013DScope/blob/master/FileFormat.txt. I also made my own web application https://igor-kor.github.io/Fnirsi-Wav-Viewer/ for this, you can check the correctness of the data conversions, because there are still some shortcomings.

— Reply to this email directly, view it on GitHub https://github.com/roberttidey/FNISR1013DScope/issues/1#issuecomment-2439592748, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIUBAWRYY6CSUVFHRSP2RVLZ5ON43AVCNFSM6AAAAABQUV2G2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGU4TENZUHA . You are receiving this because you commented.Message ID: @.***>

Gabryxx commented 2 days ago

i post on https://github.com/Igor-kor/Fnirsi-Wav-Viewer/issues/1 You know caculation for get CYCLE and TIME+ - ?

Il giorno sab 26 ott 2024 alle ore 15:59 Igor Sharangiya < @.***> ha scritto:

getMeasure(ch,Index)

I found that the data format there INT32 - Mid-Big Endian (BADC) is used for encoding most likely this function needs to be redone. You can see this description in FileFormat.txt https://github.com/roberttidey/FNISR1013DScope/blob/master/FileFormat.txt. I also made my own web application https://igor-kor.github.io/Fnirsi-Wav-Viewer/ for this, you can check the correctness of the data conversions, because there are still some shortcomings.

— Reply to this email directly, view it on GitHub https://github.com/roberttidey/FNISR1013DScope/issues/1#issuecomment-2439592748, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIUBAWRYY6CSUVFHRSP2RVLZ5ON43AVCNFSM6AAAAABQUV2G2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGU4TENZUHA . You are receiving this because you commented.Message ID: @.***>