RS-232 test on M-Duino PLUS version

April 19, 2023 by
RS-232 test on M-Duino PLUS version
Alejandro Jabalquinto

Introduction

This post, shows how to test the RS-232 M-Duino PLUS version.

Requirements

Ethernet PLC:              Ethernet PLC         

RS-232 Library ( Included in our boards package ) :     Industrial Shields boards    


Software

Connecting an M-Duino with other equipment through RS-232.

 On the Sketch is showed that you must send a 0xA5 thought RS-232 to complete this test.

RS-232 Test sketch:

/////////////////////////////////////////////////////////////////////////////

#include <RS232.h>

void setup() { Serial.begin(9600L); Serial.println("mduino-plus test RS-232 started"); RS232.begin(9600L);
} ///////////////////////////////////////////////////////////////////////////// void loop() { while (RS232.available()) {
RS232.read();
} RS232.write(0xa5);
delay(50); if (RS232.read() == 0xa5) {
Serial.println("RS232 (RS232) OK");
} else { Serial.println("RS232 FAIL"); } delay(1000); }


​Search in our Blog

RS-232 test on M-Duino PLUS version
Alejandro Jabalquinto April 19, 2023
Share this post

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 >>>