03-30-2015 12:20 PM - edited 03-30-2015 12:32 PM
Hello all
I am tring to dev some data distribution system, where one vi gets data from hw to shared variable. Vi compiled to app "sender.exe" The others units (receivers) should receive that data from shared var and write it to different serial ports (configured by user in runtime via control). Number of actually working ports may vary.
Should (and can?) this "receivers" vi's be the one vi, compiled to app "receiver.exe" and executed many times with different settings (diff serial port number)? // I tried this, second+ execution of receiver.exe just makes existing window active instead of creating new process as it works with other languages.
Or should i build many different vi (receiver1, receiver2, ... with actually the same content) into different .exe to run them at the same time?
Or may be the best way to build multi-port receiver with ability to communicate with any number of serial ports? // i dont like this, no code reusage here ))
The question is complicated with possibility to work via network (one of the reasons to make different exe for receivers) and may be the shared vi namespace may not allow many receiver-side vi's to have the same name?
In short, it should work as SENDER.exe >> RECEIVER1.exe, 2, 3... i.e. "one to many".
Asking for a best solution advice.
Please help)
03-30-2015 12:30 PM
ns_create wrote:Should (and can?) this "receivers" vi's be the one vi, compiled to app "receiver.exe" and executed many times with different settings (diff serial port number)? // I tried this, second+ execution of receiver.exe just makes existing window active instead of creating new process as it works with other languages.
To allow multiple instances of the same exe, read this.
(I don't fully understand your setup, so I won't comment further at this time.)
03-30-2015 12:40 PM
thanks for a hack with .ini parameter ))
but the main question still actual - will it be a good working solution?
03-30-2015 12:41 PM
I don't have the details of what your receiver.exe is doing but if you want to instanciate VI look into the *.vit (VI template) with "Open VI Reference", or launch them as reentrant.... see the help of Open VI Reference Function.
Michel
03-30-2015 12:45 PM
@ns_create wrote:
thanks for a hack with .ini parameter ))
It is not a hack, but a valid and fully documented option. 😉
03-30-2015 01:57 PM
As the ini-hack allows execution of many identical data receivers on host, the question become simply "one vi/exe with access to many serial ports" or many identical vi/exe each for own serial port (via from panel config). Is there any differense on VISA res access? As i see the variant with identical vi/exe "one for each serial port" looks more flexible and simple -- no additional coding for loops management, port open/close...