Difference between revisions of "Bot test"
From Flowcode Help
Jump to navigationJump to search| Line 1: | Line 1: | ||
| − | + | {| style="width:50%" | |
| − | |||
| − | {| | ||
|- | |- | ||
| − | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| MatrixTSL | | MatrixTSL | ||
|- | |- | ||
| − | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
| − | | 2.0 | + | | 2.0 |
|- | |- | ||
| − | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| Comms: System | | 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. | ||
| + | |||
| + | ==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. | ||
| Line 32: | Line 28: | ||
{{Fcfile|DMX_Slave_Example1.fcfx|DMX Slave Example1}} | {{Fcfile|DMX_Slave_Example1.fcfx|DMX Slave Example1}} | ||
| − | |||
| − | |||
| − | |||
| − | + | ==Downloadable 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;" | '''SetDataChannel''' | ||
| + | |- | ||
| + | | colspan="2" | Sets the data byte in a data channel | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | DataValue | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | 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;" | '''SendDataChain''' | ||
| + | |- | ||
| + | | colspan="2" | Transmits the BREAK, MAB and StartCode followed by the contents of the data channels. | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | StartCode | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | 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;" | '''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;" | |
| − | + | |- | |
| − | UART Channel selector | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] |
| − | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |
| − | 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-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-16-icon.png]] | |
| − | Baud rate option selector | + | | 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" | [[File:Fc9-type-5-icon.png]] | |
| − | + | | width="90%" | TX | |
| − | + | |- | |
| − | + | | colspan="2" | Pin to be used for Transmit data | |
| − | + | |- | |
| − | Pin to be used for Transmit data | + | | 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" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
| − | Number of data bytes used by the DMX chain, Max 512 bytes per transmission. | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections''' |
| − | + | |- | |
| − | 24 Bytes minimum to match minimum 1204us timing requirements, not all channels need to be used. | + | |- |
| − | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
| − | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations''' | |
| − | + | |- | |
| − | + | |- | |
| − | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
| − | Selects if the scope traces are automatically added to the data recorder window or not. | + | | width="90%" | Scope Traces |
| − | + | |- | |
| − | Simulation - draws an approximation of the UART data onto the scope trace. | + | | 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. |
| − | + | |- | |
| − | 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]] | |
| − | Selects if the console data is automatically generated or not | + | | 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 | |
| − | Number of characters that can be displayed on a single line of the console. | + | |- |
| − | + | | 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. | |
| − | + | |} | |
| − | |||
| − | |||
| − | |||
| − | 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 | ||
| − | |||
| − | |||
Revision as of 15:38, 26 August 2021
| 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.
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 Slave Example, captures the first DMX data channel sent from the Master and outputs the value onto a Port using the LED array component.
Downloadable macro reference
| SetDataChannel | |
| Sets the data byte in a data channel | |
| Channel | |
| DataValue | |
| Return | |
| SendDataChain | |
| Transmits the BREAK, MAB and StartCode followed by the contents of the data channels. | |
| StartCode | |
| Return | |
| Initialise | |
| Configures the UART serial interface. | |
| Return | |