03-04-2019 04:07 AM - edited 03-04-2019 04:26 AM
Hello everyone,
I'm a beginner of LabVIEW, and recently have some problem about "get data from .exe". Now I have an .exe of random number generator, and is it possible to get the number by .vi ? (The attachment is rng.exe). Hope someone can help me, and don't be hesitated to ask more detail.
Thanks a lot
Albert
Solved! Go to Solution.
03-04-2019 04:17 AM
Hi Albert,
I don't think I will start any EXE from a public forum without being able to see it's code…
have some problem about "get data from .exe".
You can use several options:
- save data to a file
- publish data over network communication (UDP, TCP, SharedVariables, NetworkStreams, many more…)
- use a screen scraper with image analysis to get the displayed numbers…
03-04-2019 04:25 AM
@GerdW wrote:
Hi Albert,
I don't think I will start any EXE from a public forum without being able to see it's code…
have some problem about "get data from .exe".
You can use several options:
- save data to a file
- publish data over network communication (UDP, TCP, SharedVariables, NetworkStreams, many more…)
- use a screen scraper with image analysis to get the displayed numbers…
Oh, I like the last one! Create a .jpg as output from the program and then read it with OCR! 😄
/Y
03-04-2019 04:26 AM
Sorry for that, let me update the rng code.
03-04-2019 04:31 AM - edited 03-04-2019 04:32 AM
03-04-2019 04:36 AM
Using invoke node allow me to easily read data from this vi (rng.vi). However, when I convert rng.vi to rng.exe, the invoke node seems to be disable...
03-04-2019 04:50 AM - edited 03-04-2019 04:50 AM
Hi Albert,
when I convert rng.vi to rng.exe, the invoke node seems to be disable...
Yes.
That's a system protection in most modern OS: you don't want one executable being able to manipulate data in another executable! In a modern multitasking OS each executable uses it's own memory scheme! When you want to communicate between executable you should use network functions…
When you just need a RNG you should implement that function in a DLL. Then call that DLL function using the CLFN from your other executable!
03-04-2019 04:56 AM
Thanks for your kind reply and providing me some way to study.