Jump to content

EricD

Mitglieder
  • Gesamte Inhalte

    34
  • Benutzer seit

  • Letzter Besuch

Beiträge erstellt von EricD

  1. Hallo in die Runde,

    Ich verwende Profession V 8.5.2.0 mit Plus Pack (endet am 21/09/2023). Ich bin sehr daran interessiert, die Steuerung über eine externe Schnittstelle (API) auszuprobieren, die JSON verwendet.

    Obwohl ich die gesamte Dokumentation (mehrmals) gelesen habe, habe ich immer noch keine Ahnung, wie ich anfangen soll.

    Könnte mir bitte jemand ein einfaches Beispiel zeigen, z.B. wie man den Zustand eines Signals über ein externes Programm + API ändern kann?

    Ich danke Ihnen.

    EricD

    Übersetzt mit www.DeepL.com/Translator (kostenlose Version)
    ===========================================================

    Hello everyone,

    I am running Profession V 8.5.2.0 with plus pack (ends 21/09/2023). I am very keen to try out the Control via external interface (API) which uses JSON.

    Although I have read all the documentation (several times), I still do not have a clue how to start.

    Please could someone show me a simple example e.g. how to change the state of a signal using an external program + API ?

    Thank you,

    EricD

  2. Hi Frank

    If 2 horizontal tracks overlap by 3mm or more they will be drawn red in the technical view.

    If two horizontal tracks are out of vertical alignment by 3mm or more they will be drawn red in the technical view.

    It's easy to spot vertical mis-alignment without using the technical view. But you need the technical view in order to spot horizontal overlaps. 

    Best wishes Eric (Please excuse my lack of German)

  3. Hallo,

    Wenn ich das Forum lese, finde ich die animierten Profilbilder, die einige wenige Mitglieder verwenden, sehr ablenkend. Weiß jemand, wie ich sie am Spielen hindern kann?

    Viele Grüße, 
    EricD
    (Mürrischer alter Mann)

    -------------------------------------------------------------------------------

    Hello fellow members,
    When reading the forum, I find the animated profile pictures that a few members use to be very distracting. Does anyone know how I can stop them from playing? 
    Best wishes,
    EricD
    (Grumpy old man)

  4. Hello fellow members

    Please do not discourage others from posting in this forum. I have learned a great deal from reading other peoples' posts. If you do not like the idea of coding in Lua (or C# or Java or even VB) then don't code in Lua etc and don't bother reading the posts which contain  code. But please do not try to stop other people from discussing such things.

    I use the Pascal interface to control such things as locomotive routing. I have gained enormous pleasure from developing Delphi programs to control my layouts. I can, therefore, see the potential of an interface in a more frequently used language. 

    When Lua was included in V5 I chose to learn that from scratch - nobody forced me to, but it gave me great pleasure. A lot of what I learnt came from reading posts in this forum.

    Programmers - please do continue to share your knowledge here in the forum. Please do not confine your knowledge to PN.

    Best wishes

    EricD

     

  5.   Hello Members
      
      Please can someone help me with the following.
      I am trying to build a table containing all the Locomotives
      in the layout. I cannot find the Lua code corresponding to
      "the vehicle has an engine" in the following:  
      
      function GetAllLocos()
          local tt = {}
          g = layout:enumVehicles(
          function ( vehicle )
             if "the vehicle has an engine" then
               table.insert(tt,vehicle)
             end
          end
          )
          return tt
      end
      
      I have searched the forum for quite a long time before making
      this request. I hope some kind person will tell me the solution.
      
      Thank you
      
      Eric
      
      ----------------------------------------
      Google translation:
      Bitte kann mir jemand bei folgendem helfen.
      Ich versuche eine Tabelle mit allen Lokomotiven zu erstellen
      im Layout. Ich kann den entsprechenden Lua-Code nicht finden
      "Das Fahrzeug hat einen Motor" im Folgenden:
                 <Lua function>
      Ich habe das Forum ziemlich lange durchsucht, bevor ich es gemacht habe
      diese Anfrage. Ich hoffe, eine freundliche Person wird mir die Lösung sagen.
      
      Vielen Dank

      Eric
     

  6. Hello HaNNoveraNer

    (Please excuse English - regrettably, I do not speak German)
    I use the following method to bring a train to a smooth halt. (The function GetDeceleration is set up for HO gauge.)

    Event One:

        --[[
          EVENT NAME: ContactBrakeIn
          A track contact with keyword 'Brake' is triggered upon entering
        --]]
        -- ==================================
        function GetDeceleration(Loco, Distance)
            local k = Loco.currentSpeed
           return 0.443451 * k * k / Distance
        end
        -- ==================================
          if contact.variables['Signal'].state == RED then
            local Distance = contact.variables['Distance']
            vehicle.deceleration = GetDeceleration(vehicle, Distance)
            vehicle.targetSpeed = 5
          end
    --

    Event Two:

        --[[
          EVENT NAME: ContactExitIn
          A track contact with keyword 'Exit' is triggered upon entering
          This is the complete stop which replaces the need for Lock-Tracks
        --]]
          if contact.variables['Signal'].state == RED then
              vehicle.currentSpeed = 0
          end
      
    "Distance" is the distance from the BrakeIn contact to the ContactExitIn contact. The BrakeIn decelerates the vehicle to 5kph. It then moves at 5kph until the ContactExitIn which stops it.

    I hope this will help you. I am happy to answer any questions you may have.

    Best wishes

    Eric
       
     

  7. Hi Tom

    You said "Here I find it easier to use a scaled down (0.1) loco ... for spreading the tracks out"  

    I am intrigued! I cannot scale a loco. When on the track the loco will not scale. When off the track it will scale to 0.1, but as soon as I put it on the track it re-scales itself to 1

    Cheers

    Eric

  8. Hi Bahnland

    1. Using the track editor to produce a curved slope is much easier than joining together small pieces of curved track with many different angles. Also the resulting 'cockpit' view is more pleasing. 

    2. You are absolutely right about the switches - they are totally unnecessary. Thank you for pointing that out.

    Many greetings

    Eric 

    Twisted tracks without switches.mbp

  9. If you have a slope which is curved the end of the slope may not be level. You can use a "twisted" track to correct this.

    Twist.jpg.61fa17953cec915bbb9b36bb06fc58c2.jpg

    You can make a "twisted" track using the track editor:

    Stage 1: Create six routes as follows

    Routes.thumb.jpg.5f200680fcecf0c10bb07e45a7c073c6.jpg

    Stage 2: Create two switch positions. Switch 0 actives Routes 0,1,2,3,4,5,6. Switch 1 also activates Routes 0,1,2,3,4,5,6

    PLEASE NOTE: Edit: Bahnland has kindly told me that stage 2 in NOT NEEDED - so please ignore it!

    Switches.jpg.0c7cb268d2adce7e0cf70954ddf9e9c1.jpg

    (I am grateful to Goetz for this idea - I learnt this from studying one of his Points designs)

    That's all you need to do. I know that you could achieve the same by using a group of 7 tracks but I think this is a neater method.Twisted tracks.mbp

    Best wishes to all

    Eric  

  10. Hi Andy

    I didn't realise that unless my signal is in the catalogue it will not appear. I thought it was contained inside the .mbp file. My signal is functional but not pretty - it does not compare well to the quality of the German signals in the catalogue. When I produce a better looking version I will upload it.

    Cheers

    Eric

    P.S. My original title "Disappearing Signals" has proved to be true in this mbp file!

  11. Thank you very much, Andy. I'm now keen to become proficient with Blender. But it's a steep learning curve! 

    UPDATE: Fantastic! Success!  I now have a working "cube" which behaves as a signal and can be seen in cockpit view from over 1000mm. Once again, thank you very, very much - this is something that I have been wanting to do for a long time.

  12. Hi Andy

    Thank you for your suggestion. I have spent all day (I'm retired!) reading the forum about Blender 2.8. I'm going to have a go tomorrow. However, I am still not clear how to

    1. Create an object that will behave like a digital switch 

    2. Create an object with a contact point.

    I've read the Wiki "Model making>functional models, control objects" "(Modellbau>Funktionmodelle>Signale, Steuerobjekte)" but I don't understand how this relates to Blender.

    Could you point me in the right direction? - I'm not asking you to do the work for me!

    Thank you 

    Eric

     

  13. Hello Members

    I have tried to make some signals that resemble those used on British railways. Since I do not know how to make new models, I have assembled them from Primitives and Buttons already present in the MBS catalogue.

    Everything seemed to be working well until I used the "Enter Cockpit" camera of the Loco. I then discovered, to my dismay, that the signals appeared and disappeared according to their distance from the Loco. (This does NOT happen when using a free camera attached to the Loco.)

    168294056_DisappearingSignal.thumb.jpg.5acf417558e1006c0005dada327f2506.jpg

    I have enabled the "Glow" feature of some of the components but this has not solved the problem.

    Can anyone offer me advice? I would really like to use some realistic-looking signals. Unfortunately, the German signals are very different to the British ones.

    Thank you in advance for any suggestions.

    Best wishes

    Eric

    Disappearing Signal.mbp

  14. The solution by Goetz is better than mine. Normally, I don't like "work-arounds" but this was all I could think of. I agree that it's better to use $("table has changed").

    I'm still learning and am happy to be doing so!

    Does anyone know how to detect a change in Locomotive speed? i.e. if you change the targetSpeed using the Locomotive control window, how can you detect this change in the Event Manager?

×
×
  • Neu erstellen...