Hello Sven,
welcome to the Community!
First, DVFrame is the right choice to develop a communcation via a serial interface to a 3rd party device.
To get a serial communication up and running does not only depend on the right settings of the interfaces itself, but depending on the communication partners also in some cases on the protocol implementation itself: some devices may not react even if settings and base code setup are right, as long as the protocol is not as expected by the 3rd party device.
But let’s start at the beginning:
RS485 connection has to be terminated at the first and the last device - X20BB53 has a little switch at the bottom to activate the built-in termination resistor - if it’s activated you can see that the “T” led on the X20BB53 is on.
If the 3rd party device is the last device at the RS485 bus, it has to be terminated, too.
With Automation Studio installation, some samples for libraries are available. For DVFrame, the sample code can be imported directly from the following folder:
Of course this samples have to be adapted to the device and the protocol needs, but it’s a good starting point to dig deeper into DVFrame functions.
What’s implemented in and how the demo code works is described
here in Automation Help.
For using the RS485 on BB53 you have to change in the demo code at least the FRM_xopen.mode string to the 3rd party device settings for baudrate (/BD), data bits (/DB), parity (/PA), stopp bits (/SB), and tell the function block that we’re using a RS485 interface (/PHY).
The following screenshot shows a example for X20BB53’s interface (the interface name is IF1 like shown in the hardware tree), and a setup for “RS485 interface using a baudrate of 115.2kBit, 8 data bits and 1 stopp bits, parity none”:
The usage of the parameter string is described here in the Automation Help
After setting the right parameters for the 3rd party device, then you can go on with sending and receiving data.
Of course, this now depends highly on the device / protocol itself, so I can’t provide more tipps/ideas about that without having much deeper knowledge about the device itself.
But I hope the information above helps a little, have a nice weekend!