Richard T Geschrieben 16. Januar 2022 Teilen Geschrieben 16. Januar 2022 I would like to add a Maximum Speed to an engine. I was intending to set up an event instruction so if the Engine gets a new speed command, it will check it, and if the command is greater than the max, then it will set the speed at max. I can set up the instructions but I can’t find a way to trigger the event when the engine receives a new speed command. There seems to be an example on Wiki – event management (basic) –, I can translate the page to English, but it doesn’t translate the example. Could someone help me please? Also, is there an event management (advanced) page? Some years ago, I wrote a program in VB to control things, but I can’t remember how I did it. I must have had some more detailed information about the game to have done it. Does anyone know where I could find more detailed programming info for V7 as I would like to do a bit more in this area? Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Goetz Geschrieben 16. Januar 2022 Teilen Geschrieben 16. Januar 2022 vor 6 Stunden schrieb Richard T: I can’t find a way to trigger the event when the engine receives a new speed command. Hello Richard, a new speed command isn't a trigger as such, which is why you cannot respond to it. When the issuing of a new target speed is an action inside your EV, you may of course use that same EV entry to first compare the new target speed with the max value stored in the engine's variables. From the way you describe this, I'm sure you know this. I assume you want to activate the speed limiter when the speed is changed by external means (user input, rocrail etc.)? In that case, you'll either have to set up a loop which regularly monitors all engine's target speed. Or maybe place a few stop contacts at strategic locations and set their deceleration value to the engine's max value. The latter would be more in line with the studio's general philosophy. Kind regards Goetz Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
simonjackson1964 Geschrieben 17. Januar 2022 Teilen Geschrieben 17. Januar 2022 I've had this exact same problem. My solution, though inelegant, works. I have a number of events, all of which do the same thing. One is triggered when a train enters a track contact, one when it reaches the centre, one when it leaves, one when it enters a track length one when it leaves a track length. All of them do basically what Goetz said: check the vehicle's speed against a variable "Max Speed"on the vehicle, if it is greater they set it back to the maximum speed. The problem is that at V7 signals have auto-accelerate on them. This is good because it saves a lot of code to stop and start trains when signals change, but while the train is passing that signal, it still tries to set the speed to the signal's "accelerate to" speed - even once the signal has gone red, which is weird! The only way I have found to limit a loco's speed at V7 is to literally check it everywhere and set it back down. Having a low acceleration on the slower trains means they generally don't get too much above their max before something notices. If having maximum speeds on locos is important, you would be better off using V6, where the loco must be stored at the signal by an EV, and started by an EV when the signal changes, this EV can access the loco's max speed variable and set the speed as required. Hopefully V8 will take account of this and allow different trains to have different maximum speeds Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
simonjackson1964 Geschrieben 17. Januar 2022 Teilen Geschrieben 17. Januar 2022 (bearbeitet) Sorry, forget that. Bearbeitet 17. Januar 2022 von simonjackson1964 Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Goetz Geschrieben 17. Januar 2022 Teilen Geschrieben 17. Januar 2022 vor 29 Minuten schrieb simonjackson1964: it still tries to set the speed to the signal's "accelerate to" speed No matter what people event, there's always some who manage to shoot themselves in the foot with it. Haha How about setting the acceleration at signals to a low value, say a shunting speed of 25 km/h? And let your automatic take care of superseeding this value, in accordance with the individual Vmax? Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
simonjackson1964 Geschrieben 17. Januar 2022 Teilen Geschrieben 17. Januar 2022 (bearbeitet) Because it means that an express train will slow to an unrealistic crawl when passing a clear signal? [Edit] .... Wait... Set the "accelerate to" to the lowest speed, but don't set the decelerate to unless that is the track limit! Then have a contact right after the signal that sets the train's new speed! @Goetz Thanks, you've made my day. (Major edit to layout coming up) Bearbeitet 17. Januar 2022 von simonjackson1964 typo Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Goetz Geschrieben 17. Januar 2022 Teilen Geschrieben 17. Januar 2022 vor 2 Stunden schrieb simonjackson1964: .... Wait... Set the "accelerate to" to the lowest speed, but don't set the decelerate ... you got it! Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
simonjackson1964 Geschrieben 17. Januar 2022 Teilen Geschrieben 17. Januar 2022 It works too... The bit I haven't quite got yet is how I'm going to change the maximum speed in the track contact for signals that have HP1 and HP2. I'll probably figure out a way to use the same EV that controls the HV ZS3 signals. Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Richard T Geschrieben 22. Januar 2022 Autor Teilen Geschrieben 22. Januar 2022 Thans for your help. I am doing it through an external program at this stage. Works well but there are a few things i want to tidy up. I'll ask in the programming part. Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
David Teide Geschrieben 27. Januar 2022 Teilen Geschrieben 27. Januar 2022 Kann ich also beim Konfigurieren eines neuen Lokmodells einen Befehl für die Höchstgeschwindigkeit erstellen? Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Empfohlene Beiträge
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 erstellenAnmelden
Du hast bereits ein Benutzerkonto? Melde dich hier an.
Jetzt anmelden