In this example we will deal with a water tank, which is a typical case of remote installation with needs for remote control and immediate notification of the persons in charge if something goes wrong.
To implement the needed functionality, we will use the ready-made procedures performed by the GAT device.
The scenario of this application is as follows:
The GAT device is used to supervise the water level in the tank and control the drain valve.
The tank is equipped with a level sensor with voltage output
in the range of 0,0 to 10,0V for water level in the range of 0,0 to 2,5 meter.
The sensor output is connected to Input #1 of the GAT device.
There is also a drain valve, used for watering.
This is controlled by the Output #1 of the GAT device.
The functionality provided is as follows:
- The administrator can start watering, by sending the message:
WATER ON
The device will activate the tank valve and reply with the message:O.K.
WATER ON
The administrator can stop watering, by sending the message:WATER OFF
The device will deactivate the valve and reply with the message:O.K.If the administrator does not send a watering stop message, the tank drain valve will close 30 minutes after the watering start message.
WATER OFF - The administrator of the tank is able to check the GAT device with an unanswered telephone call.
If the device is functioning properly, it will answer with a telephone call to the administrator. - The administrator can ask the water level at any time by sending the message:
0000 ID
The GAT device will answer with a message like:2022/01/10,13:30:20
WATER-TANK #1
LEVEL:1.74m
ID:
GAT-1 version:1.2 SN:294E08 - If the water level falls below a predetermined limit of 40cm,
the GAT device will immediately send a warning message to the administrator:
2022/01/10,13:30:20
WATER-TANK #1
LEVEL:0.38m
WATER LEVEL LOW!
The above descripted functionality is implemented with the following program:
;~ FPwizard 07/18/22,20:00:01 |
This application program has been produced with the help of the dialog window "Functional Parameters Wizard", which is part of the "GATcomm" support application.
The user can open the text editor window, start this dialog window and fill in the data in the input fields.
The application program is created by clicking the button "Apply" on this window.
Then he can upload the application program to the connected GAT device to test it and edit the program text or re-open the window to modify it.
The application program is uploaded to the device with 2 successive messages:
The "GATcomm" application sends the messages in a "compressed" form,
with only the necessary spaces and line changes.
If we ask these settings through the "FP" command,
the device will answer us in a fairly understandable text format:
* * *
On this example, we used some ready-made features provided by the GAT device,
like the ability to calibrate the Analog Input Value
in the range of 0..250cm with a resolution of 1cm ( command "AIC" ),
and set the Analog Value Thresholds ( command "AIT" )
to trigger the alert message after the Input state change from "1" to "0" at the level of 40cm.
Also we used some special characters in the message Header ( "HD" ),
to present the Water Level value in a nice way format.
In a further example, we will use the GAT Automation Language
to develop a more sophisticated application with more features,
including the control of the water filling pump for the tank.