LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vi to serial port to hyperterminal

Solved!
Go to solution

Hi guys. I am using 2 RS-232 cables to connect 2 ports together. I use 1 of the ports for hyperterminal. When I run my VI I wish to see what is displayed at the hyperterminal. However, all that I get is gibberish. May I know what is the problem? Please advice. Thank you

0 Kudos
Message 1 of 8
(3,554 Views)
Can you please upload in lv12.
-Did you check the baud rate at both transmitting and receiving ends?
Thanks
uday
0 Kudos
Message 2 of 8
(3,544 Views)

What do you mean by gibberish?  You are transmitting numeric values and reading them as text.  Put an indicator on the string wired to VISA Write "write buffer". Does that display the same thing you get on hyperterminal? Of course if the data ever has the value 10, hyperterminal may interpret it as a line feed character.

 

If you will be transmitting binary data, you should use other methods for determining when to terminate the read.

 

Lynn

0 Kudos
Message 3 of 8
(3,540 Views)

Here's my VI in LV12. 

0 Kudos
Message 4 of 8
(3,517 Views)

If possible I would like the hyperterminal to display numerics for example the throttle. I'm not sure if my connections are right. Please advice. 

 

Thanks

Khairil

0 Kudos
Message 5 of 8
(3,509 Views)
You need to provide screenshot of What do you mean by gibberish data.
Thanks
uday
0 Kudos
Message 6 of 8
(3,491 Views)
Solution
Accepted by topic author makewayforkhairil

Assuming that you connections are correct (may need a null modem cable) you are probably seeing "gibberish" because you are not trasmitting ASCII characters.  Hypertermial will only display ASCII.

 

You will need to convert your numbers to ASCII character string to veiw on a terminal.  For example, if you have a 50 decimal you need to transmit two ASCII bytes (Hex representation) of 0x35 and 0x30 (or in decimal rep. 53 and 48).

 

Also, be carefull of your corresion dot where you take the array and convert it to a string.  Your array is an I32 (4 bytes in size) and your conversion truncates the I32 to a U8 and drops three of the bytes.  This is "ok" for data that is smaller than 256 (unsigned) but your data values are signed and larger.  You'll have data loss.

 

Edit: try this where the data is converted instead...

 

 

Message 7 of 8
(3,481 Views)

Hey thank you all for the help. Appreciate it so much.

 

Thank you

Khairil

0 Kudos
Message 8 of 8
(3,418 Views)