LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to realize a serial port runtime communication tool like hyperterminal

I want to use labview to realize a runtime serial control tool.

Please refer to my following source code.

I donot know why I just can use serial port at the beginning when i build and execute it. but i want the tool can automatic show the receiving serial data when I donot press stop button. I also want to realize paralled read serial date and write data to serial port.

Please help to point out any error, and give me an idea how can i realize a runtime serial control tool like hyperterminal.Thanks a million.

Amanda
0 Kudos
Message 1 of 5
(2,909 Views)

First, it looks like all you did is slightly modify the Basic Serial Write and Read example.

 

Second, if you want something to act continuously, you need to put a while loop around your code.  Configure the port before the loop, close it after, and do the writing and reading inside the loop.  To behave more like hyperterminal, you will probably need to use an event structure to handle keypresses and write data out to the serial port.

 

Before you do something that is sort of ambitious like recreating hyperterminal, I suggest you start smaller and just try to get some communication working with a serial device.

 

Also, start with some LabVIEW tutorials.

LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 2 of 5
(2,901 Views)

You have no loop or stop button so I have no idea what you are talking about. Do NOT use the run continuous button.

 

I would suggest an event structure. A value change event for the string to write with a VISA Write and place a VISA Read in the timeout event. You would be better using a shift register and concantanate string than writing new data all the time. Do not do a read if the number of bytes is 0.

 

You've mangled the shipping example by eliminating the termination characters. Right click and see the '\' Codes Display. Probably better to append on the block diagram antway.

 

0 Kudos
Message 3 of 5
(2,896 Views)
0 Kudos
Message 4 of 5
(2,889 Views)

Yeah, Dennis, Thanks for your good suggestion.

 

Amanda
0 Kudos
Message 5 of 5
(2,888 Views)