repetier.log file delay

Hello,

I am currently utilizing Repetier-Host Version .85b on Windows 7 64bit. I have been trying to build a program that searches the repetier.log file for a homing trigger on my rep-rap however, it appears there is a couple minute delay between when the limit switch is actuated and when that bit of code appears in the repetier.log file. Is there an explanation for this? I have monitored the repetier.log file and it appears it is sent information in 4kb increments every couple of minutes as previously stated. Where is the 4kb of data being stored prior to it showing up in the repetier.log file(Perhaps R.A.M.?) and is there anyway I can access a live feed of this data?  One thing to note is that there is no issue on the hardware side of things and the printer functions appropriately during fabrication of a component. Let me know your thoughts, thanks!

Comments

  • Log is a simple file we write to. Writes are not flushed so it writes only when a block is complete I guess.

    If you want direct responses you need to use 1.x version and write that function as a simple plugin, see plugin documentation on our homepage.
  • That is what I had figured was the case. Is there no way to access the live feed in the running window of Repetier-Host such as the live log at the bottom of the program? Also I will download the latest version and start to play with the plugin feature however would you be aware of any existing plugin that already completes a similar task of providing a live or minimal delay log file? Thanks for your response and wisdom on this subject!
  • No, I don't know any plugin doing that. With a plugin there is no need for this. If you need to parse the responses you can do so in the plugin getting every response firmware sends. Not really sure if there is hook to get all log lines only know you can get all responses.
  • I understand! So do you believe it would be feasible to create a plug in that reads live firmware response and then opens an.exe file from an arbitrary directory? If so would this be a difficult task to complete (with the relative knowledge of myself being proficient in c++)? Thanks again for your response you are very helpful! 
  • If you print with the host you can execute programs with @execute just by adding the commands where needed, if that is a help.

    c# is not difficult to learn for a C++ programmer. Just remove all the complex C++ stuff and you have c# basics. Then add properties and it is more like a different syntax for some things and of course libraries are different. And you do not need all that fancy stuff, more the basic demo plugin plus 2 functions I guess.
  • Aw excellent! So if I say @execute do I then follow it by the file directory for the specified .exe file I wish to use or what is the correct way to do this? Also is that feature included on the latest version of Repetier-Host? Thanks! 
  • My question now is simply why does this not work and what corrections should I make to make it work.
    @execute ;C:\Users\ME\Desktop\Hello.exe

    Thanks!
  • That should work - no spaces and complete path. With spaces you need to wrap command in double quotes. Here the code that gets executed:

            public void Run()
            {
                if (!File.Exists(exe)) return;
                list.Add(this);
                process = new Process();
                try
                {
                    process.EnableRaisingEvents = true;                
                    process.Exited += new EventHandler(runFinsihed);
                    process.StartInfo.FileName = Trans.host.IsMono ? exe : WrapInQuotes(exe);
                    process.StartInfo.UseShellExecute = false;
                    process.StartInfo.RedirectStandardOutput = true;
                    process.OutputDataReceived += new DataReceivedEventHandler(OutputDataHandler);
                    process.StartInfo.RedirectStandardError = true;
                    process.ErrorDataReceived += new DataReceivedEventHandler(OutputDataHandler);
                    process.StartInfo.Arguments = arguments;
                    process.Start();
                    // Start the asynchronous read of the standard output stream.
                    process.BeginOutputReadLine();
                    process.BeginErrorReadLine();
                }
                catch (Exception e)
                {
                    Trans.host.LogError(e.ToString());
                    list.Remove(this);
                }
            }

    I have tested it only with command line executables and redirects output to log. Is yours a commandline cmd and is it callable directly?
Sign In or Register to comment.