LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why it does not work as Hyperterminal?

I use Hyperterminal & setup:

 

COM3, Baudrate = 115200, 8 bit, 1 Stop Bit, Parity = None, Flow = None 

 

When I type the "*debug" & hit 'Enter' key in the Hyperterminal, it received & showed a lot of Ascii text continously on the dialog (then I close the Hyperterminal)

 

But when I tried to the same with my vi (please see the attachment), when run the InQ & the Read String dialog box show nothing return!

 

- I did use the NI Measurement & Automation Explorer to config the COM3 with 115200 successfully (just make sure NI driver can see it)

 

- Even I change "*debug" or "*debug\r" or "*debug\n" or "*debug\r\n" it still does not work!

 

Can anyone know why?

 

Thank for any help

 

0 Kudos
Message 1 of 16
(4,581 Views)

Are you getting any errors?

Is the VI showing the correct number of bytes being written to the port?

Did you close Hyperterminal before opening LV?

What are you talking to?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 16
(4,580 Views)

Did you set the baud rate and parity within the subVI?  As it is now, your front panel defaults are 9600, 8 none 1 on com1, rather than 115,200 8 none 1, on com3.  Even if you change the baud rate within MAX, that just changes the default baud rate.  Since the serial port is being configured in this VI, it will override whatever you set for the serial port in MAX.

Message 3 of 16
(4,563 Views)

1. I forgot to mention that I try to communicate with an independent device that receive Serial Ascii commands & return data (it works very well with Hyperterminal)

 

2. I monitor error & recieve no error, but it show code: 1073676294 in Source: VISA Read in Serial_XYZ.vi (I assumed that there is no byte in InQ)

 

3. I did close Hypertinal before running VI

 

4. The OutQ show corrected bytes

 

May you see some thing?

0 Kudos
Message 4 of 16
(4,534 Views)

Hi Ravens,

 

I forgot mention clearly that I did do everything as you suggested (change all parameters before running VI: COM3, 115200, 8 bits ...), but it does not work!

 

Might be some thing else?

0 Kudos
Message 5 of 16
(4,534 Views)
When you are working with hyperterm and hit the enter key, you also send the code for the enter key. This is not true for Labview. In Labview you have to add the \n char in some way. Take a look at this trhead for info on how to do it automatic http://forums.ni.com/ni/board/message?board.id=170&message.id=381478#M381478 


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 16
(4,523 Views)

plit string wrote:

Hi Ravens,

 

I forgot mention clearly that I did do everything as you suggested (change all parameters before running VI: COM3, 115200, 8 bits ...), but it does not work!

 

Might be some thing else?


 

Okay, I just wanted to check.  I usually set the parameters I will use as the defaults, that way if I close and reopen the VI, the correct parameters are default so I don't forget and don't have to worry about changing them again.

 

 


plit string wrote:

1. I forgot to mention that I try to communicate with an independent device that receive Serial Ascii commands & return data (it works very well with Hyperterminal)

 

2. I monitor error & recieve no error, but it show code: 1073676294 in Source: VISA Read in Serial_XYZ.vi (I assumed that there is no byte in InQ)

 

3. I did close Hyperterminal before running VI

 

4. The OutQ show corrected bytes

 

May you see something?


That code is a warning just to say that you got exactly what you asked for, and more bytes might be available. 

 

Where is Serial_XYZ and InQ and OutQ your refer to?  They aren't in the VI you originally posted which is just basically the example Basic Serial Read/Write.

Message Edited by Ravens Fan on 01-29-2009 11:14 AM
0 Kudos
Message 7 of 16
(4,512 Views)

Remember that if you are going to use '\' codes your text control must be in the right mode. Right click  on the control and select '\' code display. If not you will only send \n as two normal ascii char. \n is most often the correct term char



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 8 of 16
(4,505 Views)

Looking at the VI he posted, the string control is set for '\' Codes Display. The name of the VI posted is completely different than 'Serial_XYZ.vi ' so maybe the VI posted and the one bieng used is completely different?

 

 

0 Kudos
Message 9 of 16
(4,500 Views)

Sorry, I did not send a corrected file (with detail setting), here it is!

 

Note: To be sure that I send the right ascii code, I display the sending string in Hexadecimal

0 Kudos
Message 10 of 16
(4,493 Views)