as soon as the STEP 7 program was loaded into the CPU, the FB 100 begins automatically to initialize the modem. Ends this with success i.e.all steps from n_status = 1 to n_status = 9 (look at tip "status of the sms application") were completed, the variable b_init will set "true" and n_status will become "201".
A active communication between modem and CP is also discernable by the flickering of the Rx/Tx-LEDs on the CP.
Not till then sending a SMS is possible!
But when not? b_init is still "false" and the sequencer stops?
The sequencer stops at n_status = 2 ("Wait for answer of the modem").
If this is the case, modem and CP are not able to communicate together. This can have differnet reasons:
==>Check the serial cable between modem and CP. Is it fixed with the conncetion? The cable must not be a NULL-MODEM-Cable (i.e.internal crossed). For this application you need a 1:1 cable (production number: 6NH7701-5AN).
==>Check the baudrates of the CP and modem. In both modules, the same baudrate must be adjusted. A instruction how to adjust the baudrate in the modules you find in the documentation of the configuration 10.
Note: After setting the modem to factory reset, the default baudrate of the modem is 19200kBit/s. If you use a CP340, the baudrate must be changed, because the CP340 doesn´t support this baudrate.
The sequencer stops at the transmission of the PIN or/and the modem doesn´t log into the GSM-net.
==>Check the PIN you deposit in DB1 (simple_project) or OB1 (SMS_application).
==> At the simple_project. open DB1->View->Data View. The actual values of the DB will be shown. The actual values must agree with the initial values. If not, change the actual values, save the DB and load it into the CPU.
Check the communication blocks for the CP. Depending on what CP you use, other communication blocks will be needed. At the SMS_application, this blocks are allocated to the right CP in the adapted library. At the simple_project you have to change the blocks for your own, if you use another CP as given. The communication blocks are available in the STEP 7 library.
|=== Edited by O_Moderator @ 4/14/2010 2:19 PM [GMT ] ===|