Component: DALI Slave (Comms: System)

From Flowcode Help
Jump to navigationJump to search


Author MatrixTSL
Version 1.0 (Release)
Category Comms: System


Image DALI Slave component

A serial based communications protocol designed for controlling lighting, specifically digitally controlled dimmable fluorescent ballasts. DALI requires the signals to be level shifted from VCC and GND to +9.5V - +25.5V and GND using external circuitry.

Examples

DALI Master Example, reads the value of a keypad and sends out DALI commands based on the key pressed, 1 = switch on a slave's light, 2 = switch off a slave's light, 3 = read the slave's light level. FC6 Icon.png DALI Master Example1 DALI Slave Example, listens for DALI messages and checks that the group is correct before attempting to process the request and if required reply to the master. FC6 Icon.png DALI Slave Example1

Downloadable macro reference

ReceiveForwardFrame

Attempts to receive an 16-bit command from the master controller.

0xFFFF indicates timeout or no reply

Parameters

This macro has no parameters


Return value

UINT


CheckForIndividualAddress

Tests the 16-bit incoming data for the defined individual address

Returns 0 for no match, returns 1 for a match

Parameters

UINT Data


Return value

BYTE


CollectDataByte

Returns the data byte from a 16-bit data packet

Parameters

UINT Data


Return value

BYTE


CheckForGroupAddress

Tests the 16-bit incoming data for the defined group address

Returns 0 for no match, returns 1 for a match

Parameters

UINT Data


Return value

BYTE


CollectPacketType

Returns if the incoming packet was data or a command.

Return of 0 = Data

Return of 1 = Command

Parameters

UINT Data


Return value

BYTE


TransmitBackwardFrame

Send out a 8-bit frame consisting of a data byte.

Parameters

BYTE Data
Data Byte


Return value

BYTE


Initialise

Configures the UART serial interface.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

TX Pin

This property is of type Single digital pin and can be referenced with the variable name TXPIN.

No additional information


RX Pin

This property is of type Single digital pin and can be referenced with the variable name RXPIN.

No additional information


Individual Address

This property is of type Unsigned integer and can be referenced with the variable name IndAddress.

Address ranging from 0-63

Group Address

This property is of type Unsigned integer and can be referenced with the variable name GrAddress.

Address ranging from 0-15

Injector

This property is of type Fixed list of ints and can be referenced with the variable name Injector.

No additional information