I would like to access a DLP NIRscan Nano Evaluation Module by C#. Is there a way to directly realize this (e.g. a .NET-dll or an API)? A C# sample project, which shows how to access the device would help me a lot.
Best regards,
Simon
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I would like to access a DLP NIRscan Nano Evaluation Module by C#. Is there a way to directly realize this (e.g. a .NET-dll or an API)? A C# sample project, which shows how to access the device would help me a lot.
Best regards,
Simon
Hello Simon,
We do not have a C# library to access this device. Are you trying to access the device via a Windows system?
Thanks,
Kyle
Hello Kyle,
Yes, exactly. I would like to create an application which runs on a windows based industrial PC and which enables the system to distinguish different plastics. As I have lots of experience with C#, this would be the easiest way for me.
Regards,
Simon
Hi Simon,
Unfortunately we do not have a C# library to access the NIRNanoEVM, but you can refer to the NIRNanoEVM GUI Source to find out how to interface with windows PC using C++.
Thanks & Regards,
Hirak.
Hi Hirak,
OK, so I will try this way. For evaluation purpose I have installed Microsoft Visual C++ Express 2010.
Having installed the TI GUI software, there are several c, cpp and h files under C:\ti\DLPNIRscanNanoGUI_1.1.9\Sources. There is no solution file, which I would have expected. Could you recommend me which project or file(s) in the example folder I should use as a reference? What I need is a GUI which creates a connection to the NIRNano, starts a measurement and reads the results.
Would be great if you could give me some advice! Thanks in advance.
Best regards,
Simon
Hi Simon,
First of all, kindly download the latest version of NIRScan Nano GUI from this link and go to the sources subfolder. The GUI is created in QT Creator. Kindly download the latest QT Creator on your PC and then open the .pro file contained in the C:\ti\DLPNIRscanNanoGUI_1.1.9\Sources folder with QT Creator. You should now be able to build and make modifications to the GUI source code.
Thanks & Regards,
Hirak.
Hi Hirak,
So I have followed your advice. Now I can open the NIRScan Nano Gui (V2.1.0) project with QT Creator. As my target is not to create a new QT project for my application, but to find a solution with C#, I'd like to integrate the relevant files in a C# project. In an older thread concerning a similar topic ("How to communicate with DLP NIRSCAN Nano via COM Port or HID?", https://e2e.ti.com/support/dlp/f/94/t/538053 ), Pedro Gelabert mentioned the files API.c, API.cpp, hidapi.h, usb.cpp and usb.h, which are important to be able to communicate with the HID-device. Now I am searching a way to integrate this code into my C# project. Of course it will not be sufficient to symply add the files to a C# project. Could you give me a tip to achive this? If you think the approach with C# won't work, can you explain me how to integrate the files in a C++ project? Maybe you have a C++ example project available.
As this is already the second thread concerning the integration of a NIRScan Nano with C# and the two topics had about 1.500 views, maybe TI might think about a .NET-dll for this sensor in the future. I think this would be a great help for many developers.
Thanks & Regards,
Simon
Hi Simon,
Thanks for your valuable suggestion, we'll discuss internally about the course of action to take on this. But unfortunately as of this moment we don't have any C# project to communicate with NIRScan Nano. You have to figure out how to migrate the C++ source files to C#.
Thanks & Regards,
Hirak