Difference between revisions of "Component: DMX 512 Slave (Comms: System)"
(XML import - Pre 8.0 release) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color: gray;" | Version | ||
− | | | + | | 2.0 (Release) |
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color: gray;" | Category | ||
Line 22: | Line 22: | ||
==Examples== | ==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 Example, reads the value of two ports using switch arrays to set the values and then transmits the data in a DMX packet. | ||
− | |||
{{Fcfile|DMX_Master_Example1.fcfx|DMX Master Example1}} | {{Fcfile|DMX_Master_Example1.fcfx|DMX Master Example1}} | ||
− | |||
− | |||
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 Example, captures the first DMX data channel sent from the Master and outputs the value onto a Port using the LED array component. | ||
− | |||
{{Fcfile|DMX_Slave_Example1.fcfx|DMX Slave Example1}} | {{Fcfile|DMX_Slave_Example1.fcfx|DMX Slave Example1}} | ||
− | |||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
Line 86: | Line 80: | ||
<span style="font-weight: normal;"><u>Channel</u></span> | <span style="font-weight: normal;"><u>Channel</u></span> | ||
− | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CHANNEL''. | + | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::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. | ||
+ | <span style="font-weight: normal;"><u>RX</u></span> | ||
− | + | This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_uart::RX''. | |
− | + | Pin to be used for Receive data | |
− | + | <span style="font-weight: normal;"><u>Baud Options</u></span> | |
+ | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::BAUD_LIST''. | ||
+ | Baud rate option selector | ||
− | <span style="font-weight: normal;"><u> | + | <span style="font-weight: normal;"><u>Baud Rate</u></span> |
− | This property is of type '' | + | This property is of type ''Signed integer'' and can be referenced with the variable name ''cal_uart::BAUD''. |
''<span style="color:red;">No additional information</span>'' | ''<span style="color:red;">No additional information</span>'' | ||
Line 112: | Line 112: | ||
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''DataChannels''. | This property is of type ''Unsigned integer'' and can be referenced with the variable name ''DataChannels''. | ||
− | Number of data bytes | + | Number of data bytes to receive from the master, Max 512 bytes per transmission. |
− | 24 Bytes minimum to match minimum 1204us timing requirements, not all channels need to be used. | + | 24 Bytes minimum from Master to match minimum 1204us timing requirements, not all channels need to be used. |
<span style="font-weight: normal;"><u>Start Channel</u></span> | <span style="font-weight: normal;"><u>Start Channel</u></span> | ||
Line 122: | Line 122: | ||
Channel from the master which we want to start taking our data channels | Channel from the master which we want to start taking our data channels | ||
− | <span style="font-weight: normal;"><u> | + | <span style="font-weight: normal;"><u>Use Start Code</u></span> |
+ | |||
+ | This property is of type ''True or false'' and can be referenced with the variable name ''UseStart''. | ||
+ | |||
+ | Do we wait for the start code or simply begin receiving data? | ||
+ | |||
+ | <span style="font-weight: normal;"><u>Start Code</u></span> | ||
+ | |||
+ | This property is of type ''Unsigned integer'' and can be referenced with the variable name ''StartCode''. | ||
+ | |||
+ | Start code value to listen out for, range 0-255 | ||
+ | |||
+ | <span style="font-weight: normal;"><u>Scope Traces</u></span> | ||
+ | |||
+ | This property is of type ''True or false'' and can be referenced with the variable name ''cal_uart::ScopeTraces''. | ||
+ | |||
+ | 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. | ||
+ | |||
+ | <span style="font-weight: normal;"><u>Console Data</u></span> | ||
+ | |||
+ | This property is of type ''True or false'' and can be referenced with the variable name ''cal_uart::ConsoleData''. | ||
+ | |||
+ | Selects if the console data is automatically generated or not | ||
− | + | <span style="font-weight: normal;"><u>Console Columns</u></span> | |
− | ''<span style=" | + | This property is of type ''Unsigned integer'' and can be referenced with the variable name ''cal_uart::ConsoleColumns''. |
+ | |||
+ | Number of characters that can be displayed on a single line of the console. | ||
+ | |||
+ | <span style="font-weight: normal;"><u>Data Source</u></span> | ||
+ | |||
+ | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::DataSource''. | ||
+ | |||
+ | 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:50, 22 May 2018
Author | MatrixTSL |
Version | 2.0 (Release) |
Category | Comms: System |
Contents
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.
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
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
Downloadable macro reference
GetDataChannel
Gets the data byte from a data channel
Parameters
- UINT Channel
Return value
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.
Parameters
- BYTE Timeout
- 0 = Don't wait, 1 - 254 = 1ms - 254ms, 255 = Wait forever
Return value
Initialise
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
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::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
This property is of type Single digital pin and can be referenced with the variable name cal_uart::RX.
Pin to be used for Receive data
Baud Options
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::BAUD_LIST.
Baud rate option selector
Baud Rate
This property is of type Signed integer and can be referenced with the variable name cal_uart::BAUD.
No additional information
Data Channels
This property is of type Unsigned integer and can be referenced with the variable name DataChannels.
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
This property is of type Unsigned integer and can be referenced with the variable name StartChannel.
Channel from the master which we want to start taking our data channels
Use Start Code
This property is of type True or false and can be referenced with the variable name UseStart.
Do we wait for the start code or simply begin receiving data?
Start Code
This property is of type Unsigned integer and can be referenced with the variable name StartCode.
Start code value to listen out for, range 0-255
Scope Traces
This property is of type True or false and can be referenced with the variable name cal_uart::ScopeTraces.
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
This property is of type True or false and can be referenced with the variable name cal_uart::ConsoleData.
Selects if the console data is automatically generated or not
Console Columns
This property is of type Unsigned integer and can be referenced with the variable name cal_uart::ConsoleColumns.
Number of characters that can be displayed on a single line of the console.
Data Source
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::DataSource.
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.