PLC commands #Q
PLC address settings (PLC Change Address) |
Address type, RS485 Baudrate, IP-address, Subnet, Gateway |
|
Connect to WiFi (PLC WIFI Connect) |
SSID string, Password string |
|
Get WiFi list (PLC WIFI List) |
Array-Id (SSID), Array-Id (RSSI), Callback macro |
#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 |
#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 |
#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 |