Serial Communication with Nodemcu

Hello.

Im trying To Serial communicate With NodeMcu MicroController (Only Read Value from the PLC) If Anyone Have Information About This (Hardware & Software) Please share me

HI Pramod,

Which serial protocol does your MicroController use? In order to read data from it using a B&R controller, you’ll need:

  • A relevant serial interface (e.g. X20CS1020 for RS232 communication)
  • Software to interact with the serial interface

The library you’ll probably want to use is DVFrame. This library allows you to exchange data with serial devices.

Alexander gave a good explanation of how to get started with this library in a previous post. It’s in the context of RS485, but it may be relevant for you.

1 Like

HI Marcus,

yes its supports RS232 communication But i don’t have any Idea DVFrame. library

There are a couple of sample programs you can add via the Libraries Samples folder in the Automation Studio Toolbox:

  1. Transmitting and receiving frames via the serial interface
  2. Serial communication with a terminal

I think you’ll most likely want the first one. This should get you started as you learn about the available function blocks and what they do. The documentation I linked above also has information about how this library works. Do you have any specific questions?

If you’re only planning to read data, you’ll mostly be using FRM_read(). This function block will put received RS232 frames into a buffer so that you can parse them and pull out the data you need and place it into other process variables.

1 Like