Jump to content

Component: SysBlocks (E-blocks 2): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(3 intermediate revisions by the same user not shown)
Line 32: Line 32:


===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" | Initialise components 
| colspan="2" | Initialise components 
Line 46: Line 46:


===LCDClear===
===LCDClear===
{| 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;" | '''LCDClear'''
| width="90%" class="mtx-class-macrohead" | '''LCDClear'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 60: Line 60:


===LCDWriteString===
===LCDWriteString===
{| 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;" | '''LCDWriteString'''
| width="90%" class="mtx-class-macrohead" | '''LCDWriteString'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 89: Line 89:


===ReadEncoderCounter===
===ReadEncoderCounter===
{| 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;" | '''ReadEncoderCounter'''
| width="90%" class="mtx-class-macrohead" | '''ReadEncoderCounter'''
|-
|-
| colspan="2" | Reads the current dial counter This is a counter from -32768 to 32767 
| colspan="2" | Reads the current dial counter This is a counter from -32768 to 32767 
Line 108: Line 108:


===ReadSwitch===
===ReadSwitch===
{| 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;" | '''ReadSwitch'''
| width="90%" class="mtx-class-macrohead" | '''ReadSwitch'''
|-
|-
| colspan="2" | Samples one of the digital switches 
| colspan="2" | Samples one of the digital switches 
Line 127: Line 127:


===ReadSwitches===
===ReadSwitches===
{| 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;" | '''ReadSwitches'''
| width="90%" class="mtx-class-macrohead" | '''ReadSwitches'''
|-
|-
| colspan="2" | Samples all of the digital switches and returns as a three bit value. 
| colspan="2" | Samples all of the digital switches and returns as a three bit value. 
Line 141: Line 141:


===ResetEncoderCounter===
===ResetEncoderCounter===
{| 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;" | '''ResetEncoderCounter'''
| width="90%" class="mtx-class-macrohead" | '''ResetEncoderCounter'''
|-
|-
| colspan="2" | Resets the encoder dial counter to zero 
| colspan="2" | Resets the encoder dial counter to zero 
Line 160: Line 160:


===SetDigitalPotWiper===
===SetDigitalPotWiper===
{| 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;" | '''SetDigitalPotWiper'''
| width="90%" class="mtx-class-macrohead" | '''SetDigitalPotWiper'''
|-
|-
| colspan="2" | Sets the value of one of the digital potentiometers. 
| colspan="2" | Sets the value of one of the digital potentiometers. 
Line 184: Line 184:


===UsbGetByte===
===UsbGetByte===
{| 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;" | '''UsbGetByte'''
| width="90%" class="mtx-class-macrohead" | '''UsbGetByte'''
|-
|-
| colspan="2" | Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. 
| colspan="2" | Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. 
Line 198: Line 198:


===UsbGetNumberBytes===
===UsbGetNumberBytes===
{| 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;" | '''UsbGetNumberBytes'''
| width="90%" class="mtx-class-macrohead" | '''UsbGetNumberBytes'''
|-
|-
| colspan="2" | Returns the number of valid data bytes currently inside the buffer. 
| colspan="2" | Returns the number of valid data bytes currently inside the buffer. 
Line 212: Line 212:


===UsbLookForValue===
===UsbLookForValue===
{| 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;" | '''UsbLookForValue'''
| width="90%" class="mtx-class-macrohead" | '''UsbLookForValue'''
|-
|-
| colspan="2" | Scans the buffer for an array of specific values. Returns 0 if the value is not found. Returns 1 if the value is found. 
| colspan="2" | Scans the buffer for an array of specific values. Returns 0 if the value is not found. Returns 1 if the value is found. 
Line 246: Line 246:


===UsbSendString===
===UsbSendString===
{| 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;" | '''UsbSendString'''
| width="90%" class="mtx-class-macrohead" | '''UsbSendString'''
|-
|-
| colspan="2" | Sends a string to the USB 
| colspan="2" | Sends a string to the USB 
Line 265: Line 265:


===WriteLED===
===WriteLED===
{| 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;" | '''WriteLED'''
| width="90%" class="mtx-class-macrohead" | '''WriteLED'''
|-
|-
| colspan="2" | Writes to one of the LEDs as a digital output 
| colspan="2" | Writes to one of the LEDs as a digital output 
Line 289: Line 289:


===WriteLEDs===
===WriteLEDs===
{| 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;" | '''WriteLEDs'''
| width="90%" class="mtx-class-macrohead" | '''WriteLEDs'''
|-
|-
| colspan="2" | Writes to all of the LEDs as digital outputs 
| colspan="2" | Writes to all of the LEDs as digital outputs 
Line 308: Line 308:


===WriteVU===
===WriteVU===
{| 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;" | '''WriteVU'''
| width="90%" class="mtx-class-macrohead" | '''WriteVU'''
|-
|-
| colspan="2" | Writes to one of the 8-bit VU meters 
| colspan="2" | Writes to one of the 8-bit VU meters 
Line 332: Line 332:


===WriteVUBargraph===
===WriteVUBargraph===
{| 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;" | '''WriteVUBargraph'''
| width="90%" class="mtx-class-macrohead" | '''WriteVUBargraph'''
|-
|-
| colspan="2" | Outputs a bargraph to the VU allowing for level visualiusation. 
| colspan="2" | Outputs a bargraph to the VU allowing for level visualiusation. 
Line 357: Line 357:
==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'''  
|-
|-
|}==Component Source Code==
|}==Component Source Code==

Latest revision as of 14:23, 13 July 2026

Author Matrix TSL
Version 1.0
Category E-blocks 2


SysBlocks component

Detailed description

Please click here for a Sysblocks getting started guide.

More information on the Sysblocks component can be found here.

Examples

Here is an example of Sysblocks in action, here we are generating the fourier series.

Sysblocks Fourier Series example


Macro reference

Initialise

Initialise
Initialise components 
- VOID Return


LCDClear

LCDClear
 
- VOID Return


LCDWriteString

LCDWriteString
 
- BYTE X
 
- BYTE Y
 
- STRING Data
 
- VOID Return


ReadEncoderCounter

ReadEncoderCounter
Reads the current dial counter This is a counter from -32768 to 32767 
- BYTE Channel
Range: 0-1 
- INT Return


ReadSwitch

ReadSwitch
Samples one of the digital switches 
- BYTE Channel
Range: 0-2 
- BOOL Return


ReadSwitches

ReadSwitches
Samples all of the digital switches and returns as a three bit value. 
- BYTE Return


ResetEncoderCounter

ResetEncoderCounter
Resets the encoder dial counter to zero 
- BYTE Channel
Range: 0-1 
- VOID Return


SetDigitalPotWiper

SetDigitalPotWiper
Sets the value of one of the digital potentiometers. 
- BYTE Channel
Range: 0-5 
- UINT Value
129 Taps Range: 0-128 / 257 Taps Range: 0-256 
- VOID Return


UsbGetByte

UsbGetByte
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. 
- UINT Return


UsbGetNumberBytes

UsbGetNumberBytes
Returns the number of valid data bytes currently inside the buffer. 
- UINT Return


UsbLookForValue

UsbLookForValue
Scans the buffer for an array of specific values. Returns 0 if the value is not found. Returns 1 if the value is found. 
- STRING Value
Value to look for, can be a string or byte array, 
- BYTE NumChars
The number of characters you wish to try and match 
- BYTE RemoveContent
0=Leave data alone, 1=Remove data from buffer 
- BYTE ResetFind
0=Continue the find from the last operation, 1=Start again 
- BYTE Return


UsbSendString

UsbSendString
Sends a string to the USB 
- STRING Data
String to send 
- VOID Return


WriteLED

WriteLED
Writes to one of the LEDs as a digital output 
- BYTE Channel
Range: 0-2 
- BOOL Value
0=Off, 1=On 
- VOID Return


WriteLEDs

WriteLEDs
Writes to all of the LEDs as digital outputs 
- BYTE Values
Range: 0 (All Off) - 7 (All On) 
- VOID Return


WriteVU

WriteVU
Writes to one of the 8-bit VU meters 
- BYTE Channel
0=VU_A, 1=VU_B 
- BYTE Value
Range: 0-255 
- VOID Return


WriteVUBargraph

WriteVUBargraph
Outputs a bargraph to the VU allowing for level visualiusation. 
- BYTE Channel
0 = VU_A, 1=VU_B 
- BYTE Value
Range: 0 - 8 
- VOID Return


Property reference

Properties

==Component Source Code==

Please click here to download the component source project: FC_Comp_Source_SysBlocks.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_SysBlocks.fcfx