Jump to content

Bahnübergang Halb-Schranke


Empfohlene Beiträge

Bahnübergang Halb-Schranke 

Hello @prinz  @Roter Brummer @Goetz and @Kai61

Sorry @Kai61 , I did not want to come in your topic and spoil your question. But at now I need some help myself on that subject.

  • Two tracks are used with the same barriers.
  • I managed to let the barriers stay closed when a second train comes in on the opposite side.
  • I do not use start, but current. Because it is possible that the animation is already going on when the second train comes.
  • For the moment I use always "Schließen" backwards and forwards. But yes @Roter Brummer was correct saying that the red/orange light is not ok when opening with this method.

How can I best proceed to have it all ? Thanks in advance. 

It's time I review an old publication.  But for the moment it should help  with only a small example with a command button for close / open that barrier, with current , not start. And the red/ orange lights have to work correct. ( So do not bother the double tracks, I will tackle my layout")

Thanks in avance, not urgent.

Kind regards, Herman 

Bearbeitet von Herman
mistype
Link zu diesem Kommentar
Auf anderen Seiten teilen

1 hour ago, Goetz said:

Only close the barriers when the first train approaches.

Hello @Goetz ,  thanks, seems very locigal. I'll try it out, probably after the weekend.

But for the moment I'm not clever enough to make a single command button for open and close, and use both "öffnen" and "schließen" properly with current.
I' ll make a little layout. There must be a logic misunderstanding in my mind , I think :/

Greetings, Herman

Bearbeitet von Herman
Link zu diesem Kommentar
Auf anderen Seiten teilen

Hello, maybe I should have come directly with this.

Bahnübergang Halb-Schranke.mbp

Halb-Schranke.thumb.jpg.6ab64ef5a2cd890df27a2ec0d452bc09.jpg

With 2x "schließen" it works, I think, even the red/orange lights ? ( blue button )
But what is wrong when using "schließen" and "öffnen" ( red button )

Only solutions with current and not start please.

Regards,
Herman

Bearbeitet von Herman
Link zu diesem Kommentar
Auf anderen Seiten teilen

1 hour ago, Goetz said:

Use the second train to increase the counter, but don't issue the "close" command a second time.

Hello  @Goetz .  I think I used your suggested solution, because I use counters, I have to check it. But what if the second first train comes in just when the animation for open is already busy , then we have to close, and that's why I use "current". 

Best regards, Herman

Bearbeitet von Herman
first train, see Goetz further
Link zu diesem Kommentar
Auf anderen Seiten teilen

vor 5 Minuten schrieb Herman:

But what if the second train comes in just when the animation for open is already busy

If the "open" animation is running, your counter is at 0.
Whatever train comes in at this point will be considered the first train. It cannot be a second train at this point or else your counter wouldn't be 0.

Link zu diesem Kommentar
Auf anderen Seiten teilen

vor 32 Minuten schrieb Herman:

Only solutions with current and not start please.

Therein lies your problem.
After running the "open" animation, the "close" animation ist still at it's end position. Running it from current to end will result in no animation.
The particular barrier that you chose cannot work with "current", because the "close" animation doesn't reset the "open" animation and vice versa. 

That's why you have to ensure that the animation always runs from the start. And thus only when the first train arrives.

V 8.5 demo layout (with german variable names!):    zweigleisiger Bahnübergang.mbp  

Please note: The closing animation is triggered when a train steps on a contact, whereas the opening animation is triggered when the counter reaches 0.
This is important because it guarantees that the closing mechanism is only triggered when the counter changes from 0 to 1.
It is not set off when the counter goes back from 2 to 1

 

One tiny flaw with this system: the barrier may open and close in quick succession, when the timing of two train arrivals is unfortunate.
This can be avoided with a more complex control mechanism. But let's start with the easy stuff and progress from here, when all is understood.

Kind regards
Goetz

Bearbeitet von Goetz
additional notes
Link zu diesem Kommentar
Auf anderen Seiten teilen

50 minutes ago, Goetz said:

After running the "open" animation, the "close" animation ist still at it's end position.

50 minutes ago, Goetz said:

That's why you have to ensure that the animation always runs from the start.

