Jump to content

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

From Flowcode Help
No edit summary
No edit summary
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. 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 
- BYTE Return


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


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


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


Initialise
Configures the UART serial interface. 
- VOID Return


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


RawSend
Sends data to the LCD display 
- 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 
- VOID Return


ReadAnalogAsByte
Reads one of the analogue components as an byte value 
- BYTE Channel
0 = LDR, 1 = POT 
- BYTE Return


ReadAnalogAsInt
Reads one of the analogue components as an Integer value 
- BYTE Channel
0 = LDR, 1 = POT 
[[File:]] - Return


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. 
- BYTE RemapIdx
Remap Index, Range: 0 to (Remap Characters - 1) 
- BYTE SearchCharacter
Character to look for a replace 
- BYTE ReplacementCharacter
New character value to use in place of the search character. 
- VOID Return


Start
Startup routine required by the hardware device. Automatically clears the display after initialising. 
- VOID Return


SetLEDState
Sets the state of a single LED 
- BYTE Port
0 = PortA, 1 = PortB 
- BYTE LED
0 = LED0, 7 = LED7 
- BYTE State
 
- VOID Return


GetRxIdent
Gets the Rx ID as a Integer Standard and Extended IDs. 
- BYTE Buffer
 
- ULONG Return


Initialise
Must be called before any other CAN component macros to enable and initialise the CAN peripheral.  
- VOID Return



Property reference

Properties
TX Pin
 
RX Pin
 
Connections
Simulations
API