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

Using TinyG in WPF Project #282

Open
David-Vice opened this issue Jan 5, 2024 · 6 comments
Open

Using TinyG in WPF Project #282

David-Vice opened this issue Jan 5, 2024 · 6 comments

Comments

@David-Vice
Copy link

Hello, I have a big project where the motors are used to move the arms of goniospectrophotometer. And as I understood WPF causes some thread related problems, because TinyG driver, which is in C++ is not thread safe. I put mutexes in the source code of C++ and WPF project and now it works better, but still not ideal. If I put getranges() 10 times in a row, on 3rd or 4th try it will give some corrupted values like 1.323411414 or 2.12312441. Who knows how to fix it, or maybe someone has thread safe version of this driver.

Thank you in advance!

@ril3y
Copy link
Member

ril3y commented Jan 5, 2024 via email

@David-Vice
Copy link
Author

Thank you, but I'm talking about cpp version of TinyG driver, that was sent to me. I created C++/CLI wrapper for it and added mutexes to make it thread safe, but it doesn't work perfect still. Maybe you have an idea how I can fix it.

Repo: https://github.com/David-Vice/Thread-Safe-Wrapper

Thank you in advance!

@siredmar
Copy link

siredmar commented Jan 7, 2024

Just out of curiosity... What DLL are you referring to?

@David-Vice
Copy link
Author

Just out of curiosity... What DLL are you referring to?

The code I gave generates Optel_TinyG.dll and isomove.dll

@ril3y
Copy link
Member

ril3y commented Jan 7, 2024 via email

@siredmar
Copy link

siredmar commented Jan 8, 2024

Not sure who or what Optel is, but i second @ril3y. Unless you are not the author, you should search out for help where you found that source.

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

3 participants