01-28-2009 05:30 PM
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
01-28-2009 05:40 PM
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...
01-28-2009 08:09 PM
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.
01-29-2009 08:38 AM
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?
01-29-2009 08:47 AM
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?
01-29-2009 09:54 AM

01-29-2009 10:13 AM - edited 01-29-2009 10:14 AM
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.
01-29-2009 10:27 AM
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

01-29-2009 10:40 AM
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?
01-29-2009 11:00 AM
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