Welcome to MattzoBricks Forums MattzoTrainController for Power Functions (MTC4PF) MTC4PF – MattzoTrainController for Power Functions

Viewing 53 reply threads
  • Author
    Posts
    • #1658
      Matthias RunteMatthias Runte
      Keymaster

      Questions and ideas around the MTC4PF.

      Please read the documentation first:
      MattzoTrainController for Power Functions (MTC4PF)

      Thanks!

    • #1795
      Piet BeinekePiet Beineke
      Participant

      And here I am again haha. The Sensors and switches work properly now and I was trying to start building my first train-Conrtoller to test the 2 Controllers I already built in Automatic-Mode, but I can’t seem to find 5k Ohm Resistors, as they can be seen in the sketch, anywhere on the web. The Question I had was if it is possible to switch out the 5k Ohm and the 20k Ohm Resitors to 4.7k Ohm and 22k Ohm Resistors, as I already have them here, before I fry my board.
      Regards
      Piet

    • #1796
      Thorsten SchmitzThorsten Schmitz
      Participant

      Hi Piet, you are right. This you can’t find in for example the E12 Resistor Specs. When you want to work with this resistance you have to chose Trimpotis. But you can also chose a Resistor A and Resistor B has a ratio four times higher. The ratio is important not the absolute value. Beware, the precise Voltage devider you build up with this Resistors is very complicated. We throw out this feature until we find a solution more need for us!

    • #1797
      Piet BeinekePiet Beineke
      Participant

      I have decided to use multiple resistors and put them in a row I guess that works fine

    • #1798
      Matthias RunteMatthias Runte
      Keymaster

      As written in the documentation, the wiring to measure the battery voltage on pin A0 are not required for the present version of the firmware, as they are not really used to recalibrate the train speed when the battery voltage decreases. Anyways, you can build the controller now as specified and wait for the firmware upgrade in which the logic will be introduced.

    • #1848
      Piet BeinekePiet Beineke
      Participant

      I have now left out the resistors and finished up the wiring of the controller. Is it possible to power the Controller normally (by cable), so it is possible to programm it and get the Infos or do I have to disconnect everything before programming?
      Regards
      Piet

    • #1855
      Dan GoreckiDan Gorecki
      Participant

      Piet, I normally keep my ESp8266/Arduino devices on the breadboard with everything connected/wired up. Never had an issue with updating firmware. Once you do the initial load, the new v.03 software should allow OTA(over the air) updates, so no need to connect cable back, unless you want to see serial monitor.

      • #1856
        Henk van LingenHenk van Lingen
        Moderator

        Thats the theory, and I tested OTA working on several MattzoController types. Note however you may have to check some network things, as OTA uses multicast DNS in your local subnet(s).

    • #1966
      Ulrich SchneiderUlrich Schneider
      Participant

      Hi,

      While I had no trouble with the MTC4PF V0.2, I experience a weird issue with V3.0. It seems like I have power over the controller, but it is strangely reversed. When the speed is at 100% forward, the motor stops. When the speed is at 0% forward (or backward, or even 100% backward) the train is basically going at 100% speed. I have tried to set the motor to -1 instead of 1 in the configuration file and to invert it in rocrail but that has not solved the problem.

      Has someone an idea what else I could change to get this worked out?

      Best,
      Uli

    • #1967
      Thorsten SchmitzThorsten Schmitz
      Participant

      Hi Uli,
      please check with the Serial Monitor if the commands of rocrail are right implemented of the Controller. I mean, is 100% forward in rocrail the same in the Controller. If it is, please Check the wiring of the Motor shield. Do you use the two or three Pin variant? Is the Setting right? Please Report!
      Thorsten

      • #1974
        Ulrich SchneiderUlrich Schneider
        Participant

        I found the issue.

        While the Wiring diagram showed that the pins of motor A should be connected to D2 and D3, the code actually wants them to connect to D3 and D4. Changed that. Now it works.

        • #2045
          Matthias RunteMatthias Runte
          Keymaster

          Hi Ulrich, thanks for the heads up. I fixed that in the wiring diagram. Now it should be at least a bit easier to get going without the need if understanding every little detail in the code and configuration.

          Cheers,
          Mattze

    • #1973
      Hans-Joachim JaeckHans-Joachim Jaeck
      Participant

      Hallo und Guten Tag
      Irgendwie kann ich ein Problem nicht lösen. In der Configuration.h habe ich für meine Lok den Namen “RoteLok” und die Adresse 100 vergeben. Das gleiche hatte ich auch nochmal beim Motorschild so eingetragen. Die Adresse 100 habe ich dann bei Rocrail unter Schnittstelle/Adresse so eingetragen .Leider reagiert die Lok nicht. Ich erfuhr dass der Controller eine Adresse automatisch vergibt. Diese lautet in meinem Fall: 45282. Leider kann ich diese Adresse nicht in Rocrail eintragen. Das maximale, was ich eintrage kann ist 16383. Ich bitte um Hilfe da ich leider nicht weiterkomme. Liegt es vielleicht daran, dass ich Linux als Betriebsystem benutze?
      Vielen Dank!
      Gruß
      Achim

      • #1975
        Ulrich SchneiderUlrich Schneider
        Participant

        Hallo Achim,

        die Adresse 100 ist in diesem Fall die richtige. Die Nummer des Mattzocontollers ist für Rocrail in diesem Fall unwichtig.

        An Linux liegt es sicherlich auch nicht, ich benutze auch Linux.

        Hast du die 2 inneren oder die 2 äußeren Kabel der Power Functions Kabel an deinen Motorshield angeschlossen? Richtig wären die beiden Inneren.

        Das Diagramm ist ein wenig veraltet. Du müsstest einen Motor, den du an “Motor A” angeschlossen hast an die Pins D3 und D4 des ESP8266 anschließen. Ist dein Motor and “motor B” angeschlossen, brauchst du die pins D5 und D6. Sonst GND an GND und VCC an Vin.

        Ein guter Tipp ist den Controller mit USB an den Computer anzuschließen und in der Arduino Application unter “Tools -> Serial Monitor” zu beobachten. Wenn alles Verbunden bist und in Rocrail die Geschwindigkeit änderst, zeigt dir das der Serial Monitor an? Wenn ja, dann haben rocrail und dein Controller eine Verbindung. Dann kann es nur an der Verkabelung liegen.

        Viele Grüße,
        Uli

        • #1981
          Piet BeinekePiet Beineke
          Participant

          Nur noch mal zur Sicherheit, die beiden INNEREN sind die richtigen, korrekt? Denn mein Motor läuft nicht, obwohl ich am Controller sehe, dass er die Nachrichten aus Rocrail empfängt…
          VG

          • #2047
            Matthias RunteMatthias Runte
            Keymaster

            Using the inner Power Function wires is correct.

    • #1982
      Hans-Joachim JaeckHans-Joachim Jaeck
      Participant

      Hallo Uli, danke für deine Antwort.
      Soweit habe ich alles überprüft. Dass das Diagramm nicht die richtige Verkabelung zum Programm zeigt, hatte ich bei meiner Fehlersuche bereits bemerkt und dementsprechend geändert. So wie es ausschaut empfängt der Controller keine Daten. Der Serielle Monitor zeigt nach dem booten folgendes:
      MattzoController booting…
      Loaded mattzoControllerId from EEPROM: 45282
      Connecting as MTC4PF45282 to Wifi In_einem_Lan_vor_unserer_Zeit…
      MattzoController setup completed.
      initalizing funktion pins
      loading loco an motor shild configuration
      initializing built-in motor shield
      stopping all trains
      Setting motor speed: 0 (power: 0) for motor shild RoteLok

      Weitere Meldungen erscheinen nicht. Auch nicht wenn ich den Regler in Rocrail hoch schiebe. Dies erschien mir ein bisschen wenig an Infos. Im Monitor müsste ja eigentlich die Wifi und die Mosquitto Verbindung angezeigt werden. Darauf hin habe ich die Netzwerk-konfiguration.h überprüft. Daran lag es jedoch nicht. Nach langen hin und her überlegen schaute ich mal auf meine FritzBox. Und siehe da, der Controller ist nicht verbunden. Der Fehler steckt wie immer im Detail. Neue Wlan-Geräte haben immer erst einen gesperrten Zugang. Dies ist wohl aus Sicherheitsgründen so eingerichtet. Nun, jetzt funktioniert die Lok einwandfrei. Hätte ich vorher mal genauer auf den Seriellen Monitor geschaut, hätte ich viel Zeit mit Fehlersuchen einsparen können. Vielen Dank für den Tipp!
      Ich werde mich jetzt erst einmal in Rocrail einarbeiten um dies bedienen zu können. Ich überlege auch dann der LegoBahn einen eigenen Router auf Basis eines Raspberry Pi zu spendieren. Herzlichen dank auch an den Entwicklern und Mitarbeitern für dieses Projekt!

      Liebe Grüße
      Achim

      • #2046
        Matthias RunteMatthias Runte
        Keymaster

        Hi Achim,
        first of all: I like your WiFi SSID. According to the log, the controller did not connect to the WiFi correctly. Did you install a status LED on pin D8? That’s sometimes quite helpful. Flashing means: no wifi connection. Blinking means: no mqtt connection.

        Good luck!

        Cheers,
        Mattze

    • #2050
      clyssclyss
      Participant

      Hello,
      I wanted to use the IR emitter : how can I connect ir (pinout)
      Is the led btw 5v and PIN or btw PIN and GND (CPIO source or sink)? have you a best schema to purpose ?
      Thanks a lot

      • #2056
        Matthias RunteMatthias Runte
        Keymaster

        Hi clyss,
        your question is pretty good. Indeed I didn’t have time to add a dedicated wiring diagram for the MTC4PF with the infrared option yet. I will do that soon to make things a bit clearer.

        In the meantime some help for you: an infrared LED is nothing else than a LED, just that the emitted light is in the infrared spectrum and can not be seen by the human eye. That means: connect the longer leg of the LEDs to e.g. the i/o pin (e.g. D5 as in the standard configuration), and connect GND to the shorter leg. That is really all you need to do. Configure the firmware, upload it, power the controller up, and here you go.

        Good luck!

        Cheers,
        Mattze

      • #2068
        Matthias RunteMatthias Runte
        Keymaster

        Wiring diagram for MTC4PF with infrared added to the documentation.

    • #2069
      Thorsten SchmitzThorsten Schmitz
      Participant

      In addition a Technic Hint: Use your smartphone camera to make IR Spectrum visible. Check for e.g. the IR Led of your TV’s remote control. Look through the Cameradisplay on this while pushing any button. You will see the flickering! Use this for checking the function of your IR Led build in the controller!
      Thorsten

    • #2097
      Lucas HLucas H
      Participant

      Hi,

      I have a question regarding the wiring diagram of the Mattzocontroller for Power Functions with the IR led. The diagram shows that the IR led is directly connected to the 3v and d5 pins. However, most IR leds only run at 1,5v (at least the 940nm type which is commonly used). Furthermore, IR leds often run at higher currents (60mah or higher) while the gpio pins of the esp8266 only can provide 12mah max. I have tried the IR solution a while ago with a 940nm IR led when firmware 0.3 was released. I found then that most similar projects which use and esp8266 and an IR led use resistors and a transistor (type 2n222 or similar) which I had also used for my testing. I found that the solution was a bit unreliable so I bought the L9110 motorshield and have not tried it ever since. However, when I saw your new video today I became interested again since it seemed to work really well and would be easier to implement onboard the train.

      Could you explain why you’ve chosen to not use resistors and a transistor in this scenario and what type of IR led you have used? Isn’t this harmful to the controller/led in the long run or am I missing something here here?

      Thanks a lot and all the best,

      Lucas

      • #2163
        Matthias RunteMatthias Runte
        Keymaster

        Hi Lucas,
        the IR LED is not connected to D5 and 3.3V, it’s connected to D5 and GND. I will compile an exact list of the components that I used. So far, I didn’t burn any of the controllers or IR LEDs in that setup, and it ran over several weeks. Overstressing components is not good, but the infrared pulses are extremely short, which may help a bit to protect the LED even if overpowered.

        Cheers,
        Mattze

        • #2164
          Lucas HLucas H
          Participant

          Hi Mattze,

          I meant the GND pin indeed, my bad. Looking forward to the list!

          Lucas

    • #2108
      Thorsten SchmitzThorsten Schmitz
      Participant

      Hello Lukas,
      yes you‘re absolutely right. Never use a LED with 1.5V Flowvoltage on 3.3V without a limiting resistor! That‘s common Electronic Knowledge. But, what made it still function? Some luck , of course, and something like a Data transmitting based Puls width Modulation. The ir led works only while transmitting Data. This pulsing caused by an specific Frequency lowers the total Voltage to a not damaging Value.
      Not that terrible, it works! 😉

      Thorsten

      • #2161
        Lucas HLucas H
        Participant

        Hi Thorsten,

        Thank you for your reply, very interesting to read! I tried it out today for one of my trains on the layout and it works really well with the IR led build into the train next to the receiver. Although I prefer the Powered Up solution for most of my trains, this is a really nice way of automating my older power function trains. Only difference is that with the motor shield the train runs a bit smoother, but that’s negligible.

        Thanks again and all the best,

        Lucas

        • #2162
          Matthias RunteMatthias Runte
          Keymaster

          That might be because the Lego Infrared Receiver has only 7 power levels. That makes accelerating and braking and bit less smooth.

    • #2247
      ZoltanZoltan
      Participant

      I have a problem with compiling MTC4PF. It complains about L9110N in the configuration header line 82. Buth there is only L9110 defined. (And I use an L9110S.) What are the differences? I suppose none important? Can I just change the word “L9110N” to “L9110” in the config line 82? With that chane it compiled okay – but will it work? Alas, I still have no Hardware to check (is on the way)

    • #2249
      Matthias RunteMatthias Runte
      Keymaster

      That’s a little bug in Firmware 0.3. Change it to L9110 and you’ll be fine. Will be fixed with the bugfix release 0.3.1 (presently scheduled for Sunday or next week).

      • #2252
        Thomas RodriguesMax
        Participant

        release 0.3.1 (presently scheduled for Sunday or next week)

        Hi Mattze,

        any releasenotes prior to the release? Just asking for a friend 🙂

        • #2253
          Matthias RunteMatthias Runte
          Keymaster
        • #2255
          ZoltanZoltan
          Participant

          Thanks, Matthias, as I said I did it.
          A question to V1.0: MTC4PF runs on “normal” ESP, MTC4PU runs on ESP32. Shall the “consolidated” firmware run on ESP32 only, or also on the “old” ESP? I ask this, for I now plan ESP for MTC4PF, but do I have to buy a new ESP32 board if I want to run the new Firmware for “old” locos without PU (bluetooth)?

          • #2261
            Matthias RunteMatthias Runte
            Keymaster

            I would recommend to wait a bit. We are not finally decided on unifying the MattzoTrainControllers yet. The ESP8266 based controllers work absolutely stable and without any problems. As you know, we are still struggeling a bit with the stability of the ESP32. Before we haven’t sorted out all problems, I am not willing to give up the ESP-8266 yet. Anyways, you can always use your ESP8266 for building layout controllers (sensors, switches, signals…).

          • #2262
            ZoltanZoltan
            Participant

            Okay, thanks. And I suppose a stable MTC4PF V0.3 shall work without any problems also after the new one is out.

    • #2256
      Thomas RodriguesMax
      Participant

      I’ve ran into the same bug like Zoltan described it in his post #2247.
      Nevertheless if you fix the .motorShieldType into “MotorShieldType::L9110” the Sketch runs trough Arduino IDE like a charm.

      For the sake of completeness I’ve tested two different 8266 NodeMCU Versions.
      Both without any problems so far.

      mtc4pf-8266-v3

      • This reply was modified 3 years, 5 months ago by Thomas RodriguesMax.
    • #2258
      ZoltanZoltan
      Participant

      Can I run the MTC4PF controller on a Vemos D1 mini with a d1 motorshield over i2c or with L298N H-Bridge? What must I change in the .ino code and how would the wiring go?

      • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
      • #2260
        Matthias RunteMatthias Runte
        Keymaster

        I didn’t try this yet. At least the i2c connectivity will require some code changes, I suppose.

        Be careful that your Wemos D1 mini doesn’t smoke off when you connect it to power. It does not cope with 9V. You need a step-down module between the battery and the microcontroller.

        • #2263
          ZoltanZoltan
          Participant

          I already run the D1 on 12 V with the D1 PowerShield without any problems with its own MotorShield in PWM Mode, controlled by the Z21 App or the WLANMouse. Another exemplar runs with L298N off its BEC functionality, delivering DCC out for an ESU decoder, also controlled by the Z21 App or the WLANMouse. So the power is not the problem… but the code 🙂 I wish to have the MQTT functionality for Rocrail, then that is what fascinates me.

    • #2276
      Thomas RodriguesMax
      Participant

      @Matze und Team: Es gibt im Sketch für MTC4PF_Configuration.h einen Typo im Kommentar:

      
      // Automatic lights. If set to true, Functions with odd numbers (Fn1, Fn3...) are switch on when loco is going forward, and odd numbers (Fn2, Fn4)
      

      Korrigiert müsste es lauten:

      
      // Automatic lights. If set to true, Functions with odd numbers (Fn1, Fn3...) are switch on when loco is going forward, and even numbers (Fn2, Fn4)
      
      • #2277
        Matthias RunteMatthias Runte
        Keymaster

        Thanks!

      • #2278
        ZoltanZoltan
        Participant

        Thank you, Max. I corrected it in all the 4 “.h” files (although it is not critical – but a good sketch documents itself, so it is importanat!)

    • #2281
      Herbert S.Herbert S.
      Participant

      Hello, I am new here and very enthusiastic about the idea. So today I have ordered a lot of controllers, reed sensors and other stuff. I have two questions: I have an white ICE 7897 and a green crocodile 7898. These work with IR, but this system was published befor power functions. So is it or will it be possible to control them with an MattzoTrainControll with IR-LED? The second question is about your future plans für the MattzoLayoutController and the new train controller. Will it be the same hardware (ESP8266 / ESP 32) or are there plans to change?

      • #2286
        Matthias RunteMatthias Runte
        Keymaster

        Hello Herbert,
        welcome! At present, we have no plans to support the old RC Infrared prototcol, though I am aware that people have reengineered it and replaced the infrared remote control with their own devices. So it should theoretically be possible to do that.

        The MattzoLayoutController will be based on the ESP8266 as well. You may order some PCA9685 port extenders as well if you’re planning larger layouts.

        Cheers,
        Mattze

    • #2293
      Lucas HLucas H
      Participant

      Hi,

      I have successfully implemented a RGB led on both the front and rear of my 60197 train which works perfectly when switching directions: the leds show either white or red depending on the direction. I simply added two ESP8266s with a 9v battery in the front and rear of the train and used the MTC4PF firmware to control the LEDs. However, I would like to have two leds in both the front and rear of the train but I run into a slight problem with the code. I’ve installed the red terminal of the LEDs on the ports D0 and D5 and added D0-1-2-5-6-7 to the functions in the config file (since those are the ports I am using to control the LEDs). When going forward the leds in the front of the train both show the white aspect, which is correct. However, for the rear part of the train only one of the 2 LEDs shows the red aspect, the other one remains dark. I’ve tried some combinations in the execute light event section of the code but have not been successful yet. Could someone indicate what would be the correct functioncommand[i] for reverse in order to have both leds show red when in reverse direction? Or is this something that is not yet supported in this version of the firmware?

      Cheers,
      Lucas

      • #2295
        Matthias RunteMatthias Runte
        Keymaster

        If you could post:
        1. the relevant sections of the config file (MTC4PF_Configuration.h or similar),
        2. your lightEvent() function in MTC4PF.ino,
        then I could try to comment on that.

        Thanks!

        • #2299
          Lucas HLucas H
          Participant

          Hi Matthias,

          The section of the config file (MTC4PF_Configuration.h):

          
          // NUM_FUNCTIONS represents the number of Rocrail functions that are defined for this controller
          // If changed, the number of array values for FUNCTION_PIN below must be changed as well.
          // You should also check void lightEvent(), which is responsible for switching headlights from white to red etc.
          const int NUM_FUNCTIONS = 6;
          
          // Digital pins for function output
          // For lights conntected to LEGO IR Receiver 8884, use virtual function pins IR_LIGHT_RED and IR_LIGHT_BLUE
          uint8_t FUNCTION_PIN[NUM_FUNCTIONS] = { D0, D1, D2, D5, D6, D7 };
          
          // The loco address for which the function pin will be triggered.
          // You may fill that array up with zeros (0). Meaning: "all trains". Makes only sense if this controller is handling a single train only.
          int FUNCTION_PIN_LOCO_ADDRESS[NUM_FUNCTIONS] = { 0, 0, 0, 0, 0, 0 };
          
          // Automatic lights. If set to true, Functions with odd numbers (Fn1, Fn3...) are switch on when loco is going forward, and odd numbers (Fn2, Fn4) when reverse. Set to false to disable the feature.
          // To set-up more advanced behaviour, find the lightEvent() function in the MTC4PF code and change it as desired.
          const bool AUTO_LIGHTS = true;
          
          // Digital output PIN to monitor controller operation (typically a LED)
          bool STATUS_LED_PIN_INSTALLED = false;  // set to false if no LED is installed
          uint8_t STATUS_LED_PIN = D8;
          

          And the lightEvent() function in MTC4PF:

          
          // execute light event
          // IF DESIRED, YOU MAY UPDATE THIS CODE SO THAT IT FITS YOUR NEEDS!
          void lightEvent(LightEventType le, int locoIndex) {
            if (!AUTO_LIGHTS)
              return;
            
            for (int i = 0; i < NUM_FUNCTIONS; i++) {
              if (locoIndex == 0 || locoIndex == FUNCTION_PIN_LOCO_ADDRESS[i]) {
                switch (le) {
                case LightEventType::STOP:
                  mcLog("Light event stop");
                  // switch all functions off
                  // UPDATE THIS CODE SO THAT IT FITS YOUR NEEDS!
                  // functionCommand[i] = false;
                  break;
                case LightEventType::FORWARD:
                  mcLog("Light event forward");
                  // UPDATE THIS CODE SO THAT IT FITS YOUR NEEDS!
                  functionCommand[i] = true;
                  break;
                case LightEventType::REVERSE:
                  mcLog("Light event reverse");
                  // UPDATE THIS CODE SO THAT IT FITS YOUR NEEDS!
                  functionCommand[i] = (i == 0);
                  break;
                }
              }
            }
          }
          

          This should be all the relevant code. Let me know if I missed something!

    • #2316
      Matthias RunteMatthias Runte
      Keymaster

      The last part of the lightEvent() function should be changed like this:

      
             case LightEventType::REVERSE:
              mcLog("Light event reverse");
              // UPDATE THIS CODE SO THAT IT FITS YOUR NEEDS!
              functionCommand[i] = ((i == 0) || (i == 3));
              break;
            }
          }
        }
      }
      

      Let me know if it works.

      We have plans to make the light configuration both simpler and more powerful in the future.

      • #2319
        Lucas HLucas H
        Participant

        Hi Matthias,

        Thank you very much for your help, it works perfect!

        All the best,
        Lucas

        • #2320
          Matthias RunteMatthias Runte
          Keymaster

          Happy to hear that.

          And here is your chance for compensation: 🙂
          – If you build a beautiful LEGO train layout, send me the track plan and media like photos and videos, so that I can publish it in the projects section on the website! My e-mail address can be found in the imprint (Impressum) section.

          Thanks!

          • #2336
            Lucas HLucas H
            Participant

            Will do!

    • #2321
      Douwe PenDouwe Pen
      Participant

      Hi,

      After successfully running trains in Rocrail using the MTC4PU I now want to try the MTC4PF.

      After successfully loading the program onto the esp 12 and what looks like me to normal behaviour in serial monitor. I can’t get it to talk to Rocrail. After connecting the power. Train light comes on at pin D0, indicator led on pin D8 is off. Battery voltages measured on pins that control shield. Battery voltage measured on motorshield power in. 2.77 volts measured on other pins of the shield. No voltage on motor outlets. Controller doesn’t respond to commands from Rocrail.

      What do I do next ?

      • #2322
        Piet BeinekePiet Beineke
        Participant

        Firstly I simply want to make sure, that you used the INNER cables of the PF cable to screw into the motorcontroller, because this is crucial.
        Regards

        • #2324
          Douwe PenDouwe Pen
          Participant

          I’m simply testing with my multimeter at this stage. The whole thing is sitting on bread boards. I am familiar with LEGO wiring diagrams.

    • #2323
      Douwe PenDouwe Pen
      Participant

      I’m simply testing with my multimeter at this stage. The whole thing is sitting on bread boards. I am familiar with LEGO wiring diagrams.

      • #2354
        Douwe PenDouwe Pen
        Participant

        Update: I now have a working MTC4PF. Unfortunately I have no idea what I did to make it work so I didn’t learn much.

    • #2361
      ZoltanZoltan
      Participant

      Sorry, falscher Post

      Ich komme von der Maschinenbau Ecke und bin “leicht” greenhorn in ESP Programming.
      Ich habe die Configfiles wie beschrieben für meine Netzwerkkonfig editiert, der Lok eine Adresse von 3000 gegeben und den MTC4PF dann erfolgreich kompiliert. Dann Upload gestartet (blaue LED blinkt):
      Ergebnis:

      Executable segment sizes:
      IROM   : 308880          - code in flash         (default or ICACHE_FLASH_ATTR) 
      IRAM   : 28428   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...) 
      DATA   : 1376  )         - initialized variables (global, static) in RAM/HEAP 
      RODATA : 4332  ) / 81920 - constants             (global, static) in RAM/HEAP 
      BSS    : 26232 )         - zeroed variables      (global, static) in RAM/HEAP 
      Sketch uses 343016 bytes (32%) of program storage space. Maximum is 1044464 bytes.
      Global variables use 31940 bytes (38%) of dynamic memory, leaving 49980 bytes for local variables. Maximum is 81920 bytes.
      /home/nathalie/.arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 /home/nathalie/.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/upload.py --chip esp8266 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash 0x0 /tmp/arduino_build_96414/MTC4PF.ino.bin 
      esptool.py v2.8
      Serial port /dev/ttyUSB0
      Connecting....
      Chip is ESP8266EX
      Features: WiFi
      Crystal is 26MHz
      MAC: 8c:aa:b5:7c:22:40
      Uploading stub...
      Running stub...
      Stub running...
      Configuring flash size...
      Auto-detected Flash size: 4MB
      Compressed 347168 bytes to 247922...
      Wrote 347168 bytes (247922 compressed) at 0x00000000 in 21.8 seconds (effective 127.2 kbit/s)...
      Hash of data verified.
      
      Leaving...
      Hard resetting via RTS pin...

      Blaue LED ist an.

      Im Serial Monitor sehe ich garbage:

      11:12:27.117 -> {$|⸮⸮⸮⸮s⸮c⸮#⸮⸮ng⸮$gn⸮⸮⸮cp⸮⸮d{$sdp⸮g⸮

      (serial Monitor steht auf 9600 Baud)

      Reset Knopf gedrückt: keine Änderung.

      Sicherlich ist es ein dummer elementarer Fehler, aber ich komme nun nicht weiter.

      • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
      • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
      • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
      • #2364
        Piet BeinekePiet Beineke
        Participant

        Hallo Zoltan.
        Dies ist tatsächlich ein blöder Fehler, den ich zunächst auch hatte:
        Auf den Controllern steht, es müssten 9600 Baud eingestellt sein, um die richtigen Ausgaben für den Controller sehen zu können muss der Serial-Monitor aber auf 115200 Baud eingestellt werden.
        Viele Grüße
        Piet

        • #2366
          ZoltanZoltan
          Participant

          Vielen Dank, Piet, inzwischen bin ich drauf gekommen, kann aber meinen Eintrag nicht mehr löschen.

          Nun sehe ich:

          11:14:33.467 -> MattzoController booting...
          11:14:33.467 -> Loaded mattzoControllerId from EEPROM: 13395
          11:14:33.467 -> Connecting as MTC4PF13395 to Wifi PBS-5074F5...
          11:14:33.467 -> MattzoController setup completed.
          11:14:33.467 -> initializing function pins
          11:14:33.467 -> loading loco and motor shield configuration
          11:14:33.467 -> initializing built-in motor shield
          11:14:33.500 -> stopping all trains
          11:14:33.500 -> Setting motor speed: 0 (power: 0) for motor shield LEGO

          Und das sieht gut aus – aber wie geht es nun weiter?

          Ich habe auf meinen Debian Rechner Rocrail und Mosquitto, in Rocrail habe ich localhost und Port eingestellt und eine Lok definiert.

          Aber ich sehe den ESP nicht im Netzwerk. Wie kann ich ihn finden? Wenn er sich konnektiert hat, muss er ja eine IP bekommen haben…

          EDIT: Mein Fehler, falsche SSID angegeben…

          11:32:36.241 -> Wifi connected. My IP address is 10.0.0.15.
          11:32:36.274 -> (Re)connecting to MQTT 10.0.0.12...
          11:32:36.307 -> MQTT connected, listening on topic [rocrail/service/command].
          11:32:36.539 -> Received MQTT message [rocrail/service/command]: <sys cmd="shutdown" informall="true" val="0"/>
          11:32:36.539 -> 
          11:32:36.539 -> Parsing XML successful
          11:32:36.539 -> <sys> node found. Processing sys message...
          11:32:36.539 -> rocrail system command: shutdown
          11:32:36.539 -> received ebreak, stop or shutdown command. Stopping train.
          11:32:36.539 -> Flipping function 1 to 1
          11:32:36.539 -> Flipping function 3 to 1
          11:32:36.770 -> Flipping function 1 to 0
          11:32:36.770 -> Flipping function 2 to 1
          11:32:36.770 -> Flipping function 3 to 0

          Sorry dass ich hier DAU Sachen treibe, aber irgendwie muss ich anfangen.

          Mattze, vielleicht kannst du einiges löschen bzw. einen DAU Thread einrichten… ich nehme an, dass es noch einige andere ausser mir geben wird mit elementaren Problemen.

          • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
          • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
          • #2367
            Piet BeinekePiet Beineke
            Participant

            Funktioniert er noch nicht richtig, oder wofür willst du ihn finden? Ich selbst habe nie in die Netzwerkeinträge geschaut, da alles auch so funktioniert hat…

          • #2370
            ZoltanZoltan
            Participant

            Ich habe ihn gefunden:

            Hostname   : MTC4PF13395
            MAC Adresse: 8c:aa:b5:7c:22:40
            IP Adresse : 10.0.0.15 
          • #2372
            Piet BeinekePiet Beineke
            Participant

            Sehr schön. Läuft der Zug schon?
            Viele Grüße

    • #2373
      Thomas RodriguesMax
      Participant

      Ich bin gerade daran einen absoluten Beginner-Leitfaden zu erstellen. Der Thread “MattzoBricks Train Automation for Beginners” wird von mir sukzessiv erweitert.

      Aber Zoltan, läuft die Lok? 🙂

    • #2375
      ZoltanZoltan
      Participant

      Hallo alle, vielen lieben Dank für die Hilfe von euch.
      Die Lok läuft noch nicht, weil ich es noch nicht zusammengestöpselt habe, alles Trockentest, aber ich sehe im Serial Output, dass Sachen ankommen, wenn ich in Rocrail die Lok bewegen will.
      Nun kommt Wiring.
      Ich speise von einem Batteriepack 7,4 V (2×18650 LiIon), dem Motor ist es okay für Vmax.
      Ich will aber den NodeMCU nicht damit speisen, er bekommt einen 5V-StepDown auf Vin.
      Motorshield L9110 bekommt die 7,4 V direkt.
      Es ist möglich, dass ich später den StepDown weglasse, denn 7,4-8 V verkraftet der NodeMCU angeblich ohne Probleme. Aber ich möchte Wärme darauf vermeiden.
      Ich muss noch herausfinden, wie ich insgesamt 10 LEDs anschliessen kann, für AutoReverse (je 2-2 rote paralell und je 3-3 weiße paralell)

      Jetzt gehe ich stöpseln, und wenn die Lok läuft, danach werde ich gleich die beiden anderen Controllern für Weiche und Sensor angehen (Sensor, Reedrelais und weitere 2 NodeMCUs sind schon da).

      Ich werde mich melden.

      • #2378
        Thomas RodriguesMax
        Participant

        Ich würde das ja gern mal sehen. Mach doch mal ein Bild vom Breadboard.

        • #2381
          ZoltanZoltan
          Participant

          Mache ich, wenn ich dazukomme. ZZ. habe ich viel um die Ohren. Und wie ich ein Bild hier einstelle muss ich auch noch herausfinden.

          • #2384
            ZoltanZoltan
            Participant

            Hallo Max, nun zum Breadboard, aber einiges davor über mich, wie und warum ich hier überhaupt aufgetaucht bin:

            Ich komme, wie gesagt, aus der Maschinenbau-Ecke und hatte bisher keinen wirklichen Kontakt mit cpp.

            Modellbahnmäßig fahre ich selbst gebaute Echtdampfloks auf Spur G, die werden mit Servos per RC gesteuert.

            Ansonsten (bis auf einigen Ausnahmen in anderen Spurweiten, ich sammle nämlich NOHAB Loks) fahre ich Spur Z als “elektrische Eisenbahn”.

            Auch mit der ESP habe ich einige Erfahrung, ich habe LittleYodas ESP-DCC nachgebaut, um auf G schienenstromlose, autonome Loks mit eingebauter Zentrale und mitfahrende Akkus – allerdings wurden da fertige Binaries mit esptool auf die NodeMCUs und D1minis draufgeflasht. Mit Geisterwagen habe ich es in H0 ebenfalls nachgebaut, um auch dort schienenstromlos digital fahren zu können.

            Ich habe also auch keine Lego Bahn – bis auf eine Spielerei auf Z-Spur mit Lego:
            (https://www.youtube.com/watch?v=pt8qNeuCrnk)

            Ich habe einiges auch mit Rocrail automatisiert, also etwas Erfahrung mit Rocrail habe ich schon (mit Digikeijs Komponenten).

            Im Rocrail Forum habe dann ich die Webseite von Mattze erwähnt gefunden, und klickte natürlich sofort dahin.
            Das Konzept hat mich fasziniert.

            Ich wollte (und konnte) aber nicht noch eine Spurweite einrichten.
            Erstens: Budget – ich bin Pensionist.
            Zweitens: chronischer Platzmangel – ich wohne in 70 m2 Innenstadt und habe überhaupt keinen Platz für nix, auch die G-Gleise stecke ich nur mal temporär im Wohnzimmer zusammen; daher auch Z, das kann ich auf einem Tisch aufbauen.

            Noch dazu betreibe ich eine eigene 52-er Vereins-Dampflok in 1:1.

            Aber Mattzes Konzept und die Rocrail Steuerung ohne Zentrale mit MQTT hat mich trotzdem gewurmt, und nachdem Mattze mir erlaubt hat, sein Projekt zu “missbrauchen”, habe ich alles für Spur G “modelliert”, indem ich aus einem von jemanden ausrangierten und abgestoßenen Piko G-Taurus Fahrgestell eine “PseudoLegoLok” für Spur G baue.

            Eine G-Weiche und ein Servo sind auch schon vorhanden, weitere zwei NodeMCUs und die vorgeschlagene ReedRelais habe ich auch gekauft, um den Switchcontroller und den SensorController auch zu bauen.

            Wenn ich alles wirklich zum Laufen bekommen kann, wird es vielleicht einmal ergänzt, um eine echte Anlage damit zu betreiben. Und wenn ich am Lotto gewinne, baue ich es in Lego nochmal 🙂

            Ich dokumentiere meine Bauten ziemlich akribisch mit vielen Fotos, aber ich glaube, dass das hier vielleicht nicht erwünscht wäre. Daher stelle ich nur 3 Bilder hier ein, um zu zeigen, wie es sich mit dem Breadboard verhält: ich habe jene Phase nämlich nach einiger Vorbereitung doch ausgelassen, und habe alles gleich auf der “Lok” zusammengestellt.

            Zuerst mein Testplan:

            Dann mein “Breadboard”:

            Breadboard

            Etwas näher:

            Stellprobe

            Ein “Trockentest” mit dem angeschlossenen NodeMCU, Rocrail und Serial Monitor ergab, dass der NodeMCU auf die Rocrail Fahr-Kommandos zu reagieren scheint.

            Ich möchte 4 Funktionstasten programmieren:
            – 3xweiss Fahrzeugseite 1
            – 2xrot Fahrzeugseite 1
            – 3xweiss Fahrzeugseite 2
            – 2xrot Fahrzeugseite 2
            So kann ich unabhängig Spitzlicht und Schlusslicht so schalten, wie es mir gerade passt, ohne automatischen Lichtwechsel mit der Fahrtrichtung.
            Wie ich den Code dafür modifizieren muss, weiß ich noch nicht wirklich, aber mal sehen.

            Mit den 2 18650 LiIons habe ich etwa 8,3 V Leerlaufspannung, das sind fast die 9 V bei Mattzes Zeichnungen.
            Meine LEDs leuchten mit 6,8 kOhm Vorwiderstand schon hell genug.
            Und der Motor läuft damit für eine kleine Rangierlok vorbildgerechte Höchstgeschwindigkeit.
            Also glaube ich für ein Test gut gerüstet zu sein.

            Bitte entschuldigt die lange Geschichte, ich wollte aber zeigen, mit wem ihr zu tun haben und warum ich mal komische Fragen stellen werde.

            • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
            • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
    • #2387
      clyssclyss
      Participant

      Thanks a lot for the ir diagram:)

      Perhaps, you could publish all the code/config on GitHub : we could be able to collectively improve documents and code ?
      If you need help configuring github, don’t hesitate to contact me
      Thanks for your incredible job

      • #2388
        Matthias RunteMatthias Runte
        Keymaster

        The code is on GitHub, but it’s not public. We have plans to set the repository to public at a later stage.

        • #2390
          clyssclyss
          Participant

          Ok! Hope u’ll do it soon that we can help!

    • #2398
      ZoltanZoltan
      Participant

      So, das erste Projekt ist soweit fertig, die “Lok” leuchtet und fährt.

      Ich habe aber ein Problem:
      Die Lok fährt sehr ruckartig an und stoppt auch ruckartig.
      Schon bei 1 rattert sie mit einer ziemlichen “Grund-Drehzahl” los, und von 1 auf 0 bleibt sie ziemlich abrupt stehen, es gibt kein “kriechen”. Wie kann ich das Regelverhalten auf dem Motor abstimmen, damit er kriechen kann?

      • #2399
        Thomas RodriguesMax
        Participant

        Hast dus in Rocrail mal unter “deine Lok -> Eigenschaften -> Geschwindigkeit” versucht?

    • #2400
      ZoltanZoltan
      Participant

      Ja klar, aber schon bei 1 fährt sie sofort ziemlich schnell los.
      Irgendwie müsste man die niedrigste Fahrstufe feiner (im Code?) einstellen.

      EDIT: MIN_ARDUINO_POWER ist mit 400 definiert – ich glaube, hier könnte man drehen – wie weit kann man damit heruntergehen, ohne dass etwas dabei kaputt geht?

      Ausserdem noch ein Problem eben gemerkt:

      Die Lichter wechseln gut die “Fahrtrichtung”, aber die Richtung selber nicht.
      Wenn sie aus 0 losfährt fährt sie IMMER vorwärts, unabhängig von der in Rocrail eingestellten Fahrtrichtung (aber die Lichter wechseln korrekt, allerdings erst nach Losfahren).

      Wenn ich bei Fahrt die Richtung wechsle, dann klappt es korrekt auch mit dem Wechsel der Motordrehrichtung zu rückwärts, aber nach Stop fährt sie IMMER vorwärts los, auch wenn der Regler auf Rückwärts steht. Also Rückwärtsfahrt (klappt wie gesagt nur bei “fliegender” Umschaltung), stop, weiterfahrt – aber dann wird die Drehrichtung wieder vorwärts!

      Sowohl in Rocrail, als auch bei mosquitto_sub zeigt es bei Richtungswechsel korrekt die wechselnde Richtung an, nur der Motor dreht sich aus 0 startend statt rückwärts immer vorwärts (es sei denn, ich knalle es bei der Fahrt, also bei V<>0 um).

      EDIT: Kann das damit zu tun haben, dass V>=0 als forward und V<0 als reverse angesehen wird, oder liege ich da voll falsch? Code ist für einen DAU komplex genug, dass ich da nicht durchsehe… kann mir hiermit jemand helfen?

      (Es wäre auch schön, wenn er bei Betätigen von Rocrails “<<” bzw “>>” sofort die Lichter in die korrekte Richtung schalten würde, und nicht erst beim Losfahren wechseln würde.

      • This reply was modified 3 years, 5 months ago by ZoltanZoltan.
    • #2412
      ZoltanZoltan
      Participant

      Ich habe obiges etwas ergänzt – kann ein Guru (=Mattze…) im Code nachschauen oder mir sagen, wo ich Fehler mache?

    • #2430
      ZoltanZoltan
      Participant

      Hallo Leute, ich schon wieder (bzw.: noch immer…):

      Der Motor dreht sich aus 0 startend immer vorwärts, unabhängig davon, ob im Rocrail Throttle “>>” oder “<<” angezeigt wird.

      Wird es während der Fahrt von”>>” auf “<<” umgeschaltet, tut der Motor die Drehrichtung ändern. Steht die Lok, dreht der Motor immer vorwärts los.

      Kann mir denn hier niemand helfen?

      • #2431
        Matthias RunteMatthias Runte
        Keymaster

        Poste bitte mal die MQTT loco messages und welche Richtung du jeweils erwartest. Auch die Serial Logs vom MattzoTrainController wären hilfreich.

        • #2435
          ZoltanZoltan
          Participant

          Ich weiss nicht, wie ich Dateien anhängen kann, die Logs sind ziemlich lang, ich versuche, sie als “Code” einzufügen.

          Zuerst zum Aufbau:

          D0, D1, D2 und D7 sind Spitz- und Schlusslichter.
          Die wechseln jedesmal korrekt wie sie sollen.

          D3, D4 gehen zum Motorshield L9110 Motor A, Motor ist an Buchse A angeschlossen und reagiert.
          Wenn ich während der Fahrt von “>>” auf “<<” oder zurück wechsle, ändert sich der Motor die Drehrichtung korrekt.

          Wenn ich bei der Fahrt “>>” zuerst “Stop” drücke und dann “<<“, und dann wieder losfahre, dreht sich der Motor wieder in die gleiche Richtung und er ändert die Drehrichtung nicht.

          Das heisst, wenn V=0 ist, fährt der Motor immer in die eine Richtung los, unabhängig vom Stand “>>” oder “<<“.

          Hier ist die Logdatei von mosquitto_sub:

          MQTT-LOG (MQTT Logging gestartet mit "mosquitto_sub -v -t '#' | ts > /home/nathalie/Schreibtisch/mqtt.log"
          --------
          
          Feb 19 16:32:00 rocrail/service/command <clock divider="1" hour="16" minute="32" wday="5" mday="19" month="2" year="2021" time="1613748720" temp="20" bri="255" lux="0" pressure="0" humidity="0" cmd="sync"/>
          Feb 19 16:32:00 
          Feb 19 16:32:00 rocrail/service/info/clock <clock divider="1" hour="16" minute="32" wday="5" mday="19" month="2" year="2021" time="1613748720" temp="20" bri="255" lux="0" pressure="0" humidity="0" cmd="sync"/>
          Feb 19 16:32:00 
          Feb 19 16:32:00 rocrail/service/info/clock <clock divider="1" hour="16" minute="32" wday="5" mday="19" month="2" year="2021" time="1613748720" temp="20" bri="255" lux="0" pressure="0" humidity="0" cmd="sync" wio="true"/>
          Feb 19 16:32:00 
          Feb 19 16:32:14 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:32:14 
          Feb 19 16:32:14 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:32:14 
          Feb 19 16:32:14 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2411" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:14 
          Feb 19 16:32:14 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=8, command=- V=30, dir=rev, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:32:14 
          Feb 19 16:32:14 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="true" addr="3000" secaddr="0" V="29" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2411" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:14 
          Feb 19 16:32:21 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:32:21 
          Feb 19 16:32:21 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:32:21 
          Feb 19 16:32:21 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2418" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:21 
          Feb 19 16:32:21 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=0, command=- V=0, dir=rev, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:32:21 
          Feb 19 16:32:21 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="true" addr="3000" secaddr="0" V="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2418" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:21 
          Feb 19 16:32:34 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:32:34 
          Feb 19 16:32:34 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:32:34 
          Feb 19 16:32:34 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2418" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:34 
          Feb 19 16:32:34 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=0, command=- V=0, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:32:34 
          Feb 19 16:32:34 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2418" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:34 
          Feb 19 16:32:44 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:32:44 
          Feb 19 16:32:44 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:32:44 
          Feb 19 16:32:44 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2418" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:44 
          Feb 19 16:32:44 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=8, command=- V=30, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:32:44 
          Feb 19 16:32:44 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="29" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2418" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:44 
          Feb 19 16:32:54 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="29" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:32:54 
          Feb 19 16:32:54 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="29" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:32:54 
          Feb 19 16:32:54 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="29" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2428" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:54 
          Feb 19 16:32:54 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=8, command=- V=29, dir=rev, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:32:54 
          Feb 19 16:32:54 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="true" addr="3000" secaddr="0" V="29" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2428" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:32:54 
          Feb 19 16:33:00 rocrail/service/command <clock divider="1" hour="16" minute="33" wday="5" mday="19" month="2" year="2021" time="1613748780" temp="20" bri="255" lux="0" pressure="0" humidity="0" cmd="sync"/>
          Feb 19 16:33:00 
          Feb 19 16:33:00 rocrail/service/info/clock <clock divider="1" hour="16" minute="33" wday="5" mday="19" month="2" year="2021" time="1613748780" temp="20" bri="255" lux="0" pressure="0" humidity="0" cmd="sync"/>
          Feb 19 16:33:00 
          Feb 19 16:33:00 rocrail/service/info/clock <clock divider="1" hour="16" minute="33" wday="5" mday="19" month="2" year="2021" time="1613748780" temp="20" bri="255" lux="0" pressure="0" humidity="0" cmd="sync" wio="true"/>
          Feb 19 16:33:00 
          Feb 19 16:33:04 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="29" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:04 
          Feb 19 16:33:04 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="29" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:04 
          Feb 19 16:33:04 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="29" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2438" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:04 
          Feb 19 16:33:04 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=8, command=- V=29, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:04 
          Feb 19 16:33:04 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="29" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2438" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:04 
          Feb 19 16:33:11 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:11 
          Feb 19 16:33:11 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:11 
          Feb 19 16:33:11 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2445" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:11 
          Feb 19 16:33:11 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=0, command=- V=0, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:11 
          Feb 19 16:33:11 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2445" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:11 
          Feb 19 16:33:16 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:16 
          Feb 19 16:33:16 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:16 
          Feb 19 16:33:16 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=8, command=- V=30, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:16 
          Feb 19 16:33:16 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2445" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:16 
          Feb 19 16:33:16 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="29" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2445" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:16 
          Feb 19 16:33:21 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:21 
          Feb 19 16:33:21 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:21 
          Feb 19 16:33:21 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2450" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:21 
          Feb 19 16:33:21 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=0, command=- V=0, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:21 
          Feb 19 16:33:21 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2450" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:21 
          Feb 19 16:33:25 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:25 
          Feb 19 16:33:25 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:25 
          Feb 19 16:33:25 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2450" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:25 
          Feb 19 16:33:25 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=0, command=- V=0, dir=rev, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:25 
          Feb 19 16:33:25 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="true" addr="3000" secaddr="0" V="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2450" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:25 
          Feb 19 16:33:28 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:28 
          Feb 19 16:33:28 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:28 
          Feb 19 16:33:28 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2450" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:28 
          Feb 19 16:33:28 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=8, command=- V=30, dir=rev, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:28 
          Feb 19 16:33:28 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="true" addr="3000" secaddr="0" V="29" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2450" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:28 
          Feb 19 16:33:36 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:36 
          Feb 19 16:33:36 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:36 
          Feb 19 16:33:36 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2458" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:36 
          Feb 19 16:33:36 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=0, command=- V=0, dir=rev, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:36 
          Feb 19 16:33:36 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="true" addr="3000" secaddr="0" V="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2458" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:36 
          Feb 19 16:33:37 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:37 
          Feb 19 16:33:37 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:37 
          Feb 19 16:33:37 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2458" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:37 
          Feb 19 16:33:37 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=0, command=- V=0, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:37 
          Feb 19 16:33:37 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2458" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:37 
          Feb 19 16:33:39 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:39 
          Feb 19 16:33:39 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:39 
          Feb 19 16:33:39 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2458" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:39 
          Feb 19 16:33:39 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=8, command=- V=30, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:39 
          Feb 19 16:33:39 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="29" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2459" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:39 
          Feb 19 16:33:42 rocrail/service/command <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          Feb 19 16:33:42 
          Feb 19 16:33:42 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false" wio="true"/>
          Feb 19 16:33:42 
          Feb 19 16:33:42 rocrail/service/info/lc <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" iid="" uid="0" sid="0" secaddr="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="2462" mtime="0" rdate="1613748285" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:42 
          Feb 19 16:33:42 rocrail/service/info/exception <exception text="id=lego: addr=3000, protocol=default, calculated speed=0, command=- V=0, dir=fwd, lights=off, throttleid=rv3535" level="16384" id="9999"/>
          Feb 19 16:33:42 
          Feb 19 16:33:42 rocrail/service/info/lc <lc id="lego" uid="0" sid="0" dir="false" addr="3000" secaddr="0" V="0" placing="false" blockenterside="false" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" fn="false" runtime="2462" mtime="0" rdate="1613748285" mint="0" throttleid="virtual" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="lego.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
          Feb 19 16:33:42 
          Feb 19 16:33:50 rocrail/service/command <sys cmd="stop" informall="true" controlcode="" slavecode="" server="infwA0000ED0"/>
          Feb 19 16:33:50 
          Feb 19 16:33:50 rocrail/service/info/sys <sys cmd="stop" informall="true" controlcode="" slavecode="" server="infwA0000ED0" wio="true"/>
          Feb 19 16:33:50 
          Feb 19 16:33:50 rocrail/service/info/exception <exception text="Global power OFF" level="16384" id="9999"/>
          Feb 19 16:33:50 
          Feb 19 16:33:50 rocrail/service/info/state <state iid="vcs-1" power="false" loadmax="5000" load="0" volt="0" temp="30" uid="1" trackbus="false" sensorbus="true" accessorybus="true" error="167" consolemode="false" healthy="true"/>
          Feb 19 16:33:50 

          Hier ist die Logdatei von ttyUSB0 serial:

          Log vom Arduino IDE für ttyUSB0:
          --------------------------------
          16:32:00.781 -> Parsing XML successful
          16:32:00.781 -> Unknown message, disregarded.
          16:32:14.192 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:32:14.259 -> 
          16:32:14.259 -> Parsing XML successful
          16:32:14.309 -> <lc> node found. Processing loco message...
          16:32:14.309 -> loco id: lego
          16:32:14.309 -> addr: 3000
          16:32:14.309 -> Consuming message for train LEGO (3000)
          16:32:14.309 -> dir (raw): false
          16:32:14.309 -> direction: backward
          16:32:14.309 -> V: 30
          16:32:14.309 -> V_max: 100
          16:32:14.309 -> Message parsing complete, target speed set to -30 (current: 0, max: 100)
          16:32:14.309 -> Setting motor speed: -2 (power: 412) for motor shield LEGO
          16:32:14.309 -> Light event reverse
          16:32:14.309 -> Light event reverse
          16:32:14.309 -> Light event reverse
          16:32:14.309 -> Light event reverse
          16:32:14.309 -> Flipping function 1 to 0
          16:32:14.309 -> Flipping function 2 to 1
          16:32:14.309 -> Flipping function 3 to 0
          16:32:14.309 -> Flipping function 4 to 1
          16:32:14.391 -> Setting motor speed: -4 (power: 425) for motor shield LEGO
          16:32:14.490 -> Setting motor speed: -6 (power: 437) for motor shield LEGO
          16:32:14.590 -> Setting motor speed: -8 (power: 450) for motor shield LEGO
          16:32:14.689 -> Setting motor speed: -10 (power: 462) for motor shield LEGO
          16:32:14.788 -> Setting motor speed: -12 (power: 475) for motor shield LEGO
          16:32:14.888 -> Setting motor speed: -14 (power: 487) for motor shield LEGO
          16:32:14.987 -> Setting motor speed: -16 (power: 500) for motor shield LEGO
          16:32:15.087 -> Setting motor speed: -18 (power: 512) for motor shield LEGO
          16:32:15.186 -> Setting motor speed: -20 (power: 525) for motor shield LEGO
          16:32:15.285 -> Setting motor speed: -22 (power: 537) for motor shield LEGO
          16:32:15.385 -> Setting motor speed: -24 (power: 550) for motor shield LEGO
          16:32:15.484 -> Setting motor speed: -26 (power: 562) for motor shield LEGO
          16:32:15.583 -> Setting motor speed: -28 (power: 574) for motor shield LEGO
          16:32:15.682 -> Setting motor speed: -30 (power: 587) for motor shield LEGO
          16:32:21.212 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:32:21.278 -> 
          16:32:21.278 -> Parsing XML successful
          16:32:21.278 -> <lc> node found. Processing loco message...
          16:32:21.318 -> loco id: lego
          16:32:21.318 -> addr: 3000
          16:32:21.318 -> Consuming message for train LEGO (3000)
          16:32:21.318 -> dir (raw): false
          16:32:21.318 -> direction: backward
          16:32:21.318 -> V: 0
          16:32:21.318 -> V_max: 100
          16:32:21.318 -> Message parsing complete, target speed set to 0 (current: -30, max: 100)
          16:32:21.318 -> Setting motor speed: 0 (power: 0) for motor shield LEGO
          16:32:21.318 -> Light event stop
          16:32:21.318 -> Light event stop
          16:32:21.318 -> Light event stop
          16:32:21.318 -> Light event stop
          16:32:34.359 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:32:34.425 -> 
          16:32:34.425 -> Parsing XML successful
          16:32:34.425 -> <lc> node found. Processing loco message...
          16:32:34.425 -> loco id: lego
          16:32:34.425 -> addr: 3000
          16:32:34.425 -> Consuming message for train LEGO (3000)
          16:32:34.425 -> dir (raw): true
          16:32:34.425 -> direction: forward
          16:32:34.425 -> V: 0
          16:32:34.425 -> V_max: 100
          16:32:34.425 -> Message parsing complete, target speed set to 0 (current: 0, max: 100)
          16:32:44.856 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:32:44.923 -> 
          16:32:44.923 -> Parsing XML successful
          16:32:44.923 -> <lc> node found. Processing loco message...
          16:32:44.960 -> loco id: lego
          16:32:44.960 -> addr: 3000
          16:32:44.960 -> Consuming message for train LEGO (3000)
          16:32:44.960 -> dir (raw): true
          16:32:44.960 -> direction: forward
          16:32:44.960 -> V: 30
          16:32:44.960 -> V_max: 100
          16:32:44.960 -> Message parsing complete, target speed set to 30 (current: 0, max: 100)
          16:32:44.960 -> Setting motor speed: 2 (power: 412) for motor shield LEGO
          16:32:44.960 -> Light event forward
          16:32:44.960 -> Light event forward
          16:32:44.960 -> Light event forward
          16:32:44.960 -> Light event forward
          16:32:44.960 -> Flipping function 1 to 1
          16:32:44.960 -> Flipping function 2 to 0
          16:32:44.960 -> Flipping function 3 to 1
          16:32:44.960 -> Flipping function 4 to 0
          16:32:45.055 -> Setting motor speed: 4 (power: 425) for motor shield LEGO
          16:32:45.154 -> Setting motor speed: 6 (power: 437) for motor shield LEGO
          16:32:45.254 -> Setting motor speed: 8 (power: 450) for motor shield LEGO
          16:32:45.353 -> Setting motor speed: 10 (power: 462) for motor shield LEGO
          16:32:45.452 -> Setting motor speed: 12 (power: 475) for motor shield LEGO
          16:32:45.552 -> Setting motor speed: 14 (power: 487) for motor shield LEGO
          16:32:45.651 -> Setting motor speed: 16 (power: 500) for motor shield LEGO
          16:32:45.750 -> Setting motor speed: 18 (power: 512) for motor shield LEGO
          16:32:45.850 -> Setting motor speed: 20 (power: 525) for motor shield LEGO
          16:32:45.949 -> Setting motor speed: 22 (power: 537) for motor shield LEGO
          16:32:46.048 -> Setting motor speed: 24 (power: 550) for motor shield LEGO
          16:32:46.148 -> Setting motor speed: 26 (power: 562) for motor shield LEGO
          16:32:46.247 -> Setting motor speed: 28 (power: 574) for motor shield LEGO
          16:32:46.347 -> Setting motor speed: 30 (power: 587) for motor shield LEGO
          16:32:54.294 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="29" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:32:54.360 -> 
          16:32:54.360 -> Parsing XML successful
          16:32:54.360 -> <lc> node found. Processing loco message...
          16:32:54.360 -> loco id: lego
          16:32:54.360 -> addr: 3000
          16:32:54.360 -> Consuming message for train LEGO (3000)
          16:32:54.360 -> dir (raw): false
          16:32:54.360 -> direction: backward
          16:32:54.360 -> V: 29
          16:32:54.360 -> V_max: 100
          16:32:54.360 -> Message parsing complete, target speed set to -29 (current: 30, max: 100)
          16:32:54.393 -> Setting motor speed: 28 (power: 574) for motor shield LEGO
          16:32:54.459 -> Setting motor speed: 26 (power: 562) for motor shield LEGO
          16:32:54.559 -> Setting motor speed: 24 (power: 550) for motor shield LEGO
          16:32:54.658 -> Setting motor speed: 22 (power: 537) for motor shield LEGO
          16:32:54.757 -> Setting motor speed: 20 (power: 525) for motor shield LEGO
          16:32:54.857 -> Setting motor speed: 18 (power: 512) for motor shield LEGO
          16:32:54.956 -> Setting motor speed: 16 (power: 500) for motor shield LEGO
          16:32:55.056 -> Setting motor speed: 14 (power: 487) for motor shield LEGO
          16:32:55.155 -> Setting motor speed: 12 (power: 475) for motor shield LEGO
          16:32:55.254 -> Setting motor speed: 10 (power: 462) for motor shield LEGO
          16:32:55.354 -> Setting motor speed: 8 (power: 450) for motor shield LEGO
          16:32:55.453 -> Setting motor speed: 6 (power: 437) for motor shield LEGO
          16:32:55.585 -> Setting motor speed: 4 (power: 425) for motor shield LEGO
          16:32:55.685 -> Setting motor speed: 2 (power: 412) for motor shield LEGO
          16:32:55.784 -> Setting motor speed: 0 (power: 0) for motor shield LEGO
          16:32:55.784 -> Light event stop
          16:32:55.784 -> Light event stop
          16:32:55.784 -> Light event stop
          16:32:55.784 -> Light event stop
          16:32:55.884 -> Setting motor speed: -2 (power: 412) for motor shield LEGO
          16:32:55.884 -> Light event reverse
          16:32:55.884 -> Light event reverse
          16:32:55.884 -> Light event reverse
          16:32:55.884 -> Light event reverse
          16:32:55.884 -> Flipping function 1 to 0
          16:32:55.884 -> Flipping function 2 to 1
          16:32:55.884 -> Flipping function 3 to 0
          16:32:55.884 -> Flipping function 4 to 1
          16:32:55.983 -> Setting motor speed: -4 (power: 425) for motor shield LEGO
          16:32:56.082 -> Setting motor speed: -6 (power: 437) for motor shield LEGO
          16:32:56.182 -> Setting motor speed: -8 (power: 450) for motor shield LEGO
          16:32:56.281 -> Setting motor speed: -10 (power: 462) for motor shield LEGO
          16:32:56.380 -> Setting motor speed: -12 (power: 475) for motor shield LEGO
          16:32:56.480 -> Setting motor speed: -14 (power: 487) for motor shield LEGO
          16:32:56.579 -> Setting motor speed: -16 (power: 500) for motor shield LEGO
          16:32:56.678 -> Setting motor speed: -18 (power: 512) for motor shield LEGO
          16:32:56.778 -> Setting motor speed: -20 (power: 525) for motor shield LEGO
          16:32:56.877 -> Setting motor speed: -22 (power: 537) for motor shield LEGO
          16:32:56.976 -> Setting motor speed: -24 (power: 550) for motor shield LEGO
          16:32:57.076 -> Setting motor speed: -26 (power: 562) for motor shield LEGO
          16:32:57.175 -> Setting motor speed: -28 (power: 574) for motor shield LEGO
          16:32:57.274 -> Setting motor speed: -29 (power: 581) for motor shield LEGO
          16:33:00.752 -> Received MQTT message [rocrail/service/command]: <clock divider="1" hour="16" minute="33" wday="5" mday="19" month="2" year="2021" time="1613748780" temp="20" bri="255" lux="0" pressure="0" humidity="0" cmd="sync"/>
          16:33:00.785 -> 
          16:33:00.785 -> Parsing XML successful
          16:33:00.785 -> Unknown message, disregarded.
          16:33:04.792 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="29" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:04.891 -> 
          16:33:04.891 -> Parsing XML successful
          16:33:04.891 -> <lc> node found. Processing loco message...
          16:33:04.891 -> loco id: lego
          16:33:04.891 -> addr: 3000
          16:33:04.891 -> Consuming message for train LEGO (3000)
          16:33:04.891 -> dir (raw): true
          16:33:04.891 -> direction: forward
          16:33:04.891 -> V: 29
          16:33:04.891 -> V_max: 100
          16:33:04.891 -> Message parsing complete, target speed set to 29 (current: -29, max: 100)
          16:33:04.891 -> Setting motor speed: -27 (power: 568) for motor shield LEGO
          16:33:04.990 -> Setting motor speed: -25 (power: 556) for motor shield LEGO
          16:33:05.089 -> Setting motor speed: -23 (power: 543) for motor shield LEGO
          16:33:05.189 -> Setting motor speed: -21 (power: 531) for motor shield LEGO
          16:33:05.288 -> Setting motor speed: -19 (power: 518) for motor shield LEGO
          16:33:05.388 -> Setting motor speed: -17 (power: 506) for motor shield LEGO
          16:33:05.487 -> Setting motor speed: -15 (power: 493) for motor shield LEGO
          16:33:05.586 -> Setting motor speed: -13 (power: 481) for motor shield LEGO
          16:33:05.685 -> Setting motor speed: -11 (power: 469) for motor shield LEGO
          16:33:05.785 -> Setting motor speed: -9 (power: 456) for motor shield LEGO
          16:33:05.884 -> Setting motor speed: -7 (power: 444) for motor shield LEGO
          16:33:05.983 -> Setting motor speed: -5 (power: 431) for motor shield LEGO
          16:33:06.083 -> Setting motor speed: -3 (power: 419) for motor shield LEGO
          16:33:06.182 -> Setting motor speed: -1 (power: 406) for motor shield LEGO
          16:33:06.281 -> Setting motor speed: 1 (power: 406) for motor shield LEGO
          16:33:06.281 -> Light event forward
          16:33:06.281 -> Light event forward
          16:33:06.315 -> Light event forward
          16:33:06.315 -> Light event forward
          16:33:06.315 -> Flipping function 1 to 1
          16:33:06.315 -> Flipping function 2 to 0
          16:33:06.315 -> Flipping function 3 to 1
          16:33:06.315 -> Flipping function 4 to 0
          16:33:06.381 -> Setting motor speed: 3 (power: 419) for motor shield LEGO
          16:33:06.480 -> Setting motor speed: 5 (power: 431) for motor shield LEGO
          16:33:06.579 -> Setting motor speed: 7 (power: 444) for motor shield LEGO
          16:33:06.679 -> Setting motor speed: 9 (power: 456) for motor shield LEGO
          16:33:06.778 -> Setting motor speed: 11 (power: 469) for motor shield LEGO
          16:33:06.877 -> Setting motor speed: 13 (power: 481) for motor shield LEGO
          16:33:06.977 -> Setting motor speed: 15 (power: 493) for motor shield LEGO
          16:33:07.076 -> Setting motor speed: 17 (power: 506) for motor shield LEGO
          16:33:07.208 -> Setting motor speed: 19 (power: 518) for motor shield LEGO
          16:33:07.308 -> Setting motor speed: 21 (power: 531) for motor shield LEGO
          16:33:07.407 -> Setting motor speed: 23 (power: 543) for motor shield LEGO
          16:33:07.506 -> Setting motor speed: 25 (power: 556) for motor shield LEGO
          16:33:07.606 -> Setting motor speed: 27 (power: 568) for motor shield LEGO
          16:33:07.705 -> Setting motor speed: 29 (power: 581) for motor shield LEGO
          16:33:11.712 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:11.778 -> 
          16:33:11.778 -> Parsing XML successful
          16:33:11.778 -> <lc> node found. Processing loco message...
          16:33:11.812 -> loco id: lego
          16:33:11.812 -> addr: 3000
          16:33:11.812 -> Consuming message for train LEGO (3000)
          16:33:11.812 -> dir (raw): true
          16:33:11.812 -> direction: forward
          16:33:11.812 -> V: 0
          16:33:11.812 -> V_max: 100
          16:33:11.812 -> Message parsing complete, target speed set to 0 (current: 29, max: 100)
          16:33:11.812 -> Setting motor speed: 0 (power: 0) for motor shield LEGO
          16:33:11.812 -> Light event stop
          16:33:11.812 -> Light event stop
          16:33:11.812 -> Light event stop
          16:33:11.812 -> Light event stop
          16:33:16.547 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:16.613 -> 
          16:33:16.613 -> Parsing XML successful
          16:33:16.613 -> <lc> node found. Processing loco message...
          16:33:16.613 -> loco id: lego
          16:33:16.613 -> addr: 3000
          16:33:16.613 -> Consuming message for train LEGO (3000)
          16:33:16.613 -> dir (raw): true
          16:33:16.613 -> direction: forward
          16:33:16.613 -> V: 30
          16:33:16.613 -> V_max: 100
          16:33:16.613 -> Message parsing complete, target speed set to 30 (current: 0, max: 100)
          16:33:16.613 -> Setting motor speed: 2 (power: 412) for motor shield LEGO
          16:33:16.613 -> Light event forward
          16:33:16.646 -> Light event forward
          16:33:16.646 -> Light event forward
          16:33:16.646 -> Light event forward
          16:33:16.712 -> Setting motor speed: 4 (power: 425) for motor shield LEGO
          16:33:16.812 -> Setting motor speed: 6 (power: 437) for motor shield LEGO
          16:33:16.911 -> Setting motor speed: 8 (power: 450) for motor shield LEGO
          16:33:17.011 -> Setting motor speed: 10 (power: 462) for motor shield LEGO
          16:33:17.110 -> Setting motor speed: 12 (power: 475) for motor shield LEGO
          16:33:17.209 -> Setting motor speed: 14 (power: 487) for motor shield LEGO
          16:33:17.309 -> Setting motor speed: 16 (power: 500) for motor shield LEGO
          16:33:17.408 -> Setting motor speed: 18 (power: 512) for motor shield LEGO
          16:33:17.507 -> Setting motor speed: 20 (power: 525) for motor shield LEGO
          16:33:17.607 -> Setting motor speed: 22 (power: 537) for motor shield LEGO
          16:33:17.706 -> Setting motor speed: 24 (power: 550) for motor shield LEGO
          16:33:17.805 -> Setting motor speed: 26 (power: 562) for motor shield LEGO
          16:33:17.905 -> Setting motor speed: 28 (power: 574) for motor shield LEGO
          16:33:18.004 -> Setting motor speed: 30 (power: 587) for motor shield LEGO
          16:33:21.646 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:21.713 -> 
          16:33:21.713 -> Parsing XML successful
          16:33:21.713 -> <lc> node found. Processing loco message...
          16:33:21.746 -> loco id: lego
          16:33:21.746 -> addr: 3000
          16:33:21.746 -> Consuming message for train LEGO (3000)
          16:33:21.746 -> dir (raw): true
          16:33:21.746 -> direction: forward
          16:33:21.746 -> V: 0
          16:33:21.746 -> V_max: 100
          16:33:21.746 -> Message parsing complete, target speed set to 0 (current: 30, max: 100)
          16:33:21.746 -> Setting motor speed: 0 (power: 0) for motor shield LEGO
          16:33:21.746 -> Light event stop
          16:33:21.746 -> Light event stop
          16:33:21.746 -> Light event stop
          16:33:21.746 -> Light event stop
          16:33:25.653 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:25.719 -> 
          16:33:25.719 -> Parsing XML successful
          16:33:25.719 -> <lc> node found. Processing loco message...
          16:33:25.769 -> loco id: lego
          16:33:25.769 -> addr: 3000
          16:33:25.769 -> Consuming message for train LEGO (3000)
          16:33:25.769 -> dir (raw): false
          16:33:25.769 -> direction: backward
          16:33:25.769 -> V: 0
          16:33:25.769 -> V_max: 100
          16:33:25.769 -> Message parsing complete, target speed set to 0 (current: 0, max: 100)
          16:33:28.964 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:29.030 -> 
          16:33:29.030 -> Parsing XML successful
          16:33:29.030 -> <lc> node found. Processing loco message...
          16:33:29.063 -> loco id: lego
          16:33:29.063 -> addr: 3000
          16:33:29.063 -> Consuming message for train LEGO (3000)
          16:33:29.063 -> dir (raw): false
          16:33:29.063 -> direction: backward
          16:33:29.063 -> V: 30
          16:33:29.063 -> V_max: 100
          16:33:29.063 -> Message parsing complete, target speed set to -30 (current: 0, max: 100)
          16:33:29.063 -> Setting motor speed: -2 (power: 412) for motor shield LEGO
          16:33:29.063 -> Light event reverse
          16:33:29.063 -> Light event reverse
          16:33:29.063 -> Light event reverse
          16:33:29.063 -> Light event reverse
          16:33:29.063 -> Flipping function 1 to 0
          16:33:29.145 -> Flipping function 2 to 1
          16:33:29.145 -> Flipping function 3 to 0
          16:33:29.145 -> Flipping function 4 to 1
          16:33:29.145 -> Setting motor speed: -4 (power: 425) for motor shield LEGO
          16:33:29.262 -> Setting motor speed: -6 (power: 437) for motor shield LEGO
          16:33:29.361 -> Setting motor speed: -8 (power: 450) for motor shield LEGO
          16:33:29.460 -> Setting motor speed: -10 (power: 462) for motor shield LEGO
          16:33:29.560 -> Setting motor speed: -12 (power: 475) for motor shield LEGO
          16:33:29.659 -> Setting motor speed: -14 (power: 487) for motor shield LEGO
          16:33:29.758 -> Setting motor speed: -16 (power: 500) for motor shield LEGO
          16:33:29.858 -> Setting motor speed: -18 (power: 512) for motor shield LEGO
          16:33:29.957 -> Setting motor speed: -20 (power: 525) for motor shield LEGO
          16:33:30.056 -> Setting motor speed: -22 (power: 537) for motor shield LEGO
          16:33:30.156 -> Setting motor speed: -24 (power: 550) for motor shield LEGO
          16:33:30.255 -> Setting motor speed: -26 (power: 562) for motor shield LEGO
          16:33:30.354 -> Setting motor speed: -28 (power: 574) for motor shield LEGO
          16:33:30.454 -> Setting motor speed: -30 (power: 587) for motor shield LEGO
          16:33:36.182 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="false" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:36.248 -> 
          16:33:36.248 -> Parsing XML successful
          16:33:36.248 -> <lc> node found. Processing loco message...
          16:33:36.248 -> loco id: lego
          16:33:36.248 -> addr: 3000
          16:33:36.248 -> Consuming message for train LEGO (3000)
          16:33:36.282 -> dir (raw): false
          16:33:36.282 -> direction: backward
          16:33:36.282 -> V: 0
          16:33:36.282 -> V_max: 100
          16:33:36.282 -> Message parsing complete, target speed set to 0 (current: -30, max: 100)
          16:33:36.282 -> Setting motor speed: 0 (power: 0) for motor shield LEGO
          16:33:36.282 -> Light event stop
          16:33:36.282 -> Light event stop
          16:33:36.282 -> Light event stop
          16:33:36.282 -> Light event stop
          16:33:37.076 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" sw="true" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:37.142 -> 
          16:33:37.142 -> Parsing XML successful
          16:33:37.202 -> <lc> node found. Processing loco message...
          16:33:37.202 -> loco id: lego
          16:33:37.202 -> addr: 3000
          16:33:37.202 -> Consuming message for train LEGO (3000)
          16:33:37.202 -> dir (raw): true
          16:33:37.202 -> direction: forward
          16:33:37.202 -> V: 0
          16:33:37.202 -> V_max: 100
          16:33:37.202 -> Message parsing complete, target speed set to 0 (current: 0, max: 100)
          16:33:39.096 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="30" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:39.162 -> 
          16:33:39.162 -> Parsing XML successful
          16:33:39.162 -> <lc> node found. Processing loco message...
          16:33:39.162 -> loco id: lego
          16:33:39.162 -> addr: 3000
          16:33:39.162 -> Consuming message for train LEGO (3000)
          16:33:39.162 -> dir (raw): true
          16:33:39.162 -> direction: forward
          16:33:39.162 -> V: 30
          16:33:39.162 -> V_max: 100
          16:33:39.229 -> Message parsing complete, target speed set to 30 (current: 0, max: 100)
          16:33:39.229 -> Setting motor speed: 2 (power: 412) for motor shield LEGO
          16:33:39.229 -> Light event forward
          16:33:39.229 -> Light event forward
          16:33:39.229 -> Light event forward
          16:33:39.229 -> Light event forward
          16:33:39.229 -> Flipping function 1 to 1
          16:33:39.229 -> Flipping function 2 to 0
          16:33:39.229 -> Flipping function 3 to 1
          16:33:39.229 -> Flipping function 4 to 0
          16:33:39.295 -> Setting motor speed: 4 (power: 425) for motor shield LEGO
          16:33:39.394 -> Setting motor speed: 6 (power: 437) for motor shield LEGO
          16:33:39.493 -> Setting motor speed: 8 (power: 450) for motor shield LEGO
          16:33:39.593 -> Setting motor speed: 10 (power: 462) for motor shield LEGO
          16:33:39.692 -> Setting motor speed: 12 (power: 475) for motor shield LEGO
          16:33:39.791 -> Setting motor speed: 14 (power: 487) for motor shield LEGO
          16:33:39.891 -> Setting motor speed: 16 (power: 500) for motor shield LEGO
          16:33:39.990 -> Setting motor speed: 18 (power: 512) for motor shield LEGO
          16:33:40.089 -> Setting motor speed: 20 (power: 525) for motor shield LEGO
          16:33:40.189 -> Setting motor speed: 22 (power: 537) for motor shield LEGO
          16:33:40.288 -> Setting motor speed: 24 (power: 550) for motor shield LEGO
          16:33:40.387 -> Setting motor speed: 26 (power: 562) for motor shield LEGO
          16:33:40.487 -> Setting motor speed: 28 (power: 574) for motor shield LEGO
          16:33:40.586 -> Setting motor speed: 30 (power: 587) for motor shield LEGO
          16:33:43.004 -> Received MQTT message [rocrail/service/command]: <lc id="lego" bus="0" addr="3000" V="0" fn="false" dir="true" usesecaddr="false" throttleid="rv3535" controlcode="" slavecode="" server="infwA0000ED0" fncnt="4" f0="false" f1="false" f2="false" f3="false" f4="false" f5="false" f6="false" f7="false" f8="false" f9="false" f10="false" f11="false" f12="false" f13="false" f14="false" f15="false" f16="false" f17="false" f18="false" f19="false" f20="false" f21="false" f22="false" f23="false" f24="false" f25="false" f26="false" f27="false" f28="false" f29="false" f30="false" f31="false" f32="false" mass="0" minstep="0" maxstep="0" pwm="0" pwmcorrdiv="10" V_step="0" V_min="1" V_max="100" V_mode="percent" prot="P" protver="1" spcnt="28" oid="" identifier="" mode="stop" iid="" imagenr="0" informall="false"/>
          16:33:43.070 -> 
          16:33:43.070 -> Parsing XML successful
          16:33:43.070 -> <lc> node found. Processing loco message...
          16:33:43.070 -> loco id: lego
          16:33:43.070 -> addr: 3000
          16:33:43.070 -> Consuming message for train LEGO (3000)
          16:33:43.070 -> dir (raw): true
          16:33:43.070 -> direction: forward
          16:33:43.070 -> V: 0
          16:33:43.070 -> V_max: 100
          16:33:43.103 -> Message parsing complete, target speed set to 0 (current: 30, max: 100)
          16:33:43.103 -> Setting motor speed: 0 (power: 0) for motor shield LEGO
          16:33:43.103 -> Light event stop
          16:33:43.103 -> Light event stop
          16:33:43.103 -> Light event stop
          16:33:43.103 -> Light event stop
          16:33:50.089 -> Received MQTT message [rocrail/service/command]: <sys cmd="stop" informall="true" controlcode="" slavecode="" server="infwA0000ED0"/>
          16:33:50.122 -> 
          16:33:50.122 -> Parsing XML successful
          16:33:50.122 -> <sys> node found. Processing sys message...
          16:33:50.122 -> rocrail system command: stop
          16:33:50.122 -> received ebreak, stop or shutdown command. Stopping train.
          16:33:50.586
          • #2439
            Matthias RunteMatthias Runte
            Keymaster

            Sieht so aus als würden Rocrail und der Controller alles richtig machen. Wenn die Lok trotzdem immer vorwärts fährt, ist möglicherweise das Motor Shield falsch angeschlossen. Check doch mal, ob Du mit einem einfachen Motorshield Sketch aus der Beispiel-Bibliothek der Arduino IDE der Motor überhaupt andersherum gedreht bekommst. Ansonsten würde mich Deine MattzoController Konfigurationsdatei (MTC4PF_Configuration.h) interessieren.

    • #2443
      ZoltanZoltan
      Participant

      Der Motor dreht sich ja korrekt auch in die andere Richtung, wenn ich ihn direkt während der Fahrt umsteuere. Er dreht nur dann immer vorwärts, wenn ich erstmal Stopp mache und dann erst die Richtung wechsle. Aus V=0 fährt er immer nur in die eine Richtung los, unabhängig von << oder >>. Config.h ist die gleiche die ich vom “Firmware” heruntergeladen habe. Also alles ist wie auf deiner Website! Ich finde keinen Fehler nirgends, deswegen bin ich ja verzweifelt!

    • #2444
      Matthias RunteMatthias Runte
      Keymaster

      In Rocrail musst Du für Richtungswechsel die logische Fahrtrichtung ändern.

    • #2445
      ZoltanZoltan
      Participant

      Hm, danke… das löst das Problem, dass es “umgekehrt” ist – stinkeinfach, wenn es wirklich nur das war, hätte ich selber drauf kommen können/sollen… checke ich morgen. Aber mein grösstes Problem bleibt vorerst bestehen… ich melde mich morgen.

    • #2446
      ZoltanZoltan
      Participant

      Erledigt 🙂

      Mattze, du hast den entscheidenden Tipp oben geliefert, ich habe in ganz andere Richtungen geschaut.

      Ich habe einmal irgendwann tatsächlich die logische Fahrtrichtung geändert gehabt, und habe das dann vergessen.

      Ich habe es nun wieder “zurückgeändert” auf “normal” und damit hat sich das verkehrte Verhalten eliminiert: forward war wieder vorwärts und reverse war wieder rückwärts.

      Aber das ist noch nicht genug: auch das andere Problem wurde gelöst, wobei es andere, aber ebenfalls Rocrail-Ursachen hatte. Hinterher leuchtet alles ein, aber ad hoc war es nebelig, noch dazu durch die verkehrte Drehrichtung verdeckt und ich schaute anfangs hinein wie ein Schwein ins Uhrwerk…

      Meine Test-Layout ist eine Pendelstrecke (für mehr habe ich keinen Platz):

      Die “Lok” ist demgemäß auch als “Pendelzug” definiert.

      Ist sie auf der Strecke, kann sie in allen drei Blöcken ja immer nur entgegengesetzt losfahren, als wie sie eingefahren ist, weil sie automatisch die Richtung drehen muss! Sie muss also meine Richtungsbefehle ignorieren, und solang losfahren, wie sie eben kann…

      Nach “zurückdrehen” der logischen Richtung und “abheben” des Loksymbols von dem Block tut sie brav, was sie soll – nach Klicken von “<<” und “>>” ändert sie brav die Motordrehrichtung.

      Bei eingeschalteter Automatik, wenn ich die Lokzeichnung in bk1 hineinsetze und die Lok starte, fährt die Lokzeichnung korrekt die Strecke ab, genau, wie ich ihre Fahrt mit dem Anklicken der Sensoren simuliere – und die aufgebockte “Lok” dreht die Räder in die entsprechende, korrekte Richtung mit, brav die Richtung wechselnd. Lichter inklusive. Also alles paletti. Fast. Ich habe nämlich noch eine Beobachtung gemacht: Bevor die “Lok” in der Gegenrichtung anfährt, kommt immer ein ganz kurzer Motor-Impuls noch in der vorhergehenden Richtung! Kann man das irgendwie abstellen?

      (Eine Kleinigkeit noch, allerdings Rocrail-related: Vmin (Stufe I.) in die Geschwindigkeitseinstellungen darf nicht kleiner als 3 sein, denn es verwirrt Rocrail irgendwie, der Schieberegler regelt dann nicht ab. Er zeigt zwar 0, aber der Motor dreht sich weiter, ich weiß nicht, warum. Und nach Stop ignoriert er die Drehrichtung in diesem Falle auch wieder. Mit Vmin=3 verhält sich aber alles korrekt.)

      Eine letzte Frage noch: kann ich den Wert von MIN_ARDUINO_POWER von 400 heruntersetzen? Wie weit? Die Lok fährt nämlich sehr abrupt los und hält sehr abrupt an, das könnte doch etwas sanfter gehen? Bitte das noch beantworten!

      • #2454
        Matthias RunteMatthias Runte
        Keymaster

        Klar, MIN_ARDUINO_POWER kannst Du anpassen. Wenn notwendig, kannst Du den Wert sogar auf 0 setzen.

        • #2457
          ZoltanZoltan
          Participant

          Danke! 🙂

        • #2461
          ZoltanZoltan
          Participant

          Was ist das Maximum für MAX_ARDUINO_POWER?

          • #2462
            Matthias RunteMatthias Runte
            Keymaster

            1023

          • #2463
            ZoltanZoltan
            Participant

            Super, Mattze, danke dir.

            Ich nehme an, dann sind das sozusagen “Fahrstufen”, also Steps von 0 bis MaxBatterieSpannung, abhängig von der Batteriespannung? Also wenn ich am Motorshield 9 Volts anlege, dann 0 bis 9 Volt (mit 1023 als Max in etwa tausend Steps), wenn ich 18 V anlege, dann 0 bis 18 Volt ebenso? Oder wie ist das?

            Ich möchte die Logik dahinter verstehen 🙂

            Danke!

    • #2466
      Piet BeinekePiet Beineke
      Participant

      Hello Forum,
      I don’t really know how the wiring of this controller works, but its been bothering me for some time, that I cant use any loco as a MTC4PF, because the breadboard is simply too big for the casing of the loco (eg BR 146 from BB), so I asked myself if it would be possible to simply solder the cables together on plus and minus strip of the board, because thats the only part I use at the time, so the controller doesn’t take up that much space anymore. That would be helpful, but I atleast wanted to ask before I destroy a controller.
      Regards
      Piet

      • #2467
        ZoltanZoltan
        Participant

        Hi Piet, why do you stick to the beadboard?
        I do not use the bteadboard at all after the testing. You can use female-ended cables to connect directly to the controller pins, as I do in my “loco”, or you can even carefully solder the wires directly to the controller using a fine iron. This makes everything much smaller.

        • #2468
          Piet BeinekePiet Beineke
          Participant

          Shure, but I mean the cables that go from eg the Power-Pack to the controller and motorcontroller. Can I solder those together? Also how can I attach pictures to show which cables I mean in particular?
          Regards
          Piet

          • #2469
            ZoltanZoltan
            Participant

            In my case:
            Powerpack plus (8,4 V) goes to the main switch.
            Switched plus goes to VIN of controller and VCC of motorcontroller both. So it is the same plus for both. I have a common GND “bus”, for motorcontroller GND, for Controller GND and for all LED GNDs. Caution: if you want to reflash the controller, you must take away everything! And use the pure USB as power for flashing only. After reflashed, you can connect everything again. That’s why I did not solder, but used female breadboardwires. You can see it in my posts.

            Pictures: you have to host them somewhere (I use picr.de) and from there you can link them using the img src=”http://imagepath”/notation.

          • #2470
            Piet BeinekePiet Beineke
            Participant

            But how do you achieve that it goes to both? I have done that via breadboard and my cables dont have a variant with female to 2 female/male…

          • #2471
            ZoltanZoltan
            Participant

            I soldered an Y-cable 🙂

          • #2472
            Piet BeinekePiet Beineke
            Participant

            Well that explains… But would it theoreticly be possible to solder three cables together to achieve something like a Y-Cable?

          • #2473
            ZoltanZoltan
            Participant

            Sure!

    • #2613
      Herbert S.Herbert S.
      Participant

      Hello Forum,
      I have a problem with this controller. Mayby someone has an quick idea.

      My situation: MattzoSwitchController: up and running, MattzoTrainControllerPU: up and running, Problem: MTC4PF: Train is not responding (only once there was a little move of the train)
      My configuration: Train with LEGO IR 1884, Motor on red and lights on blue, Standard ESP8266 MOD 12-F from AZ Delivery,only one IR LED soldered on D5 and GND (short leg), power supply: 9V on VIN and GND,
      Also tested: a second board with another type of IR LED, both boards also testet with 5V (USB)
      The Mattzo Controller looks to be working perfect and send the right commands (see protocol)
      Possible problem: I only measure 0,14 V on the IR LED when it is working. It is supposed to has 1,35V. But I have no idea what could be wrong. I tested everything twice with a second board. The power supply of the board is ok (3,3 V on 3V3 and GND).Maybe the value “const int MAX_AI_VOLTAGE = 5100″; is too low, but I didn’t want to change this. It comes from the example file
      Has anybody an idea?

      Find there the protocol from board and the config file:
      Received MQTT message [rocrail/service/command]: <lc id=”Gelb_7939″ V=”25″ fn=”true” dir=”true” throttleid=”rv7880″ controlcode=”” slavecode=”” server=”infw0343CA14″ fncnt=”4″ f0=”true” f1=”false” f2=”false” f3=”false” f4=”false” f5=”false” f6=”false” f7=”false” f8=”false” f9=”false” f10=”false” f11=”false” f12=”false” f13=”false” f14=”false” f15=”false” f16=”false” f17=”false” f18=”false” f19=”false” f20=”false” f21=”false” f22=”false” f23=”false” f24=”false” f25=”false” f26=”false” f27=”false” f28=”false” f29=”false” f30=”false” f31=”false” f32=”false” mass=”0″ minstep=”0″ maxstep=”0″ pwm=”0″ pwmcorrdiv=”10″ V_step=”0″ V_min=”25″ V_max=”100″ V_mode=”percent” bus=”0″ prot=”P” protver=”1″ spcnt=”255″ oid=”” identifier=”” mode=”stop” iid=”” addr=”7939″ imagenr=”0″ informall=”false”/>
      Parsing XML successful
      <lc> node found. Processing loco message…
      loco id: Gelb_7939
      addr: 7939
      Consuming message for train Gelb_7939 (7939)
      dir (raw): true
      direction: forward
      V: 25
      V_max: 100
      Message parsing complete, target speed set to 25 (current: 0, max: 100)
      Setting motor speed: 2 (IR speed: 2)
      Light event forward
      Flipping function 1 to 1
      Setting motor speed: 4 (IR speed: 4)
      Setting motor speed: 6 (IR speed: 6)
      Setting motor speed: 8 (IR speed: 8)
      Setting motor speed: 10 (IR speed: 10)
      Setting motor speed: 12 (IR speed: 12)
      Setting motor speed: 14 (IR speed: 14)
      Setting motor speed: 16 (IR speed: 16)
      Setting motor speed: 18 (IR speed: 18)
      Setting motor speed: 20 (IR speed: 20)
      Setting motor speed: 22 (IR speed: 22)
      Setting motor speed: 24 (IR speed: 24)
      Setting motor speed: 25 (IR speed: 25)
      Received MQTT message [rocrail/service/command]: <clock divider=”1″ hour=”18″ minute=”34″ wday=”1″ mday=”1″ month=”3″ year=”2021″ time=”1614620053″ temp=”20″ bri=”255″ lux=”0″ pressure=”0″ humidity=”0″ cmd=”sync”/>

      Parsing XML successful
      Unknown message, disregar

      Config File

      // **********************************************************************************
      // Example file for configuring the MTC4PF to control a train with L9110 motor shield
      // **********************************************************************************

      // ***********
      // MattzoLocos
      // ***********

      // Number of locos (aka. MattzoLocos) controlled by this controller
      const int NUM_LOCOS = 1;

      // List of MattzoLocos
      // The parameters have the following meaning:
      // – locoName: name of the loco as setup in Rocrail
      // – locoAddress: address of the loco as setup in Rocrail
      // – accelerationInterval: time interval for acceleration / braking (default: 100 ms)
      // – accelerateStep: power increment for each acceleration step
      // – brakeStep: : power decrement for each braking step
      MattzoLocoConfiguration* getMattzoLocoConfiguration() {
      static MattzoLocoConfiguration locoConf[NUM_LOCOS];

      locoConf[0] = (MattzoLocoConfiguration) {
      .locoName = “Gelb_7939”,
      .locoAddress = 7939,
      .accelerationInterval = 100,
      .accelerateStep = 2,
      .brakeStep = 2
      };

      return locoConf;
      }

      // *************
      // Motor shields
      // *************
      // Motor shields are usually electronical components attached to the MattzoTrainController.
      // They are controlled via PWM signals from the controller and handle the higher currents required
      // for train motors.
      // Beside those physically existing motor shields, they are also partly or completely virtual motor shields as:
      // – LEGO_IR_8884, and
      // – WIFI_TRAIN_RECEIVER_4DBRIX
      // It is important to note that one train can have MULTIPLE motor shields attached to it. This is relevant for the following scenarios:
      // – Infrared LED controls multiple motors in a single train
      // – More than one 4DBrix WiFi Train Receiver installed in a single train.
      // – Combining different motorshields into a single train is also possible (e.g. steam loco with 4DBrix receiver in the front
      // and an additional “push” waggon in the middle of the train with an L9110 motorshield).

      // Number of motor shields controlled by this controller
      const int NUM_MOTORSHIELDS = 1;

      // List of motor shields that are controlled by this controller
      MattzoMotorShieldConfiguration* getMattzoMotorShieldConfiguration() {
      static MattzoMotorShieldConfiguration msConf[NUM_MOTORSHIELDS];

      msConf[0] = (MattzoMotorShieldConfiguration) {
      .motorShieldName = “Gelb_7939”,
      .motorShieldType = MotorShieldType::LEGO_IR_8884,
      .minArduinoPower = MIN_ARDUINO_POWER,
      .maxArduinoPower = MAX_ARDUINO_POWER,
      .configMotorA = 1,
      .configMotorB = 0,
      .locoAddress = 7939
      };

      return msConf;
      }

      // ***************************
      // Controller wiring specifics
      // ***************************

      // Type of motor shield directly wired to the controller.
      // (The different motor shield types are defined in MTC4PF.ino)
      // Set to MotorShieldType::NONE if only virtual motor shields are used!
      const MotorShieldType MOTORSHIELD_TYPE = MotorShieldType::NONE;

      // Constants for motor shield type L298N
      #define enA D0 // PWM signal pin for motor A. Relevant for L298N only.
      #define enB D1 // PWM signal pin for motor B. Relevant for L298N only.

      // Constants for motor shield type L298N and L9110
      #define in1 D3 // pin for motor A direction control (forward).
      #define in2 D4 // pin for motor A direction control (reverse).
      #define in3 D5 // pin for motor B direction control (forward).
      #define in4 D6 // pin for motor B direction control (reverse).

      // Constants for motorshield type Lego IR Receiver 8884
      #define IR_LED_PIN D5 // pin on which the IR LED is installed.
      #define IR_CHANNEL 0 // channel number selected on the Lego IR Receiver 8884. May be 0, 1, 2 or 3.
      #define IR_PORT_RED 1 // Usage of red port on Lego IR Receiver 8884: 1 = motor, default rotation; 0 = no motor connected; -1 = motor, reversed rotation
      #define IR_PORT_BLUE 0 // Usage of blue port on Lego IR Receiver 8884: 1 = motor, default rotation; 0 = no motor connected; -1 = motor, reversed rotation

      // NUM_FUNCTIONS represents the number of Rocrail functions that are defined for this controller
      // If changed, the number of array values for FUNCTION_PIN below must be changed as well.
      // You should also check void lightEvent(), which is responsible for switching headlights from white to red etc.
      const int NUM_FUNCTIONS = 1;

      // Digital pins for function output
      // For lights conntected to LEGO IR Receiver 8884, use virtual function pins IR_LIGHT_RED and IR_LIGHT_BLUE
      uint8_t FUNCTION_PIN[NUM_FUNCTIONS] = { IR_LIGHT_BLUE };

      // The loco address for which the function pin will be triggered.
      // You may fill that array up with zeros (0). Meaning: “all trains”. Makes only sense if this controller is handling a single train only.
      int FUNCTION_PIN_LOCO_ADDRESS[NUM_FUNCTIONS] = { 0 };

      // Automatic lights. If set to true, Functions with odd numbers (Fn1, Fn3…) are switch on when loco is going forward, and odd numbers (Fn2, Fn4) when reverse. Set to false to disable the feature.
      // To set-up more advanced behaviour, find the lightEvent() function in the MTC4PF code and change it as desired.
      const bool AUTO_LIGHTS = true;

      // Digital output PIN to monitor controller operation (typically a LED)
      bool STATUS_LED_PIN_INSTALLED = false; // set to false if no LED is installed
      uint8_t STATUS_LED_PIN = D8;

      // Report battery level
      const bool REPORT_BATTERYLEVEL = false; // set to true or false to allow or omit battery level reports
      const int SEND_BATTERYLEVEL_INTERVAL = 60000; // interval for sending battery level in milliseconds
      const int BATTERY_PIN = A0;
      const int VOLTAGE_MULTIPLIER = 20000 / 5000 – 1; // Rbottom = 5 kOhm; Rtop = 20 kOhm; => voltage split factor
      const int MAX_AI_VOLTAGE = 5100; // maximum analog input voltage on pin A0. Usually 5000 = 5V = 5000mV. Can be slightly adapted to correct small deviations

      // ****************
      // Network settings
      // ****************

      // Trigger emergency brake upon disconnect
      #define TRIGGER_EBREAK_UPON_DISCONNECT false

      // ***************
      // Syslog settings
      // ***************

      // Syslog application name
      const char* SYSLOG_APP_NAME = “MTC4PF”;

    • #2618
      Herbert S.Herbert S.
      Participant

      Thank you for the info. I will buy this type too.

      Actually I used 2 different types:
      LED 5mm Infrarot klar 10-40mW/sr 13 7 0,49 3,43
      183338 LED-KREATIV-SET S081 IR-LED 5 MM (set of receiver and transmitter)

    • #2624
      ZoltanZoltan
      Participant

      Mein “Projekt” ist fertig.

      Wie schon erwähnt, MattzoBricks Lego Automation hat mich fasziniert!
      Aber ich habe keine Lego Züge. Ich wollte es aber trotzdem ausprobieren. So habe ich das Projekt etwas geändert (in den Äusserlichkeiten), und auf Spur G als Test umgesetzt. Hier ist ein Bericht über den Bau der MTC4PF-“Lokomotive” 🙂

      • This reply was modified 3 years, 4 months ago by ZoltanZoltan.
    • #2747
      Herbert S.Herbert S.
      Participant

      Hallo Matthias,
      könntest du mir – und somit natürlich der gesamten Lego Community – einen großen Gefallen tun. Aus meiner Sicht sollte es einfach sein, den LEGO_IR_8884 Code um 4 weitere Einstellungen/Kanäle zu ergänzen (nur IR). Die Züge 7897 (wunderschöner ICE) und 7898 (grünes Krokodil) lassen sich auch mit IR steuern. Es gibt 3 Kanäle und einen 4. für 1 bis 3 gemeinsam.
      Es gibt nur + und Minus Taste (funktioniert 7 Mal – somit 7 Geschwindigkeiten) und Stop Taste. Jeweils Plus drücken wird der Zug eine Stufe schneller bis zum Maximum (dann kann man zwar weiter drücken, aber der Motor wird nicht mehr schneller), mit Minus drücken wird er langsamer bis er rückwärts wieder bis zum Maximum fährt. Dann gibt es noch die Stop Taste.
      Wenn die Befehlsstruktur gleich ist wie beim Power Functions, müsse es einfach sein, das Programm zu erweitern. Wenn es bei PF mehr Geschwindigkeitsstufen gibt, könnte man ja einfach welche doppelt verwenden, damit man das Programm nicht adaptieren muss. Man könnte einfach statt den Kanälen 0-3 (PF), die Kanäle 4-7 in deinem Programm verwenden. Lichter gibt es sowieso nicht, je Kanal somit nur 1 Sender. Da kann man einfach standardmäßig Null setzen. Leider kann ich nicht C programmieren und verstehe das Programm zu wenig.
      Die Codes in Hex hätte ich mal ermittelt:
      1+:390C76EE
      1-:5CF0E634
      1stop:F3F4DCF8
      2+:1D1F21E0
      2-:7D769E4F
      2stop:1E61B965
      3+:1695FECD
      3-:7672B3A
      3stop:29F6DFB4
      All+:4B7BA39F
      All-:B0D3CC54
      Allstop:D1637DA9
      Einige waren nicht 100%ig eindeutig. Aber die 2. Möglichkeit habe ich noch und könnte einfach mal testen.
      Ich hoffe, die Adaption ist so einfach wie ich mir das vorstelle. Wäre jedenfalls eine tolle Erweiterung, speziell, da ich dann 3 Züge mehr verwenden könnte.
      PS: Dein Tip mit den IR Sendern war korrekt. Ich kaufte deine Modelle bei Amazon und alles lief perfekt. Jetzt warte ich gerade auf 100 reed sensoren:-)

      liebe Grüße & Gratulation zu diesem wirklich tollen Projekt
      Herbert

      • #2749
        Matthias RunteMatthias Runte
        Keymaster

        Hallo Herbert,
        ich habe nachgesehen und erstaunt festgestellt, dass ich die Steuerung mehrerer Züge über Infrarot mit einem einzigen MTC4PF tatsächlich nicht realisiert hatte. Liegt daran, dass ich selbst den MTC4PF immer in den Zug eingebaut hatte und das Multitrain-Setup selbst nicht getestet hatte. Ich nehme das mit auf die Liste. Bis dahin bitte einen Controller je IR-Empfänger verwenden.

        Gruß,
        Mattze

    • #2751
      Herbert S.Herbert S.
      Participant

      Hallo Mattze,
      Danke für die Info,das ist jedenfalls ganz toll. Meine Bitte war aber eher, dass du die IR Befehle vor Power Functions (7897,7898 – schwarze Fernbedienung) aufnehmen könntest. Das wäre sicher für ein umfassendes Lego Projekt sehr wichtig.
      Liebe Grüße
      Herbert

    • #2755
      Piet BeinekePiet Beineke
      Participant

      Hallo in die Runde:
      Ich hatte gestern versucht die Stromverbindungen, die normalerweise durch plus und minus des Bread-Boards laufen, durch eine Verbindung in Form von Lüsterklemmen zu ersetzen, um Platz zu sparen, jedoch ist mir bei dem Versuch die betroffene Platine samt Motorcontroller durchgebrannt. Jetzt war meine Frage, ob man etwas dabei beachten muss, was ich übersehen habe, zb welche bestimmten Eigenschaften die plus- und minus-reihe haben, welche bei den Lüsterklemmen nicht gegeben sind, da ich ungern eine weitere Platine durchbrennen würde…
      Viele Grüße
      Piet

    • #2756
      Thomas RodriguesMax
      Participant

      Hallo Piet,

      ohne deine Schaltung gesehen zu haben, ist es schwer zu sagen was du ggf. übersehen haben könntest.

      Wenn du Klemmen nutzen möchtest, kannst du jeweils VIN und GND von der Quelle zu den Verbrauchern (ESP und Motor Kontroller) zusammen fassen.
      Darüber hinaus kannst du, vorausgesetzt du schaltest Wiederstände dazwischen, auch die LEDs an die Klemme GND anschließen.

      Wie man das zusammenfassen kann, kann man vielleicht auch ganz gut auf der von mir gelöteten Version eines MTC4PF sehen.

      MTC4-PF-ESPmini

      20210312-163651

      • This reply was modified 3 years, 4 months ago by Thomas RodriguesMax.
    • #2758
      Piet BeinekePiet Beineke
      Participant

      mhmm, komisch. ich hatte rot adn vin und controller input, sowie schwarz an gnd und controller gnd geklemmt, keine leds eingebaut bisher. trotzdem ist mir das teil durchgebrannt. naja, vielleicht war ja auch die platine fehlerhaft, kann ja sein.
      Danke trotzdem
      Piet

    • #2896
      Thomas RodriguesMax
      Participant

      A short “search the issue”.

      20210325-171107

      20210327-102120

      The layout:
      MTC4-PF-ESP8266-AZ-Delivery

      The Problem:
      I”ve had a problem with another ESP8266. The motor on the motor driver port B went on 100% as soon as the loco was powered on.
      Replacing the l9110 did not resolve the issue.
      So I decided to completely solder a new one.
      Nevertheless the problem was the same.
      A deeper look into the PU config could not detect anything.
      Then I had a closer look on the PCB board again and.. B1A was not connected at all!

      Please test your boards prior to operation. 🙂

      • This reply was modified 3 years, 3 months ago by Thomas RodriguesMax.
    • #3276
      Rob AlblasRob Alblas
      Participant

      Hi,

      First I would like to say what a really cool thing the Mattzocontrollers are! I have the Signal, Switch and MTC4PF up and running and am really excited about it.

      I have a question on the resistors for the MTC4PF though. I ran into the same issue as Piet Beneke: I only have the 4.7k and 22k Ohm resistors. In one of the replies I read that the important thing is that the ratio between the two resistors should be 4. After reading the code, I wondered whether one could also change the code in the following way:

      Replace: const int VOLTAGE_MULTIPLIER = 20000 / 5000 – 1; // Rbottom = 5 kOhm; Rtop = 20 kOhm; => voltage split factor
      By: const int VOLTAGE_MULTIPLIER = 22000 / 4700 – 1; // Rbottom = 5 kOhm; Rtop = 20 kOhm; => voltage split factor

      Would that work?
      Regards,
      Rob

      • #3277
        Matthias RunteMatthias Runte
        Keymaster

        Hi ROb,
        thanks. This part of the wiring is not required at the moment as we are not using the voltage information on A0 of the microcontroller yet. Will will do this in a future release of the MTC4PF. So feel free to just leave that part out for now.

        Cheers,
        Mattze

        • #3278
          Rob AlblasRob Alblas
          Participant

          Hi Mattze,

          Thanks! I will disregard it then.

          Rob

    • #5801
      Martin HuckeMartin Hucke
      Participant

      Hi everybody,
      during the last days I spent very much effort in analysing and decoding the RC Train infrared protocol used by Lego before Powerfunctions. This protocol has been used for the ICE #7897 and the green crocodile #7898.
      I succeded with the analysis and I have implemented it on my desktop test setup into MTC4PF. I am more than glad (and also a proud) that it is running now pretty smoothly (after I’ve finetuned the timing, which is quite different from the PF protocol).

      Is anybody interested to get it, too ?

      Kind regards,
      Martin

      • This reply was modified 1 year, 6 months ago by Martin HuckeMartin Hucke.
    • #5806
      Herbert S.Herbert S.
      Participant

      Hi Martin,
      as I wrote earlier, The ICE #7897 and the green crocodile #7898 are in my opinion beautiful trains of the Lego train family. The best option would be to convince Mattzo to add it to the MTC4PF, based on Visual Studio code. Martin, did you do your work on Arduino or on Visual studio code? Maybe Mattzo can write his opinion about it. I still hope, that Mattzo adds the trains to the MTC4PF.
      best regards
      Herbert

    • #5807
      Matthias RunteMatthias Runte
      Keymaster

      The lobby machinery is working… 🙂

      We will look into it and get back to the matter in the forum.

    • #5809
      Martin HuckeMartin Hucke
      Participant

      Hi Herbert, I’ve engineered the protocol rever2sly and this protocol is pretty similar to the Power Functions Interface Specification. But definetely it supports a subset of that specification only. It is a predecessor of the PF protocol. Thus I’ve been successfull in integrating the RC trains #7897 and #7898 into the Mattzo project with minimal effort. Due to the abolsute requirement to implement the controller <–> train interface in a resilient and fault tolerant way, it is not possible to make use of the Step up/Step down (+/-) commandset of the infrared remote control. It is requiredto set an abolute speed and you need to repeat that command on a regular base. The infrared protocol is a unidirectional protocol and for the moment there is no possibility to get any acknowledgement or to regulate the speed.

      Unluckily I’ve also found that not all RC train controllers are supporting the required commands. 3 out of 5 RC train bases that I own are supporting it, 2 unfortuneately not. Obviously there are different firmware versions on the market. The older ones (2005 –> ???) can’t be integrated unluckily.

      This means that it is not guaranteed and it is more trial-and-error if you have a train base that supports the required commands.

      Therefore I will share my knowledge about that protocol with you pretty soon and also explain the required modifactions in the the firmware. You will be able to make them yourselfs, believe me. Stay tuned !

      • This reply was modified 1 year, 5 months ago by Martin HuckeMartin Hucke.
      • This reply was modified 1 year, 5 months ago by Martin HuckeMartin Hucke.
      • This reply was modified 1 year, 5 months ago by Martin HuckeMartin Hucke.
    • #5922
      Razvan AnghelRazvan Anghel
      Participant

      Hello.

      I upload new firmware to my controller with no issue but the problem is on Rocrail.
      No matter what speed i select for my loco, motor going with same speed, doesnt count the settings i made in speed tab.
      you think might be something wrong in controller_config file? Or is something else?

      / *****
      // LOCOS
      // *****

      // Number of locos (aka. MattzoLocos) controlled by this controller
      const int NUM_LOCOS = 1;

      // List of MattzoLocos
      // The parameters have the following meaning:
      // – locoName: name of the loco as setup in Rocrail
      // – locoAddress: address of the loco as setup in Rocrail
      // – accelerationInterval: time interval for acceleration / braking (default: 100 ms)
      // – accelerateStep: power increment for each acceleration step
      // – brakeStep: : power decrement for each braking step
      MattzoLocoConfiguration* getMattzoLocoConfiguration() {
      static MattzoLocoConfiguration locoConf[NUM_LOCOS];

      locoConf[0] = (MattzoLocoConfiguration){
      .locoName = “ExampleTrain”,
      .locoAddress = 6,
      .accelerationInterval = 100,
      .accelerateStep = 5,
      .brakeStep = 10
      };

      return locoConf;
      }

      // *************
      // MOTOR SHIELDS
      // *************
      // Number of motor shields connected to this controller
      const int NUM_MOTORSHIELDS = 1;

      // List of motor shields that are controlled by this controller
      // The parameters have the following meaning:
      // – locoAddress: loco that this motor shields is attached to
      // – motorShieldType: motor shield type
      // – L298N_enA, L298N_enB: PWM signal pin for motor A / B, if L298N is used.
      // – in1..in4: pin for motor direction control for motor shields L298N and L9110 (in1: forward motor A, in2: reverse motor A, in3: forward motor B, in4: reverse motor B).
      // – minArduinoPower: minimum power setting for Arduino based motor shields
      // – maxArduinoPower: maximum power setting for Arduino based motor shields (max. 1023)
      // – configMotorA: turning direction of motor A (1 = forward, -1 = backward, 0 = unused). In case of LEGO IR Receiver 8884, this is the motor connected to the red port.
      // – configMotorB: same for motor B; if IR receiver: blue port
      // – irChannel: if a LEGO IR Receiver 8884 is used, the selected channel of the receiver. May be 0, 1, 2 or 3. If the loco uses multiple IR receivers on different channels, additional motor shields for the loco are required.
      MattzoMotorShieldConfiguration* getMattzoMotorShieldConfiguration() {
      static MattzoMotorShieldConfiguration msConf[NUM_MOTORSHIELDS];

      // Type of motor shield directly wired to the controller.
      // (The different motor shield types are defined in MTC4PF.ino)
      // Set to MotorShieldType::NONE if only virtual motor shields are used!
      const MotorShieldType MOTORSHIELD_TYPE = MotorShieldType::L9110;

      msConf[0] = (MattzoMotorShieldConfiguration){
      .locoAddress = 6,
      .motorShieldType = MotorShieldType::L9110,
      .L298N_enA = 0,
      .L298N_enB = 0,
      .in1 = D5,
      .in2 = D6,
      .in3 = 0,
      .in4 = 0,
      .minArduinoPower = MIN_ARDUINO_POWER,
      .maxArduinoPower = MAX_ARDUINO_POWER,
      .configMotorA = 1,
      .configMotorB = 0,
      .irChannel = -1
      };

      return msConf;
      }

    • #5923
      Matthias RunteMatthias Runte
      Keymaster

      Check the related forum entries for this issue. You need to change .minArduinoPower and .maxArduinoPower to appropriate values.

Viewing 53 reply threads
  • You must be logged in to reply to this topic.