LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SERIAL RECEPTION PROBLEM

Solved!
Go to solution

hi... everybody..am using LABView 2009

 

i have made a VI .., in that i have to receive the data through serialy and i have to reply back depending on data which i have received...

here first am transmitting the data continously from (DOCK LIGHT- like a hyper terminal) ... and Am able to receive the data and also reply back through my VI....

 

but if am transmitting  the data only one time from the DOCK LIGHT am not getting data.......

 

Please verify my code and reply me back as soon as possible,,,.below i have attached my PROJECT.VI...,and SUBVI.

also screenshot of DOCKLIGHT

 

 

Regards...,

manoj

Download All
0 Kudos
Message 1 of 3
(2,149 Views)
Solution
Accepted by topic author Manoj90

How do you run this VI?  Are you using the Run Continuously button?

 

Run Continuously is not intended to be used that way.  It is only for testing little VIs which will later be used as subVIs and need to be called repeatedly.

 

Second, Your serialcomm_subvi initializes and closes the serial port every time it is called.  You probably lose data while initializing or closing the port.

 

Fixes?  Wrap your code inside a while loop.  Add a Stop button on your front panel to stop the loop when you are done.  Split your serialcomm_subvi into three separate subVIs. The first is just the VISA Configure Serial Port.vi.  Put it outside the while loop and wire the VISA resource name out to the loop. The second part has the write, delay, and read functions. This goes inside the loop in place of your serialcomm_subvi.  Wire the VISA resource name from the configure VI to the input of this subVI rather than using local variables. After the loop put the VISA Close.

 

There may be other issues, but this will get you started in the right direction.

 

Lynn

Message 2 of 3
(2,111 Views)

Dear Lynn,

 

Thanks a lot for your valuable suggestions. Your instructions has taken me in the right direction and I was able to get the solution.

Once again Thanks. 🙂

 

Regards,

Manoj

0 Kudos
Message 3 of 3
(2,079 Views)