CONTROLLINO MEGA - RS232 device

Hello

I am using a keyence sensor which uses RS-232 com. I did connected the device to my PC and I get de the values. I would like to send these values to my Controllino Mega, which, as I understand, does not have RS-232 port (it has RS-485). It’s possible to send the values of the sensor to the CONTROLLINO without buying an RS-232 – RS-485 adapter?

For example, I’ve thought about sending the data from the device to my PC and then sending the data from the PC to CONTROLLINO, but I don’t know wheter it’s possible or how to do it?

Any suggestion?

Thanks

It has a TTL level interface so to connect the Arduino directly to the sensor you will need a TTL to RS232 converter

The Arduino could receive data from the PC via a serial interface, but you will need software on the PC to communicate with the sensor and pass it on

1 Like

As @UKHeliBob says, the Controllino Mega has TTL level serial ports. A quick look at the pinout on the official website says that there are 3 serial ports broken out on the X1 and X2 connectors - TX & RX + TX1 & RX1 are on the X1 connector, whilst TX2 & RX2 are on the X2 connector.

Both the X1 and X2 connectors also have +5V and GND available to power a TTL-RS232 converter module.

1 Like

Hi, thanks for answering!!
I understand what you say, and I think about it as an option. But I was thinking if it’s possible to, via Arduino IDE, receive the data from one serial port and send it to Controllino via other serial port.
For example, in my case, my PC recognizes the sensor on the COM 2, and my Controllino on the COM 6. Is it possible to communicate these ports via arduino IDE without the adapter that you are suggesting? I mean, just connecting the sensor to the PC on one port and the controlllino to the PC on some other port.
Thanks!!

I don't think you can use the Arduino IDE - I assume that you are talking about the Serial Monitor part of the IDE?

What you could do is create a simple python script (for example) that opens up COM2 & COM6 and simply copies data received on COM2 over to COM6.

There might even be some Windows CMD shell wizardry that you could use to pipe COM2 to COM6 but that's a bit beyond my expertise.

1 Like

Thank you very much for your answer. As I see, the best option is getting the TTL to RS232 converter.
In this case, how should I write my skeatch to open the communication with the "extra" serial port? I guess it should be something related to serial.begin(), but I guess that I should define the "extra" port somewhere, right?
Thanks for helping!!

I believe that you use the other serial ports like:

Serial1.begin()
Serial1.print()

or

Serial2.begin()
Serial2.print()

etc.

1 Like

Thank you very much!!

Can you operate this Controllino MEGA using Arduino IDE to perform sketch uploading?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.