Driver-specific functions

Previous chapterNext chapter Show allShow all    Hide allHide all

This driver supports the following functions:

Protocol

The protocol was defined by the ASHRAE (American Society of Heating, Refrigeration and Air-Conditioning Engineers, Inc.) and is described extensively in the ASHRAE standard 135-2001 + Appendix A – L „A Data Communication Protocol for Building Automation and Control Networks".

Connection

The BACnet standard offers five options on the data link and physical layers of the OSI layer model (which is reduced to four layers). The driver only supports the option ISO 8802-3, known as "Ethernet". This option (together with the other layers of the BACnet protocol) is also called "BACnet/IP, Annex J".

BACnet Layers

 

 

 

 

OSI Layers

BACnet Application Layer

 

 

 

 

Application

BACnet Network Layer

 

 

 

 

Network

ISO 8802-2 Type1

 

MS/TP

PTP

LonTalk

Data Link

ISO 8802-3

ARCNET

EIA-485 (RS485)

EIA-232 (RS232)

 

Physical

The communication of this option is based on ISO 8802-2 Type1 (Ethernet) in the data link layer. This means that the PC requires an Ethernet card with connection to a TCP/IP network.

Definition

BAS

BACnet automation station

BAZ

Command output time

COV

Change of Value

DA

Data type

DCS

Double Command State for TK 46

KT

Channel type

OB

Object

RPM

ReadPropertyMultiple

General function description

The BACnet automation station (BAS) is represented as a Device-Object in the BACnet driver. The BAS behaves as a server. For the peer-to-peer data exchange the BACnet driver connects as a client. Each datapoint of the BAS is modeled as a BACnet object. For the data update the COV Subscription as well as the ReadPropertyMultiple (RPM) service can be used. The cycle time for the resubscription as well as the polling interval for the RPM service can be defined in four priority groups (see Configuration of the BACnet driver).

A time synchronization from the BACnet driver in the direction of BAS can be defined.

Establishing connection and exchanging data

As a client the BACnet driver sends the "Who-Is" service to the subnet mask as a broadcast. The existing BAS answers with an "I-Am". The driver variable of the type "Component status" resembling the name of the device object is set to 0 (OK).

With the service "Who-Has(object_name)" the client gets the BACnet objects of the according server. With the service "I-Have" the server sends the objects (incl. the properties "object_instance" and "object_type") to the client. Unanswered "Who-Has" services are repeated according to the defined number of retries. If there are BACnet objects that still do not answer with the "I-Have" service, the component status of the according BAS is set to 1 (initializing error). The corresponding object names are written into the log file.

The client then starts the COV subscriptions resp. RPM services for the existing objects. If the value (present_value) or the status (status_flags) of a COV object changes, the client is informed with a COV notification. Then it requests the time stamp (event_time_stamps) for the according object from the server with the ReadProperty service. With the RPM services the properties Present_Value, Status_Flags and Event_Time_Stamps are cyclically requested from the server.

Send data (Present_Value, Status_Flags, Event_Time_Stamps) are sent to the server with the WritePropertyMultiple service. If one of these properties cannot be written to on the server, the server acknowledges this with an error message („Rec_error: WritePropertyMultiple").

Saving value and status

Values, stati and time stamps of the output variables are saved spontaneously. So a data loss in the case of a computer breakdown is avoided. The saved information is read on a restart.

Breakdown monitoring

In order to check the presence of the server the client cyclically sends "Who-Is" telegrams. The cycle time is defined in the driver configuration dialog under BACnet settings.

If the server does not answer with an "I-Am" within a certain time, the interface will be considered as not operative. The corresponding virtual datapoint of the type BACnet component status is set to 64 (NOK). All process datapoints of this BAS are set to disturbed (invalid).

The server announces the reestablishment of the connection with an "I-Am". The further procedure is the same as the one with the connection establishment.

Access methods

The values of the variables can be read spontaneous or by polling. The type of polling can be selected via the property "priority" of the individual variables
If the hardware allows the reading of time stamps, the variables get these time stamps, otherwise the variables get the time stamps from the driver.

Polling

If the variable property "Priority" is set to "Higher", "High" or "Highest", the variable values will be polled in the interval defined for the according priority in the driver configuration (page "General"). For this, the BACnet service ReadPropertyMulti (reads the object properties "present_value", "status_flags" and "event_time_stamps") is used.

Spontaneous

If the variable property "Priority" is set to "Normal", the variable values will be read with the BACnet service COV ("change of value"). After the first request of the variable value, a so-called "COV subscription" will be executed, i.e. the according object will be asked to send a COV notification telegram each time the value changes.

The COV subscription is valid for the time defined for the priority "Normal" in the driver configuration. After that time the device will stop sending value changes. If in this case the variable value is still needed, the driver will execute another COV subscription.

After receiving the COV notification of BACnet objects, the properties "present_value" and "status_flags" (FAULT <=> IBit) are read and "event_time_stamps" is requested with the service ReadProperty. If the received time is invalid (0 or 255), the BACnet driver will use the current computer time.

Taking back values from the priority array:

For some object types, you can remove values set by zenon from the BACnet priority array of the variable on the PLC. However, this cannot be achieved directly via the driver; you will need a VBA script for this.


Example for a VBA script:

Sub ResetPrioArray()

Dim Var As Variable

Set Var = Variables.Item("TestVar 0")

Var.SetValueWithStatus 0, 262144, 0, 0 '262144 = Hex 40000, corresponds to the set I-Bit

End Sub

Limitations

If you launch the driver several times, you will need different UDP ports for every driver. These ports also have to be configurable on the PLCs (BACNet Server).

Priority: The driver sends set values with priority 8