Routers

You can use Unitronics cellular routers to send and receive SMS messages via Ethernet.

Depending on your model router, you may also be able to use it to perform a variety of communication tasks, including Modbus. In addition to Ethernet, certain models also support RS232, RS485, GNSS (GPS), and offer microSD and USB interfaces. Additionally, certain routers may include digital and analog I/O; check your model's specifications for details regarding supported features.

In order to use your router, you must configure it, and initialize it in your Ladder program.

Configuring the Router

  1. Click Router in the Solution Explorer; the Router Window opens.

  2. Click Enable Router.

  3. Select your router model, and click the fields to enter the other parameters.

  4. To enable the router to accept incoming SMS messages and add them to the SMS Received Queue, you must check the Receive SMS option.

  5. To filter the phone numbers from which incoming message may be received, click Authorized Numbers and add permissible phone numbers to the list.  

NOTE

Checking SMS Received adds the message to the queue.
However, the only way for the controller to receive the message is via the LF: Receive SMS

When you add the router, the program creates a struct that you can use in your program.

Name

Data Type

Definition

Success

Bit

ON= Router Initialized Successfully

Fail

Bit

ON= Router Initialization Failed

Status

UINT32

Code

 Message

0 = No Errors

1 = Function Started

2 = Function in Progress

-1 = General initialization error

-2 = Pin code Error

-3 = Baud Rate Error

-4 = Signal Quality Error

-5 = Router name error

-6 = Save router parameter error

-7 = Modem GPRS error

-9 = Router General Error

-10 = Router signal quality error

-11 = Router session ID error

-12 = Router network type error

-13 = Router GPS error

-14 = Router mobile traffic error

-17 = Router Model Name error

-99 = Modem/Router not connected

-100 = Modem/Router powered off                             

Signal Quality

UINT8

Written here by the controller

Router Name

ASCII

Entered by user when defining the Router.

NetWork Type

INT 16

0=No service | 1=GSM/GPRS/EDGE| 2=WCDMA/HSDPA/HSPA(3G) | 3=TDSCDMA | 4=LTE 4G) | 5=CDMA | 6=EVD0 | 7=CDMA-EVD0

PIN Code

ASCII

Entered by user when defining the Router.

SMS Received Queue

UINT8

 

This is the number of SMS messages that are in the Router queue, that have not been transferred to the controller.
Note that the only way for the controller to accept the message is via the Receive SMS ladder function.

 

 

 

Related Topics

LF: Get/Set Router Structs

SMS: Creating Messages

SMS: Sending via Ladder

LF: Receive SMS

LF: Initialize Router Modem

Buffers

Parse

Configuring a Modem