Announcement

Collapse
No announcement yet.

USB Temperature Data Logger - RML (Roast Monitor Language)

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • USB Temperature Data Logger - RML (Roast Monitor Language)

    This is the biggest Roast Monitor feature release in quite some time...

    RML - Roast Monitor Language.

    This is a very powerful addition to the Roast Monitor as it gives the ability to create your own rules for events during the roast.* These could be as simple as a beep at first crack to a verbal warning about roasting too fast.*

    There is a HTML file in the Roast Monitor package called: Introducing RML

    In it you will find the formal language specification along with some easy examples that should get you going quickly.

    If you are stuck on something post the RML up here and someone will help troubleshoot it.

    When you write something that others could use feel free to share it in this thread.

    If you do post RML scripts in here then using the "code" tags will help keep this thread neater.

    Enjoy!
    8-)

  • #2
    Re: USB Temperature Data Logger - RML (Roast Monitor Language)

    Below is one that I tried tonight (with lower temps for testing).

    Something similar should added to all RML files to give you an alert for eminent fire



    Code:
    # No air flow or burners way too high.
    
    IF M1R_NOW > 50
    {
       AUDIO "/\/windows/\/media/\/tada.wav";
       ALERT "C per minute is climbing too fast, currently " : M1R_NOW;
       LOG "C per min rise is " : MR_NOW;
    }
    
    
    # Serious FIRE RISK
    
    IF M1D_NOW > 240 AND M1D_NOW < 260
    {
       AUDIO "/\/windows/\/media/\/Windows Exclamation.wav";
       ALERT "WAKEUP - Roaster is about to catch fire. Temp is now " : M1D_NOW;
       LOG "Current Temp is " : M1D_NOW;
    }
    
    IF M1D_NOW > 260 AND M1R_NOW > 20
    {
       AUDIO "/\/windows/\/media/\/Windows Exclamation.wav";
       ALERT "Check your insurance policy or put the fire out now";
       LOG "The fire started when the Current Temp was " : M1D_NOW;
    }

    edit 24 Aug 2011 - changed to suit the current version.
    Previous syntax was MD for meter degrees, now M1D for Meter #1 Degrees as you could be loging up to 9 inputs
    -- Andy
    Last edited by fromthebeanbag; 10th July 2012, 10:31 AM.

    Comment


    • #3
      Re: USB Temperature Data Logger - RML (Roast Monitor Language)

      Not bad.

      Now add the part that calls the emergency services and sends the SMS to the insurance company and were about done!

      Comment


      • #4
        Re: USB Temperature Data Logger - RML (Roast Monitor Language)

        Fantastic new feature Andy, and much appreciated by myself, so thanguverrrymush  [smiley=thumbsup.gif]

        One of the measurements I like to log is the Time between Cracks, and Total Roast time since "Load". Now able to Alert & Log that easily.

        Attached is a file of the code I am using to do that in case anyone else finds it useful. Tested, but still to be tested in anger. (Probably do that tonight)

        Update: If you reset and log another set within the same session the Alert display re-displays the 1st set of times, while the logging actually logs the correct times. (Im using the default.rml feature) Not sure why but seems related to screen (Alert) messages because if you have had another message prior like meter not switched on, it repeats that instead of the time alerts.?. I circumvent by restarting monitor between sessions for now.

        Pointing out mistakes or suggesting improvement also gratefully accepted 

        GrahamK

        Comment


        • #5
          Re: USB Temperature Data Logger - RML (Roast Monitor Language)

          Originally posted by 0134272E272B0D460 link=1304437799/3#3 date=1304474337
          If you reset and log another set within the same session the Alert display re-displays the 1st set of times, while the logging actually logs the correct times.
          I noticed similar during initial testing too but didnt get back to report it (but I will). It had me scratching my head for a minute until I noticed the time of the error was 15 minutes prior.

          Originally posted by 0134272E272B0D460 link=1304437799/3#3 date=1304474337
          I circumvent by restarting monitor between sessions for now
          Thats what I did too.


          Originally posted by 0134272E272B0D460 link=1304437799/3#3 date=1304474337
          Attached is a file of the code I am using
          Wow, you were super fast to start playing and that is a useful thing to keep track of.

          I also noticed that you had to change the extension of the rml so you could upload it here. Ive just fixed that on the server too.

          Looking forward to seeing what others dream-up for their Roast Monitor Language files.

          Comment


          • #6
            Re: USB Temperature Data Logger - RML (Roast Monitor Language)

            Very minor mistake in the IntroducingRML.html instructions:

            TC("First crack")
            is the temperature of first crack in the template.

            should be:

            TD("First crack")

            GrahamK

            Comment


            • #7
              Re: USB Temperature Data Logger - RML (Roast Monitor Language)

              Thanks for the heads-up Graham.

              That was my fault! The internal testing version 2.25 used C for Celcius and I asked for it to be changed to D or degrees to save the confusion for those in the USA running the Fahrenheit version.

              Ive just changed it in the HTML in the download file and in the online RML document.
              8-)

              Comment


              • #8
                Re: USB Temperature Data Logger - RML (Roast Monitor Language)

                I have had a problem with the calculations when using in a proper roast. Suspect the variables do not hold their value well, so going to change my whole program to see if I can group what data I need for the calculations together, so their is no time lag between getting the times and doing arithmetic on them. All good fun. (For me anyway) 

                GrahamK

                Comment


                • #9
                  Re: USB Temperature Data Logger - RML (Roast Monitor Language)

                  Thanks to Grahams very detailed bug report (via email today) there is now a new version of RML in the Roast Monitor package.

                  It turns out that the problem only happened after 1000 seconds when a comma was added (eg: 1,000.555 seconds) so it slipped past all the internal short testing.

                  Good find Graham!
                  8-)

                  Comment


                  • #10
                    Re: USB Temperature Data Logger - RML (Roast Monitor Language)

                    Nice one Andy  [smiley=thumbsup.gif] . That was quick. 
                    Like the new vertical comments text.

                    Will give it a proper whirl soon

                    Update: Problem solved - tested OK 

                    New RML file attached if anyone interested

                    GrahamK

                    Comment


                    • #11
                      Re: USB Temperature Data Logger - RML (Roast Monitor Language)

                      Love the new Roast Monitor v2.33, but it created a minor panic at the start of my roasting session tonight when the RML failed to load!

                      RM v2.33 requires some minor changes to the RML code:

                      Attached is and update to Grahams default.rml for v2.33 for all those in a panic.


                      (edit... put the RML in the code tag below so others can read it without downloading) -- Andy

                      Code:
                      # Default.rml file including:
                      # Calculating and logging the difference between 1st & 2nd Crack and Total Roast time since "Load".
                      # Note: Remove the "#" characters to provide more verbose Alerts and Logging of the values
                      #
                      # V4 06/05/2011 - GrahamK
                      # V5 18/08/2011 - maca55 - minor mods for RM v2.33 support, first crack warning added
                      #
                      
                      LIMIT 1 {
                                LOG " ";
                                LOG "default.rml V5 13/08/2011 loaded";
                                LOG "===============================================================================";
                                LOG " ";
                              }
                      
                      IF M1S("Second Crack") > 0
                         LIMIT 1 { 
                                  LOG "Beans Loaded at Temp = " : M1D("Load") : "C";
                                  SET FirstC = M1S("First Crack");
                                  SET SecondC = M1S("Second Crack");
                                 ALERT "Second Crack time = " : SecondC;
                                 LOG "First Crack time = " : FirstC;
                                 LOG "Second Crack time = " : SecondC;
                                  SET Timebtwc = ((SecondC-FirstC)/60);
                                  LOG "First Crack Temp = " : M1D("First Crack") : "C";
                                  LOG "Second Crack Temp = " : M1D("Second Crack") : "C";
                                  LOG "Time Between Cracks = " : Timebtwc : " minutes";
                                  ALERT "Time Between Cracks = " : Timebtwc : " minutes";
                                 }
                      
                      IF M1S("Unload") > 0
                         LIMIT 1 {
                                  SET Loadt = M1S("Load");  
                                  SET Unloadt = M1S("Unload");
                                 ALERT "Unload time = " : Unloadt;
                                 LOG "Unload time = " : Unloadt;
                                 LOG "Load time = " : Loadt;
                                  SET Timebtwc = ((Unloadt-Loadt)/60);
                                  LOG "Unload Temp = " : M1D("Unload") : "C";
                                  LOG "Total Roast Time = " : Timebtwc : " minutes";
                                  ALERT "Total Roast Time = " : Timebtwc : " minutes";
                                 }
                      
                      
                      # Alert - First crack should happen soon
                      if M1D_NOW > 195
                         LIMIT 3
                            BEEP;

                      Comment


                      • #12
                        Re: USB Temperature Data Logger - RML (Roast Monitor Language)

                        Nice work guys, just ran a test profile on the KKTO empty to see how it works in practise.

                        To save my hungover head from trying to work it out, can someone post Grahams default rml with all times in minutes? At the moment some of it logs/alerts in seconds and some in minutes, I would like it to all display in minutes.

                        EDIT - Its OK! Got my head around it, attached is the default file with all times set to display and log in minutes.

                        (edit... put the RML in the code tag below so others can read it without downloading) -- Andy


                        Code:
                        # Default.rml file including:
                        # Calculating and logging the difference between 1st & 2nd Crack and Total Roast time since "Load".
                        # Note: Remove the "#" characters to provide more verbose Alerts and Logging of the values
                        #
                        # V4 06/05/2011 - GrahamK
                        # V5 18/08/2011 - maca55 - minor mods for RM v2.33 support, first crack warning added
                        #
                        
                        LIMIT 1 {
                                  LOG " ";
                                  LOG "default.rml V5 13/08/2011 loaded";
                                  LOG "===============================================================================";
                                  LOG " ";
                                }
                        
                        IF M1S("Second Crack") > 0
                           LIMIT 1 { 
                                    LOG "Beans Loaded at Temp = " : M1D("Load") : "C";
                                    SET FirstC = M1S("First Crack")/60;
                                    SET SecondC = M1S("Second Crack")/60;
                                   ALERT "Second Crack time = " : SecondC : " minutes";
                                   LOG "First Crack time = " : FirstC : " minutes";
                                   LOG "Second Crack time = " : SecondC : " minutes";
                                    SET Timebtwc = (SecondC-FirstC);
                                    LOG "First Crack Temp = " : M1D("First Crack") : "C";
                                    LOG "Second Crack Temp = " : M1D("Second Crack") : "C";
                                    LOG "Time Between Cracks = " : Timebtwc : " minutes";
                                    ALERT "Time Between Cracks = " : Timebtwc : " minutes";
                                   }
                        
                        IF M1S("Unload") > 0
                           LIMIT 1 {
                                    SET Loadt = M1S("Load")/60;  
                                    SET Unloadt = M1S("Unload")/60;
                                   ALERT "Unload time = " : Unloadt : " minutes";
                                   LOG "Unload time = " : Unloadt : " minutes";
                                   LOG "Load time = " : Loadt : " minutes";
                                    SET Timebtwc = (Unloadt-Loadt);
                                    LOG "Unload Temp = " : M1D("Unload") : "C";
                                    LOG "Total Roast Time = " : Timebtwc : " minutes";
                                    ALERT "Total Roast Time = " : Timebtwc : " minutes";
                                   }
                        
                        
                        #Alert - First crack should happen soon
                        if M1D_NOW > 195
                           LIMIT 3
                              BEEP;


                        Comment


                        • #13
                          Re: USB Temperature Data Logger - RML (Roast Monitor Language)

                          Great to see that the programs are starting to become collaborative.

                          If anyone is interested I have attached the current defult rml that I use, which has been made compatible with v2.33. It calculates roughly the same times etc, but was designed to produce a more streamlined log of the roasts for a session which I can then save and/or print. It also allows for an input to be provided prior to hitting "Load" which will then include the bean origin and in my case the name of the Roaster program for documentation. These will need to be of course adapted for your own use.

                          Type and Enter the origin code in the "Comments" field after the "Go" and before the "Load".

                          It does not have the warning that galumay has added to the previous one yet.

                          GrahamK


                          (edit... put the RML in the code tag below so others can read it without downloading) -- Andy

                          Code:
                          # Default.rml file including:
                          # Calculating and logging the difference between 1st & 2nd Crack and Total Roast time since "Load".
                          #
                          # V9 03/08/2011 - GrahamK
                          #
                          
                          LIMIT 1 {
                                    LOG " ";
                                    LOG "default.rml V9 03/08/2011 loaded";
                                    LOG "===============================================================================";
                                    LOG " ";BEEP;
                                    SET origin = "A Region of origin was not identified";
                                    SET Prog  = "Program Not identified";
                                    ALERT "Before pressing Load Set Bean Origin to one of SA , CA , AF , IN , AS , OZ , IS";
                                  }
                          
                          IF M1S("Load") = 0 {
                            
                                    IF origin = "A Region of origin was not identified"
                                      {
                                      IF M1S("SA") > 0
                                        {
                                         SET origin = "Region of Origin: South America";
                                         SET Prog = "AD1";
                                        }
                                      ELSE
                                          IF M1S("CA") > 0
                                            {
                                             SET origin = "Region of Origin: Central America";
                                             SET Prog = "AD1";
                                            }
                                          ELSE 
                                              IF M1S("AF") > 0
                                                {
                                                 SET origin = "Region of Origin: Africa";
                                                 SET Prog = "AD2";
                                                }
                                              ELSE
                                                  IF M1S("IN") > 0
                                                    {
                                                     SET origin = "Region of Origin: Indonesia";
                                                     SET Prog = "AD2";
                                                    }
                                                  ELSE
                                                      IF M1S("AS") > 0
                                                        {
                                                         SET origin = "Region of Origin: Asia";
                                                         SET Prog = "AD2";
                                                        }
                                                      ELSE
                                                          IF M1S("OZ") > 0
                                                            {
                                                             SET origin = "Region of Origin: Australia";
                                                             SET Prog = "AD1";
                                                            }
                                                           ELSE
                                                              IF M1S("IS") 
                                                                {
                                                                 SET origin = "Region of Origin: Islands";
                                                                 SET Prog = "AD1";
                                                                }
                                      }
                                            }
                          ELSE
                              LIMIT 1 {
                                       ALERT origin : " - Roaster Prog : " : Prog; LOG origin : " - Roaster Prog : " : Prog; LOG " "; BEEP;
                                      }
                           
                          
                          IF M1S("Second crack") > 0
                             LIMIT 1 { 
                                      LOG "Load time           = " : (M1S("Load")/60) : " min : Load Temp         = " : M1D("Load") : " C";            
                                      SET FirstC = M1S("First crack");
                                      SET SecondC = M1S("Second crack");
                          #           ALERT "Second Crack time   = " : SecondC/60;
                                      LOG "First Crack  time   = " : (FirstC)/60 : " min : First Crack Temp  = " : M1D("First crack") : " C";
                                      LOG "Second Crack time   = " : (SecondC)/60 : " min : Second Crack Temp = " : M1D("Second crack") : " C";
                                      LOG " ";
                                      SET Timebtwc = ((SecondC-FirstC)/60);
                                      LOG "Time Between Cracks = " : Timebtwc : " min";
                                      ALERT "Time Between Cracks = " : Timebtwc : " min";
                                     }
                          
                          IF M1S("Unload") > 0
                             LIMIT 1 {
                                      SET Loadt = M1S("Load");  
                                      SET Unloadt = M1S("Unload");
                          #           ALERT "Unload time         = " : Unloadt/60;
                                      SET Timebtwc = ((Unloadt-Loadt)/60);
                                      LOG "Total Roast Time    = " : Timebtwc : " min";
                                      LOG " ";
                                      LOG "Unload time         = " : (Unloadt)/60 : " min : Unload Temp       = " : M1D("Unload") : " C";
                                      LOG " ";
                                      ALERT "Total Roast Time           = " : Timebtwc : " min";
                                     }

                          Comment


                          • #14
                            Re: USB Temperature Data Logger - RML (Roast Monitor Language)

                            I have been thinking about having a means of selecting the beans used in the roast and logging them. Not hard to make a list of available beans in say Notepad and then script to select and log bean varieties prior to load.

                            Grahams idea with the selection of origins got me inspired with the idea of logging the beans being roasted.

                            At this stage I am thinking it would need a prompt to select, then maybe manually copy and paste in the bean types, anyone who is interested in the idea is welcome to provide me with some coding inspiration!

                            EDIT - Got it working, its a bit clunky but it logs my blend. Copy attached for those interested.

                            (edit... put the RML in the code tag below so others can read it without downloading) -- Andy

                            Code:
                            # Default.rml file including:
                            # Calculating and logging the difference between 1st & 2nd Crack and Total Roast time since "Load".
                            # Note: Remove the "#" characters to provide more verbose Alerts and Logging of the values
                            
                            
                            LIMIT 1 {
                                      LOG " ";
                                      LOG "default_002-3.rml 16/08/2011 loaded";
                                      LOG "===============================================================================";
                                      LOG " ";BEEP;
                                      SET blend = "A Blend was not identified";
                                      
                                      ALERT "Before pressing Load Set Bean blend to one of A , B , C , D , E , F , G";
                                    }
                            
                            IF M1S("Load") = 0 {
                              
                                      IF blend = "A Blend was not identified"
                                        {
                                        IF M1S("A") > 0
                                          {
                                           SET blend = "Peru Ceja de Selva Estate, Nicuragua La Gloria Las Brisas, Ethiopian Ghimbi, Sumatra Sigararutang";
                                           
                                          }
                                        ELSE
                                            IF M1S("B") > 0
                                              {
                                               SET blend = "Peru Ceja de Selva Estate, Santo Domingo Cibao Altura AA , Malawi Nyika AA, PNG Kone Ka";
                                              
                                              }
                                            ELSE 
                                                IF M1S("C") > 0
                                                  {
                                                   SET blend = "blank";
                                                  
                                                  }
                                                ELSE
                                                    IF M1S("D") > 0
                                                      {
                                                       SET blend = "blank";
                                                      
                                                      }
                                                    ELSE
                                                        IF M1S("E") > 0
                                                          {
                                                           SET blend = "blank";
                                                          
                                                          }
                                                        ELSE
                                                            IF M1S("F") > 0
                                                              {
                                                               SET blend = "blank";
                                                               
                                                              }
                                                             ELSE
                                                                IF M1S("G") 
                                                                  {
                                                                   SET blend = "blank";
                                                                  
                                                                  }
                                        }
                                              }
                            ELSE
                                LIMIT 1 {
                                         ALERT "Blend = " : blend;
                                         LOG "Blend = " : blend;  
                                              BEEP;
                                        }
                            
                            IF M1S("Second Crack") > 0
                               LIMIT 1 { 
                                        LOG "Beans Loaded at Temp = " : M1D("Load") : "C";
                                        SET FirstC = M1S("First Crack")/60;
                                        SET SecondC = M1S("Second Crack")/60;
                                       ALERT "Second Crack time = " : SecondC : " minutes";
                                       LOG "First Crack time = " : FirstC : " minutes";
                                       LOG "Second Crack time = " : SecondC : " minutes";
                                        SET Timebtwc = (SecondC-FirstC);
                                        LOG "First Crack Temp = " : M1D("First Crack") : "C";
                                        LOG "Second Crack Temp = " : M1D("Second Crack") : "C";
                                        LOG "Time Between Cracks = " : Timebtwc : " minutes";
                                        ALERT "Time Between Cracks = " : Timebtwc : " minutes";
                                       }
                            
                            IF M1S("Unload") > 0
                               LIMIT 1 {
                                        SET Loadt = M1S("Load")/60;  
                                        SET Unloadt = M1S("Unload")/60;
                                       ALERT "Unload time = " : Unloadt : " minutes";
                                       LOG "Unload time = " : Unloadt : " minutes";
                                       LOG "Load time = " : Loadt : " minutes";
                                        SET Timebtwc = (Unloadt-Loadt);
                                        LOG "Unload Temp = " : M1D("Unload") : "C";
                                        LOG "Total Roast Time = " : Timebtwc : " minutes";
                                        ALERT "Total Roast Time = " : Timebtwc : " minutes";
                                       }
                            
                            
                            #Alert - First crack should happen soon
                            if M1D_NOW > 195
                               LIMIT 3
                                  BEEP;

                            Comment


                            • #15
                              Re: USB Temperature Data Logger - RML (Roast Monitor Language)

                              I roasted a batch yesterday with the .rml file I have modified, I have attached an excerpt from the log and a copy of the graph to show the results. (also played with the heat slider - what the %$&* does it do??)



                              Comment

                              Working...
                              X