LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW hang in Serial communication !!

Solved!
Go to solution
Highlighted

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
Message 1 of 28
(1,452 Views)
Highlighted
Where's the block diagram? Can't tell a thing from just the front panel.
0 Kudos
Message 2 of 28
(1,441 Views)
Highlighted

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
Message 3 of 28
(1,436 Views)
Highlighted

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
Message 4 of 28
(1,422 Views)
Highlighted

I don't see a Write.

0 Kudos
Message 5 of 28
(1,415 Views)
Highlighted

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
Message 6 of 28
(1,403 Views)
Highlighted

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
Message 7 of 28
(1,399 Views)
Highlighted

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 !! Smiley Frustrated

0 Kudos
Message 8 of 28
(1,375 Views)
Highlighted
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
Message 9 of 28
(1,363 Views)
Highlighted

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

6 is not my hero number Smiley Tongue   ,  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
Message 10 of 28
(1,356 Views)