annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

serial visa executable not working

Risolto!
Vai alla soluzione

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

 

 

0 Kudos
Messaggio 1 di 11
5.557Visualizzazioni

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:

 

  • What is the point of the shift register for the Boolean value? Once the loop stops it stops. Sending the value into the next iteration (which doesn't exist) is pointless.
  • What is the point of the case structures driven by an enum which converts a Boolean to a string, which have only one case? 
  • Learn proper coding. You have wires going in all sorts of directions, so it's a challenge just to see the flow. A simple click on the Diagram Cleanup Tool will do wonders for you.
0 Kudos
Messaggio 2 di 11
5.553Visualizzazioni

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.

0 Kudos
Messaggio 3 di 11
5.551Visualizzazioni

I have no idea what modifications you need to make because you haven't explained what the problem is.

0 Kudos
Messaggio 4 di 11
5.542Visualizzazioni

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). 

0 Kudos
Messaggio 5 di 11
5.535Visualizzazioni
Soluzione
Accettato da autore argomento neomus

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.

Messaggio 6 di 11
5.534Visualizzazioni

You should have reported the error code/message that you were getting instead of repeatedly just saying the exe did not work.

0 Kudos
Messaggio 7 di 11
5.529Visualizzazioni

In fact there was no error message. may be my serial visa VI config is not correct.

0 Kudos
Messaggio 8 di 11
5.523Visualizzazioni

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.

0 Kudos
Messaggio 9 di 11
5.510Visualizzazioni

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 ..

0 Kudos
Messaggio 10 di 11
5.390Visualizzazioni