LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Com1 Modem Read

I think you're right Matt.  I didn't notice the //n because the VI I opened of his in one of the numerous duplicate threads did not have the default data saved.
0 Kudos
Message 11 of 24
(1,523 Views)
Hi,
 
Yes I downloaded the free serial port monitor program, on Hyper terminal gave me when I write AT
AT  
A
T
.
OK               "response"
 
,but ion labview gave me when I write AT  
AT
AT          "response" .
 
 
 
 
0 Kudos
Message 12 of 24
(1,509 Views)
Using the serial port monitor program, open a request view and run Hyperterminal, then run your LabVIEW code.  After you have run both, right click in the Request View window and choose export, and save the file as a text file and post it here.  It will show the hex codes being sent by both applications.  I can tell for sure from what you copied and pasted that Hyperterminal is sending an extra character, probably a \n that you did not send when you  sent it via LabVIEW.  The period is a non-ASCII character.  The read data is what you sent, the blue is what you received.  So, in your LabVIEW session, the device is waiting for the termination character.  The example you posted from LabVIEW is definitely not sending the \n that we told you to send.  If you post the file, I can tell you for sure what the "." character represents, but I think it is a \n.
0 Kudos
Message 13 of 24
(1,505 Views)
Hi,
 
I did what you said.
I opened Hyper Terminal and Wrote AT  ..............   as you see in attached text file.
then,
I opened Labview and made it three times:   first one  I sent   AT\n
                                                                       second   I sent   AT    follow by Enter
                                                                        Third I sent       AT     just
every thing clear on the text file below.
 
0 Kudos
Message 14 of 24
(1,495 Views)
There's the answer.  Hyperterminal is sending out a carriage return the 0D charcter (ASCII 13), not line feed which is 0A (ASCII 10).
 
Change your character to \r instead of \n.
 
So AT\r  or 41 54 0D in hex display.


Message Edited by Ravens Fan on 12-04-2007 09:49 AM
0 Kudos
Message 15 of 24
(1,493 Views)
Hi,
 
I tried, and the result is below  
0 Kudos
Message 16 of 24
(1,475 Views)
What value are you using for your "milliseconds to wait"?  You may need to wait longer.  Until you get it working, you should probably set it to a large value (1000), then you can find out how low you can get it once you have everything working.

You may also have to try to send the characters at a slower rate.  I am seeing a response, so I don't think you would, but it can't hurt to try.
0 Kudos
Message 17 of 24
(1,470 Views)
You're also going to have an eventual issue since you have the termination character set to True when you init the COM port.  The response from the SIM in Hyperterminal does have a \n in it.  When you do your VISA read, it will only send back the data up to the \n, which will not include the OK line.  Set that to false, so you know you always get all your data.
0 Kudos
Message 18 of 24
(1,444 Views)

Hi,

I did as you said, and it works Smiley Very Happy , but if I put the program in the Flat Sequence the result is true for the first time run,     any time after that   gives nothing.

If I put the all in While loop also it works just in the first loop and the loops after gives nothing. So I should  stop  then run.   stop then run  and so on.

this is problem  because I want to send series commands one by one (like the configuration of reading SMS from the mobile) I should send command after command (the response should be OK ) Until last command which will give the list of SMS from mobile to read it & delete............ 

How can I do it?? How can I reach to read the SMS on VISA read string? what is process??

Thanks alot.

0 Kudos
Message 19 of 24
(1,435 Views)
Can you post the code which is not working?
0 Kudos
Message 20 of 24
(1,430 Views)