mbuesch / pyprofibus

PROFIBUS-DP stack
https://bues.ch/a/profibus
GNU General Public License v2.0
134 stars 52 forks source link

TxDen pin Question #23

Closed TadyTheFish closed 2 years ago

TadyTheFish commented 2 years ago

Hello I can't find any description where to connect the TxDen pin if using a raspberry pi?

mbuesch commented 2 years ago

The TxDen pin is for switching the transceiver into transmit mode. It can be used on devices that support fast HW based RTS signalling. As far as I know (please correct me if I'm wrong), the Raspi can't do that.

I use the timing circuitry for TxDen. This circuitry could also be replaced by a simpler capacitor based solution. Especially if you don't want to support a wide range of baud rates.

TadyTheFish commented 2 years ago

I eill try some custom overlays for the Pi that should enable the RTS pin.

A aide question... Does anyone have a working example with the wago 750-343? Thank you

mbuesch commented 2 years ago

I eill try some custom overlays for the Pi that should enable the RTS pin.

Deriving an RTS/TXen signal from the TX pin is what the NE555 on my board does. A hat could do a similar thing. Most transceivers use a much simpler capacitor based circuit. That also works Ok most of the time.

What does not work is software-RTS. That is way too slow. There's a hard real time limit for releasing the bus (switching TXen off).

Does anyone have a working example with the wago 750-343?

I don't know. But today's pyprofibus usually works quite well together with new yet untested devices. The pyprofibus DPM state machine is pretty forgiving when it comes to differences in the slave's DP implementation.

TadyTheFish commented 2 years ago

Thank you!