UART Console

For general Flowcode discussion that does not belong in the other sections.
medelec35
Matrix Staff
Posts: 1451
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: UART Console

Post by medelec35 »

Hello.
Sorry for the delay in replying.
Yes, there is a component that works similar to the Arduino ide Serial Monitor, i.e any incoming UART data is displayed, without running any simulation.
There is a serial monitor demo file within the Flowcode wiki.
When you load the demo project you will need to select the Serial Monitor and select the correct comport that is receiving UART data.
The project has UART component, which is only required to create demo code for the Arduino UNO.
It is not required for the serial monitor to work
Note there is an issue that has been corrected, but it may not get implemented in V9, if there are no exe updates, until v10.
The issue is if you close Flowcode, while the port is still open (as it will be with Automatic Connection Type then there will be
a Flowcode has suffered a fatal exception pop-up.
You can either select No to send a report or change the Connection type within Serial Monitor properties to Manual, then select Close for the Connection.
Martin

geomanfred
Posts: 18
Joined: Mon Jun 27, 2022 2:56 pm
Has thanked: 5 times
Been thanked: 1 time

Re: UART Console

Post by geomanfred »

But during simulation, why do I see the data only as in the below picture and not as in the link below?
In the other tabs of the console is nothing.
https://www.flowcode.co.uk/wiki/index.p ... e_Tools%29
UART.png
UART.png (235.23 KiB) Viewed 986 times

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 71 times
Been thanked: 217 times

Re: UART Console

Post by LeighM »

Change the UART property "Console Format" from "Log" to "Data"

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: UART Console

Post by medelec35 »

Running a simulation and viewing data via UART tab, which is data that was sent to the UNO and not the data being received on your PC, is not the way it works.
You will need to stop your simulation and select the properties of Serial Monitor component.
Change Refresh COM Ports to Yes, It will instantly change back to No.
Select the correct COM port for the connected UNO.
Either select Automatic or Manual Connection Type.
If the latter, select Open for connection.
If all is working the Data will appear within RX Monitor TAB, not the UART tab:
Serial Monitor.png
Serial Monitor.png (11.27 KiB) Viewed 981 times
If no data is within the RX Monitor tab then either:

You are not running the latest Serial Monitor component.
To update Flowcode, select Help, Library Updates...
Change the Files in-use to full database
If any components have been updated, you will need to select Reload for the effects to take place.

Or the port is already open, So removed the UNO, plug it back in and try all the above steps from the beginning.

Or you might not have the correct port selected.

Or the UNO is not transmitting data.
Martin

Post Reply