How to work with Arduino Serial Plotter with multiple values
Using Serial Plotter for data monitoring
16 December, 2021 by
How to work with Arduino Serial Plotter with multiple values
Boot & Work Corp. S.L., Fernandez Queralt Martinez

Introduction

Many times, when we use sensors connected to our Arduino-based PLCs, we have the need to graphically see the power values received or sent, to monitor and test the correct operation of the application.

We are going to see how to use the Arduino Serial Plotter to be able to display multiple values graphically.

Latest Posts

Requirements

Arduino-based PLC >>

Power Supply >>

B type cable to program the Arduino-based PLC

Testing Arduino Serial Plotter

Arduino Serial Plotter is one of the fantastic tools of the Arduino IDE through which variables can be graphically monitored in a very simple way.

The Arduino Serial Plotter is really useful for monitoring input values because you can see what you are receiving. The same happens with output variables since you can see graphically the digital or analog value that is sent through the outputs.

Let's see how to program our PLC to monitor these variables:

1. Open Arduino IDE.

2. We will write a basic code with random values in two variables, to be able to see something through the serial plotter, without there being errors in the reading of sensors or values in the inputs or outputs of the PLC.

So copy and paste this code into your Arduino IDE:

void setup() {
  Serial.begin(9600);
}
void loop() {
  int value1, value2;
  value1 = random(1000,6000);
  Serial.print(value1);
  Serial.print(",");
  value2 = random(0,3000);
  Serial.println(value2);
  delay(100);
}

3. Go to Tools > Select the board > Select the model > Select the port > And upload your sketch.

4. If you go to the serial monitor, you will be able to see the real values.
Close it before the next step.

5. Go to Tools > Click on Serial Plotter and see how the values are shown! 


Serial Plotter - How to work with Arduino Serial Plotter with multiple values
 
 

Find what you are looking for
Search in our Blog

How to work with Arduino Serial Plotter with multiple values
Boot & Work Corp. S.L., Fernandez Queralt Martinez
16 December, 2021
Share this post
Archive

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC comparison >>>

Do you want more information?

Just fill the form!

Tell me more!