Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: How to stop a loco on an enter2in sensor #7701
    Liam MolloyLiam Molloy
    Participant

    Thanks Mattzo, my ultimate goal is to implement 2 sensors per block (enter and in) but at the moment I do not have all of the needed hardware. I currently have 10 sensors / 10 blocks, 16 switches and 4 2-aspect signals. I would need to double to 20 sensors to make enter and in work. All of the wiring I have currently looks like a big bowl of spaghetti and adding wiring for 10 more sensors scares me. One day I hope to build an MLC Mega to power all of this and make everything look clean and tidy 🙂 I will also research BBT in Rocrail.

    I am not familiar with the MTC4PF. I will take a look at the code which implements immediate stop in there and see if I can fork the MLC4BT code and implement the functionality within. My C++ is a bit rusty but I will give it a try.

    Thanks for all of the hard work you and the team have put into this product. I am having fun automating my lego train layout.

    Cheers,
    Liam

    in reply to: How to stop a loco on an enter2in sensor #7698
    Liam MolloyLiam Molloy
    Participant

    Thanks Mattze!

    I tried leaving the pwr*Step parameters. When I do this, their default value is 10. These can be found in loadControllerConfiguration.h.

    I tried setting pwrDecStep to a high value of 100. The loco is still taking a longtime to slowdown and stop. It takes about 120cm from being detected by the sensor until it comes to a stop.

    I am going to try with some other values to see if they make a difference.

    Cheers,
    Liam

    in reply to: Two motors. Forwards and Backwards #6306
    Liam MolloyLiam Molloy
    Participant

    I found the issue. In the example configurations on the MTC4BT, “backward” is used but in ‘loadControllerConfiguration.h” in line 116 the value “reverse” is used to set the “isinverted” property when the channels are configured.

    In my configuration file I changed “backward” to “reverse” and now the loco runs as expected.

    I would recommend either updating the documentation to say “reverse” or updating the code to say “backward”. Updating the documentation would mean the code does not have to be updated.

    // loadControllerConfiguration.h
    [115] const char *dir = channelConfig[“direction”] | “forward”;
    [116] bool isInverted = strcmp(dir, “reverse”) == 0;

Viewing 3 posts - 1 through 3 (of 3 total)