| Author
 | 
Matrix TSL
 | 
| Version
 | 
1.0
 | 
| Category
 | 
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 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
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.
Logging Example
Macro reference
 
 | 
Clear
 | 
| Clears the contents of the console tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
CountLines
 | 
| Counts the number of lines in the console. 
 | 
  - ULONG
 | 
Return
 | 
 
 | 
AddString
 | 
| Adds text string to the console window. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetTextLine
 | 
| Sets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColour
 | 
| Allows for full RGB colour selection 
 | 
  - BYTE
 | 
R
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
G
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
B
 | 
| Colour channel, Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColourIdx
 | 
| Sets the text colour from the properties selection of colours. 
 | 
  - BYTE
 | 
Index
 | 
| Range: 0-3 
 | 
  - VOID
 | 
Return
 | 
 
 | 
ShowConsole
 | 
| Pops up the console window and shows the correct tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
GetTextLine
 | 
| Gets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Console Name
 | 
| Textual name of the console shown as the tab name at the top of the console window. 
 | 
 
 | 
Colour 0
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 1
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 2
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 3
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
New Line After Data
 | 
| Automatically append a newline character after any data has been written to the console using the AddString  component macro. 
 | 
 
 | 
Clear On Sim Start
 | 
| Automatically clear the console tab when the simulation is started. 
 | 
 
 | 
Add Timestamp
 | 
| Automatically adds a timestamp to the console after a newline character has been received. 
 | 
 
 | 
Timestamp
 | 
 
 | 
Date Format
 | 
| Specifies the format of the date string.  No - "DD/MM/YY"  Yes - "MM/DD/YY"  
 | 
 
 | 
Time Separator
 | 
| Characters that are used in between the time digits 
 | 
 
 | 
Date Separator
 | 
| Characters that are used in between the date digits 
 | 
 
 | 
TimeStamp Separator
 | 
| Characters that are used between the time and date strings when returning a full time stamp. 
 | 
 
 | 
Override Colour
 | 
| Overrides the current selected colour when writing the timestamp. 
 | 
 
 | 
Timestamp Colour
 | 
| Defines the colour of the time stamp text 
 | 
==Macro reference==
 
 | 
Clear
 | 
| Clears the contents of the console tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
CountLines
 | 
| Counts the number of lines in the console. 
 | 
  - ULONG
 | 
Return
 | 
 
 | 
AddString
 | 
| Adds text string to the console window. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetTextLine
 | 
| Sets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColour
 | 
| Allows for full RGB colour selection 
 | 
  - BYTE
 | 
R
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
G
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
B
 | 
| Colour channel, Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColourIdx
 | 
| Sets the text colour from the properties selection of colours. 
 | 
  - BYTE
 | 
Index
 | 
| Range: 0-3 
 | 
  - VOID
 | 
Return
 | 
 
 | 
ShowConsole
 | 
| Pops up the console window and shows the correct tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
GetTextLine
 | 
| Gets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Console Name
 | 
| Textual name of the console shown as the tab name at the top of the console window. 
 | 
 
 | 
Colour 0
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 1
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 2
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 3
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
New Line After Data
 | 
| Automatically append a newline character after any data has been written to the console using the AddString  component macro. 
 | 
 
 | 
Clear On Sim Start
 | 
| Automatically clear the console tab when the simulation is started. 
 | 
 
 | 
Add Timestamp
 | 
| Automatically adds a timestamp to the console after a newline character has been received. 
 | 
 
 | 
Timestamp
 | 
 
 | 
Date Format
 | 
| Specifies the format of the date string.  No - "DD/MM/YY"  Yes - "MM/DD/YY"  
 | 
 
 | 
Time Separator
 | 
| Characters that are used in between the time digits 
 | 
 
 | 
Date Separator
 | 
| Characters that are used in between the date digits 
 | 
 
 | 
TimeStamp Separator
 | 
| Characters that are used between the time and date strings when returning a full time stamp. 
 | 
 
 | 
Override Colour
 | 
| Overrides the current selected colour when writing the timestamp. 
 | 
 
 | 
Timestamp Colour
 | 
| Defines the colour of the time stamp text 
 | 
==Macro reference==
 
 | 
Clear
 | 
| Clears the contents of the console tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
CountLines
 | 
| Counts the number of lines in the console. 
 | 
  - ULONG
 | 
Return
 | 
 
 | 
AddString
 | 
| Adds text string to the console window. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetTextLine
 | 
| Sets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColour
 | 
| Allows for full RGB colour selection 
 | 
  - BYTE
 | 
R
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
G
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
B
 | 
| Colour channel, Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColourIdx
 | 
| Sets the text colour from the properties selection of colours. 
 | 
  - BYTE
 | 
Index
 | 
| Range: 0-3 
 | 
  - VOID
 | 
Return
 | 
 
 | 
ShowConsole
 | 
| Pops up the console window and shows the correct tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
GetTextLine
 | 
| Gets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Console Name
 | 
| Textual name of the console shown as the tab name at the top of the console window. 
 | 
 
 | 
Colour 0
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 1
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 2
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 3
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
New Line After Data
 | 
| Automatically append a newline character after any data has been written to the console using the AddString  component macro. 
 | 
 
 | 
Clear On Sim Start
 | 
| Automatically clear the console tab when the simulation is started. 
 | 
 
 | 
Add Timestamp
 | 
