From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial visa executable not working

Solved!
Go to solution

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
Message 1 of 11
(4,087 Views)

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
Message 2 of 11
(4,083 Views)

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
Message 3 of 11
(4,081 Views)

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

0 Kudos
Message 4 of 11
(4,072 Views)

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
Message 5 of 11
(4,065 Views)
Solution
Accepted by topic author 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.

Message 6 of 11
(4,064 Views)

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

0 Kudos
Message 7 of 11
(4,059 Views)

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

0 Kudos
Message 8 of 11
(4,053 Views)

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
Message 9 of 11
(4,040 Views)

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
Message 10 of 11
(3,920 Views)