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

From Flowcode Help
Jump to navigationJump to search
Line 16: Line 16:
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 286: Line 290:
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| 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''
 +
|}
 +
 +
 +
{| 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;" | '''GetRxIdent'''
 +
|-
 +
| colspan="2" | Gets the Rx ID as a Integer Standard and Extended IDs. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Buffer
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}

Revision as of 10:35, 17 November 2021

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.

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

Fc9-comp-macro.png ReceiveBackwardFrame
Attempts to receive an 8-bit reply 0 indicates timeout or no reply 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Address
Address byte 
Fc9-u8-icon.png - BYTE Data
Data Byte 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Address
Individual Address 0-63 
Fc9-u8-icon.png - BYTE Type
0 = Data, 1 = Command 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Address
Group Address 0-15 
Fc9-u8-icon.png - BYTE Type
0 = Data, 1 = Command 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u8-icon.png - BYTE Return


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


Fc9-comp-macro.png SegShowDigit
Displays a digit on the 7-seg display  
Fc9-u8-icon.png - BYTE Digit
Which of the digits to change (0 - 3) 
Fc9-u8-icon.png - BYTE Value
The value to display (0 - 9) 
Fc9-u8-icon.png - BYTE DecimalPoint
Decides if the decimal point is lit 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png RawSend
Sends data to the LCD display 
Fc9-u8-icon.png - BYTE data
The data byte to send to the LCD 
[[File:]] - type
A boolean to indicate command type: true to write data, false to write a command 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReadAnalogAsByte
Reads one of the analogue components as an byte value 
Fc9-u8-icon.png - BYTE Channel
0 = LDR, 1 = POT 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadAnalogAsInt
Reads one of the analogue components as an Integer value 
Fc9-u8-icon.png - BYTE Channel
0 = LDR, 1 = POT 
[[File:]] - Return


Fc9-comp-macro.png RemapCharacter
Assigns a remap character allowing the PrintString function to automatically swap between pre-defined characters. The characters can be custom (in the range 0-9) or can point to an existing character in the LCD character map. 
Fc9-u8-icon.png - BYTE RemapIdx
Remap Index, Range: 0 to (Remap Characters - 1) 
Fc9-u8-icon.png - BYTE SearchCharacter
Character to look for a replace 
Fc9-u8-icon.png - BYTE ReplacementCharacter
New character value to use in place of the search character. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Start
Startup routine required by the hardware device. Automatically clears the display after initialising. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetLEDState
Sets the state of a single LED 
Fc9-u8-icon.png - BYTE Port
0 = PortA, 1 = PortB 
Fc9-u8-icon.png - BYTE LED
0 = LED0, 7 = LED7 
Fc9-u8-icon.png - BYTE State
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetRxIdent
Gets the Rx ID as a Integer Standard and Extended IDs. 
Fc9-u8-icon.png - BYTE Buffer
 
Fc9-u32-icon.png - ULONG Return


Fc9-comp-macro.png Initialise
Must be called before any other CAN component macros to enable and initialise the CAN peripheral.  
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-5-icon.png TX Pin
 
Fc9-type-5-icon.png RX Pin
 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations
Fc9-type-16-icon.png API