| Automatically adds a timestamp to the console after a newline character has been received. 
 | 
 
 | 
Timestamp
 | 
 
 | 
Date Format
 | 
| Specifies the format of the date string.  No - "DD/MM/YY"  Yes - "MM/DD/YY"  
 | 
 
 | 
Time Separator
 | 
| Characters that are used in between the time digits 
 | 
 
 | 
Date Separator
 | 
| Characters that are used in between the date digits 
 | 
 
 | 
TimeStamp Separator
 | 
| Characters that are used between the time and date strings when returning a full time stamp. 
 | 
 
 | 
Override Colour
 | 
| Overrides the current selected colour when writing the timestamp. 
 | 
 
 | 
Timestamp Colour
 | 
| Defines the colour of the time stamp text 
 | 
==Macro reference==
 
 | 
Clear
 | 
| Clears the contents of the console tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
CountLines
 | 
| Counts the number of lines in the console. 
 | 
  - ULONG
 | 
Return
 | 
 
 | 
AddString
 | 
| Adds text string to the console window. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetTextLine
 | 
| Sets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColour
 | 
| Allows for full RGB colour selection 
 | 
  - BYTE
 | 
R
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
G
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
B
 | 
| Colour channel, Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColourIdx
 | 
| Sets the text colour from the properties selection of colours. 
 | 
  - BYTE
 | 
Index
 | 
| Range: 0-3 
 | 
  - VOID
 | 
Return
 | 
 
 | 
ShowConsole
 | 
| Pops up the console window and shows the correct tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
GetTextLine
 | 
| Gets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Console Name
 | 
| Textual name of the console shown as the tab name at the top of the console window. 
 | 
 
 | 
Colour 0
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 1
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 2
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 3
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
New Line After Data
 | 
| Automatically append a newline character after any data has been written to the console using the AddString  component macro. 
 | 
 
 | 
Clear On Sim Start
 | 
| Automatically clear the console tab when the simulation is started. 
 | 
 
 | 
Add Timestamp
 | 
| Automatically adds a timestamp to the console after a newline character has been received. 
 | 
 
 | 
Timestamp
 | 
 
 | 
Date Format
 | 
| Specifies the format of the date string.  No - "DD/MM/YY"  Yes - "MM/DD/YY"  
 | 
 
 | 
Time Separator
 | 
| Characters that are used in between the time digits 
 | 
 
 | 
Date Separator
 | 
| Characters that are used in between the date digits 
 | 
 
 | 
TimeStamp Separator
 | 
| Characters that are used between the time and date strings when returning a full time stamp. 
 | 
 
 | 
Override Colour
 | 
| Overrides the current selected colour when writing the timestamp. 
 | 
 
 | 
Timestamp Colour
 | 
| Defines the colour of the time stamp text 
 | 
==Macro reference==
 
 | 
Clear
 | 
| Clears the contents of the console tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
CountLines
 | 
| Counts the number of lines in the console. 
 | 
  - ULONG
 | 
Return
 | 
 
 | 
AddString
 | 
| Adds text string to the console window. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetTextLine
 | 
| Sets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Data
 | 
|  
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColour
 | 
| Allows for full RGB colour selection 
 | 
  - BYTE
 | 
R
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
G
 | 
| Colour channel, Range: 0-255 
 | 
  - BYTE
 | 
B
 | 
| Colour channel, Range: 0-255 
 | 
  - VOID
 | 
Return
 | 
 
 | 
SetColourIdx
 | 
| Sets the text colour from the properties selection of colours. 
 | 
  - BYTE
 | 
Index
 | 
| Range: 0-3 
 | 
  - VOID
 | 
Return
 | 
 
 | 
ShowConsole
 | 
| Pops up the console window and shows the correct tab. 
 | 
  - VOID
 | 
Return
 | 
 
 | 
GetTextLine
 | 
| Gets the string data from a specific line in the console. 
 | 
  - LONG
 | 
Line
 | 
| Line number, -1 for the last line. 
 | 
  - STRING
 | 
Return
 | 
Property reference
 
 | 
Properties
 | 
 
 | 
Console Name
 | 
| Textual name of the console shown as the tab name at the top of the console window. 
 | 
 
 | 
Colour 0
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 1
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 2
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
Colour 3
 | 
| Used to define a colour channel referenced by the SetColourIdx component macro call. 
 | 
 
 | 
New Line After Data
 | 
| Automatically append a newline character after any data has been written to the console using the AddString  component macro. 
 | 
 
 | 
Clear On Sim Start
 | 
| Automatically clear the console tab when the simulation is started. 
 | 
 
 | 
Add Timestamp
 | 
| Automatically adds a timestamp to the console after a newline character has been received. 
 | 
 
 | 
Timestamp
 | 
 
 | 
Date Format
 | 
| Specifies the format of the date string.  No - "DD/MM/YY"  Yes - "MM/DD/YY"  
 | 
 
 | 
Time Separator
 | 
| Characters that are used in between the time digits 
 | 
 
 | 
Date Separator
 | 
| Characters that are used in between the date digits 
 | 
 
 | 
TimeStamp Separator
 | 
| Characters that are used between the time and date strings when returning a full time stamp. 
 | 
 
 | 
Override Colour
 | 
| Overrides the current selected colour when writing the timestamp. 
 | 
 
 | 
Timestamp Colour
 | 
| Defines the colour of the time stamp text 
 |