09-30-2011 11:46 AM
Hi LV
i have LV 2010. i have created a VI to control the DC motor through serial port. The VI is working fine. But if i create a executable and run on the same PC communication is not working. please someone advise me.
Ananth
Solved! Go to Solution.
09-30-2011 11:52 AM
Define "not working".
Since you said you're running it on the same PC, then we can assume you have NI-VISA installed.
As for your code:
09-30-2011 12:06 PM
Thank you. The VI is working fine. I could control the DC motor from the VI. To make the executable working what modifications i have to do in my VI. please advise me. i am new to LV.
09-30-2011 01:14 PM
I have no idea what modifications you need to make because you haven't explained what the problem is.
09-30-2011 01:30 PM
Before i create a executable the VI serial communication (COM6) with PIC MCU is okay. but when i run the executable in the same PC the communication with PIC is not working (COM6).
09-30-2011 01:36 PM
the problem is solved. I have closed the LV application (cause LV was using the COM6) and run the executable and the communication is okay.
09-30-2011 01:43 PM
You should have reported the error code/message that you were getting instead of repeatedly just saying the exe did not work.
09-30-2011 02:26 PM
In fact there was no error message. may be my serial visa VI config is not correct.
09-30-2011 03:43 PM - edited 09-30-2011 03:46 PM
No, that's not the reason. The reason, based on your statement that it works once you close the LabVIEW VI, is that you cannot have two separate applications accessing the serial port at the same time. The operating system will not allow this. Your error code handling is not set up properly. The only way you're going to know of an error is to stop the loop. If an error occurs within the loop it will get lost when the loop goes into the next iteration. If you do not want to lose the error then you need to use a shift register instead of tunnels for the error cluster. You will need to decide whether you want to stop the loop if an error occurs during one iteration, or to simply indicate the error on the front panel, and keep going.
05-24-2013 04:10 AM
Good morning,
I've created a vi that calls a subVI that automatically searches for the serial port. Once you have created the exe, the serial port communication doesn't work but if I launch it from my pc where is installed labview works ... I also installed the VISA runtime engine 5.3 (I own the version of labview 2011) ... any ideas ?!? thank you very much!
Please find enclosed the image of the subVI ..