Difference between revisions of "Component: Console Writer (Indicators)"
From Flowcode Help
Jump to navigationJump to search (XML import) |
|||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {| style="width:50%" | |
− | {| | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| Matrix TSL | | Matrix TSL | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
− | | 1.0 | + | | 1.0 |
|- | |- | ||
− | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| Indicators | | Indicators | ||
|} | |} | ||
+ | ==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. | ||
− | == | + | ==Component Pack== |
− | |||
− | |||
− | + | FREE | |
− | |||
+ | ==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. | |
− | + | {{Fcfile|Logging_Example.fcsx|Logging Example}} | |
− | + | ==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;" | '''Clear''' | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | :'' | + | {| 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;" | '''CountLines''' | ||
+ | |- | ||
+ | | colspan="2" | Counts the number of lines in the console. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG | ||
+ | | 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;" | '''AddString''' | ||
+ | |- | ||
+ | | colspan="2" | Adds text string to 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'' | ||
+ | |} | ||
− | |||
− | :[[ | + | {| 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;" | '''SetTextLine''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the string data from a specific line in the console. | ||
+ | |- | ||
+ | |- | ||
+ | | 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" | [[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'' | ||
+ | |} | ||
− | |||
− | |||
+ | {| 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;" | '''SetColour''' | ||
+ | |- | ||
+ | | colspan="2" | Allows for full RGB colour selection | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | R | ||
+ | |- | ||
+ | | colspan="2" | Colour channel, Range: 0-255 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | G | ||
+ | |- | ||
+ | | colspan="2" | Colour channel, Range: 0-255 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | B | ||
+ | |- | ||
+ | | colspan="2" | Colour channel, Range: 0-255 | ||
+ | |- | ||
+ | | 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;" | '''SetColourIdx''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the text colour from the properties selection of colours. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | === | + | {| 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;" | '''ShowConsole''' | ||
+ | |- | ||
+ | | colspan="2" | Pops up the console window and shows the correct 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'' | ||
+ | |} | ||
− | |||
− | + | {| 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;" | '''GetTextLine''' | |
− | + | |- | |
− | + | | colspan="2" | Gets the string data from a specific line in the console. | |
− | + | |- | |
− | + | |- | |
− | + | | 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-string-icon.png]] - STRING | |
− | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | |
− | == | + | |} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | :: | ||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Gets the string data from a specific line in the console. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 136: | Line 194: | ||
==Property reference== | ==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" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Console Name | |
− | + | |- | |
− | + | | colspan="2" | Textual name of the console shown as the tab name at the top of the console window. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | + | | width="90%" | Colour 0 | |
− | + | |- | |
− | + | | colspan="2" | Used to define a colour channel referenced by the SetColourIdx component macro call. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | + | | width="90%" | Colour 1 | |
− | + | |- | |
− | + | | colspan="2" | Used to define a colour channel referenced by the SetColourIdx component macro call. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | + | | width="90%" | Colour 2 | |
− | + | |- | |
− | + | | colspan="2" | Used to define a colour channel referenced by the SetColourIdx component macro call. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | + | | width="90%" | Colour 3 | |
− | + | |- | |
− | + | | colspan="2" | Used to define a colour channel referenced by the SetColourIdx component macro call. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | New Line After Data | |
− | + | |- | |
− | + | | colspan="2" | Automatically append a newline character after any data has been written to the console using the AddString component macro. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Clear On Sim Start | |
− | + | |- | |
− | + | | colspan="2" | Automatically clear the console tab when the simulation is started. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | |
− | + | | width="90%" | Add Timestamp | |
− | + | |- | |
− | + | | colspan="2" | Automatically adds a timestamp to the console after a newline character has been received. | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Timestamp | |
− | + | |- | |
− | + | |- | |
− | Automatically clear the console tab when the simulation is started. | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
− | + | | width="90%" | Date Format | |
− | + | |- | |
− | + | | colspan="2" | Specifies the format of the date string. No - "DD/MM/YY" Yes - "MM/DD/YY" | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Time Separator | |
− | + | |- | |
− | + | | colspan="2" | Characters that are used in between the time digits | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Date Separator | |
− | + | |- | |
− | + | | colspan="2" | Characters that are used in between the date digits | |
− | Specifies the format of the date string. | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | TimeStamp Separator | |
− | + | |- | |
− | No - "DD/MM/YY" | + | | colspan="2" | Characters that are used between the time and date strings when returning a full time stamp. |
− | + | |- | |
− | Yes - "MM/DD/YY" | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] |
− | + | | width="90%" | Override Colour | |
− | + | |- | |
− | + | | colspan="2" | Overrides the current selected colour when writing the timestamp. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | |
− | Characters that are used in between the time digits | + | | width="90%" | Timestamp Colour |
− | + | |- | |
− | + | | colspan="2" | Defines the colour of the time stamp text | |
− | + | |} | |
− | |||
− | |||
− | Characters that are used in between the date digits | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Characters that are used between the time and date strings when returning a full time stamp. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Overrides the current selected colour when writing the timestamp. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 17:22, 9 November 2022
Author | Matrix TSL |
Version | 1.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.
Component Pack
FREE
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.
Downloadable macro reference
![]() |
Clear |
Clears the contents of the console tab. | |
![]() |
Return |
![]() |
CountLines |
Counts the number of lines in the console. | |
![]() |
Return |
![]() |
AddString |
Adds text string to the console window. | |
![]() |
Data |
![]() |
Return |
![]() |
SetTextLine |
Sets the string data from a specific line in the console. | |
![]() |
Line |
Line number, -1 for the last line. | |
![]() |
Data |
![]() |
Return |
![]() |
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 |
Sets the text colour from the properties selection of colours. | |
![]() |
Index |
Range: 0-3 | |
![]() |
Return |
![]() |
ShowConsole |
Pops up the console window and shows the correct tab. | |
![]() |
Return |
![]() |
GetTextLine |
Gets the string data from a specific line in the console. | |
![]() |
Line |
Line number, -1 for the last line. | |
![]() |
Return |