Difference between revisions of "Component: DALI Slave (Comms: System)"
(XML import - Pre 8.0 release) |
|||
Line 22: | Line 22: | ||
==Examples== | ==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. | 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. | ||
− | |||
{{Fcfile|DALI_Master.fcfx|DALI Master Example1}} | {{Fcfile|DALI_Master.fcfx|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. | 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. | ||
− | |||
{{Fcfile|DALI_Slave.fcfx|DALI Slave Example1}} | {{Fcfile|DALI_Slave.fcfx|DALI Slave Example1}} | ||
Revision as of 14:50, 22 May 2018
Author | MatrixTSL |
Version | 1.0 (Release) |
Category | Comms: System |
Contents
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.
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.
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
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
CollectDataByte
Returns the data byte from a 16-bit data packet
Parameters
- UINT Data
Return value
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
CollectPacketType
Returns if the incoming packet was data or a command.
Return of 0 = Data
Return of 1 = Command
Parameters
- UINT Data
Return value
TransmitBackwardFrame
Send out a 8-bit frame consisting of a data byte.
Parameters
- BYTE Data
- Data Byte
Return value
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