05-07-2012 08:26 AM
The modem may need some serious time in order to process at+cmfg=1. When you immediately send another command after that the modem may not be ready yet to process that and even get into some internal error that does stop it from responding to any other commands. Going to Hyperterminal to issue that command and switching back to LabVIEW afterwards gives the modem plenty of time. When you do everything in LabVIEW without some delay in between, the next command follows within milliseconds to the previous one, and that may be to fast for your modem.
05-07-2012 08:32 AM
05-07-2012 09:02 AM - edited 05-07-2012 09:08 AM
What time? The Wait until next multiple ms in there? You think that has any influence on the delay between the two VISA Writes in that case structure? Then think again! LabVIEW is dataflow and how fast those two Write functions are executed is only determined by the speed of your CPU and how much is dataflow depending between those two functions, which in your case is exactly nothing.
An extra difference to what you explained about Hyperterminal is, that you do not send the initial AT command and wait for the resulting OK at all. I would also expect that AT+CMFG=1 should also at least return an OK, that you should wait for, which would make an extra wait in between unneccessary, as the OK response by the modem indicates that it has:
1) finished processing the command successfully
2) and is ready to process the next command
And you should always make sure to attempt to read any possible response from the remote side after sending a command (unless you know for sure that the command doesn't cause a response). If you don't you will at some point send a command to return specific information and then first have to throw out all the unprocessed responses before you get at the interesting data for this command.
05-07-2012 09:04 AM
05-07-2012 09:10 AM
sequence structure?
it isn't necessary
learn to use dataflow and try to avoid sequences
05-07-2012 09:29 AM
05-07-2012 09:37 AM
a good place to start is LabVIEW 101
05-07-2012 09:51 AM
05-07-2012 09:53 AM
@duaa wrote:
You think that has any influence on the delay between the two VISA Writes in that case structure?how can i insert this delay between two visa writes ?
The Time Delay Vi can be used to insert a delay using error clusters to control execution via dataflow. However, using a delay is a band-aid approach. The CORRECT way to do it is to read the response from the modem until you see the OK (or whatever error message it returns).
05-07-2012 10:56 AM
Three things I see (and I'm no Labview know-it-all)