FATEK FBs-CMGSM Скачать руководство пользователя страница 2

140903 FBs-CMGSM User's Manual EN v3-04 

Page #

2 of 7

 

3.4.1

 

IO Connector 

IO connector has 6  terminals. Terminals “+” “-”  are intended  for service purposes 

only - for test of an internal accumulator. Terminals IN (“IN1”) are for digital input. 
Terminals OUT (“DOUT2”) are for digital output. 

 

 

8 to 30 

V

DC

 *)

OUTPUT (e.g.relay)

CMGSM

IN

OUT

4V

50 Ohm

GSM-PWR12

or

GSM-PWR1

GSM-RELE-OUT1

3k9

1k

MAX *)

35V

AC

/70mA

50 V

DC

/100mA

TEST
ACC.

INPUT
(e.g. button or mg. contact)

*) Please, see the technical 

specifications for details

+

-

 

 

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 (

SendFlag

). CMGSM sends SMS 

and writes result of the sending to PLC register (

SendFlag

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

RecvFlag

)  is  written 

value,  that  signalizes  new  received  SMS.  PLC  program  analyzes  the  registers  and 

deactivates flag 

RecvFlag

. 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

 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  (

Master

  in 

configuration). 
 

4.1.1

 

Sending a SMS 

CMGSM  periodically  tests  the  first  register  of  the 

Send  Record

,  standard  base  is 

D3800. The 

Send Record

 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 

Description 

D3800 

SendFlag 

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) 

D3810-D3819 

SendDestAddress 

Phone  number  where  to  send  the 
message. Length 20 characters. 

D3820-D3899 

SendUserData 

Text  of  the  message.  Length  160 
characters. 

This range of registers cannot be used for any other purposes! 
 

 
 

 

 
 

 
 

 

How does the CMGSM send a message: 
 

START

? D3800

WAIT 5s

WRITE
0x0003  

INTO D3800 

0x0001

ELSE

READ

D3810-D3819

Phone number

READ

D3820-D3899

Text

SENDING

? RESULT

WRITE
0x0000  

INTO D3800 

WRITE
0x0004  

INTO D3800 

OK

ERROR

 

 

 
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 

SendFlag 

(D3800)  is  changed  during 

sending a message. 

 
Example of sending a message “WE ARE THE CHAMPIONS!” to phone “123465”: 

(Check register D3800 – SendFlag for value 0x0000 before sending the message!) 

Register 

Value 

Description 

D3810 

0x3231 

SendDestAddress, characters “1” and “2” 

D3811 

0x3433 

SendDestAddress, characters “3” and “4” 

D3812 

0x3635 

SendDestAddress, characters “5” and “6” 

D3813 

0x00

00

 

End of string 

D3820 

0x4557 

SendUserData, characters “W” and “E” 

D3821 

0x4120 

SendUserData, characters “ ” (space) and “A” 

D3822 

0x4552 

SendUserData, characters “R” and “E” 

D3823 

0x5420 

SendUserData, characters “ ” (space) and “T” 

D3824 

0x4548 

SendUserData, characters “H” and “E” 

D3825 

0x4320 

SendUserData, characters “ ” (space) and “C” 

D3826 

0x4148 

SendUserData, characters “H” and “A” 

D3827 

0x504D 

SendUserData, characters “M” and “P” 

D3828 

0x4F49 

SendUserData, characters “I” and “O” 

D3829 

0x534E 

SendUserData, characters “N” and “S” 

D382A 

0x

00

21 

SendUserData, characters “!” and end of string 

D3800 

0x0001 

SendFlag: send command 

4.1.2

 

Receiving a SMS 

Incoming  SMS messages  are saved into registers of PLC in 

Recv Record

, standard 

base D3700. Structure of the record is in following table. 

Registers 

Caption 

Description 

D3700 

RecvFlag 

0x0000

 – Idle (written by PLC program) 

0x0001

 – Message  received  (written  by 

CMGSM) 

D3710-D3719 

RecvOrigAddress 

Phone  number  of  the  message  sender 

(originator). Length 20 characters. 

D3720-D3799 

RecvUserData 

Text  of  the  message.  Length  160 
characters. 

This range of registers cannot be used for any other purposes! 

 
 

 
 

 

 
 

 

PLC1.ir

Содержание FBs-CMGSM

Страница 1: ...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 GSM antenna connector 2 IO connector 3 SIM card holder 4 USB connector 5 DIN rail holder 6 FUNC button 7 Indication LEDs Rx Tx 8 Flat cable...

Страница 2: ...800 SendFlag 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 D3810 D3819 SendDestAddress Phone number where to send the message Length 20 characters D3820 D3899 SendUserData Text of the message Length 160 characters This range of registers cannot be use...

Страница 3: ...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 CONFIG 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 FACTORY CMGSM will respond with confirmation S...

Страница 4: ...running without restart so called Uptime D3510 D3529 Gprs Reserved for GPRS diagnostics See chapter TCP over GPRS for details D3530 D3539 DiagOperator String with name of operator when registered Empty string if not registered Length 20 characters D3540 D3549 DiagCredit Reserved D3550 D3699 DiagAtCmd Sending AT commands to modem directly Write a command to this place and set D3506 DiagAtFlag to 0x...

Страница 5: ...re 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 dollar 5 2 Basic parameters Key Description Def...

Страница 6: ...ct your LAN against an attack from Internet Port 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 Firewall Your computer in LAN of your company GSM Network LAN FBs CMGSM FATEK P...

Страница 7: ...998877 because CMGSM reads the configuration until the first character 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...

Отзывы: