Loco starts moving before traverser reaches second track

Moderator: Moderators

Loco starts moving before traverser reaches second track

Postby pyth » 04.03.2018, 21:16

Hi all,

I've build a train lift, which I am controlling using an arduino talking loconet and the draai15 protocol as a traverser in Rocrail. So far this has worked very well in manual mode and it almost works in automatic. When the lift needs to move to the upper track (rocrail track 0, decoder track 0) the train will nicely wait for the lift to come up and drive on it once the bridge is in position. However as soon as the route to the lower track is selected the train starts moving without waiting for the bridge to move.

I have played around a lot and I'm down to the most simple plan (attached). The block managed by Rocrail and just two other blocks are configured, all the sensors and commands do what I expect, except the the train commando is given at the same time as the "go to track" command when moving the lower track...
I hope I have provided all the information for someone to help me a step further,
Greetings,

Dirkjan
You do not have the required permissions to view the files attached to this post.
LocoBuffer, MRDDC and ORD-3 controlling many ESU old delta and 6080 decoders. Currently building a trainlift.
pyth
 

Re: Loco starts moving before traverser reaches second track

Postby LDG » 04.03.2018, 22:28

Hi Dirkjan,

please enable trace levels info and automatic for the rocrail server. Then create an issue immediately after lower track is selected and the (too early) train velocity command is sent.

Regards,
Lothar
LDG
Site Admin
 

Re: Loco starts moving before traverser reaches second track

Postby rjversluis » 05.03.2018, 07:07

Hi DirkJan,

check the
http://wiki.rocrail.net/doku.php?id=tur ... on_sensors
it should first be set after the bridge is in position.
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: Loco starts moving before traverser reaches second track

Postby pyth » 06.03.2018, 21:53

Hi,

Found some time to work on your suggestions, first the trace (attached). I found the following events as a reading guide:

Code: Select all
... // Route is set, good:
20180306.211414.650 r9999I VT 795   ORoute   0786 set route [[trainlift+]-[Bl04-]] for [VT 795]
...  // Traverser has to move, good:
20180306.211414.661 r9999I VT 795   OTT      0303 traverser from track[0] to track[1]
... // d15 protocol starts new command, good:
20180306.211414.699 r9999c VT 795   OLocoNet 2169 switch addr=206 dir=1 action=1
... // trainlift sets all bridge position sensors to off on start of new command, 991 is the level 0 position:
20180306.211414.953 r9999I lnwriter OLocoNet 0583 sensor=991 value=0
20180306.211414.954 r9999a lnwriter OModel   4816 trying to match sensor event: [LocoBuffer] 0:991 uidname=[] state=0 code=
... // Rocrail matches the feedback:
20180306.211415.068 r9999a lnwriter OFBack   0721 fb[trainlift_position_up] state=OFF code= dir=fwd val=0 count=1 regval=0
... // Rocrail start the train, not good:
20180306.211415.554 r9999c VT 795   OP50x    0409 loc 74 speed=13 lights=on dir=forwards
... // Rocrail reports bridge at level 1, but it has yet to start, not good!
20180306.211416.490 r9999I lnwriter OTT      0102 bridge at position pos=1
...// Rocrail is done sending the d15 command:
20180306.211421.792 r9999c lnwriter OLocoNet 0732 sw addr=206 gate=0 value=1
... // Trainlift again puts all position sensors to off:
20180306.211421.904 r9999I lnwriter OLocoNet 0583 sensor=991 value=0
20180306.211421.906 r9999a lnwriter OModel   4816 trying to match sensor event: [LocoBuffer] 0:991 uidname=[] state=0 code=
20180306.211421.947 r9999a lnwriter OFBack   0721 fb[trainlift_position_up] state=OFF code= dir=fwd val=0 count=1 regval=0
20180306.211421.985 r9999I lnwriter OTT      2908 OFF events are not used...

Sensors:
    - 991: upper bridge position sensor (level=0)
    - 992: lower bridge position sensor (level=1)
    - 993: position valid (unused)
Switches in de d15 protocol, 201-205 set the bits, 206 is for resetting and completing a command.

