LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

gsm can't send unless i open hyperterminl first

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 20
(459 Views)
I tried to increase the time in the case structure for sending sms and it didnt work as well !
🙂
0 Kudos
Message 12 of 20
(457 Views)

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 13 of 20
(450 Views)
Ok i will try to use sequence structure to put each visa write in independent frames
So it will take some time to work
0 Kudos
Message 14 of 20
(448 Views)

sequence structure?

 it isn't necessary

learn to use dataflow and try to avoid sequences

 

0 Kudos
Message 15 of 20
(444 Views)
Can you please explain what do you mean to use dataflow? I understand that labview is a data flow progrming program but how can this make some delay or time for the at commands?
Sorry for my questions but i want to understand and i am not an expert in labview 🙂
0 Kudos
Message 16 of 20
(437 Views)

a good place to start is LabVIEW 101

0 Kudos
Message 17 of 20
(434 Views)
Spoiler
You think that has any influence on the delay between the two VISA Writes in that case structure?
Spoiler
how  can i insert this delay between two visa writes ?
0 Kudos
Message 18 of 20
(431 Views)

@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).

0 Kudos
Message 19 of 20
(429 Views)

Three things I see (and I'm no Labview know-it-all) Smiley Very Happy

 

  1. I see that your WRITE commands are not consistant. One has a space after the CMGF and the second one does not. Make them consistant.
  2. Does the case of your commands matter? I see one in upper case and another in lower case.
  3. Wire the error cluster (the yellow wire) to the VISA Configure Serial port. I wonder if your error is happening within the Config VI.
0 Kudos
Message 20 of 20
(420 Views)