GPRS functionality overview in Horner OCS Agenda GPRS

  • Slides: 17
Download presentation
GPRS functionality overview in Horner OCS

GPRS functionality overview in Horner OCS

Agenda • GPRS functionality – Peer to Peer communication over GPRS – CSCAPE connectivity

Agenda • GPRS functionality – Peer to Peer communication over GPRS – CSCAPE connectivity over GPRS – Data exchange using KEP server. (Eric) • SMS over GPRS

GPRS functionality ØGPRS is used to establish connectivity with remote server or client. ØGPRS

GPRS functionality ØGPRS is used to establish connectivity with remote server or client. ØGPRS is used for peer to peer communication. ØSIM must be enabled for GPRS. ØSIM card must have static IP address. Static IP: 10. 111. 64. 2 Static IP: 10. 111. 64. 1

GPRS Connection Configuration in Horner OCS ØHorner OCS firmware is designed to initialize GSM

GPRS Connection Configuration in Horner OCS ØHorner OCS firmware is designed to initialize GSM modem to establish GPRS connectivity. ØGPRS in Horner OCS can be used for data exchange with other PLC(OSC) or for Cscape connectivity ØIn order to establish GPRS connectivity using Horner OCS following settings needs to be done. ØEnable GPRS transmission mode in GSM/GPRS configuration window. ØConfigure different GPRS parameter under ‘GPRS Configuration’ ØIf SMS is to be serviced when GPRS connection is active then additional ‘Data Transmission Settings’ needs to be done. ØAdditional ladder program must be written to connect to remote server over GPRS service using ‘communication operation’ ladder blocks.

GPRS Connection Configuration in Horner OCS – GPRS Config Ø‘GPRS Configuration ’ needs to

GPRS Connection Configuration in Horner OCS – GPRS Config Ø‘GPRS Configuration ’ needs to be done before establishing GPRS connectivity with server which are as follows. • User Name: GPRS network user name. Mandatory field to connect to GPRS network. • Password: GPRS network password. Mandatory field to connect to GPRS network. • APN: Access Point Name for GPRS access. • GPRS Mode : Client or Server Mode of operation • Cs. CAN Source IP Address : IP address of client for Cscape connectivity. • Cs. CAN Source Port: Send-receive TCP/UDP port address of the modem. • Block Size: GPRS packet size in number of bytes. • Timeout Period: Packet timeout in 100 ms. . Either reaching Packet Size (block size) or occurrence of timeout will result in transmission of GPRS packet to destination address. • Forward Character: Transmission of GPRS packet can take place on reception of PAD character configured in this window. This is Hex value of ASCII character. For e. g. : In above window ‘ 0 D’ is configured, which results in transmission of GPRS packet when Line Feed character is received. • Send Forward character: If enabled then forward character will be sent together with GPRS packet.

GPRS modem status register value definitions Modem Status Register Value Modem Output Power Modem

GPRS modem status register value definitions Modem Status Register Value Modem Output Power Modem is inactive 65535 (0 x. FFFF) Disabled Modem command started and waiting for response 65534 (0 x. FFFE) Disabled Modem is not responding (Command Timeout) 65533 (0 x. FFFD) Disabled Modem Command is succeeded 0 (0 x 0) Enabled (Only in case of Initialization modem command else Disabled) Modem is connected to remote unit (server) 1(0 x 1) Enabled Modem is Ringing (i. e. incoming call) 2 (0 x 2) Disabled Modem detected no/lost carrier 3(0 x 3) Disabled Modem command syntax error 4(0 x 4) Disabled SMS functionality is Active 5(0 x 5) Disabled Modem is ready to accepts connection request from Client 6(0 x 6) Disabled

Cscape connectivity over GPRS ØGPRS configuration is required in order to support GPRS as

Cscape connectivity over GPRS ØGPRS configuration is required in order to support GPRS as default programming port. ØConfigure different GPRS parameter in ‘GPRS configuration window’ (as shown). i. e. User Name, Password and APN address. Only GPRS Server mode will support Cscape connectivity. Provide IP address of client (i. e. Cscape console) or 0. 0 in Cs. CAN Source IP address. Provide Cs. CAN source port as 10001 (fixed in Cscape). ØThe connection status and signal strength are updated in register address provided in GSM/GPRS/SMS configuration. ØCscape connectivity can be established in both RUN and IDLE modes. ØModem ladder block in application program can override GPRS default programming port. i. e. Modem ladder block will have higher priority than GPRS default programming. If modem ladder block is activated in Run mode, then it will disconnect active GPRS default programming port connection.

Cscape connectivity over GPRS – System Menu ØSelecting GPRS as default programming port under

Cscape connectivity over GPRS – System Menu ØSelecting GPRS as default programming port under OCS System Menu -> Set Serial Ports -> Dflt Pgm Port to ‘GPRS’ put modem in Listen Mode. MAIN MENU SUB-MENU View I/O Slots View Protocols Set Fkeys Mode Dflt Pgm Port Serial Ports MJ 1 -232 GPRS MJ 1 RS 485 Bias MJ 2 RS 485 Bias Set Time/Date Set Screen Removable Media (ESC to Exit) ØThe connection status is updated in Cs. CAN status register. No No

Cscape connectivity over GPRS ØConnecting to remote unit over GPRS requires VPN setup and

