WISE controller offers CGI Command setting. This function allows sending pre-input CGI Command to pre-set remote network device under certain conditions.
WISE-52xx/WISE-224x supports the CGI command receiving function. This function allows WISE-52xx/WISE-224x to receive the CGI command from other network devices. The content of CGI command can be used in IF condition statements to trigger the THEN/ELSE actions.
CGI Command Setting
- WISE-71xx, 72xx, 75xx, 790x
- WISE-580x
- WISE-284x, 52xx, 224x
The CGI command setting page is shown as below:
Follow the following steps:
-
Specify the numbers of CGI Commands you want to set up from the dropdown list of the “CGI Amount” field.
-
Specify the CGI group number from the dropdown list of the “Index” field.
-
Enter the Remote Server IP or domain name, Port number and CGI Command in the “CGI Command” field. In addition, it provides an encoded string that allow user to add current I/O channel value into the CGI Command. You can use the I/O channel selection interface (shown as above) to add the I/O channel encoded string into the CGI Command.
-
Enter the number in the “Retry Count” field. It means the retry number WISE will try when it can’t connect with Remote Server.
-
Enter the number in the “Connection Timeout” field. It means the time interval for WISE to send CGI command to the Remote Server and wait for the response. The unit is Second.
-
Repeat steps 2 ~ 5. After all CGI groups settings are completed, click “Save” button to save the changes.
The CGI command setting page is shown as below:
Follow the following steps:
-
Specify the numbers of CGI Commands you want to set up from the dropdown list of the “CGI Amount” field.
-
Specify the CGI group number from the dropdown list of the “Index” field.
-
Enter the Remote Server IP, Port number and CGI Command in the “CGI Command” field. In addition, it provides an encoded string that allow user to add current I/O channel value into the CGI Command. You can use the I/O channel selection interface (shown as above) to add the I/O channel encoded string into the CGI Command.
-
Enter the number in the “Retry Count” field. It means the retry number WISE will try when it can’t connect with Remote Server device. The range of retry count is between 0 and 65535.
-
Enter the number in the “Retry Interval” field. It means the time interval between each retry connection. The unit is Second and the range of retry interval is between 0 and 65535.
-
Repeat steps 2 ~ 5. After all CGI groups settings are completed, click “Save” button to save the changes.
WISE-52xx/WISE-224x supports fully CGI command operations as CGI command sending and CGI command receiving.
-
The setting of CGI command sending page is shown as below:
-
Click the “CGI Sending” Tab on the right-top corner of the CGI command Setting page.
-
Click on “Add new CGI Servers” to add the new CGI servers which will receive the CGI commands.
-
After clicking the “Add new CGI Servers”, the CGI Server Setting Page will appear. The setting page interface will be shown as below:
-
In the CGI Server Setting Page, you can input the name of the remote CGI Server in the “Nickname” field and you could also input the description of this CGI Server in the “Description” field.
-
Enter the remote CGI Server IP address (or domain name) and Port number in the related fields.
-
If the remote CGI Server requires account and password validation, please select the “Enable” checkbox in the Authentication field, doesn’t need account and password validation, uncheck the “Enable” checkbox.
-
Enter the number in the “Retry Count” field. It means the retry number WISE-52xx/WISE-224x will try when it can’t connect to the remote CGI Server device.
-
In the “FTP Transfer” field, please specify the FTP Servers to receive the CGI Server files that sent by the WISE-52xx/WISE-224x.
-
After the setting of remote CGI Server, please continue the steps for the CGI Command setting.
-
Click on “Add new CGI Command” to add the new CGI Command which will be sent by WISE-52xx/WISE-224x to the remote CGI Server. The setting page interface will be shown as below:
-
In the CGI Command Setting Page, you can input the name of the CGI Command in the “Nickname” field and you could also input the description of this CGI Command in the “Description” field.
-
Enter the content of the CGI Command in the “CGI Command” field. In addition, it provides encoded strings for users to add current I/O channel value or Internal Register value into the CGI Command content. To make it easy to add the encoded string, WISE provides “Real-time variable editor” for operation.
-
To verify if the setting of the CGI Server and the CGI Command is correct or not, please click “Testing” in the “Connection Testing” field.
-
After complete all settings, click the “OK” button to confirm the CGI Command setting, and return to the CGI Server Setting page.
-
Repeat steps 10 ~ 14 to complete settings of all CGI Commands, After you finish all the CGI Server settings, click “Save” button to save the settings.
-
The setting of CGI command receiving page is shown as below:
-
Click the “CGI Receiving” Tab on the right-top corner of the CGI Command Setting page.
-
Click on “Add” button in the “Variable Name” field to add variables which will be used in the CGI command.
-
Click on “Add” button in the “Source Address” field. It means WISE-52xx/WISE-224x can recognize the received CGI commands from the IP address which user defines. User can use the “Source Address” of CGI command in the IF condition setting.
-
After you finish all the CGI command receiving settings, click “Save” button to save the settings.
The settings steps are as below:
The settings steps are as below:
CGI Command Rule Setting
-
CGI Command Condition:
-
CGI Command Action:
Identify the value of CGI Command to be equal to, greater than, less than, equal to or greater than, equal to or less than the Variable, if the result matches the evaluation criteria, the Action will be executed.
CGI Command | Operator | Variable | Description | Condition Statements |
CGI index N | = > < ≥ ≤ |
User-Defined Value | Using a user-defined value to compare with this CGI command value. | continue to be TRUE when the status matches the criteria |
Internal Register | Using the internal register value to compare with this CGI command value. | |||
AI Channel Value | Using AI channel values of module to compare with this CGI command value. | |||
AO Channel Value | Using AO channel values of module to compare with this CGI command value. | |||
DI Channel Counter Value | Using DI channel counter values of module to compare with this CGI command value. | |||
DO Channel Counter Value | Using DO channel counter values of module to compare with this CGI command value. | |||
Input Register Value | Using input register values of module to compare with this CGI command value. | |||
Holding Register Value | Using holding register values of module to compare with this CGI command value. |
Users can send CGI Command in the Action statement.
CGI Command | Action | Description | Execution Type |
CGI index N | Send | Send CGI Command | One Time |
CGI Command Application Example
Web Server receiving CGI Commands
Scenario | Example Document | ||||
WISE controller supports CGI command sending function that can be used to control the remote devices or send back the channel data to back-end server. This document provides an example of CGI channel data transmission. It will show you how to set up CGI commands and how to use them to work with ready-to-use web-side code to receive the I/O channel data sent by WISE and display the data on webpage. Each data has a specific tag therefore could be freely used for further analysis or other purposes. |
|
||||
Graphic Illustration | |||||