The last line of the selected trace leads me to believe I should not send all the OFF messages for the bridge position sensors... Will try that next. Okay, updated firmware, it got rid of the messages, but not of the problem. :( Any ideas?
Good evening, gute Abend,

Dirkjan
You do not have the required permissions to view the files attached to this post.
LocoBuffer, MRDDC and ORD-3 controlling many ESU old delta and 6080 decoders. Currently building a trainlift.
pyth
 

Re: Loco starts moving before traverser reaches second track

Postby rjversluis » 07.03.2018, 07:56

Hi,

you must set the position sensor.
Screen Shot 2018-03-07 at 07.54.43.png
You do not have the required permissions to view the files attached to this post.
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: Loco starts moving before traverser reaches second track

Postby pyth » 07.03.2018, 21:10

Hi,

Thanks for the reply, I think I had tried that and that it didn't work. But I have tried again tonight. I originally left it empty as the wiki (http://wiki.rocrail.net/doku.php?id=turntable-int-en) says "This optional sensor can be used if the turntable controller generates an event after reaching the wanted position. In this case the track position sensors can be left empty." I left it empty because of the last sentence.
Anyway, more testing with the position sensor enabled and no success. Trace is attached again, but I think I found something in there:
Code: Select all
20180307.204527.043 r9999I VT 795   OTT      0303 traverser from track[0] to track[1]
20180307.204527.049 r9999I VT 795   OTT      1057 Goto track 1, current pos=0
20180307.204527.057 r9999I VT 795   OTT      1079 goto track[1], mapped=[1]
20180307.204527.064 r9999I VT 795   OTT      1119 reset position flag 0:0:202 straight
// Here loconet gets the command start
20180307.204527.071 r9999c VT 795   OLocoNet 2169 switch addr=206 dir=1 action=1
20180307.204527.092 r9999I VT 795   OTT      1131 position 0 0:0:202 straight
20180307.204527.099 r9999c VT 795   OLocoNet 2169 switch addr=200 dir=1 action=1
20180307.204527.117 r9999I VT 795   OTT      1143 position 1 0:0:202 turnout
20180307.204527.123 r9999c VT 795   OLocoNet 2169 switch addr=201 dir=0 action=1
// The command start is send here:
20180307.204527.139 r9999c lnwriter OLocoNet 0732 sw addr=206 gate=1 value=1
20180307.204527.146 r9999a lnwriter OModel   4973 trying to match switch event: 0:52:3:1 type=0 uidname=[]
20180307.204527.159 r9999I VT 795   OTT      1155 position 2 0:0:202 turnout
20180307.204527.168 r9999c VT 795   OLocoNet 2169 switch addr=202 dir=0 action=1
20180307.204527.182 r9999a lnwriter OModel   3570 no more switches found by address [52,3]
20180307.204527.191 r9999a lnwriter OModel   4998 trying to match signal event: 0:52:3 type=0 uidname=[]
20180307.204527.193 r9999I VT 795   OTT      1168 position 3 0:0:202 turnout
20180307.204527.201 r9999c VT 795   OLocoNet 2169 switch addr=203 dir=0 action=1
20180307.204527.210 r9999a lnwriter OModel   3648 no signal found by address [0,52,3] type=0 uidname=[]
20180307.204527.228 r9999a lnwriter OModel   4253 tt [trainlift] found by address 0:0
20180307.204527.229 r9999I lnwriter OTT      0079 turntable [trainlift] event: value=1
20180307.204527.230 r9999I lnwriter OTT      2864 polarization address is not set
// Here the bridge is reported to be in position
20180307.204527.233 r9999I lnwriter OTT      0102 bridge at position pos=1
20180307.204527.240 r9999I VT 795   OTT      1179 position 4 0:0:202 turnout
20180307.204527.250 r9999c VT 795   OLocoNet 2169 switch addr=204 dir=0 action=1
20180307.204527.282 r9999I VT 795   OTT      1192 position 5 0:0:202 turnout
// But only here does the lift reply it has invalidated its position.
20180307.204527.289 r9999I lnwriter OLocoNet 0583 sensor=993 value=0
20180307.204527.292 r9999a lnwriter OModel   4816 trying to match sensor event: [LocoBuffer] 0:993 uidname=[] state=0 code=
20180307.204527.311 r9999c VT 795   OLocoNet 2169 switch addr=205 dir=0 action=1
20180307.204527.330 r9999I VT 795   OTT      1204 set position flag 0:0:202 turnout
20180307.204527.332 r9999c VT 795   OLocoNet 2169 switch addr=206 dir=0 action=1

The lift replies in 150 ms to the new command starting, but that seems too slow. Is there a way to check what causes the bridge to be in position as reported in line 20180307.204527.233?

I've also looked at the loconet traffic which looks as I expect:
Code: Select all
RX: B0 4E 31 30 Switch Request: 207:Closed - On
RX: B2 70 43 7E Sensor: 993 - Inactive
RX: B0 48 11 16 Switch Request: 201:Thrown - On
RX: B0 49 11 17 Switch Request: 202:Thrown - On
RX: B0 4A 11 14 Switch Request: 203:Thrown - On
RX: B0 4B 11 15 Switch Request: 204:Thrown - On
RX: B0 4C 11 12 Switch Request: 205:Thrown - On
RX: B0 4D 11 13 Switch Request: 206:Thrown - On
RX: B0 4E 11 10 Switch Request: 207:Thrown - On
RX: B2 70 43 7E Sensor: 993 - Inactive
RX: B2 70 43 7E Sensor: 993 - Inactive
RX: B2 70 43 7E Sensor: 993 - Inactive
RX: B2 14 40 19 Sensor: 41 - Inactive
RX: B2 6F 53 71 Sensor: 991 - Active
RX: B2 70 53 6E Sensor: 993 - Active
RX: B2 14 50 09 Sensor: 41 - Active
You do not have the required permissions to view the files attached to this post.
LocoBuffer, MRDDC and ORD-3 controlling many ESU old delta and 6080 decoders. Currently building a trainlift.
pyth
 

Re: Loco starts moving before traverser reaches second track

Postby rjversluis » 08.03.2018, 07:48

You mis understood this line.
You can use the bridge position sensor. If not you must provide a sensor at each track.
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 Automatic mode