03-02-2010 02:01 AM
kelvin tay wrote:hi
I have no idea with what u means that Use VISA termination mode where you receive line after line of a response and look for characteristic patterns in that stream that indicate an end of response. Could u provide me some example?
How can I list out the received sms of the gsm modem?
I can't read the message by now.........
Actually you can read them as you show in your earlier example, just not the All option since you do not use a smart method to read the variable sized messages.
VISA temination method is theEnable Termination Char input at the Configure Serial Port VI. Open it and look for the VISA properties it uses and read the online help for them.
03-02-2010 01:37 PM - edited 03-02-2010 01:40 PM
What Rolfk is trying to explain is that you cannot use HyperTerminal and LabView at the same time. So your previous error that you posted I can tell by experience is because HyperTerminal is currently using it.
My Suggestion: Connect all hardware as needed. Use HyperTerminal to establish a connection and send a very simple AT command at it (preferably one that has a response). Once you are happy HyperTerminal works this means you are now ready to interface LabView with it. BUT if you find there are weird activities or issues with hyperterminal, then you are dealing with a configuration issue.
I've attached a very simple diagram of serial communications. Where the pink box is is where you will type in your AT command. Again as Rolfk indicated you will probably have to wire a carriage return (constant) from your string menu.
**Can't figure out how to delete this post, and I'm sorry I didn't see pages 2 and 3***
Good Luck!
Chazzzmd
03-02-2010 01:44 PM
Chazzmd,
That VI is completely wrong. You should not wire the output of the VISA Write to the input of VISA Read. There is absolutley no correctly between the number of bytes you have written with the number of bytes you should read.
03-02-2010 09:30 PM
hi
how could i determine the byte that i want to read?
could u provide me some example, please?
thank you
best regard
kelvin
03-02-2010 09:53 PM
03-02-2010 10:00 PM
yes, i get it..... actually i can read out the message by using the example at page 2, while i want to compare the 'words' in the sms,
but i found that it will read out also the time and date of receive sms, so how can i only read out the 'words' without date and time?
is it set the number of bytes for read VISA?
03-02-2010 10:06 PM
03-03-2010 01:31 AM
Dennis Knutson wrote:
You use the VISA Bytes at Serial Port - just like the example program you are using. The problem with the example is the fixed delay. You really don't need any delay if you first put it in a loop that exits when the byte count is greater than zero and then go to another loop with it in and exit when the available bytes are equal to zero.
Actually modem communication follows a certain pattern. I would not recommend to use Bytes at Serial Port at all. Instead I would use the Termination Mode and read line by line. All responses should be terminated with an OK, CONNECT, RING, .. etc line.
So it is easy to read the lines after each command until you see such a line and then terminate on that. Don't make it more complicated than it is. The VISA Termination mode can actually do most of the work for receiving messages from devices that use a specific line termination character, so you don't have to worry about how many bytes to read, but simply can provide a large enough value that you will for sure read always an entire line.
03-03-2010 06:57 AM
You're absolutely right, I shouldn't post if I'm in a hurry.
Best Regards
03-07-2010 08:15 PM
Hi
Thank you very much, finally i have success to read the receive message and compare with preset characters......
However, i still got a small problem.... My received sms is used to trigger ON my DAQ 6009 to turn on(output at digital port=5V), while turn off for next trigger(output at digital port=0V).... I need to turn ON more than one port, but i found that i can only turn ON each port and has to turn it OFF before turn ON another port......
for keep the port ON, the signal of the arrow must be always true, Could I change it to turn ON always for only one pulse trigger(True) and turn OFF for next trigger(True)?
Look forward your reply eagerly.....
Thanks
Best regard
kelvin