Documentation for Intellect 4.11.0-4.11.3. Documentation for other versions of Intellect is available too.

Previous page Example with BacNet  Examples with Message services and notification services Next page


Formats and functions

Format of events procedure for the Relay:

OnEvent("GRELE", "_id_","_event_")

Operator format to describe actions with the Relay:

DoReact("GRELE","_id_","_command_");

Function to check the state of the Relay object:

CheckState("GRELE","number","state")

Format of events procedure for the Sensor:

OnEvent("GRAY","_id_","_event_")

Operator format to describe actions with the Sensor:

DoReact("GRAY","_id_","_command_");

Function to check the state of the Sensor object: 

CheckState ("GRAY","number","state")

Examples

Example of using events and reactions of the Relay object:

Enable relay 2 when connection with relay 1 is lost.

OnEvent("GRELE","1","SIGNAL_LOST")
{
    DoReact("GRELE", "2", "ON");
}

 Examples of using events and reactions of the Sensor object:

  1. It is required to switch the second sensor over to the second input if connection with the first sensor is lost.

    OnEvent("GRAY","1"," SIGNAL_LOST") //connection with first sensor is lost
    {
        DoReact("GRAY","2","SETUP","chan<2>"); //sensor is on the second input
    }
  2. Open the second sensor and enable the rollback record of the first camera when the first sensor is closed.

    OnEvent("GRAY","1"," ON") //first sensor is closed
    {
        DoReact("GRAY","2","SETUP","type<1>"); //open the second sensor
        DoReact("CAM","1","REC","rollback<1>");//perform rollback record from the first camera
    }
  • No labels