Nuestros bancos de prueba tienen una placa propia con un PIC24FJ128GA202 que debe actuar como esclavo Modbus RTU (dirección 7, 19200 8E1) para que una pasarela pueda consultar cuatro holding registers y reportarlos a Hermetry. El transceptor es un MAX485, con DE y /RE unidos en RB9.Desde la pasarela (una Pi con pymodbus, que funcionó bien con un medidor comercial en el mismo bus) solo obtengo timeouts:
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
En el osciloscopio veo que la petición llega al par A/B y al pin RO del MAX485. El PIC parece no reaccionar nunca. La interrupción de RX de la UART no se dispara. El TX funciona: si hago que el PIC envíe un byte de prueba cada segundo, la Pi lo recibe. He asignado U1RX a RP8 y U1TX a RP7 con PPS. Llevo dos días dándole vueltas.
Our test rigs have a custom board with a PIC24FJ128GA202 that should act as a Modbus RTU slave (address 7, 19200 8E1) so a gateway can poll four holding registers and report them to Hermetry. Transceiver is a MAX485, DE and /RE tied together on RB9.
From the gateway (a Pi with pymodbus, tested fine against a commercial meter on the same bus) I get timeouts only:
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
On the scope I see the request arrive on the A/B pair and on the MAX485’s RO pin. The PIC never seems to react. My UART RX interrupt doesn’t fire. TX works: if I make the PIC send a test byte every second, the Pi sees it. I mapped U1RX to RP8 and U1TX to RP7 with PPS. I’ve been staring at this for two days.