Difference between revisions of "Component: DALI Master (Comms: System)"
(XML import BR) |
|||
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}} | ||
− | |||
==Downloadable macro reference== | ==Downloadable macro reference== |
Revision as of 15:45, 16 February 2017
Author | MatrixTSL |
Version | 1.0 (Release) |
Category | Comms: System |
Contents
DALI Master 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. The master component can addess up to 64 individual slaves & up to 16 groups.
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
ReceiveBackwardFrame
Attempts to receive an 8-bit reply
0 indicates timeout or no reply
Parameters
- This macro has no parameters
Return value
TransmitForwardFrame
Send out a 16-bit frame consisting of the 8-bit address and data bytes.
After sending the controller will attempt to receive
If a reply is detected then the Return value will equal to the reply.
If no reply is detected then the Return value will be 0.
Parameters
- BYTE Address
- Address byte
- BYTE Data
- Data Byte
Return value
TransmitIndividualForwardFrame
Sends out an individual frame containing address and data.
After sending the controller will attempt to receive a reply.
If a reply is detected then the Return value will equal to the reply.
If no reply is detected then the Return value will be 0.
Parameters
- BYTE Address
- Individual Address 0-63
- BYTE Type
- 0 = Data, 1 = Command
- BYTE Data
Return value
TransmitGroupForwardFrame
Sends out a group frame containing address and data.
After sending the controller will attempt to receive a reply.
If a reply is detected then the Return value will equal to the reply.
If no reply is detected then the Return value will be 0.
Parameters
- BYTE Address
- Group Address 0-15
- BYTE Type
- 0 = Data, 1 = Command
- BYTE Data
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
Injector
This property is of type Fixed list of ints and can be referenced with the variable name Injector.
No additional information