Hello @Goetz , yes I do understand that clear.  I used for a long time the same solution with "start" ( of course yours is more clear and compact, mine was from V6  ).

If the first train comes in just when the opening is not finished yet, we have to close and add 1 to the counter. But then the "start" jumps the barriers back to start before the close. ( just tested also on your layout) That's not nice to see. That's why I changed to use current.

So it is better we both say : it is not possible when you use current to open and close with both the "ôffnen" and "schließen" animations. I thougt for a moment there was a solution.o.O

Since the solution "current" and 2x "schließen" ( above red button ) seems ok (exept the late orange light on open), I stay with that solution here. Just a choice.

Thanks for your layout, and the clarifications. (y) I always learn from it. 
Kind regards,

Herman

 

 

Bearbeitet von Herman
missed Goetz additonal notes, ok now
Link zu diesem Kommentar
Auf anderen Seiten teilen

vor 16 Stunden schrieb Herman:

If the first train comes in just when the opening is not finished yet, we have to close and add 1 to the counter. But then the "start" jumps the barriers back to start before the close.

That is the "flaw" I mentioned in my added remark.
The only proper solution for this is to increment the counter long before you close the barrier.
That way, the barriers stay shut when there's insufficient time to fully open them between two trains.

Here's example No. 2, with an added delay to improve the behaviour:   zweigleisiger Bahnübergang mit Verzögerung.mbp

Please note: The contacts are now located at a much longer distance, to make up for the extra time required.
The delay time is 6 seconds, because the barriers need approx. 5 seconds to fully open.

Kind regards
Goetz

 

Bearbeitet von Goetz
Schreibfehler korrigiert
Link zu diesem Kommentar
Auf anderen Seiten teilen

vor 7 Stunden schrieb simonjackson1964:

can you not just use the same animation to open and close the barriers

Not with this particular model, Simon. Because the opening sequence is unlike the closing sequence run backwards.

closing:

  1. switch traffic lights to amber
  2. switch traffic lights to red
  3. lower barriers

opening:

  1. raise barriers
  2. turn traffic lights off when barriers are half risen.
Link zu diesem Kommentar
Auf anderen Seiten teilen

On 10/20/2023 at 11:00 PM, Goetz said:

Here's example No. 2, with

Hello @Goetz, thank you, I will certainly look at it very soon. ( I was not here in the weekend )

On 10/20/2023 at 11:00 PM, Goetz said:

The only proper solution for this is to increment

