LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Com1 Modem Read

Hi,
I'm working to build a program to read from mobile phone with com1 connected, the problem is : when I Write in (VISA "COM1" Write string) "AT"  The response should be "OK" on (VISA read string), but the (VISA read string) always give me what I wrote , in this case it gives "AT" again.   can you help me ???
0 Kudos
Message 1 of 24
(4,645 Views)
What kind of cable are you using?  Are there any special settings that need to be set on the phone?  At first guess, a serial loopback cable or the phone having an echo mode turned on could give you the results you see.
0 Kudos
Message 2 of 24
(4,636 Views)
I'm using serial cable between mobile and laptop. It is for mobile coming with it.
0 Kudos
Message 3 of 24
(4,607 Views)
Have you tried using Hyperterminal or some other communication program?  This should help tell you whether it is a hardware/cable setup problem or something in the software.  If it works in Hyperterminal, then you should be able to get things to work right in Labview.
0 Kudos
Message 4 of 24
(4,601 Views)
I think your termination charater may not be correct, as was pointed out in your duplicate thread.  If you still cannot figure out the difference between what you are getting in Hyperterminal vs. LabVIEW, then try this free serial port monitor program.  It will show you all the traffic on your serial port, so you can see how HyperTerminal is sending the data and how LabVIEW is sending it.
0 Kudos
Message 5 of 24
(4,575 Views)
In your response to your duplicate thread posting, Are you aware that when you init the serial port, you have the termination character enabled.  You didn't say if this is how you added your /n to your message.  Your post seems that you just sent "/n"  Did you actually send "AT/n"?  If you are in Hyperterminal, when you type AT, do you have to hit enter first?  If so, you at least have a /n appended to your command.
0 Kudos
Message 6 of 24
(4,550 Views)
AlSheikh,
 
Your string control is set for normal display. In order to correctly send a termination character, you must right click on the control and select '\' Code Display. The shipping example for serial communication has this.
0 Kudos
Message 7 of 24
(4,541 Views)
Thanks all,
 
In hyper terminal, I should write   AT  then  Enter ,  the response is  OK
 
 
Now, In LabView Project :  I changed the string from normal to \ code
 
I wrote    AT\n   in string of  VISA write, but also the read string gave me   AT   , butwithout \n .
 
I put the project below if there is any mistake!!
0 Kudos
Message 8 of 24
(4,522 Views)
Try making it AT\r\n.  Maybe it needs carriage return - line feed.


Message Edited by Ravens Fan on 12-03-2007 04:28 PM
0 Kudos
Message 9 of 24
(4,517 Views)
In the code you posted, your write buffer has a default value of "AT\\n" which is NOT "AT\n" in \ codes display but "AT\n" in normal display.  DId you download the free serial port monitor program I suggested and capture the data on the serial port from Hyperterminal?


Message Edited by Matthew Kelton on 12-03-2007 03:51 PM
0 Kudos
Message 10 of 24
(4,513 Views)