3 memory mapping, Bacnet binary input block (0ч60 – 0ч67), Bacnet binary output block (0ч400 – 0ч407) – Spectrum Controls 2080sc-BAC User Manual

Page 36: 3 memory mapping -18

Advertising
background image

3-18

Chapter 3: Configuring the Module

User’s Manual Pub. 0300274-01 Rev. A.0

(* Write Input Table to Module *)

bacnet_module_address := 112;
bacnet_module_datalen := 8;
bacnet_module_write_fn(TRUE, BACNET_MODULE_SLOT,
bacnet_module_address, bacnet_module_datalen,
bacnet_convert_fn.bac_raw_tbl);

Similarly, for Analog Output, a read operation is performed to read the whole
analog table to

bac_raw_tb

l defined in function block

bacnet_convert_fn

.

Then individual AnalogOutput objects are written to the variable after conversion
from ULINT to a tag data type.

(* Read Output Table from Module *)

bacnet_module_read_fn(TRUE, BACNET_MODULE_SLOT,
bacnet_module_address, bacnet_module_datalen,
bacnet_convert_fn.bac_raw_tbl);

(* 0, AnalogOutput, ao0 *)

bacnet_convert_mode := 0;
bacnet_convert_offset := 0;
bacnet_convert_fn(bacnet_convert_offset,
bacnet_convert_var, bacnet_convert_mode);

tag4 := ANY_TO_INT(bacnet_convert_fn.tmp_raw_var);

3.5.3 Memory Mapping

This section discusses memory mapping between a BACnet module and the PLC.
The BACnet module has internal memory that is mapped to the PLC memory
range. On the PLC, each slot has 2 Kbytes of memory. The internal RAM in the
Module is arranged as below.

This section is for reference only as all the mappings are automatically generated
in the structured text.

BACnet Binary Input Block (0Ч60

– 0Ч67)

Register Name Addr.

Comments

Default

R/W

From PLC

R/W From
Module

BAC_BI

0Ч60 –
0Ч67

BACnet Binary Input data
(tags 0 – 63)

0

W

R

Each bit of the BACnet Binary Input represents a true/false value for one
BACnet Binary Input object. This block supports up to 64 such objects.

BACnet Binary Output Block (0Ч400

– 0Ч407)

Register Name Addr.

Comments

Default

R/W

From PLC

R/W From
Module

BAC_BO

0Ч400

0Ч407

BACnet Binary Output data
(tags 0 – 63)

0

W

R

Advertising