Component: Serial Monitor (Runtime Tools)

From Flowcode Help
Jump to navigationJump to search
Author Matrix Ltd
Version 1.0
Category Runtime Tools


Serial Monitor component

Allows data from a COM port to be piped through to the console window for easy program status and debugging.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Here is a simple example showing how to pass data from a device such as an Arduino back into Flowcode for debugging purposes. The example is designed to run on an Arduino Uno R3 with an LED connected to pin D2 and a potentiometer connected to pin A0. The program loops switching the LED on and off and reporting the status to the console, the ADC is also sampled as a voltage string and this is also passed back to the console.

FC6 Icon.png Serial Monitor Demo

The incoming data can be seen on the Flowcode console even when the simulation is not running.

ArdInData.jpg

Outgoing data can be sent back to the embedded hardware by typing data directly into the RX Queue tab of the console.

ArdOutData.png






Macro reference

GetProp

Fc9-comp-macro.png GetProp
Allows the property filter for the COM port list to be copied to a parent component. 
Fc9-string-icon.png - STRING PropName
 
Fc9-string-icon.png - STRING Return


SetProp

Fc9-comp-macro.png SetProp
Allows the COM port property to be set from a parent component. 
Fc9-string-icon.png - STRING PropName
 
Fc9-u32-icon.png - ULONG PropVal
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png COM Port
Selects which port to communicate with, only lists ports which are currently available.  
Fc9-type-7-icon.png Refresh COM Ports
When set to yes the COM port list is rescanned for newly connected or available ports. Note that refreshing the ports list may take a few seconds depending on the number of connected ports. 
Fc9-type-14-icon.png Baud
Baud rate passed to the COM port to control the rate of data. 
Fc9-type-16-icon.png Connection Type
Decides how to work with the COM port. Manual - Port needs to be manually opened and closed by the user. Port may become locked if left open. Port is automatically closed when programming. Automatic - Port handling is automatic but port may be left open when closing the project. Port is automatically closed when programming and reopened after 20 seconds. 
Fc9-type-16-icon.png Connection
Port connection status. Closed - Port is unavailable and not in use. Open - Port is available for data communications.