Hello @Goetz , "only" , perhaps yes in the graphical EV. 
And saterday night (*) I was just thinking that in V8.xx we can see where the animation is at a certain point ( only in Lua script), and intercept when the opening is not yet ready ? (maybe - I'll have to look at it ) 

(*) half sleeping, one of the reasons I should stay out of the forum or the studio after 18 hour. o.O :D

Hello @Phrontistes , thank you for the suggestion in P.M.  I'll look at it too.

Kind regards, Herman

Bearbeitet von Herman
typo
Link zu diesem Kommentar
Auf anderen Seiten teilen

vor 7 Minuten schrieb Herman:

we can see where the animation is at a certain point (...), and intercept

Nope, that won't work, Herman. Sorry!
You can read where the opening mechanism stands. But the closing mechanism has a different timing. The values won't match.

Plus it still leaves you with the untidy and unrealistic behaviour that a barrier half opens and immediately closes again when it should have stayed shut for the second train.
This is a timing issue. That's why I call my solution the only proper approach. It addresses the cause and eliminates it.

Kind regards
Goetz

Link zu diesem Kommentar
Auf anderen Seiten teilen

On 10/20/2023 at 11:00 PM, Goetz said:

The only proper solution for this is to increment the counter long before you close the barrier.
That way, the barriers stay shut when there's insufficient time to fully open them between two trains.

Here's example No. 2,

Hello, as always I need some time to investigate and understand. Nice done (y)
With thanks, Herman

Bearbeitet von Herman
Link zu diesem Kommentar
Auf anderen Seiten teilen

Thanks to @Herman who pointed out that the particular barriers used here don't do well when saving and loading a layout with closed barriers.

The problem occurs because the two animations don't stay in sync. When you run the "open" animation, the "close" animation stays at the end position and vice versa.
At the end of each animation, both have a value of 1, but with opposite effect. I added a short script that resyncs both states at the end of each animation.

This improved demo layout doesn't play up when saved and reloaded, regardless when.

 

Vielen Dank an Herman, der darauf hingewiesen hat, dass die hier verwendeten Schranken beim Speichern eines Layouts mit geschlossenem BÜ falsch aufwachen.

Das Problem tritt auf, weil die beiden Animationen nicht synchron bleiben. Wenn man die "Öffnen"-Animation ausführt, bleibt die "Schließen"-Animation an der Endposition und umgekehrt. Am Ende jeder Animation haben beide den Wert 1, aber mit gegenteiliger Bedeutung.

Ich habe ein kurzes Skript hinzugefügt, das beide Zustände am Ende jeder Animation neu synchronisiert.

Diese verbesserte Demo Anlage habe ich unter den Tutorials veröffentlicht. 

Tutorial Anlage: 35B6213D-D5A3-4098-B14E-D4E3D7B6C9BE    (nutzbar ab 3D-Modellbahn Studio V7)

Bearbeitet von Goetz
Anlagen ID ausgetauscht
Link zu diesem Kommentar
Auf anderen Seiten teilen

Hallo,

vor 4 Minuten schrieb phoobie2000:

könntest Du bitte Deine Lösung auch in der V 8 anbieten? Das Problem mit den Halb-Schranken habe ich auch und ich bin es immer durch "normale Schranken umgangen.

Wäre interessant zu sehen, wie Du es gelöst hast. Danke vielmals vorab.

die Demoanlage 8613F75A-4E11-444C-92CE-377832A5984E von @Goetz kannst Du auch unter V8 aufrufen...
Im Startfenster -> "Online-Katalog" -> "Suchbegriff / Content-ID" (oben rechts) die ID eingeben.

Gruß
EASY

Link zu diesem Kommentar
Auf anderen Seiten teilen

vor 3 Stunden schrieb phoobie2000:

könntest Du bitte Deine Lösung auch in der V 8 anbieten?

Das kann ich gerne tun.

Ich habe die V 8.5 Tutorial Anlage rausgeworfen und stattdessen eine V7 Tutorial Anlage (mit gleichem Inhalt) veröffentlicht.

Neue ID:    35B6213D-D5A3-4098-B14E-D4E3D7B6C9BE

Bearbeitet von Goetz
Ergänzungen
Link zu diesem Kommentar
Auf anderen Seiten teilen

Hello, since I started this discussion , I republish my old solution refreshed in V7. Also cars stop/start before the barriers.  It is an acceptable solution and easy to use. Since it is generic : just paste from layout once. Then each local copy works ( copy the whole group, unpack later ).  Do not copy the EV code twice.
It does not use Goetz excellent solutions, in his latest publication you can find all extra's. He published it in tutorials ( see above ). 

Hallo, da ich diese Diskussion begonnen habe, veröffentliche ich meine alte Lösung in V7 aufgefrischt. Auch Autos stoppen/starten vor den Schranken.  Es ist eine akzeptable Lösung und einfach zu bedienen. Da es sich um eine generische Lösung handelt, muss man nur einmal aus dem Layout einfügen. Dann funktioniert jede lokale Kopie (die ganze Gruppe kopieren, später auspacken).  Kopieren Sie den EV-Code nicht zweimal.
Es verwendet nicht Goetz ausgezeichnete Lösungen, in seiner letzten Veröffentlichung können Sie alle Extras finden. Er hat sie in Tutorials veröffentlicht ( siehe oben ).

Railwaytwotrackscrossingaroad.jpg.ecc055ecafb30e3653823436df5d9efb.jpg

161A334F-A357-4CD6-B8E0-C07FB97F2648

Best regards, Herman

( I know I had better updated the version, but the deletion was already a fact.  o.O Oeps. )

Bearbeitet von Herman
typo
Link zu diesem Kommentar
Auf anderen Seiten teilen

Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren

Du musst ein Benutzerkonto besitzen, um einen Kommentar verfassen zu können

Benutzerkonto erstellen

Neues Benutzerkonto für unsere Community erstellen.

Neues Benutzerkonto erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...