PLCM09 variables

PLCM09 device is a Wireless Modem with LED and digital I/O. The behavior of the related System Variables are depend on how the module has been configured inside the System Settings (see "PLCM09 Plugin Wireless Modem" for additional information)

Protocol Editor Settings

Path: ProjectView> Protocols

  1. Click + and select System Variables: the System Variables dialog is displayed.
  1. Select PLCM09 from the PLCModels list.
Tag Editor Settings

Path: ProjectView> Config > double-click Tags

  1. To add a tag, click +: a new line is added.
  2. Select System Variables from the Driver list: tag definition dialog is displayed.

Element Description Data type

Input1

Input2

Value of the Input signals

boolean

Read only

Output1

Output2

Value of the output signals

Output variables are read/write only when configured as "User controlled" (see "PLCM09 Plugin Wireless Modem" for additional information). In the other configurations, where output signals are controlled directly from the PLCM09 module, the system variables are read only.

boolean

Read/Write

Led1

Led2

Value of the LED status

  • 0 = Off
  • 1 = On
  • 2 = Blink

LED variables are read/write only when configured as "User controlled" (see "PLCM09 Plugin Wireless Modem" for additional information). In the other configurations, where LED status are controlled directly from the PLCM09 module, the system variables are read only.

unsignedByte

Read/Write

Mobile Start

Write 1 inside this tag to force the mobile connection to start.

This is a write only variable, command will executed any time you rewrite it.

boolean

Write Only

Mobile Stop

Write 1 inside this tag to force the mobile connection to stop.

This is a write only variable, command will executed any time you rewrite it.

boolean

Write Only

Mobile Restart

Write 1 inside this tag to force the mobile connection to restart.

This is a write only variable, command will executed any time you rewrite it.

boolean

Write Only

Mobile State

Mobile connection state

0 IDLE
1 STARTING
10 RUNNING
100 CONNECTING
200 CONNECTED
300 STOPPING
-1 GENERICERROR
-10 SYSTEMERROR
-100 MODEMNOTFOUND
-101 MODEMBUSY
-110 MODEMCOMM
-120 MODEMTIMEOUT
-130 MODEMERROR
-200 SIMMISSING
-300 PINREQUIRED
-301 NEWPINREQUIRED
-310 PINERROR
-320 PUKREQUIRED
-330 PUKERROR
-400 ROAMINGBLOCKED
-500 BADCREDENTIALS

int

Read Only

Mobile Signal

Mobile signal quality (0-100)

Value of the signal detected when the device is started

byte

Read Only

Mobile Operator Mobile operator name (e.g. 'Vodafone')

string[8]

Read Only

Mobile Access Technology

Mobile access technology

-1 N/A
0 GSM (2G)
2 UTRAN (2G)
3 GSM W/EGPRS (2G)
4 UTRAN W/HSDPA (3G)
5 UTRAN W/HSUPA (3G)
6 UTRAN W/HSDPA and HSUPA (3G)

int

Read Only

Mobile Registration Status

Mobile registration status

-1 N/A
0 Not registered. Wireless Modem is not currently searching a new operator to register.
1 Registered on home network.
2 Not registered. Wireless Modem is currently searching a new operator to register.
3 Registration denied.
4 Unknown
5 Registered on roaming

int

Read Only

Mobile RX/TX Number or received/transmitted bytes

unsignedInt[2]

Read Only

Mobile Start Time (Sec) When mobile connection was started (in seconds since epoch)

unsignedInt

Read Only

Write Only Variables cannot be read. Be sure to not use the R/W access mode to avoid the read error icon.

JavaScript (Mobile Connection State)

The mobile connection state can be retrieved even from the below JavaScript interface where the "protocolSysVar" is the protocol instance code (e.g. "prot1", "prot2", etc.)

Mobile_State = tagMgr.invokeProtocolCommand(protoSysVar,"get_mobile_state", ""); // get modem status