13 Replies Latest reply on Jan 17, 2019 12:33 AM by mr.white

    Calculation in Open Labs

    mr.white

      Hello,

       

      I had a fallow up question, to my previous post.

       

       

      Calculation in Open Labs

       

      I want to take the Factor ( 1.96 ) * =(SumAmt)

      1.97 * 79.292 = 156.2

      How to calculate the Factor = (CurrentInjection.AllPeaksAndGroupsByName("Propanol").First().Compound_Area)/(CurrentInjection.AllPeaksAndGroupsByName("Ethanol").First().Compound_Area)

       

      How to calculate the Amount ( =SumAmt)

       

      The problem is that the first Calculation I made with the custom calculator.

      The second I used the expression.

       

      Is there any way to solve this problem ?

       

      Thank you in advance

        • Re: Calculation in Open Labs
          camelia

          I think you could create a second custom calculation (Sum) to calculate the sum of propanol and ethanol by substituting Compound_Area with Compound_Amount and use + instead of / Then create a further custom calculation to calculate Factor * Sum. You can get and use previous custom calculations in further calculations if they are in the same custom calculation file so you could get Factor and Sum and use these in the final calculation.  Alternatively,  with careful use of brackets you could combine all 3 custom calculations into 1 custom calculation. I am away from the PC and can't remember exactly how to navigate to GetCC within the custom calculator (Injection Scope and the names of the CC Factor and Sum are the identifiers) but could probably find it for you tomorrow and confirm the suggested approach.

          • Re: Calculation in Open Labs
            mr.white

            Hello Pierre,

             

            Im still testing it.

             

            I keep you updated

             

            Regards

            White

              • Re: Calculation in Open Labs
                mr.white

                Ok I tried... but I got lost in the process.

                 

                The first Calculation give me the result. 1.92

                 

                I need to multiply this value with the Expression =(SumAmt) ( This value changes every run )

                 

                Its a factor we selected to see if the run is within the specifications.

                  • Re: Calculation in Open Labs
                    ir_nerd

                    Hello mr.white,

                     

                    Yes, I understand. Your ratio is an injection constant. You can use that constant in the other line using the identifier:

                    As Camelia suggested, you can create a second line, here called "SumAmount":

                     

                    (CurrentInjection.AllPeaksAndGroupsByName("Propanol").First().Compound_Amount) + (CurrentInjection.AllPeaksAndGroupsByName("Ethanol").First().Compound_Amount)

                     

                    2019-01-16_11-19-35.png

                     

                    And then use the 2 first lines in a 3rd line using the identifiers:

                    Diffusion * SumAmount

                     

                    2019-01-16_11-28-22.png

                     

                    I was not sure about the exact formula you want to have.

                    Let me know if that helps.

                    Pierre

                • Re: Calculation in Open Labs
                  mr.white

                  Hello,

                   

                  Thank you very much for the fast reply.

                  I will immediately check it.

                   

                  White

                  • Re: Calculation in Open Labs
                    mr.white

                    Ok I created the Calculation in CC.

                    Saved the file.

                     

                    Linked it to my processing method.

                    Reprocessed all Data ==> Saved all Results

                    Added the data from Fields/Injection/CustomCalculationResults

                     

                    Why it say Diffusion. It supposed to be Faktor.

                     

                    Can someone please tell me what I did wrong,

                     

                    Thank you

                    • Re: Calculation in Open Labs
                      mr.white

                      Hello,

                       

                      Perfect it worked.

                      Last question.

                      Did you lean all this in the "Custom Calculator" practice from Agilent. I saw they got something esp for this.

                       

                      It look nearly impossible without programming skill. I am very very happy that Agilent support their customer in this way.

                       

                      Is this OpenLabs 2.4 that you are using ?

                       

                      If you should describe in 1 Sentence... what´s the best changes compared to 2.3

                       

                      White

                        • Re: Calculation in Open Labs
                          ir_nerd

                          Hello mr.white,

                           

                          I am an organic (medicinal) chemist from Background, with zero IT/programming training.

                          I learned many by practicing even if I had an initial training which probably helped me to understand some basics about this new tool. But training is one thing.. Applying this is another.  At least from my side, my brain is made in a way I need to be facing my challenges and use the try and error approach to integrate new things But I have the chance to have a lot of exposure to it.

                          Agilent provides also both Webinars and onsite training. It can help as a good starting point.

                           

                          Here is few hints I always use to find a solution:

                               1. FI button:

                                   Browsing the How To, searching for a key word, or these two chapters which are very useful (for Custom Calculator and Reporting):

                                   How To > OpenLab CDS > Report Template Editor > Dictionary > Fields used in OpenLab CDS     -      This is the fields definition

                                   How To > OpenLab CDS > Report Template Editor > Dictionary > Enumerations     -      This is the enumeration you can use for filters

                           

                               2. Use the examples provided in the custom calculations to edit your expressions:

                                   2019-01-16_19-58-01.png

                                   Or the examples Agilent provides in the installer media under: <INSTALLER> \\Setup\Tools\Support\UCL

                                   These can be very helpful to see how to build Expression and also a complete calculation edition workflow.

                           

                               4. For sure, this community is more than helpful... Sharing questions, experiences and projects is the best way to all work in one direction, and grow our expertise together. I am impress to see how good is the communication here on the Agilent Community. Thank you all of you for that !!!

                           

                               3. Both reporting and custom calculations uses common VB.net languages (and LinQ for the Custom Calculator). There are good references on the web.

                           

                          Regards,

                          Pierre

                          1 person found this helpful
                            • Re: Calculation in Open Labs
                              mr.white

                              Hello Pierre,

                               

                              Thank you and everyone else in this community.

                               

                              Tomorrow is my last day in the company I developed the system for them.

                              In total I can say that the program is very powerful , fast, and secure. It has many options available. Especially the server version.

                              But its not user friendly. But that's good. It has just 2 many options for the average user.

                              I think I made it user friendly. I setup projects which have limited access to a group of people who use the system and another group who maintenance the system. All Reports are linked to the processing method and also a CSV is created for our LIMS system.

                              I started from 0. Never used a GC before. But I worked with Chemstation on HPLC Systems. Also ICP-MS with Mass Hunter.

                              It was a very long way.

                               

                               

                              But what I really want to say is:

                               

                              Thank you all, for helping to archive my goal.

                              You are just amazing. Every single question you was able to answer.

                              Even the very specific one.