FATEK FBs-CMGSM CMGSM, B1-CMGSM CMGSM GSM module User's Manual
The FBs-CMGSM and B1-CMGSM are communication modules for FATEK PLC systems to transfer data via the GSM network using SMS, GPRS, and Data Call CSD (Dial-up). The modules can monitor and remotely control PLCs through SMS, establish a dial-up data transfer connection with a control center for system analysis and PLC software tuning, and create a GPRS data connection using the TCP/IP protocol. These modules support a variety of functionalities like local time and date from the GSM network, have digital input and output capabilities, and support firmware updates via GSM.
Advertisement
Advertisement
FBs-CMGSM, B1-CMGSM
User’s Manual
1. Introduction
FBs-CMGSM and B1-CMGSM (CMGSM for short) are communication modules for
FATEK PLC systems FBs-xxMC and B1-xxM. CMGSM uses the GSM network to transfer the data. CMGSM is based on the quad band GSM module
(850/900/1800/1900 MHz). CMGSM is backed up by Li-Ion accumulator.
CMGSM offer three different ways of communication with connected PLC.
The first one is monitoring and remote control of PLC via SMS. CMGSM reads periodically PLC registers containing a flag to send SMS, if the flag is set, CMGSM reads destination phone number and string of characters (text), sends SMS and clears the flag. If there is a SMS received by CMGSM, it is written into PLC registers including another flag “SMS received” to be processed by PLC program. At the end the PLC program clears this flag. So these operational SMS must be processed by
PLC program both on SMS reception and SMS sending. Some status and event SMS are predefined in CMGSM (e.g. “Connection to PLC failure”) and only the destination phone number have to be set in PLC registers.
The second way of communication with PLC via CMGSM is dial up data transfer
via GSM network (CSD). The connection can be only incoming for CMGSM, that may be initiated from a control center for the purpose of remote system analysis and PLC software tuning and modification by WinProladder SW.
The third way of CMGSM communication over the GSM network is GPRS data
connection using TCP/IP protocol. CMGSM opens the connection in TCP client
mode. Any SIM card, that can provide internet connection over the GSM network, can be used. CMGSM connects to IP address and port specified in from PLC. It is important to notice, that the connection can be opened in direction from CMGSM to
PC (server) only. PC cannot open a connection to CMGSM because CMGSM has no server implemented and usually does not have public IP address. GPRS has special data transfer properties (data grouping, data transfer delay 1 ... 10 seconds), which are not suitable for WinProladder SW. WinProladder must use dial up data
transfer (so called CSD) only.
Main features
Three ways of GSM network use – SMS, GPRS, Data Call CSD (all of them practically at the same time)
WinProladder remote GSM dial up data transfer connection (CSD)
One digital input IN and one digital output OUT
Local Time and Date (NITZ) from GSM network (if available)
USB port for module monitoring (for service purposes only)
Firmware update via GSM available
Li-Ion backup accumulator – min. 2 days of operation w/o charging
Lowest level super watchdog function (Hardware Power OFF)
FBs-CMGSM can be used directly with PLC FBs-xxMC (Port 3)
B1-CMGSM can be used directly with PLC B1-xxM (Port 1)
SMS functionality is fully under PLC program control
Configuration of CMGSM means just to set several PLC registers
No PLC program support is necessary for CSD and GPRS operation
LEDs for indication of the CMGSM status and data flow signalization
Unlimited number of logical and analog inputs and outputs can work with one CMGSM (PLC network)
1
8
1) GSM antenna connector
2) IO connector
3) SIM card holder
4) USB connector
5) DIN rail holder
6) FUNC button
7) Indication LEDs RCV, SEND (SMS)
8) Flat cable for connection to PLC
9) Indication LEDs GSM, ERR
2
3
4
9
7
6
5
2. Content of the Delivery
1 pc of FAC-FBS-CMGSM or FAC-B1-CMGSM
1 pc of antenna GSM-ANT05S
1 pc of 6 pin connector, pitch 3.81 mm
1 pc of CD with documentation
FBs-CMGSM User's Manual EN v3-07.doc
3. Typical Application, Installation
GSM
Antenna
CMGSM FATEK PLC
RS 232 Communication
Power + 5 V
DC
Flat cable
Note: FATEK PLC is not part of the delivery of this product. It is needed to order independently.
Warning
Turn off all power supply during installation of CMGSM to PLC to prevent damage to equipment!
3.1 Configuration
If a SIM card does not need PIN code, no configuration for basic use is necessary.
For the SIM card with PIN code the configuration in PLC is necessary. Read chapter
3.2 Hardware settings
Switch off the power supply of PLC
Connect GSM antenna
Insert SIM card
Connect the flat cable between CMGSM and PLC
3.3 Startup
Device status is indicated with blue GSM LED on the CMGSM front panel. Valid statuses are as follows:
Term Description permanently off
500 ms on /
500 ms off
No power or STAND BY mode.
Device is not registered to the GSM network.
This state occurs after start of device for approx. 30 seconds.
If it remains, check: SIM card (is inserted? is active?)
Antenna (is connected?)
Configuration (is the SIM PIN correct?)
10 ms on /
4 s off
Device is registered to the GSM network and is idle.
(It means that no GPRS nor CSD connection is active.)
10 ms on /
2 s off
10 ms on /
1 s off
GPRS active, data transfer in progress
CSD (data connection) in progress
Expressed line is common operating state.
3.4 Front Panel
Name
ANT
GSM
Element
Connector
LED blue
ERR
IO
FUNC
SIM
CARD
USB
RCV
SND
LED red
Connector
Button
SIM card
Holder
Connector
LED yellow
LED green
Description
GSM Antenna connector
GSM status
(see the previous table)
Error
IN (input), OUT (output)
Multifunction Button:
DOUT2 change, RESTART,
STAND BY mode.
Press the SIM card to remove it from holder
USB for connection to PC
(for debugging purposes only)
Receiving SMS from GSM
Sending SMS to GSM
-
+
IN
USB
1
1
GSM
ERR
OUT
SIM
RCV
SND
FUNC
FBs-CMGSM
COMMUNICATION
GSM MODULE
3.4.1 Pushbutton “FUNC”
Pushbutton “FUNC” has several functions. Short press changes the state of the output OUT (DOUT2). Long press (longer than 3 seconds) will either RESTART
CMGSM (if CMGSM is powered by the PLC) or enter the STAND BY MODE (if the
CMGSM is powered from the internal accumulator - PLC is either disconnected or turned off).
Page #1 of 7
3.4.2 IO Connector
IO connector has 6 terminals. Terminals “+” “-”are designed to supply the input IN of internal Li-ION battery. Terminals IN (“IN1”) are for digital input. Terminals OUT
(“DOUT2”) are for digital output.
CMGSM
-
*) Please, see the technical specifications for details
GSM-PWR12 or
GSM-PWR1
50 Ohm
4V
+
3k9
1k IN
MAX *)
35V
AC
/70mA
50 V
DC
/100mA
INPUT
(e.g. button or mg. contact)
How does the CMGSM send a message:
START
? D3800
0x0001
WRITE
0x0003
INTO D3800
ELSE
READ
D3810-D3819
Phone number
READ
D3820-D3899
Text
OUT
SENDING
WAIT 5s
OK
? RESULT
ERROR
OUTPUT (e.g.relay)
GSM-RELE-OUT1
4. Function of the device
4.1 SMS
One of the primary functions of the CMGSM is to send and receive SMS messages.
There are 2 kinds of SMS, which have different functions and purposes:
SMS for and from PLC FATEK, see chapters 4.1.1. and 4.1.2
Service SMS commands processed by CMGSM, see chapter 4.3
Outgoing SMS from PLC FATEK are sent by PLC program, that writes the text and destination phone number into PLC registers and orders CMGSM to send the message by write special value to another register ( and writes result of the sending to PLC register (
SendFlag
SendFlag
). CMGSM sends SMS
). Incoming messages for
PLC FATEK are received by CMGSM and the text and origin phone number are written into PLC registers. Subsequently in another register ( value, that signalizes new received SMS. PLC program analyzes the registers and deactivates flag
Master
RecvFlag
in configuration).
. All the SMS structure and security features must be done by PLC program, including confirmation, that SMS was received, if required.
SMS messages, which contains characters “#!” (hash and exclamation) followed by access code, are sent and received by CMGSM itself and their function, structure and security features cannot be changed by user or PLC program. Incoming SMS of this kind are described in chapter 4.3
Service SMS Commands
RecvFlag
) is written
and are used to get information about CMGSM status, to reset CMGSM or to get current CMGSM configuration. Outgoing SMS of this kind are described in chapter 4.5
Events
.
(
Events, it is information about emergency status of CMGSM module like lost communication with PLC. These events are sent to a predefined phone number
4.1.1 Sending a SMS
CMGSM periodically tests the first register of the
D3800. The
Send Record
Send Record
, standard base is
is an area in PLC registers which must be filled by program in PLC in order to send a SMS message. For structure of the record see the following table.
Registers Caption
D3800
D3801-D3809
SendFlag
ModemTime
Description
0x0000 – Idle
0x0001 – Command to send (written by program in PLC)
0x0003 – SMS is sending (written by
CMGSM)
0x0000 – SMS sent successfully (written by CMGSM)
0x0004 – Failed while sending SMS
(written by CMGSM)
Local Date and Time (NITZ) from GSM
(if available – depends on GSM operator).
DateTime from modem in PLC RTC format, refresh approx. 1 per 10 sec.
D3810-D3819
D3820-D3899 SendUserData
Text of the message. Length 160 characters.
This range of registers cannot be used for any other purposes!
FBs-CMGSM User's Manual EN v3-07.doc
WRITE
0x0000
INTO D3800
WRITE
0x0004
INTO D3800
Register
D3810
D3811
D3812
D3813
D3820
D3821
D3822
D3823
D3824
D3825
D3826
D3827
D3828
D3829
D382A
D3800
Every register of
Phone number
or
Text
contains two characters. String of characters ends with special character 0x00. Examples:
String with one character – “A”: D3820 = 0x0041
String “TEXT”: D3820 = 0x4554, D3821 = 0x5458, D3822 = 0x0000
String “HELLO”: D3820 = 0x4548, D3821 = 0x4C4C, D3822 = 0x004F
If the length of a phone number is exactly 20 characters (or 160 characters of text) then the character 0x00 at the end is omitted!
Base of
Send Record
(D3800) may be changed to another D or R register via configuration key REGSEND. Only register sending a message.
SendFlag
(D3800) is changed during
Example of sending a message “WE ARE THE CHAMPIONS!” to phone “123465”:
(Check register D3800 – SendFlag for value 0x0000 before sending the message!)
Value Description
0x3231
0x3433
SendDestAddress, characters “1” and “2”
SendDestAddress, characters “3” and “4”
0x3635 SendDestAddress, characters “5” and “6”
0x0000 End of string
0x4557
0x4120
SendUserData, characters “W” and “E”
SendUserData, characters “ ” (space) and “A”
0x4552
0x5420
0x4548
0x4320
SendUserData, characters “R” and “E”
SendUserData, characters “ ” (space) and “T”
SendUserData, characters “H” and “E”
SendUserData, characters “ ” (space) and “C”
0x4148 SendUserData, characters “H” and “A”
0x504D SendUserData, characters “M” and “P”
0x4F49
0x534E
SendUserData, characters “I” and “O”
SendUserData, characters “N” and “S”
0x0021 SendUserData, characters “!” and end of string
0x0001 SendFlag: send command
4.1.2 Receiving a SMS
Incoming SMS messages are saved into registers of PLC in base D3700. Structure of the record is in following table.
Recv Record
, standard
Registers Caption Description
D3700 RecvFlag
0x0000 – Idle (written by PLC program)
0x0001 – Message received (written by
CMGSM)
D3710-D3719
D3720-D3799
RecvOrigAddress
RecvUserData
Phone number of the message sender
(originator). Length 20 characters.
Text of the message. Length 160 characters.
This range of registers cannot be used for any other purposes!
Page #2 of 7
How CMGSM stores a received message:
START
Message received
? D3700
0x0000
WRITE
Phone number
INTO
D3710-D3719
ELSE
WRITE
Text of SMS
INTO
D3720-D3799
WRITE
0x0001
INTO D3700
WAIT 1s
END
Every register of
Phone number
or
Text
contains two characters. String of characters ends with special character 0x00. Examples:
String with one character – “A”: D3720 = 0x0041
String “TEXT”: D3720 = 0x4554, D3721 = 0x5458, D3722 = 0x0000
String “HELLO”: D3720 = 0x4548, D3721 = 0x4C4C, D3722 = 0x004F
If length of phone number is exactly 20 characters (or 160 characters of text) the character 0x00 at the end is omitted!
CMGSM contains a queue of up to 100 SMS messages. After the queue is full all other SMS messages are discarded. If a power failure occurs all received messages in the queue are lost. Base of
Recv Record
(D3700) may be changed to another D or R register via configuration key REGRECV. No other registers are changed than the necessary ones.
Example of receiving of message “TEST MESSAGE.” from phone “+420123456789”:
Register Value Description
D3700
D3710
D3711
D3712
D3713
D3714
D3715
D3716
D3720
D3721
D3722
D3723
D3724
D3725
D3726
0x0001 RecvFlag: new message
0x342B RecvOrigAddress, characters “+” and “4”
0x3032
0x3231
RecvOrigAddress, characters “2” and “0”
RecvOrigAddress, characters “1” and “2”
0x3433
0x3635
0x3837
0x0039
0x4554
0x5453
RecvOrigAddress, characters “3” and “4”
RecvOrigAddress, characters “5” and “6”
RecvOrigAddress, characters “7” and “8”
RecvOrigAddress, characters “9” and end of string
RecvUserData, characters “T” and “E”
RecvUserData, characters “S” and “T”
0x4D20 RecvUserData, characters “ ” (space) and “M”
0x5345 RecvUserData, characters “E” and “S”
0x4153
0x4547
0x002E
RecvUserData, characters “S” and “A”
RecvUserData, characters “G” and “E”
RecvUserData, characters “.” and end of string
4.2 GSM Data Connection (Data Call, CSD)
Data connection can be established anytime, even if GPRS communication is in progress.
Warning
There is no security mechanism against unauthorized data connection to
PLC. So it is highly recommended to set security in PLC (password).
4.3 Service SMS Commands
Received SMS message with string ‘#!’ and password at the beginning are considered to be
service SMS commands
. These messages are not forwarded to
PLC, but they are processed in CMGSM. Device will check for a valid access code
(ACODE parameter in configuration) and if the access code is valid, the message is searched for keywords. Only one keyword in every SMS is executed.
Example of this SMS:
#!1234 INFO
#!998877 CONFIG
FBs-CMGSM User's Manual EN v3-07.doc
Table of all keywords:
Keyword
INFO
STATE
RESET
CONFIG
FACTORY
ON
OFF
Description
Device will respond with SMS describing its current status, e.g.
CMGSM: NETWORK=Vodafone CZ 77%
IN1=off
OUT2=off
CSD=no connection
GPRS=no connection
PLC=connected
CMGSM v8.2
Device will respond with confirmation SMS and restart itself. PLC is not affected.
This command is used after change of configuration in PLC register to accept the changes by CMGSM.
Device will respond with current configuration. (Current configuration is a default configuration with some values changed by configuration string in PLC, see Chapter 5 – Configuration.)
CMGSM will respond with confirmation SMS. CMGSM will write default configuration to attached PLC and restart itself.
Activate digital output OUT2
Deactivate digital output OUT2
4.4 TCP over GPRS
One of the primary functions of this device is to establish and maintain TCP connection from PLC to a server. In order to achieve this goal FBsCMGSM has to make following steps after power up:
Establish connection to PLC via serial port. Parameters of the serial port are: 9600 baud, 7 data bits, EVEN parity, 1 stop bit, no hw handshake (it is default FATEK settings for all serial ports), address 01h.
After power on the FBsCMGSM will proceed steps:
Read configuration from PLC register D3900 – D3999.
Login to the GSM network, using PIN from configuration.
Attach to GPRS, using APN, USER and PASSWD from configuration.
Establish and maintain TCP connection to SERVER on port PORT.
CMGSM will try indefinitely to read configuration from PLC at the beginning. If there is no serial communication between CMGSM and PLC device will not login into the
GSM network! If there is no configuration in PLC or the configuration is damaged or other problem occurs CMGSM writes default configuration into the PLC.
GPRS can be controlled and monitored via set of registers in PLC and via configuration:
Registers Caption Description
D3510
D3511
D3512
GprsCommand
GprsState
GprsCntErr
0=no connection (written by PLC)
1=open connection (written by PLC)
0x00=no connection, idle
0x01=connecting
0x80=connected
0x81=disconnecting
Error counter for connection
D3516-D3517
D3518-D3519
D3520-D3523
D3524
D3525-D3528
GprsCntUp
GprsCntDown
GprsLocalIP
GprsLocalPort
GprsRemoteIP
Data counter, direction
(= PLCTCP), D3516 LSB
Data counter, direction
(= TCPPLC), D3518 LSB
UP
DOWN
Local IP address if connected. “0.0.0.0” if not connected. (D3520=MSB)
Example:
If local IP address is 147.32.80.1, then
D3520 … 0x0093 (147d)
D3521 … 0x0020 (32d)
D3522 … 0x0050 (80d)
D3523 … 0x0001 (1d)
Local TCP port if connected, 0 if not connected
Remote IP address if connected. “0.0.0.0” if not connected. (D2425=MSB)
D3529 GprsRemotePort
Remote TCP port if connected, 0 if not connected
This range of registers cannot be used for any other purposes!
GPRS diagnostic is part of Diagnostic (see chapter Diagnostic). Base of
Diag Record
(D3500) may be changed to another D or R register via configuration key REGDIAG.
4.5 Events
Device can detect special events and send a warning about them as a SMS:
Connection to PLC failure/restore
It is needed to set parameter MASTER in configuration for both of these events, see chapter 5.2 Basic Parameters.
Page #3 of 7
4.6 Diagnostic
Diagnostics values are written to
Diagnostic Record
of the record is in following table:
, standard base D3500. Structure
Registers Caption Description
D3500.0
D3500.1
D3500.8-15
D3501.0-7
D3501.8-15
D3502
D3503
D3504
D3505
D3506
D3508-D3509
D3510-D3529
D3530-D3539
DiagCnct *1)
DiagRQueue
DiagGsmReg
DiagSigQuality
DiagSigErr
DiagAlive
DiagVersion
0x0000
DiagReset
DiagAtFlag
DiagUpTime
Gprs ...
DiagOperator
0=no connection to PLC, 1=connection to
PLC OK
0=no SMS in receive queue, 1=at least one
SMS in receive queue result of command AT+CREG:
0=not registered, not searching
1=registered, home network
2=not registered, searching
3=registration denied
5=registered, roaming
Signal quality in percent (0-100) or 255 if unknown.
Signal BER (0-7) or 255 if unknown.
CMGSM writes value 0x0001 whenever diagnostic record is refreshed (cca 6 seconds). This is intended for PLC program to check if CMGSM is alive. In this case PLC program will write a 0x0000 into this register and wait for 0x0001 here.
Version of CMGSM3, in high byte is high version number, in low byte is low byte is low version number
For future use
If PLC writes value 0xF3A5 to this register the CMGSM will make reset of itself.
0x0000 – Idle
0x0001 – Execute command
DiagAtCmd (written by program in PLC) in
0x0003 – Command is about to execute
(written by CMGSM)
0x0000 – Command executed successfully
(written by CMGSM)
0x0004 – Exception while executing the command (written by CMGSM)
32 bit counter which is incremented whenever CMGSM updates DiagRegisters area in PLC. The counter is cleared after restart of CMGSM. The counter value indicates in a certain way how long the
CMGSM is running without restart (so called Uptime).
Reserved for GPRS diagnostics
See chapter “TCP over GPRS” for details
String with name of operator when registered. Empty string if not registered.
Length 20 characters.
Reserved D3540-D3549 DiagCredit
D3550-D3699
D3801-D3809
DiagAtCmd
Sending AT commands to modem directly.
Write a command to this place and set
D3506 (DiagAtFlag) to 0x0001. Command is executed and result is placed in this place (overwriting original command). In
D3506 (DiagAtFlag) is signalized end of execution. The system is the same as with sending SMS.
ModemTime *2,3)
D3801 … 0x0001=time written to PLC
0x0000=time not written, wait for 0x0001
D3802 … seconds 0-59
D3803 … minutes 0-59
D3804 … hours 0-23
D3805 … day in month 1-31
D3806 … month 1-12
D3807 … year 0-99
D3808 … day in week 0-6
D3809 … hour (MSB) + minute (LSB)
This range of registers cannot be used for any other purposes!
*1) Notation
Base of
D3500.x
means x-th bit of D3500 register. For example D3500.0 is the least significant bit in register D3500. Another example D3500.8-15 are eight most significant bits in register D3500 (high byte).
Diag Record
(D3500) may be changed to another D or R register via configuration key REGDIAG.
*2) ModemTime is available in CMGSM with sw. version 2.03 and higher.
*3) CMGSM reads out the local Time and date (NITZ) from the GSM network (if NITZ is available depends on the GMS operator) and approx. 1 per 10 seconds sends this information do PLC registers. The format of ModemTime is similar to PLC registers in
RTC (Calendar).
5. Configuration
5.1 How to
Configuration for CMGSM is located inside PLC Fatek. Range of internal PLC registers
D3900 – D3999 is used. Configuration itself is a string of characters. This string is created via WinProladder (software from PLC FATEK manufacturer), see following images. This range of registers cannot be used for any other purposes!
Step 1 – Right click on Table edit - ASCII Table
and select “New ASCII Table”
Step 2 – Enter Table Name „cfg“ and Table starting address „D3900“.
Then click “OK”.
Step 3 – Enter configuration string
“CMGSM3;PIN=7608;ACODE=998877;$” into field “ASCII Editor” and click on button “Output Preview”. !!! Warning: Change PIN according your real SIM card !!!
FBs-CMGSM User's Manual EN v3-07.doc Page #4 of 7
Step 3 (GPRS) – Enter configuration string
“CMGSM3;PIN=7608;APN=internet;SERVER=test.server.com;PORT=5700
;ACODE=998877;$” into field “ASCII Editor” and click on button “Output
Preview”. !!! Warning: Change PIN according to your real SIM card !!!
Step 4 – Select “Non Output Format” and click “OK”.
Step 5 – Configuration string is now black. Click “OK”.
Step 5 (GPRS) – Configuration string is now black. Click “OK”.
Step 6 – Result
Configuration is read after power up and only once. If you change configuration (for example by WinProladder and second serial port), it is not read automatically. You have to restart CMGSM. CMGSM will try to log in the GSM network without PIN if no configuration in PLC is found. (In this case SIM card without PIN authorization is requested.)
Configuration string is very simple. For example:
CMGSM3;PIN=7608;ACODE=998877;MASTER=+420777777497;$
For easy understanding this string says:
CMGSM3 – It is a configuration for CMGSM.
PIN=7608 – PIN code of the SIM card in order to register into the GSM network.
ACODE=998877 – Access code for
Service SMS Commands
is 998877
MASTER=+420777777497 – Warning SMS is sent to this phone number in case of any event. For example “Connection to PLC failure.” when communication between CMGSM and PLC is lost or “IN1 activated (L-
>H).” when digital input IN (IN1) is activated respectively “IN1 released
(H->L).” when digital input IN (IN1) is deactivated.
Example of configuration string for GPRS:
CMGSM3;PIN=7608;APN=internet;
SERVER=test.server.com;PORT=5700;ACODE=998877;$
This string means:
CMGSM3 – It is configuration for CMGSM.
PIN=7608 – User PIN code of ‘7608’ for SIM card in order to register into the network.
APN=internet – Access Point (APN) is needed in order to use GPRS service in GSM network. In this example APN is ‘internet’.
SERVER=test.server.com – It is a name of a server, to which CMGSM will connect. (Using TCP connection.)
PORT=5700 – Use TCP connection to port 5700
ACODE=998877 – Access code for SMS control is 998877
General format of these messages is following:
CMGSM3;KEY1=VALUE1;KEY2=VALUE2;...[;]$
Part ‘CMGSM3’ at the beginning of the string is mandatory. It is a stamp of validity.
Acceptable keys are shown in table below. Unknown keys are ignored, no spaces are allowed inside keys or values. Order of pairs is not important. Keys are not case sensitive, values are case sensitive. Maximum length of configuration string is 200 characters. At the end of each part MUST be character ‘;’ (semicolon), after last pair
MAY be character ‘;’ (semicolon) and MUST be character ‘$’ (dolar).
5.2 Basic parameters
Key
PIN
ACODE
MASTER
Description
PIN code for SIM card. It may be omitted if the SIM card does not need a PIN code. But it is mandatory if the SIM card needs the PIN code.
Access code for SMS control. You can send SMS message in order to control CMGSM. These SMS must begin with this ACODE. They will be ignored otherwise. Optional.
Phone number, where to send SMS about important events: Connection to PLC failure. No SMS are sent if value is empty. Only one master is possible.
Default
<empty>
1234
<empty>
FBs-CMGSM User's Manual EN v3-07.doc Page #5 of 7
5.3 Advanced parameters
Key Description
REGSEND
REGRECV
REGDIAG
NETRESET
First register of the
First register of the
Send Record
PLC writes messages to send. See 4.1.1 Sending a
SMS. Only D or R registers can be used.
Recv Record
.. It is area, where
. It is an area, where
CMGSM writes received messages. See 4.1.2 Receive a
SMS. Only D or R registers can be used.
First register of the
Diagnostic Record
. It is an area, where CMGSM writes diagnostic values like operator, signal quality, … See chapter 4.4
This is a security feature. Value zero (0) in this parameters means security reset every week (7 days).
If you do not want any security reset write -1 to this parameter.
5.4 GPRS parameters
Keys in configuration string:
Key
APN
USER
Description
Access Point for GPRS. Ask your GSM provider for this value.
User for APN. Mandatory is provider requires.
PASSWD
SERVER
Password for APN. Mandatory is provider requires.
Name or IP address of server, to which CMGSM will connect. TCP connection is used. Optional.
PORT TCP port for connection. Optional.
D3800
D3700
D3500
0
Default
Default internet
<empty>
<empty>
<empty>
5700
DNS IP address of DNS server. Optional. <empty>
If SERVER is omitted no GPRS connection is made and device waits for a data CSD call only.
5.5 Examples of Configuration Strings
6. Usage scenarios for SMS
Usage examples can be found on CD with documentation or on the web pages http://fatek.seapraha.cz/ . In category FAC-CMGSM are examples of programs for receiving and sending of SMS from PLC.
7. Usage Scenarios for GPRS
7.1 Explanation of Important Terms
Term Description
GPRS
TCP/IP
TCP
Firewall
Port
The way how to transfer data through the GSM network. It is charged according to transferred bytes (and not per minutes) and is much more suitable for remote monitoring than data connection
(CSD).
It is protocol which is used while communicating through GPRS.
(Like Fatek protocol is used to communicate between computer and
Fatek PLC).
It is one of protocols in TCP/IP family used with CMGSM. It may be imagine as a bidirectional stream of bytes through the Internet and the GSM network from your computer to a Fatek PLC
It is a security device. It located between you LAN and Internet.
Main purpose of the Firewall is to protect your LAN against an attack from Internet.
It is a number of a service in your computer. Complete address needed to connect your computer is composed from IP address and
Port number and may be seen as 11.22.33.44:5700 (IP-
ADDRESS:PORT).
7.2 Simple Use
We recommend this scenario for your first step with CMGSM.
Internet GSM Network
5.5.1 SIM without PIN
Configuration string:
CMGSM3;ACODE=998877;$
Translated for human this string says:
CMGSM3 – It is configuration for CMGSM.
ACODE=998877 – Access code for
Service SMS Commands
is 998877
5.5.2 Use registers D1000-D1100 for sending SMS
Configuration string:
CMGSM3;PIN=7608;REGSEND=D1000;$
Translated for human this string says:
CMGSM3 – It is configuration for CMGSM.
PIN=7608 – PIN code 7608 for SIM card in order to register into network.
REGSEND=D1000 – Begin of the
Send Record
.
[default Access code for SMS control is 1234]
5.5.3 Only CSD (without GPRS)
Configuration string:
CMGSM3;PIN=7608;$
Translated for human this string says:
CMGSM3 – It is configuration for CMGSM.
[default Access code for SMS control is 1234]
5.5.4 SIM without PIN, GPRS connection
Configuration string:
CMGSM3;APN=internet;SERVER=test.server.com;PORT=5700;AC
ODE=998877;$
Translated for human this string says:
CMGSM3 – It is configuration for CMGSM.
APN=internet – Access Point (APN) is ‘internet’.
SERVER=test.server.com – Connect to ‘test.server.com’
PORT=5700 – Use TCP connection to port 5700
ACODE=998877 – Access code for SMS control is 998877
FBs-CMGSM User's Manual EN v3-07.doc
Firewall
LAN
PWR
FBsFATEK
Your computer in LAN
CMGSM
COMM
PLC of your company
You need to prepare following items in this scenario:
External (WAN) IP address of your firewall. Rest of the Internet sees you with this IP. Warning: it is NOT your IP address in LAN (i.e. 10.0.0.25).
Your external IP address may be obtained from various WEB sites, i.e. http://www.whatismyip.com/.
A redirection of port 5700 from external side of your firewall to your computer.
Cooperation of your IT department will be necessary for all of these items.
We offer simple program that acts like a server. CMGSM connects to this server.
This program is only a demonstration for one connection and elements X0-X3 and
Y0-Y3. It may be obtained from our WEB site ( www.seapraha.cz
).
Details:
Program listens on TCP port 5700 for incoming connection. Port 5700 is default port where CMGSM connects to. Program periodically queries status of inputs X0-X3 from remote station. You can change any of output Y0-Y3 by click on a check box Y0-Y1.
Page #6 of 7
8. Technical Specifications
8.1 General
Parameter
Dimensions
Fixing
Power
Backup power
Width
Height
Depth (without antenna)
Digital input
DC
(any polarity)
Antenna connector
Number
Voltage log H
Voltage log L
Current
Digital outputs
DC, AC
Number
Voltage DC
Voltage AC
Current DC
Current AC
Temperature Operational
Humidity Operational
GSM RF power
GSM frequencies
Communication interface
Symbol Conditions MIN. w h d FBS-CMGSM
B1-CMGSM
DIN rail or flat panel screw fixing
TYP.
25
90
80
55
MAX. Unit mm mm mm mm
5V DC / 120mA (max.)
from power supply of PLC main unit
Internal Li-Ion accumulator for 2 days working without charging. Full capacity will be after 2 day of charging.
-
|VIN|
|VIN|
IIN
3
1
12
<4
5
-
30 V
DC
4 V
DC mA h
A
-
VOUT
DC
VOUT
AC
IOUT
DC
IOUT
AC t
A
-20
1
8
-
50
V
35
100
70
+45 °C
90
2
V
DC
AC mA
%
W mA
Worldwide 850 / 900 / 1800 / 1900
SMA female
GSM-ANT05S recommended
MHz
Flat cable connected directly to PLC FATEK:
FBs-xxMC: Port 3, (Port 4*); B1-xxM Port 1, (Port 2*)
* PLC Port is not usable, but is not is not accessible for another expansions.
9. FAQ
It’s not possible to reset CMGSM using FUNC button – it’s necessary to hold the button FUNC pressed at least 2 seconds.
CSD (GSM data) connection cannot be established – 1) check power supply, 2) check antenna, 3) check indication LED on device and compare it with the manual, 3) are CSD connections available on your
SIM card? Ask provider, 4) check GSM signal quality on your mobile phone near the device. At least 50% signal is recommended.
No reply to Service SMS Commands – 1) check the power supply, 2) check antenna, 3) check indication LED on CMGSM and compare to the manual (Note: LED RCV and SND are not used for Command SMS), 4) check configuration - is the access code ACODE correct? 5) Insert the
SIM card from CMGSM to you mobile phone and try to send SMS and receive SMS and voice call.
Some special characters are not correctly transported by SMS –
Try to use so called 7 bit SMS (160 characters) and only basic ASCII characters (0-127)
No communication with PLC – 1) check PLC power supply, 2) check
Port3 (FBs-xxM) or Port1 (B1-xxM) settings using WinProladder. It MUST be 9600 7E1, address 01h. 3) Check that no Analog or Communication module is added to WinProladder project.
Is it possible to use B1-CMGSM simultaneously with Analog or
Communication module? – Not at the moment, but we prepare
“Autodetection”. In the future B1-CMGSM will connect to PLC through
Port1 or Port2 depending on usage of Analog or Communication module.
GPRS connection cannot be established – 1) check power supply,
2) check communication with PLC Fatek, 3) check configuration, 4) check if it is possible from another computer connected to the Internet to connect to your server (may be firewall is wrong configured).
GPRS connection is not working during CSD connection – This is the feature of GSM module. GPRS connection is restored automatically after CSD connection is finished.
Communication is OK but real outputs Y0-Y3 do not reflect
commands – 1) PLC FATEK must be in run PLC.
Run
mode. Use WinProladder to
Communication is OK but inputs X1-X3 do not show correct
value – 1) PLC FATEK must be in the PLC.
Run
mode. Use WinProladder to run
Some parameters in the FATEK configuration are not
functioning – Please check if there is no “$” character before these parameters (e.g. “CMGSM3;$PIN=7608; ACODE=998877;$”) because
CMGSM reads the configuration till the first “$” character.
FBs-CMGSM User's Manual EN v3-07.doc
10. Warranty
General warranty period is 12 months after purchase, when eventual malfunction device will be repaired free of charge in SEA company while shipping to SEA is paid by customer and SEA pays for shipping back to customer. For SW there is 24 months warranty under following conditions:
Both CPU and PC software is sold “as is”. The software was created by the best software engineers in SEA and was carefully tested both in SEA and also by SEA customers using GSM applications products made in SEA. In spite of making all possible to get error free software it can happen, that the software in CPU or PC programming SW or their mutual interaction has some error under some specific conditions. If such error is found and the description of the problem including configuration file is sent by E-mail to SEA ltd., the error is removed free of charge and
SEA will send new SW by E-mail to customer.
SEA ltd. has
NO RESPONSIBILITY
for any damage, lost, costs and any other problems direct or inducted, caused by such SW error, by eventual device malfunction from any reason or by undelivered SMS from the device.
CE Declaration of conformity in accordance with the Radio and Telecommunications Terminal Equipment Directive 1999/5/EC (R&TTE) and
Directive 2011/65/EU (ROHS).
We SEA, spol. s r.o., Dolnoměcholupská 1537/21, CZ 102 00 Praha 10, Czech Republic, ID: 47117931
(manufacturer) declare under our sole responsibility, that product equipment for remote control and monitoring
Health and safety:
EMC: radio frequency:
type FBs-CMGSM and B1-CMGSM is in conformity with the following standards:
EN 60 950-1
EN 61000-4-2, -3, -4, -5, -6, -8 EN 55022
EN 301 511 v 9.0.2
The last two digits of year in which the CE marking was affixed: 14
Place of issue: Praha
Date of issue: 7.8.2014
Name:
Grade:
Ing. Mario Vejlupek
Technical director
Page #7 of 7
Advertisement
Key Features
- Three ways of GSM network use – SMS, GPRS, Data Call CSD (all of them practically at the same time)
- WinProladder remote GSM dial up data transfer connection (CSD)
- One digital input IN and one digital output OUT
- Local Time and Date (NITZ) from GSM network (if available)
- USB port for module monitoring (for service purposes only)
- Firmware update via GSM available
- Li-Ion backup accumulator – min. 2 days of operation w/o charging