Jump to content

Component: Console Writer (Indicators)

From Flowcode Help
Revision as of 10:37, 17 November 2021 by Wiki bot (talk | contribs)
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.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable 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. 
[[File:]] - 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


GetTextLine
Gets the string data from a specific line in the console. 
[[File:]] - Line
Line number, -1 for the last line. 
- STRING Return


PWMDisable
Disable a PWM output 
- BYTE Channel
Range: 0-1 
- VOID Return


I2CStart
Put the I2C Module into Start mode 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
- VOID Return


SPITransfer
Transfer a byte using the SPI bus 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- BYTE DataOut
 
- BYTE Return


I2CReceive
Receive a byte using the I2C bus 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
[[File:]] - Last
Last byte to receive: Range 0-1 
- BYTE Return


I2CStop
Put the I2C Module into Stop mode 
- BYTE Channel
 
- VOID Return


WIFISetSSID
Assign the SSID and password for the network you wish to connect the board to. Stores the parameters into ROM for later USB free setup. 
- STRING SSID
Name of the network you wish to connect to 
- STRING Password
 
- VOID Return


ServoDisable
Disable a Servo output 
- BYTE Channel
Range: 0-5 
- VOID Return


SPIPrescaler
Modify the speed of the SPI bus 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- BYTE Prescaler
Range: 0-2 
- VOID Return


ServoEnable
Enable a Servo output 
- BYTE Channel
Range: 0-5 
- VOID Return


ADCSample10
Reads the voltage present on an Alanog pin as an 10-bit value range 0-1023 
- BYTE ADCChannel
Range: 0-5 
- UINT Return


I2CTransSend
Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent. 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
- BYTE Data
Data to send 
- UINT Count
Number of bytes to send out, MS bit 0x8000 signifies no Stop if set 
- UINT Return


I2CTransInit
Initialises the I2C Transaction mode with the 7-bit device address 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
- BYTE DeviceAddress
7-bit Device Address 
- BYTE Baud
0=100KHz, 1=400KHz, 2=1MHz 
- VOID Return


IOSetOutputPin
Sets the selected digital pin to an output and assigns the output state. 
- BYTE Pin
Range: 0-17 
[[File:]] - State
Range: 0-1 
- VOID Return


ServoSetPosition8
Sets the position as an 8-bit value 
- BYTE Channel
Range: 0-1 
- BYTE Position
Range: 0-255 
- VOID Return


UARTReceive
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- BYTE Return


SPIInitialise
Initialsie the SPI module ready for communications 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- VOID Return


WIFIGetIP
Gets the IP address of the board. Allows you to setup and get the assigned address via USB before using over WIFI, Use the WIFIIsConnected first to check the WIFI is active.  
- STRING Return


I2CSend
Transmit a byte using the I2C bus 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
- BYTE DataOut
 
[[File:]] - Return


UARTSend
Send a byte via the UART module 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- BYTE Data
Data Byte to send. Range: 0-255 
- VOID Return


PWMSetPrescaler
Sets the prescaler for the PWM output 
- BYTE Prescaler
 
- VOID Return


PWMSetDuty8
Sets the duty for the PWM output 
- BYTE Channel
Range: 0-1 
- BYTE Duty
Range: 0-255 
- VOID Return


PWMEnable
Enable a PWM output 
- BYTE Channel
Range: 0-1 
- VOID Return


Initialise
Initialise the comms to the Arduino board ready for commands to be sent. 
- VOID Return


PWMEnable
Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD 
- BYTE EnableMask
Range 0-63 or 0b00000 to 0b111111 
- VOID Return


Initialise
 
- VOID Return


LCDClear
Clears the MIAC display 
- VOID Return


LCDClear
Clears the LCD 
- VOID 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. 
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 
Connections
Simulations