Difference between revisions of "Component: DALI Slave (Comms: System)"

From Flowcode Help
Jump to navigationJump to search
 
(10 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 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.
  
==[[File:Component Icon c714f39e_c8fb_413f_afda_2d169e655134.png|Image]] DALI Slave component==
+
==Component Pack==
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==
+
COMMSC
  
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.
+
==Detailed description==
  
{{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.
 
  
{{Fcfile|DALI_Slave.fcfx|DALI Slave Example1}}
 
  
 +
''No detailed description exists yet for this component''
  
==Downloadable macro reference==
+
==Examples==
  
===<span style="font-weight: normal;"><u><tt>ReceiveForwardFrame</tt></u></span>===
 
Attempts to receive an 16-bit command from the master controller.
 
  
0xFFFF indicates timeout or no reply
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
 +
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}}
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
+
For a DALI Master example see: [[Component: DALI Master (Comms: System)]]
  
 +
==Downloadable macro reference==
  
===<span style="font-weight: normal;"><u><tt>CheckForIndividualAddress</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Tests the 16-bit incoming data for the defined individual address
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveForwardFrame'''
 +
|-
 +
| colspan="2" | Attempts to receive an 16-bit command from the master controller.  0xFFFF indicates timeout or no reply&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Returns 0 for no match, returns 1 for a match
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForIndividualAddress'''
 +
|-
 +
| colspan="2" | Tests the 16-bit incoming data for the defined individual address Returns 0 for no match, returns 1 for a match&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| 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''
 +
|}
  
:[[Variable Types|UINT]] ''Data''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CollectDataByte'''
 +
|-
 +
| colspan="2" | Returns the data byte from a 16-bit data packet&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForGroupAddress'''
 +
|-
 +
| colspan="2" | Tests the 16-bit incoming data for the defined group address Returns 0 for no match, returns 1 for a match&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| 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><tt>CollectDataByte</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Returns the data byte from a 16-bit data packet
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CollectPacketType'''
 +
|-
 +
| colspan="2" | Returns if the incoming packet was data or a command. Return of 0 = Data Return of 1 = Command&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|UINT]] ''Data''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TransmitBackwardFrame'''
 +
|-
 +
| colspan="2" | Send out a 8-bit frame consisting of a data 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''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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''
 +
|}
  
:[[Variable Types|BYTE]]
 
  
 
===<span style="font-weight: normal;"><u><tt>CheckForGroupAddress</tt></u></span>===
 
Tests the 16-bit incoming data for the defined group address
 
 
Returns 0 for no match, returns 1 for a match
 
 
'''Parameters'''
 
 
:[[Variable Types|UINT]] ''Data''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>CollectPacketType</tt></u></span>===
 
Returns if the incoming packet was data or a command.
 
 
Return of 0 = Data
 
 
Return of 1 = Command
 
 
'''Parameters'''
 
 
:[[Variable Types|UINT]] ''Data''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>TransmitBackwardFrame</tt></u></span>===
 
Send out a 8-bit frame consisting of a data byte.
 
 
'''Parameters'''
 
 
:[[Variable Types|BYTE]] ''Data''
 
::Data Byte
 
 
 
'''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''
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
 
==Simulation macro reference==
 
 
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==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''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
+
|-
 
+
|-
<span style="font-weight: normal;"><u>RX Pin</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Serial Properties
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>''
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | TX Pin
 
+
|-
 
+
| colspan="2" | &nbsp;
<span style="font-weight: normal;"><u>Individual Address</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''IndAddress''.
+
| width="90%" | RX Pin
 
+
|-
Address ranging from 0-63
+
| colspan="2" | &nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Group Address</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | DALI Slave Properties
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''GrAddress''.
+
|-
 
+
|-
Address ranging from 0-15
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Individual Address
<span style="font-weight: normal;"><u>Injector</u></span>
+
|-
 
+
| colspan="2" | Address ranging from 0-63&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Injector''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
''<span style="color:red;">No additional information</span>''
+
| width="90%" | Group Address
 +
|-
 +
| colspan="2" | Address ranging from 0-15&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | API
 +
|-
 +
| colspan="2" | &nbsp;
 +
|}

Latest revision as of 17:19, 9 November 2022

Author MatrixTSL
Version 1.0
Category Comms: System


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.

Component Pack

COMMSC

Detailed description

No detailed description exists yet for this component

Examples

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


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

Downloadable macro reference

Fc9-comp-macro.png ReceiveForwardFrame
Attempts to receive an 16-bit command from the master controller. 0xFFFF indicates timeout or no reply 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png CheckForIndividualAddress
Tests the 16-bit incoming data for the defined individual address Returns 0 for no match, returns 1 for a match 
Fc9-u16-icon.png - UINT Data
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png CollectDataByte
Returns the data byte from a 16-bit data packet 
Fc9-u16-icon.png - UINT Data
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png CheckForGroupAddress
Tests the 16-bit incoming data for the defined group address Returns 0 for no match, returns 1 for a match 
Fc9-u16-icon.png - UINT Data
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png CollectPacketType
Returns if the incoming packet was data or a command. Return of 0 = Data Return of 1 = Command 
Fc9-u16-icon.png - UINT Data
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png TransmitBackwardFrame
Send out a 8-bit frame consisting of a data byte. 
Fc9-u8-icon.png - BYTE Data
Data Byte 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Configures the UART serial interface. 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Serial Properties
Fc9-type-5-icon.png TX Pin
 
Fc9-type-5-icon.png RX Pin
 
Fc9-conn-icon.png DALI Slave Properties
Fc9-type-21-icon.png Individual Address
Address ranging from 0-63 
Fc9-type-21-icon.png Group Address
Address ranging from 0-15 
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png API