¿ªÔÆÌåÓý

Locked Re: Script occasionally missing the change of state of a sensor


 

If you open the JMRI Sensor table and watch, do you see the sensor changing status when the problem happens?

The AIU inputs are polled by the command station, so really short inputs can be missed. So the first thing to track down is whether the problem is getting the into into JMRI, or whether it¡¯s getting to JMRI getting lost.

Bob

On Dec 18, 2018, at 7:11 AM, d.uttley via Groups.Io <d.uttley@...> wrote:

JMRI PanelPro 4.12+Rb6a9bb1
Java 1.8.0_131
NCE Procab V1.3
MAC Mini running OSX 10.9.5.
I have modified a script based on Bob Jacobsen¡¯s ¡°AutomatonExample.py¡±.
There are four sensors, three track based (IR), to detect a vehicle moving over them, the other a push button to start the script loop. The USB to serial connection has a length of about 10 feet, with the adapter mounted in the middle of that run.
All works fine controlling a tram (streetcar) negotiating what in essence is a triangular route with stops and direction reversal at each apex. All sensors are connected to an NCE AIU which sends the state of the sensors to the control bus and hence to JMRI. Occasionally (maybe once in every 10 or so runs), it appears that the state change of a sensor is missed, despite it being reported correctly on the AIU. This causes the tram to miss a ¡°stop¡± command - not at all desirable, as we now have a runaway tram! Also, at times it appears that the stop command is delayed somewhat causing the tram to overrun its intended stop location.
Any ideas as to the cause?
Thanks.
Derek
--
Bob Jacobsen
rgj1927@...

Join [email protected] to automatically receive all group messages.