Posts by Feike

    The Support Team website hasn''t been updated for a long time.

    I have to select a EEP version and the latest that I can select is EEP 15.


    After pressing send there is a animated gif but no confirmation that the info is accepted, even after long waiting.


    So I will continue working with EEP 16 where the graphics are just good and it does the things I want to do.


    It was only 20 Euro to test EEP 17 which I can affort.

    There no problem.

    I am using a AMD video card.


    On starting EEP 16 for the first time EEP 16 gave a message that it would install a AMD driver.
    After that the graphics were ok.


    EEP 17 doesn't install a AMD driver, so the graphics are poor.

    Was this option forgotten in the startup of EEP 17?

    For example I make a track alongside a river.

    When I let a train drive over the track it will stop at the end.

    It would be nice if the wouldn't stop but start at the beginning of the track or on another track.

    So something like this in a movie but how do I do that?

    It was time to see if my Eepplay would work on another layout than the one I'm working on.

    So I made a copy of the layout Mitteldeutschland and opened Mittel_D_Auto.anl3

    Next the changes to the lua of this layout, took max 2 minutes.

    Last step was starting EepPlay.

    The result is in the screenshot.
    Next I could select a camera, select a train and drive it, change switches and signals.

    It's nice to see that when you try to make EepPlay work on "all" layouts that it does work in this test. "all" layouts will need some more testing.

    Next step could be making GBS views which will take more time and for this layout it will be a lot of GBS views.

    Hello Headsup


    When in EEP trains are running with one screen and you switch to another program focus is lost to EEP, trains will stop running,and LUA won' t read the file.

    A solution to this is to choose full screen mode (F4) and then switch to another program. Test it and see that your trains will still be driving around. In this case EEP is running in the background and LUA ill read the text file.

    There are two different temporary files to avoid conflicts.

    One for the message from my program to EEP and one for the messages from EEP to my program.


    The EEPmain function is run every 200ms, so every 200 ms EEP will look for the content of the temporary file to read the messages from my program and write a temporary file with the messages to my program.

    My program will also check for the content of the temporary file every 200ms.

    It all exists of two parts.

    In Eep I have a few functions combined in a file called faoLibray.lua, approx. 350 lines of code.

    This library I started in this link: Autload Lua

    The program EepPlay itself was written with C#

    The communication between Eep and EepPlay is done using temporary files.

    My father started with model trains from Fleischmann in 1960.

    In the late seventies and eighties we had a table with a model train in scale HO.

    Tracks were from Fleischmann and rolling stock from Fleischmann and Roco,

    Playing with the train was all manual, no automatic systems.

    Press a button to set a switch and a transformer for the speed.

    Stopping a train and set the signal was done by the switch.

    I have one picture of the table and with that I recreated the layout in EEP.

    Now I needed the playing option with my hardware setup of a desktop with one monitor and a laptop.

    So I made a program to play with Eep called EepPlay (temporary name).

    Eep is running on my desktop in full screen (F4) and my EepPlay is running on my laptop.

    EepPlay can at the moment do the following:

    • select a camera
    • select a train
    • set the speed of the selected train
    • see the actual speed of all running trains
    • uncouple the waggons
    • make more gbs layouts for one layout and switch between them
    • rotate the turntable
    • operate any item with can be controlled by axis (keyboard or gamepad)

    See attached screenshots to see how the program looks.

    In my layout I have two gbs layouts and one crane Crane DB EDK 300/5 to operate.

    This way I have the play option back that I had back in the days.

    Only thing that is missing are the physical buttons to set the switches, turn the turntable and operate the crane.

    After doing some experimenting and I came up with a selfmade GBS program.

    I made a few small changes to the above mentioned faoLibrary.

    Next I made a GBS program, see attached screenshot.

    In this first attempt I can set switches and signals by typing the number and select a camera view.

    My setup is now that EEP is running on my desktop in full screen (F4) and my GBS program is running on my laptop.

    Works great togheter: full screen and the possibility to set switches and signals and change camera views.

    Now thinking what I can do more with my GBS program.

    To reload the lua I need some form of communication between EEP and, for example, Notepad++.

    I am using a temporary file and read the content of this tmp file and if it contains the word 'dofile' (without quotes) the lua is reloaded and then the tmp file will be emptied.


    To do this some lua is needed which is in the file faoLibrary.lua which is placed in the lua directory of the EEP installation.
    The reload process uses the function dofile(), when using require() it won't work.


    In EEP I made two modifications: in the lua file of the layout and in the function EEPMain()


    The lua file of the layout exists of 6 lines:


    faoDirLuaLayout="f:/eep/anlagen/treintafel/"

    faoDirLuaEep="s:/eep16/lua/"

    faoTmpDoFiles={faoDirLuaLayout .. "eepmain.lua",faoDirLuaLayout .. "switch.lua"}

    faoTmpTmpFile="y:/temp/eep.tmp"

    faoTmpDelaySeconds=0


    dofile(faoDirLuaEep .. "/faoLibrary.lua")

    • Line 1
      The directory of the layout working on
    • Line 2
      The lua directory of the EEP installation
    • Line 3
      A table with all the lua files that needs to be reloaded
    • Line 4
      The path and name of the tmp file
    • Line 5
      How often will the tmp file be checked
      If this value is 0 the tmp file will be checked everytime EEPMain() is called otherwise there is a pause between the checkes with the given seconds
    • Line 6
      The faoLibray.lua is loaded
      This will initiaze the tmp file and then load the lua files that are in the table faoTmpDoFiles

    In the function EEPMain() two lines has te be added.

    I placed the function EEPMain() in the file eepmain.lua.

    Here the content of my eepmain.lua:


    clearlog()


    print("Hey let's start, EEP Version is: ", EEPVer)

    print(os.date("%H:%M:%S"))


    function EEPMain()

    faoTmpReadContent()

    faoTmpAutoReloadLua()

    return 1

    end


    The two lines starting with fao are added.


    That's all for the EEP side of things.


    Now we must change the content of the tmp file to 'dofile' when the one or more lua files are changed in Notepad++.

    This can be done using any text editor: open the tmp file anter the text dofile and save it.

    To make things easier I made a small command line tool called eeptmp

    This tool has to be started with one parameter, that is the tmp file.

    For example: eeptmp y:/temp/eep.tmp

    After the tmp file has been updated this tool will automatically switch to EEP.


    Add this command in Notepad++ to the run menu.

    And then add a shortcut to thus run option.

    In my Notepad++ I added the shortcut ctrl-shift-`: in my case this shortcut can be pressed with one hand.

    So now I change one or more lua files, save them and the press the chosen shortcut.


    Some remarks:

    • Everyting in faoLibray, variables and function, will start with fao
    • All variables and function uses for the tmp file will start with faoTmp
    • This is the best I could think of with the standard Lua that is in EEP.
      There are better solution but for that I need Lua extensions.
      Does EEP support Lua extensions?
    • The faoLibrary.lua is attached to this message
    • How do I share the file eeptmp.exe because it cannot be attached to this message.
    • If faoTmpDelaySeconds is set to 0, it will create very much disk IO.
      And for me to much disk IO on my SSD.
      Therefore I placed the tmp file on a ramdisk: there it can disk IO without a problem. For the ramdisk I use the tool imdisk
    • When there is an error message in the Event Window the the reload won't work: click on the lua button and the reload the script.
      Haven't found a solution for this. Any ideas?

    No idea if it works on another installation of EEP.

    Hopefully somebody can test it.

    On my PC it works just fine

    Files

    I will be happy to share this.

    At the moment I have at work a ransomware on a few servers.

    As a member of the ICT department I'm a bit busy...

    So it will take some time before I will be back to share the solution.

    Hello Paul


    Nothing should happen in the EEP Script Editor.

    But when I change something in Notepad++ and the go back to EEP the changed script is not loaded.

    I have to click on the lua button and then click reload script to reload the changed script.

    And it is this step that I automated.

    Started with lua programming where I use Notepad++ for editing the code.
    What I find very irritating is the fact that when I change the code in Notepad++ and go back to EEP the code is not automatically reloaded.

    I always have to manually reload the code, for example using the lua button and then reload script, this only working when using require() or dofile().


    So I found a way to automatically reload the code when going back to EEP which makes it much more comfortabel changing the code and testing it in EEP.


    Has somebody found a way to automatically reload the lua code? Maybey an easier way?

    I doing some testing on lua for an idea that I have.

    I need some functions to access the filesystem: get file time stamp, get files in directory..

    Lua doesn't have this functions.

    There is a Lua library called luafilesystem that has these functions.

    The problem is to get this library I need a C programming environment to compile the source to a dll called lfs.dll

    I have no C exprecience what so ever.

    Does anyone have this lfs.dll?