Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] Runtime library alternatives #5

Closed
Elmue opened this issue Dec 19, 2024 · 6 comments
Closed

[Discussion] Runtime library alternatives #5

Elmue opened this issue Dec 19, 2024 · 6 comments

Comments

@Elmue
Copy link

Elmue commented Dec 19, 2024

Your project requires to install 1 Giagabyte of Stuff from NI and IVI and fill the disk with nonsense that nobody ever needs.
There are 7 services running in the background from this installation.

You require this installation from the poor user just to send a few primitive text commands to the oscilloscope.
The only really required installation is the USB driver which has a size of 24 Kilobyte.
All the other stuff is a huge tremendous waste of disk space.

What the one Gigabyte of useless installation does is only to add a header of 12 bytes to each text command and send it to the USB device. The oscilloscope then responds with the same 12 byte header and another text string.
And therefore you force the poor user to install one GIGAbyte of nonsense ??

Please have a look at this project which does the same as your NI + IVI installation:
https://github.com/klasyc/ScpiNet

I extracted the really required stuff from this project and ended up in ONE file of C# code with 420 lines of code.
This one tiny C# class does exactly the same as your 1 Gigabyte installation !!!
Can you believe this ?

The author of ScpiNet says exactly the same in his introduction ReadMe:

"The most of manufacturers provide their own libraries like Tektronix's [TekVISA] or National Instruments' [NI-VISA]. Unfortunately, in my opinion these libraries are too heavy, create unwanted software dependencies, make installation packages larger, usually focus on one manufacturer hardware only and in the end they only provide a "pipe" which is able to transfer the SCPI commands. The goal of this project is to create a simple, lightweight and manufacturer-independent library which can talk to any SCPI device over USB or Ethernet."

He did an excellent work.
His code is not very clean, but it works.

The only required installation is the USB driver, nothing else.
And the USB driver consists of only 3 tiny files:
ausbtmc.inf (2 kB)
ausbtmc.cat (9 kB)
amd64\ausbtmc.sys (24 kB)

You find them on your disk, but Windows has renamed them into OEMXX.inf and OEMXX.cat and copied them into different folders.

@electro-logic
Copy link
Owner

Dear Elmu,

I agree that the thirty-party runtime library is now an overkill for this project, but was the only option readily available when the project was created.

Your research is really appreciated and I invite you to create a PR to improve the project and reduce dependencies on thirty-party runtime libraries.

@electro-logic electro-logic changed the title This project is obsolete now [Discussion] Runtime library alternatives Dec 19, 2024
@Elmue
Copy link
Author

Elmue commented Dec 21, 2024

Hello

I tell you that I already wrote the C# code that communicates directly with the oscilloscope over USB without needing ANY external installation except the tiny driver of 24 Kilobyte.
It does not even need WinUSB because the SCPI protocol is so primitive.
I will publish it on GitHub and my homepage.
This project will also show the channel voltages comfortably with zoom in the GUI and can load CSV files, it has a logic analyzer, can directly import from the memory of my Rigol DS1074Z, and more. It does not need GnuPlot, which is another external dependency, while the .NET framework has already a very powerful graphics support integrated.
I will inform you when it is ready.
It will be much more than your project has ever thought to be.

I found that your oscilloscope uses a very different Waveform command than mine.
Rigol is so fucking inconsistent!
So I would be thankful if you can later adapt the code that it also runs on yours.
I can only test on mine.

@Elmue
Copy link
Author

Elmue commented Dec 26, 2024

Hello Leonardo
I finished the Rigol code. I can load the waveform from the memory of my oscilloscope to my computer over USB without needing ANY additional installation. I'am still adding more features and do the testing.

Rigol is selling chinese crap. Every day I find a new bug in my oscilloscope and must implement another workaround.
And although my code works for my oscilloscope it will not work for yours.
The series DS1000Z and DS1000DE use completely different commands and responses for the :Waveform transfer.

The programmers manual of your scope is extremely poor. It gives nearly no detail.
And I cannot find these details in your code or comments neither to implement your serie.
Without having this oscilloscope for testing it is impossible.

I wanted to write you a personal message on Github, but this feature does not exist.
Can we communicate over email ?
There is also no email on your blog.
So I cannot write you.

Can you write me ?
Your find my email on my homepage at the bottom of each page:
netcult.ch/elmue

@electro-logic
Copy link
Owner

Hi Elmue,
Great job integrating the whole communication stack!
If you could put your project on GitHub, I'd like to give it a try with my DS1102E over the next few weeks.

@Elmue
Copy link
Author

Elmue commented Jan 7, 2025

I wrote you 2 emails.
You never answered.
If you did not get them please check your spam folder.

@electro-logic
Copy link
Owner

We were able to get in touch and a new version based on the tiny "USB Test and Measurement Device (IVI)" driver is now available here https://github.com/electro-logic/Oscilloscope/tree/TinyDriver (credits to @Elmue for the new driver code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants