Jump to content

Component: DMX-512 Master (Comms: System): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(10 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/DMX-512_Master_SCADA.fcsx FC_Comp_Source_temp/DMX-512_Master_SCADA.fcsx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_DMX-512_Master.fcfx FC_Comp_Source_DMX-512_Master.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/DMX-512_Master_SCADA.fcsx FC_Comp_Source_temp/DMX-512_Master_SCADA.fcsx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DMX-512_Master.fcfx FC_Comp_Source_DMX-512_Master.fcfx]


==Detailed description==
==Detailed description==
Line 95: Line 95:


For DMX 512 slave example see: [[Component:_ID_1be0ac44_3521_402e_a8b7_1faf86c09560|DMX Slave]]
For DMX 512 slave example see: [[Component:_ID_1be0ac44_3521_402e_a8b7_1faf86c09560|DMX Slave]]




Line 109: Line 119:


===Initialise===
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Configures the UART serial interface. 
| colspan="2" | Configures the UART serial interface. 
Line 123: Line 133:


===SendDataChain===
===SendDataChain===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendDataChain'''
| width="90%" class="mtx-class-macrohead" | '''SendDataChain'''
|-
|-
| colspan="2" | Transmits the BREAK, MAB and StartCode followed by the contents of the data channels. 
| colspan="2" | Transmits the BREAK, MAB and StartCode followed by the contents of the data channels. 
Line 142: Line 152:


===SetDataChannel===
===SetDataChannel===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDataChannel'''
| width="90%" class="mtx-class-macrohead" | '''SetDataChannel'''
|-
|-
| colspan="2" | Sets the data byte in a data channel 
| colspan="2" | Sets the data byte in a data channel 
Line 163: Line 173:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Serial Properties
| width="90%" class="mtx-class-propfolder" | Serial Properties
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | COM Port
| width="90%" | Channel
|-
|-
| colspan="2" | Selects which port to communicate with, only lists ports which are currently available.  
| colspan="2" | UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Refresh COM Ports
| width="90%" | Baud Options
|-
|-
| colspan="2" | When set to yes the COM port list is rescanned for newly connected or available ports. Note that refreshing the ports list may take a few seconds depending on the number of connected ports. 
| colspan="2" | Baud rate option selector 
|-
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Baud
| width="90%" | Baud Rate
|-
| colspan="2" |  
|-
|-
| colspan="2" | Baud rate passed to the COM port to control the rate of data. 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | TX
|-
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| colspan="2" | Pin to be used for Transmit data 
| width="90%" | Timeout Value
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | DMX Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Data Channels
|-
| colspan="2" | Number of data bytes used by the DMX chain, Max 512 bytes per transmission. 24 Bytes minimum to match minimum 1204us timing requirements, not all channels need to be used. 
|-
| 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-7-icon.png]]
| width="90%" | Scope Traces
|-
|-
| colspan="2" | Value to specify what is returned when no incoming receive data is present. 
| colspan="2" | Selects if the scope traces are automatically added to the data recorder window or not.    Simulation - draws an approximation of the UART data onto the scope trace.    ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Console Data
| width="90%" | Console Data
|-
|-
| colspan="2" |  
| colspan="2" | Selects if the console data is automatically generated or not 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | DMX Properties
| width="90%" | Console Columns
|-
|-
| colspan="2" | Number of characters that can be displayed on a single line of the console. 
|-
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Data Channels
| width="90%" | Data Source
|-
|-
| colspan="2" | Number of data bytes used by the DMX chain, Max 512 bytes per transmission. 24 Bytes minimum to match minimum 1204us timing requirements, not all channels need to be used. 
| colspan="2" | Simulation data source used to allow the component to connect to various remote devices    Nothing - Simulation data is ignored    COM port - Routes the communication data to and from a physical or virtual COM port      Injector - Routes the communication data via a data injector component on the Panel. 
|}
|}

Latest revision as of 14:37, 13 July 2026

Author MatrixTSL
Version 2.0
Category Comms: System


DMX-512 Master component

A serial based communications protocol designed for controlling theatrical equipment such as dimmers, fog machines and intelligent lights. DMX-512 Slave devices are daisy chained together with a final 180R terminating resistor at the end of the chail. DMX requires the signal to be level shifted from VCC and GND to +2.5V and -2.5V.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_DMX-512_Master.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_DMX-512_Master.fcfx

Detailed description

No detailed description exists yet for this component


Examples

DMX Master Example, reads the value of two ports using switch arrays to set the values and then transmits the data in a DMX packet.

DMX Master Example1


For DMX 512 slave example see: DMX Slave











Macro reference

Initialise

Initialise
Configures the UART serial interface. 
- VOID Return


SendDataChain

SendDataChain
Transmits the BREAK, MAB and StartCode followed by the contents of the data channels. 
- BYTE StartCode
 
- VOID Return


SetDataChannel

SetDataChannel
Sets the data byte in a data channel 
- UINT Channel
 
- BYTE DataValue
 
- VOID Return


Property reference

Properties
Serial Properties
Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Baud Options
Baud rate option selector 
Baud Rate
 
TX
Pin to be used for Transmit data 
DMX Properties
Data Channels
Number of data bytes used by the DMX chain, Max 512 bytes per transmission. 24 Bytes minimum to match minimum 1204us timing requirements, not all channels need to be used. 
Simulation
Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Console Data
Selects if the console data is automatically generated or not 
Console Columns
Number of characters that can be displayed on a single line of the console. 
Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port Injector - Routes the communication data via a data injector component on the Panel.