|
|
| (12 intermediate revisions by 2 users not shown) |
| Line 16: |
Line 16: |
|
| |
|
| ==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_DMX-512_Slave.fcfx FC_Comp_Source_DMX-512_Slave.fcfx] |
|
| |
|
| Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DMX-512_Slave.fcfx FC_Comp_Source_DMX-512_Slave.fcfx] | | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DMX-512_Slave.fcfx FC_Comp_Source_DMX-512_Slave.fcfx] |
|
| |
|
| ==Detailed description== | | ==Detailed description== |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
|
|
| |
|
| Line 40: |
Line 48: |
|
| |
|
| ==Examples== | | ==Examples== |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
|
|
| |
|
| Line 51: |
Line 65: |
|
| |
|
| For DMX 512 Master example see [[Component:_ID_b4e10f9e_4ea9_4fbc_a584_a4d7d4d8fba6|DMX Master]] | | For DMX 512 Master example see [[Component:_ID_b4e10f9e_4ea9_4fbc_a584_a4d7d4d8fba6|DMX Master]] |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
|
| ==Macro reference== | | ==Macro reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetDataChannel=== |
| | {| 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;" | '''GetDataChannel''' | | | width="90%" class="mtx-class-macrohead" | '''GetDataChannel''' |
| |- | | |- |
| | colspan="2" | Gets the data byte from a data channel | | | colspan="2" | Gets the data byte from a data channel |
| Line 72: |
Line 97: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===Initialise=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveDataChain''' | |
| |-
| |
| | colspan="2" | Waits for a BREAK, MAB and StartCode followed by the contents of the data channels. Returns 0 to indicate a timeout and 1 to indicate succesful reception.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Timeout
| |
| |- | | |- |
| | colspan="2" | 0 = Don't wait, 1 - 254 = 1ms - 254ms, 255 = Wait forever
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| |-
| | | width="90%" class="mtx-class-macrohead" | '''Initialise''' |
| | 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''
| |
| |}
| |
| | |
| | |
| {| 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. | | | colspan="2" | Configures the UART serial interface. |
| Line 103: |
Line 111: |
|
| |
|
|
| |
|
| | | ===ReceiveDataChain=== |
| | | {| class="mtx-class-macrotable wikitable" |
| ==Property reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Serial Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Channel
| |
| |-
| |
| | 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-5-icon.png]]
| |
| | width="90%" | RX
| |
| |-
| |
| | colspan="2" | Pin to be used for Receive data
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Baud Options
| |
| |-
| |
| | colspan="2" | Baud rate option selector
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
| | width="90%" | Baud Rate
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | DMX Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Data Channels
| |
| |-
| |
| | colspan="2" | Number of data bytes to receive from the master, Max 512 bytes per transmission. 24 Bytes minimum from Master to match minimum 1204us timing requirements, not all channels need to be used.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Start Channel
| |
| |-
| |
| | colspan="2" | Channel from the master which we want to start taking our data channels
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Use Start Code
| |
| |-
| |
| | colspan="2" | Do we wait for the start code or simply begin receiving data?
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Start Code
| |
| |-
| |
| | colspan="2" | Start code value to listen out for, range 0-255
| |
| |-
| |
| | 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-7-icon.png]]
| |
| | width="90%" | Scope Traces
| |
| |-
| |
| | 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="90%" | Console Data
| |
| |-
| |
| | colspan="2" | Selects if the console data is automatically generated or not
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | 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-16-icon.png]]
| |
| | width="90%" | Data Source
| |
| |-
| |
| | 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.
| |
| |}==Macro reference==
| |
| | |
| {| 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;" | '''GetDataChannel'''
| |
| |-
| |
| | colspan="2" | Gets the data byte from a data channel
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | 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''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | 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;" | '''ReceiveDataChain''' | | | width="90%" class="mtx-class-macrohead" | '''ReceiveDataChain''' |
| |- | | |- |
| | colspan="2" | Waits for a BREAK, MAB and StartCode followed by the contents of the data channels. Returns 0 to indicate a timeout and 1 to indicate succesful reception. | | | colspan="2" | Waits for a BREAK, MAB and StartCode followed by the contents of the data channels. Returns 0 to indicate a timeout and 1 to indicate succesful reception. |
| Line 220: |
Line 128: |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | 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;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Configures the UART serial interface.
| |
| |-
| |
| |-
| |
| | 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''
| |
| |}
| |
|
| |
|
| |
|
| |
|
|
| |
|
| ==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 |
| |- | | |- |
| |- | | |- |
| Line 269: |
Line 162: |
| | colspan="2" | | | | colspan="2" | |
| |- | | |- |
| | 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;" | DMX Properties | | | width="90%" class="mtx-class-propfolder" | DMX Properties |
| |- | | |- |
| |- | | |- |
| Line 293: |
Line 186: |
| | colspan="2" | Start code value to listen out for, range 0-255 | | | colspan="2" | Start code value to listen out for, range 0-255 |
| |- | | |- |
| | 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;" | Simulation | | | width="90%" class="mtx-class-propfolder" | Simulation |
| |- | | |- |
| |- | | |- |
| Author
|
MatrixTSL
|
| Version
|
2.0
|
| Category
|
Comms: System
|
DMX-512 Slave 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_Slave.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_DMX-512_Slave.fcfx
Detailed description
No detailed description exists yet for this component
Examples
DMX Slave Example, captures the first DMX data channel sent from the Master and outputs the value onto a Port using the LED array component.
DMX Slave Example1
For DMX 512 Master example see DMX Master
Macro reference
GetDataChannel
|
GetDataChannel
|
| Gets the data byte from a data channel
|
- UINT
|
Channel
|
|
|
- BYTE
|
Return
|
Initialise
|
Initialise
|
| Configures the UART serial interface.
|
- VOID
|
Return
|
ReceiveDataChain
|
ReceiveDataChain
|
| Waits for a BREAK, MAB and StartCode followed by the contents of the data channels. Returns 0 to indicate a timeout and 1 to indicate succesful reception.
|
- BYTE
|
Timeout
|
| 0 = Don't wait, 1 - 254 = 1ms - 254ms, 255 = Wait forever
|
- BYTE
|
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.
|
|
RX
|
| Pin to be used for Receive data
|
|
Baud Options
|
| Baud rate option selector
|
|
Baud Rate
|
|
|
|
DMX Properties
|
|
Data Channels
|
| Number of data bytes to receive from the master, Max 512 bytes per transmission. 24 Bytes minimum from Master to match minimum 1204us timing requirements, not all channels need to be used.
|
|
Start Channel
|
| Channel from the master which we want to start taking our data channels
|
|
Use Start Code
|
| Do we wait for the start code or simply begin receiving data?
|
|
Start Code
|
| Start code value to listen out for, range 0-255
|
|
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.
|