Материал из for iRidium developers
Перейти к: навигация, поиск
Эта страница является переводом страницы BACnet. Перевод выполнен на 97%.

Other languages:
English • ‎русский

The driver is meant to control BACnet equipment. Use a project example to have a look at it:

download the examples:


Description

iRidium for BACnet is a set of tools to create an interface to control Smart home or office on the basis of BACnet equipement. It realizes commands of BACnet protocol.


Connection

Control panels (iOS, Android, Windows, Mac) can control BACnet equipment only via BACnet controller.


BacnetConnection.png

Import configuration from SBO Workstation to iRidium Studio

You can save the configuration file in xml format and import to iRIdium

1 Open StruxureWare Building Operation Workstation and authorize there.

2 Click by the right mouse button to Enterprise server in StruxureWare Building Operation. Select "Import" from the list of options

BacnetImport.png

3 Create a new project in iRidium Studio. Open PROJECT DEVICE PANEL and select Import > BACnet Project(*.xml). The driver with commands and feedback will be created from your xml file.

BacnetStudioImport.png


Добавление драйвера вручную

If you can't import data from xml, add the BACnet driver to the project from iRidium database:

  1. Launch iRidium Studio and create a new iRidium project
  2. Open DEVICE BASE side panel and find BACnet driver. Drag and drop BACnet to PROJECT DEVICE PANEL


AddDevice.png

Adding BACnet driver


Indicate the controller address in iRidium project otherwise it will not work.


Connection settings

When a driver is added to a project with the help of import or manually, indicate connection settings.

DriverParams.png
  • Host - controller IP address
  • Port - controller connection port
  • Device Instance - ID of Bacnet device. It is seen in the controller web-interface
  • Priority - the value of this parameter can vary from 1 to 16 and it means the priority of writing an opearation. Prioritising BACnet commands


Change of Connection Settings

You need the possibility to change connection properties when you disconnect from the Wi-Fi network of the automation object and start using 3G or another Wi-Fi network. To maintain control of the object you need to switch from the local to public IP-address of the Internet router.

The switch is not automatic. You have to select the connection mode. For remote acces you have to make ports for controlling the automation system public. In order to do that you have o set up the Port Forwarding service on your Internet router. VPN can provide protected connection.


1 Download the template (*.js) (right-click button: "Save object as ..."), add the template in the script editor with the buttonIcon Scripts.png (+) Add Script from file


2 Set up script properties as it is shown in the example:

function Internal_1() {
IR.GetDevice('BACnet').SetParameters({Host: "192.168.0.95", Port: 5001, DeviceInstance: "2218114", Priority: "16"});
}
function External_1() {
IR.GetDevice('BACnet').SetParameters({Host: "215.110.10.10", Port: 5001, DeviceInstance: "2218114", Priority: "16"});
}

Copy the driver name from Projeсt Device Panel - the list of properties has to be copied from the example.


3 Select the button which will be responsible for the switch of Internal and External properties. Open Macros Editor for the Press event (Object Properties > Programming), select the Script Call command and add it by double-clicking on it. Select the name of the function which will be activated by the button:

Script call internal-external.png

Now each pressing on the button will apply the corresponding connection properties.


Commands & Feedbacks

Commands and feedback channels have to be assigned to graphic items to control equipment:

  • A command is assigned to a graphic item.
  • Feedback channel is assigned to a graphic item to display the variable state.


To assign commands or channels to graphic items use the drag&drop method.

To send a command, drag it on a graphic item. To display feedback, drag the channel on the graphic item and indicate where to output the value (Value):

SendValue.png


Setting up

To set a command or a feedback channel, set the following fields:

  • Object Type - type of variable
  • ObjectID - variable ID (input, output). It can be found in the controller web-interface -> BaCnet Interface - Application - Points - Variable - Advanced Tab

At the moment the following types of variables are supported:


Object Types

type description
analog-input Analogue input
analog-output Analogu output
analog-value Analogue value
binary-input Binary input
binary-output Binary output
binary-value Binary value
multi-state-input Input with multiple states
multi-state-output Output with multiple states
multi-state-value Value with multiple states