Difference between revisions of "Component: Console Writer (Indicators)"
From Flowcode Help
Jump to navigationJump to search| (One intermediate revision by one other user not shown) | |||
| Line 5: | Line 5: | ||
|- | |- | ||
| width="20%" style="color:gray;" | Version | | width="20%" style="color:gray;" | Version | ||
| − | | | + | | 2.0 |
|- | |- | ||
| width="20%" style="color:gray;" | Category | | width="20%" style="color:gray;" | Category | ||
| Line 15: | Line 15: | ||
A simple component to aid in creating and wiriting data to a console tab. Allows text to be coloured and automatically appended with a timestamp. | A simple component to aid in creating and wiriting data to a console tab. Allows text to be coloured and automatically appended with a timestamp. | ||
| − | == | + | ==Version information== |
| − | |||
| − | |||
| − | + | Library Version, Component Version, Date, Author, Info | |
| + | 4, 2.0, 02-07-24, BR, Added a load more functionality to the component related to cursor control | ||
==Detailed description== | ==Detailed description== | ||
| Line 93: | Line 92: | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddString''' | ||
|- | |- | ||
| − | | colspan="2" | Adds text string to the console window. | + | | colspan="2" | Adds text string to the end of the console window. |
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
| + | | width="90%" | Data | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===AddStringAtCursor=== | ||
| + | {| 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;" | '''AddStringAtCursor''' | ||
| + | |- | ||
| + | | colspan="2" | Adds text string to the current cursor position. | ||
|- | |- | ||
|- | |- | ||
| Line 114: | Line 132: | ||
| colspan="2" | Clears the contents of the console tab. | | colspan="2" | Clears the contents of the console tab. | ||
|- | |- | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===ClearFromCursorToLineEnd=== | ||
| + | {| 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;" | '''ClearFromCursorToLineEnd''' | ||
| + | |- | ||
| + | | colspan="2" | Clears the contents of the current selected line from the cursor position to the end of the line. | ||
| + | |- | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===ClearFromLineStartToCursor=== | ||
| + | {| 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;" | '''ClearFromLineStartToCursor''' | ||
| + | |- | ||
| + | | colspan="2" | Clears the contents of the current selected line from the start of the line to the cursor position. Sets the Column position to 0. | ||
| + | |- | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===ClearLine=== | ||
| + | {| 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;" | '''ClearLine''' | ||
| + | |- | ||
| + | | colspan="2" | Clears all data from a specific line. Automatically sets the cursor to the start of the line. | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG | ||
| + | | width="90%" | Line | ||
| + | |- | ||
| + | | colspan="2" | Line number, -1 for the last line. | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===ClearXCharsFromCursorPosition=== | ||
| + | {| 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;" | '''ClearXCharsFromCursorPosition''' | ||
| + | |- | ||
| + | | colspan="2" | Clears the specified number of characters starting from the cursor position. | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | CharacterCount | ||
| + | |- | ||
| + | | colspan="2" | Number of characters to remove | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| Line 195: | Line 279: | ||
|- | |- | ||
| colspan="2" | Range: 0-3 | | colspan="2" | Range: 0-3 | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===SetCursorPosition=== | ||
| + | {| 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;" | '''SetCursorPosition''' | ||
| + | |- | ||
| + | | colspan="2" | Sets the position of the cursor | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG | ||
| + | | width="90%" | Column | ||
| + | |- | ||
| + | | colspan="2" | Character position along the line, starting from 0 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG | ||
| + | | width="90%" | Line | ||
| + | |- | ||
| + | | colspan="2" | Line number, -1 for the last line. | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| Line 321: | Line 429: | ||
| colspan="2" | Defines the colour of the time stamp text | | colspan="2" | Defines the colour of the time stamp text | ||
|} | |} | ||
| + | |||
| + | ==Component Source Code== | ||
| + | |||
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_ConsoleWriter.fcfx FC_Comp_Source_ConsoleWriter.fcfx] | ||
| + | |||
| + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_ConsoleWriter.fcfx FC_Comp_Source_ConsoleWriter.fcfx] | ||
Latest revision as of 13:01, 2 July 2024
| Author | Matrix TSL |
| Version | 2.0 |
| Category | Indicators |
Contents
Console Writer component
A simple component to aid in creating and wiriting data to a console tab. Allows text to be coloured and automatically appended with a timestamp.
Version information
Library Version, Component Version, Date, Author, Info 4, 2.0, 02-07-24, BR, Added a load more functionality to the component related to cursor control
Detailed description
No detailed description exists yet for this component
Examples
A basic example using two circular knobs to simulate data e.g., temperature. Both xy chart and Console, log the data.
Macro reference
AddString
| AddString | |
| Adds text string to the end of the console window. | |
| Data | |
| Return | |
AddStringAtCursor
| AddStringAtCursor | |
| Adds text string to the current cursor position. | |
| Data | |
| Return | |
Clear
| Clear | |
| Clears the contents of the console tab. | |
| Return | |
ClearFromCursorToLineEnd
| ClearFromCursorToLineEnd | |
| Clears the contents of the current selected line from the cursor position to the end of the line. | |
| Return | |
ClearFromLineStartToCursor
| ClearFromLineStartToCursor | |
| Clears the contents of the current selected line from the start of the line to the cursor position. Sets the Column position to 0. | |
| Return | |
ClearLine
| ClearLine | |
| Clears all data from a specific line. Automatically sets the cursor to the start of the line. | |
| Line | |
| Line number, -1 for the last line. | |
| Return | |
ClearXCharsFromCursorPosition
| ClearXCharsFromCursorPosition | |
| Clears the specified number of characters starting from the cursor position. | |
| CharacterCount | |
| Number of characters to remove | |
| Return | |
CountLines
| CountLines | |
| Counts the number of lines in the console. | |
| Return | |
GetTextLine
| GetTextLine | |
| Gets the string data from a specific line in the console. | |
| Line | |
| Line number, -1 for the last line. | |
| Return | |
SetColour
| SetColour | |
| Allows for full RGB colour selection | |
| R | |
| Colour channel, Range: 0-255 | |
| G | |
| Colour channel, Range: 0-255 | |
| B | |
| Colour channel, Range: 0-255 | |
| Return | |
SetColourIdx
| SetColourIdx | |
| Sets the text colour from the properties selection of colours. | |
| Index | |
| Range: 0-3 | |
| Return | |
SetCursorPosition
| SetCursorPosition | |
| Sets the position of the cursor | |
| Column | |
| Character position along the line, starting from 0 | |
| Line | |
| Line number, -1 for the last line. | |
| Return | |
SetTextLine
| SetTextLine | |
| Sets the string data from a specific line in the console. | |
| Line | |
| Line number, -1 for the last line. | |
| Data | |
| Return | |
ShowConsole
| ShowConsole | |
| Pops up the console window and shows the correct tab. | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_ConsoleWriter.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_ConsoleWriter.fcfx