Cscape connectivity over GPRS ØConnecting to remote unit over GPRS requires VPN setup and running (as shown). ØCheck the allocated IP address for the VPN, it should be same as entered in Cc. CAN Source IP address field in GPRS configuration (as shown). If they are different then Cscape connectivity cannot be established. ØConfigure communication port in Cscape, enter static IP address of SIM, select GPRS mode and keep higher timeouts. ØEstablishing connection might take around 25 sec. ØAfter establishing connection any of Cscape operation can be performed.

SMS Over GPRS ØSelect ‘Enable SMS Configuration’ option in GSM/GPRS/SMS configuration to enable SMS

SMS Over GPRS ØSelect ‘Enable SMS Configuration’ option in GSM/GPRS/SMS configuration to enable SMS over GSM/GPRS. Ø SMS will be serviced only if GSM/GPRS is inactive. While servicing SMS enabling GSM/GPRS ladder block or switching to GSM/GPRS default programming port will complete current SMS service and then switch to requested service. While servicing SMS module the GSM/GPRS status register will display status 5 (i. e. SMS active). ØIf SMS needs to serviced when there is no data exchange over current established GSM/GPRS connection, then the option in configuration ‘Disconnect and Service SMS when connection is idle’ needs to be selected. Which holds current GSM data call or disconnect GPRS connection to service SMS. While servicing SMS, GSM/GPRS status register value will be 5.

Signal Strength Value Representation ØGSM/GPRS signal strength value is updated in 16 bit long

Signal Strength Value Representation ØGSM/GPRS signal strength value is updated in 16 bit long register. The 16 bit long value consists of 2 fields as below. ØBit 0 to 7 represents Bit Error rate Possible values are Value 0 to 7 Value 99 (63 h) : Not known or Not detectable. ØBit 8 to 15 represents Received Signal Strength Indication Possible values are 0 : -113 d. Bm or less (Very Poor signal Strength) 1 : -111 d. Bm or less ( Poor signal Strength) 30(1 Eh) : -109 to -53 d. Bm ( Good signal Strength) 31(1 Fh) : -51 d. Bm or greater (Very Good signal Strength) 99(63 h) : Not known or Not detectable.

Modem control block to find left balance in Pre-Paid SIM ØModem control block with

Modem control block to find left balance in Pre-Paid SIM ØModem control block with ‘Initialize Modem’ option is used to get left balance string from service provider. ØThe service provider balance request string is entered in ‘Init String’ box together with CUSD AT command. As shown below in screen shot. +CUSD = 1, ”*111#”, 15 “*111#” is string to request left balance in SIM depends on service provider. ØThe response from service provider is stored in consecutive register locations starting from ‘Status Address + 1’.

Data Exchange over GPRS ØData exchange can only be possible when OCS is in

Data Exchange over GPRS ØData exchange can only be possible when OCS is in run mode and power to communication ladder block is enabled. ØOpen communication ladder block is used to open communication channel between OCS and internal GSM/GPRS modem, the setting will remain same as in GSM mode. ØProtocols over GPRS can be used are Cs. CAN, Generic, Modbus RTU or Modbus ASCII. ØGPRS service can be used in server or client mode. GPRS server mode and peer to peer communication over GPRS requires Static IP SIM card. ØInitialize modem ladder block is used to send the specified Initialization String to the modem (Similar as in GSM mode).

Data Exchange over GPRS – Client Mode ØData exchange over GPRS in client mode.

Data Exchange over GPRS – Client Mode ØData exchange over GPRS in client mode. ØSelect ‘Client Mode’ Radio button in GSM/GPRS/SMS configuration. Ø Use Modem ladder block with ‘Auto Dial’ option to connect to remote server. ØProvide server IP address/port address as shown. ØSelect type of protocol required over IP i. e. TCP or UDP. ØSpecify Status register address. ØInput power to Modem block will initialize GSM modem for GPRS communication and tries to connect to specified server. The connection status is updated in status register. Different modem status register values are listed in slide 12. ØModem Output power gets enabled only after successful connection with specified server.

Data Exchange over GPRS – Server Mode ØData exchange over GPRS in server mode.

Data Exchange over GPRS – Server Mode ØData exchange over GPRS in server mode. ØSelect ‘Server Mode’ Radio button in GSM/GPRS/SMS configuration. Ø Use Modem ladder block with ‘Auto Dial’ option to receive connection from specified remote client or any client (under VPN). ØProvide client IP address or enter ‘ 0. 0’ to accept connection request from any client (under VPN). ØSelect type of protocol required over IP i. e. TCP or UDP. ØSpecify Status register address. ØInput power to Modem block will initialize GSM modem for GPRS communication and status turns ‘ 6’ indicating ready to accept connection request from specified client. Different modem status register values are listed in slide 12 ØModem Output power gets enabled when specified (any) client connects to server.

Data Exchange over GPRS (Continued) ØSample ladder for data exchange over GPRS in server

Data Exchange over GPRS (Continued) ØSample ladder for data exchange over GPRS in server or client mode using Modbus RTU protocol ØPeer to Peer communication over GPRS requires one unit in Server and other in client mode. The Server IP address should be static.

Data Exchange over GPRS – KEP Server ØSetting up KEP server for data exchange

Data Exchange over GPRS – KEP Server ØSetting up KEP server for data exchange over GPRS using Modbus Protocol. • Setup and Run VPN (if present). • Run KEP server, open new channel and select Device Driver as Modbus Ethernet • Select Network adapter as VPN (if VPN is present). • Add device to given channel with device ID as unit ‘static IP address. Modbus Id’ • Keep higher connection timeout (e. g. 30 sec) • Set Port number and select protocol as TCP/IP. • Insert Tags and run OPC client.