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

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


The driver is meant to control Beckhoff ADS equipment. To understad the driver, use the project example:

download the examples:


Description

iRidium for Beckhoff is a set of tools for creating interfaces to control homes or offices on the basis of Beckhoff equipment.


Connection

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


BeckhoffConnection.png

Adding the driver manually

To get started you add the Beckhoff driver to the project from the database iRidium:


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


AddBeckDriver.png

Adding the Beckhoff driver


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


Connection settings

When the driver is added to the project, specify the connection settings.

BeckhoffDriverParams.png
  • "'Host"' - IP address of the controller
  • "'Port"' port connect to the controller
  • "'Net ID"' - the ID of the Bacnet controller. To see it in the controller settings utility TwinCat System Manager
NetID.png

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('Beckhoff').SetParameters({Host: "192.168.0.95", Port: 5001, TargetNetID: "5.9.57.45.1.1"});
}
function External_1() {
IR.GetDevice('Beckhoff').SetParameters({Host: "215.110.10.10", Port: 5001, TargetNetID: "5.9.57.45.1.1"});
}

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


Settings

To set a command or feedback set values in the following fields:

  • Target Port - the port on which you want to refer to the variable. Designation types:


Name Port
Logger

100

Event Logger

110

IO

300

Additional Task 1

301

Additional Task 2

302

PLC RC 1

801

PLC RC 2

811

PLC RC 3

821

PLC RC 4

831

Canshaft Contr

900

System Service

10000

Scope

14000

  • Type - The type of the variable specified in the TwinCat System Manager when you create the channel or tag. iRidium supports the following types:


Type IEC61131-3
INT8

SINT

UINT8

USINT

INT16

INT

UINT16

UINT

INT32

DINT

UINT32

UDINT

INT64

LINT

UINT64

ULINT

REAL32

WORD

REAL64

DWORD

BIGTYPE

LREAL

BIT

BOOL

The type of the variable in TwinCat System Manager, you can look in the settings variable

BeckhoffChannelTypes.png
  • PLC Var Name - The variable name specified when created in TwinCat System Manager.
BeckhoffChannelName.png