Bug when using Poll Info with locomotives

Moderator: Moderators

Bug when using Poll Info with locomotives

Postby Dagnall » 08.08.2016, 19:24

Rob, I think that there is a bug in the "poll info" feature... Or a "feature" that I do not fully understand!
When using "Poll Info", Rocrail sends out repeated A0-A2 messages.
A0 and A1 messages are exactly as you might expect, but the A2 message sets SND to the states of the function switches ONLY the first time that any of the f buttons are pressed / changed...
Subsequent A2 messages are then sent with "00" data...
"lights" does send "16" repeatedly if On, as you might expect, but why do the other functions all have to act only for one A2 message cycle?

is this a "feature" or a "Bug"?

I would have expected that as long as the "switch" in Rocrail is showing the red dot in the top corner, the SND variable would show the appropriate bit set...
Is there a variable somewhere to change the way that subsequent A2 messages send their data?

If its a "feature", can you explain its methodology ?, and I will try to accommodate it in my code...

Many thanks
Dagnall
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 

Re: Bug when using Poll Info with locomotives

Postby rjversluis » 10.08.2016, 06:51

Poll Info is for Xpressnet only!
You should not use this for LocoNet!
Only the xpressnet library supports this; All other libraries ignore the wLoc.info command.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Bug when using Poll Info with locomotives

Postby Dagnall » 06.09.2016, 12:15

Thanks..
I have my Wifi interfaced loco now (mostly) working with the RFID reader, using standard Loconet protocol over UDP.

However I do suffer from occasional message loss. This always seems to occur when running automatic, and when Rocrail sends a series of six loco commands: Usually first topping the loco, then immediately reversing..
This example was taken from my WiFi monitor, and shows microseconds when the monitor saw the command, and the full message.
The sequence here started when the (loco at 192.168.0.5) spotted the RFID tag and sent the set and cleared block commands (B)2, Rocrail(192.168.0.11) then stopped and started the loco.

Code: Select all
3782040011 us. From:192.168.0.5 Full Message is: B2 55 50 48
3784088611 us. From:192.168.0.5 Full Message is: B2 55 40 58
3784702666 us. From:192.168.0.11 Full Message is: A0 03 00 5C
3784704517 us. From:192.168.0.11 Full Message is: A1 03 01 5C
3784706031 us. From:192.168.0.11 Full Message is: A2 03 00 5E
3784708127 us. From:192.168.0.11 Full Message is: A0 03 26 7A
3784713643 us. From:192.168.0.11 Full Message is: A1 03 01 5C
3784718946 us. From:192.168.0.11 Full Message is: A2 03 00 5E


This example was actually read properly and operated fine, but on other occasions, some of the "Ax" messages get lost by the Loco (but not the monitor). Sometimes this has no effect, but if the speed command is missed, the loco stalls.
I am trying to make sure that the "Loco" code is running as fast as the monitor, and plan to experiment with TCP, but can you suggest anything else to help (in particular, is there a different Command Station or Protocol that you would recommend I start with for this WIFI project)?

FYI,
When Rocrail sends just the set of three commands, I do not have any errors.... so is there a way to force gaps between Rocrail's Loco commands? DirChangePause does not seem to have any effect..

Thanks
Dagnall
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 

Re: Bug when using Poll Info with locomotives

Postby rjversluis » 06.09.2016, 12:35

Hi Dagnall,

open a new thread if you are no longer concerned about polling loco info.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 


Return to Loconet