cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

LabVIEW hang in Serial communication !!

¡Resuelto!
Ir a solución

hi.

I use pl2303HXA (usb to UART converter) in my design and send data from micro to pc in LabVIEW 2013 x86.

when i tried in CODEVISION terminal, every thing is OK and each micro send to PC, in Hypertermial or CODEVISION terminal is correctly received.

but when I run LabVIEW, it work few second and Communication suddenly abrupt and LabVIEW has hang. u can see that in below image that I capture from my decktop. Why LabVIEW hang ?

Front.JPG

image is front panel of my VI.

whenever it hang, I must restart LabVIEW and test again. in meanwhile I must said that hang is randomly occur.

Thanks.

0 kudos
Mensaje 1 de 28
5.154 Vistas
Where's the block diagram? Can't tell a thing from just the front panel.
0 kudos
Mensaje 2 de 28
5.142 Vistas

What kind of baud rate is that?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 kudos
Mensaje 3 de 28
5.137 Vistas

baudrate is ok. I changed it to 115200 but LabVIEW hang again !!

This is image from my Control panel.

Main.png

Sub VI in above image get a 24 bit 2's Complement hex string and it's output is DBL number which can be positive or negative. Sub VI is shown below :

24bit to numer.png

Sub VI work correct and in my opinion problem is not from that.

my OS is Win7 x86 and LabVIEW is 2013 x86.

VISA is installed full and correct.

I send Data with little delay approximatlly less than 0.5ms. Communication is Right in Other terminals like Hyperterminal but in LabVIEW work few second and suddnly hang and I must restart LabVIEW and Micro to continue.

Data Sendig from Micro is continusly and Idle time isn't exist.

0 kudos
Mensaje 4 de 28
5.124 Vistas

I don't see a Write.

0 kudos
Mensaje 5 de 28
5.117 Vistas

Is your communication really using a Termination Character? You did not deactivate it on the serial configuration VI.

 

Regards, Jens

Kudos are welcome...
0 kudos
Mensaje 6 de 28
5.104 Vistas

The hang isn't "random".  It's telling you that you don't understand how to communicate with the equipment.  I see you are using bytes at port AND using a termination character (on by default in the serial config).  Use one or the other, but not both.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 kudos
Mensaje 7 de 28
5.101 Vistas

First of all I must appreciate your's reply 😉

as you said I deactivate termination character and run my VI again.

it's run correctly longer than previous mode but yet has same problem and hang again !!

it's new image from my VI :

no2.JPG

as you see above, problem which was hang in receive still is !! Emoticono frustrado

0 kudos
Mensaje 8 de 28
5.076 Vistas
Please connect an error out indicator. Also, what is special about 6 bytes? You have absolutely no synchronization so it would seem that the bytes are just random. It would be better to append a termination character with the micro code and enable it on LabVIEW.
0 kudos
Mensaje 9 de 28
5.064 Vistas

How I can connect  an error out indicator to my VI ?

6 is not my hero number Emoticono sacando la lengua   ,  in micro I send 6 byte every time to PC and I set this point in byte as port .

your offer is I append a byte to my Protocol and send 7 byte in every Communication with a termination character like 'A' in end of my Protocol ?

0 kudos
Mensaje 10 de 28
5.057 Vistas