PLC commands #Q

PLC address settings

(PLC Change Address)

#QCA

Address type, RS485 Baudrate, IP-address, Subnet, Gateway

Connect to WiFi

(PLC WIFI Connect)

#QWC

SSID string, Password string

Get WiFi list

(PLC WIFI List)

#QWL

Array-Id (SSID), Array-Id (RSSI), Callback macro


PLC address settings

#QCA

Address type, RS485 Baudrate, IP-address, Subnet, Gateway

The command sets the Address type, RS485 Baudrate, IP-address (32-bit value, IPv4), Subnet (32-bit value), and Gateway (32-bit value) of the PLC module.

This command requires 5 parameter anyway. Set all parameter making no sense to zero.

Note: As the settings are applied automatically by the PLCDesigner you only need this command if you want to overwrite the selected settings at runtime. Be careful when using it.

Address type

0

RS485

1

Static IP-address

2

mDNS


Connect to WiFi

#QWC

SSID string, Password string

The command establishes a connection to the selected network. the connection status can be queried with the calculation command plcW(). The return value of the signal strength is coded as follows:

Signal strength

-2

RS485

-1

Ethernet

0

No connection

1

WIFI unusable

RSSI < -110dB

2

WIFI not good

RSSI -90dB to -110dB

3

WIFI okay

RSSI -70dB to -90dB

4

WIFI very good

RSSI -30dB to -70dB

5

WIFI amazing

RSSI > -30dB


Get WiFi list

#QWL

Array-Id (SSID), Array-Id (RSSI), Callback macro

The command scans for all available WiFi networks, stores the result in two arrays (SSID and RSSI) and calls the callback macro at the end. The signal strength is coded as follows:

Signal strength

-2

RS485

-1

Ethernet

0

No connection

1

WiFi unusable

RSSI < -110dB

2

WiFi not good

RSSI -90dB to -110dB

3

WiFi okay

RSSI -70dB to -90dB

4

WiFi very good

RSSI -30dB to -70dB

5

WiFi amazing

RSSI > -30dB