Jump to content

Component: DALI Master (Comms: System): Difference between revisions

From Flowcode Help
XML import - Pre 8.0 release
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{| style="width:50%"
 
{| width="50%"
|-
|-
| width="20%" style="color: gray;" | Author
| width="20%" style="color:gray;" | Author
| MatrixTSL
| MatrixTSL
|-
|-
| width="20%" style="color: gray;" | Version
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
| 1.0
|-
|-
| width="20%" style="color: gray;" | Category
| width="20%" style="color:gray;" | Category
| Comms: System
| Comms: System
|}
|}




==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.


==[[File:Component Icon 5aefac05_ee5e_4d51_9f31_05281900a97e.png|Image]] DALI Master component==
==Component Source Code==
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==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_DALI_Master.fcfx FC_Comp_Source_DALI_Master.fcfx]
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}}
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DALI_Master.fcfx FC_Comp_Source_DALI_Master.fcfx]
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}}
==Detailed description==


==Downloadable macro reference==


===<span style="font-weight: normal;"><u><tt>ReceiveBackwardFrame</tt></u></span>===
Attempts to receive an 8-bit reply


0 indicates timeout or no reply


'''Parameters'''


:''This macro has no parameters''




'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>TransmitForwardFrame</tt></u></span>===
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'''


:[[Variable Types|BYTE]] ''Address''
::Address byte


:[[Variable Types|BYTE]] ''Data''
::Data Byte




'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>TransmitIndividualForwardFrame</tt></u></span>===
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.
''No detailed description exists yet for this component''


If no reply is detected then the Return value will be 0.
==Examples==


'''Parameters'''


:[[Variable Types|BYTE]] ''Address''
::Individual Address 0-63


:[[Variable Types|BYTE]] ''Type''
::0 = Data, 1 = Command


:[[Variable Types|BYTE]] ''Data''




'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>TransmitGroupForwardFrame</tt></u></span>===
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'''


:[[Variable Types|BYTE]] ''Address''
::Group Address 0-15


:[[Variable Types|BYTE]] ''Type''
::0 = Data, 1 = Command


:[[Variable Types|BYTE]] ''Data''




'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
Configures the UART serial interface.


'''Parameters'''


:''This macro has no parameters''


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}}


'''Return value'''
For a DALI Slave example see: [[Component: DALI Slave (Comms: System)]]


:''This call does not return a value''






==Simulation macro reference==


''This component does not contain any simulation macros''




==Property reference==
<span style="font-weight: normal;"><u>TX Pin</u></span>


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


''<span style="color:red;">No additional information</span>''




==Macro reference==


<span style="font-weight: normal;"><u>RX Pin</u></span>
===Initialise===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
| colspan="2" | Configures the UART serial interface.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


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


''<span style="color:red;">No additional information</span>''
===ReceiveBackwardFrame===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ReceiveBackwardFrame'''
|-
| colspan="2" | Attempts to receive an 8-bit reply  0 indicates timeout or no reply&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===TransmitForwardFrame===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''TransmitForwardFrame'''
|-
| colspan="2" | 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.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Address byte&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | Data Byte&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===TransmitGroupForwardFrame===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''TransmitGroupForwardFrame'''
|-
| colspan="2" | 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.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Group Address 0-15&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Type
|-
| colspan="2" | 0 = Data, 1 = Command&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===TransmitIndividualForwardFrame===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''TransmitIndividualForwardFrame'''
|-
| colspan="2" | 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.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Individual Address 0-63&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Type
|-
| colspan="2" | 0 = Data, 1 = Command&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


<span style="font-weight: normal;"><u>Injector</u></span>


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


''<span style="color:red;">No additional information</span>''
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" class="mtx-class-macrohead" | '''Properties'''
|-
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Serial Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | TX Pin
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | RX Pin
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | API
|-
| colspan="2" | &nbsp;
|}

Latest revision as of 14:37, 13 July 2026

Author MatrixTSL
Version 1.0
Category Comms: System


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.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_DALI_Master.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_DALI_Master.fcfx

Detailed description

No detailed description exists yet for this component

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

For a DALI Slave example see: Component: DALI Slave (Comms: System)






Macro reference

Initialise

Initialise
Configures the UART serial interface. 
- VOID Return


ReceiveBackwardFrame

ReceiveBackwardFrame
Attempts to receive an 8-bit reply 0 indicates timeout or no reply 
- BYTE Return


TransmitForwardFrame

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. 
- BYTE Address
Address byte 
- BYTE Data
Data Byte 
- BYTE Return


TransmitGroupForwardFrame

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. 
- BYTE Address
Group Address 0-15 
- BYTE Type
0 = Data, 1 = Command 
- BYTE Data
 
- BYTE Return


TransmitIndividualForwardFrame

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. 
- BYTE Address
Individual Address 0-63 
- BYTE Type
0 = Data, 1 = Command 
- BYTE Data
 
- BYTE Return


Property reference

Properties
Serial Properties
TX Pin
 
RX Pin
 
Simulation
API