/// <summary>
        /// Calculate the ADC clock frequency as a expression evaluator method.
        /// </summary>
        /// <param name="exprFuncName">Name of the function.</param>
        /// <param name="args">arguments to the function</param>
        /// <param name="typeConverter">Converts types to strings</param>
        /// <returns></returns>
        object AdcClockFrequency(string exprFuncName, object[] args, ICyExprEvalArgs_v2 custArgs,
                                 ICyExprTypeConverter typeConverter)
        {
            if (args.Length != 3) // How many args do you have?
            {
                // TODO :new CyCustErr("The method "+ exprFuncName + " requires __ paramters");
                return(30720000);
            }
            else
            {
                uint resolution     = typeConverter.GetAsUInt(args[0]);
                uint sampleRate     = typeConverter.GetAsUInt(args[1]);
                uint conversionMode = typeConverter.GetAsUInt(args[2]);

                // Call the actual frequency with the given parameters
                uint theFreq = SetClock(resolution, sampleRate, conversionMode);
                return(theFreq);
            }
        }
        object GetVDDA(string exprFuncName, object[] args, ICyExprEvalArgs_v2 custArgs,
                       ICyExprTypeConverter typeConverter)
        {
            double m_systemVdda = 5.0;

            try
            {
                if (custArgs.InstQuery != null)
                {
                    if (custArgs.InstQuery.VoltageQuery != null)
                    {
                        m_systemVdda = custArgs.InstQuery.VoltageQuery.VDDA;
                    }
                }
            }
            catch
            {
                m_systemVdda = 5.0;
            }
            return(m_systemVdda);
        }
 object GetVDDA(string exprFuncName, object[] args, ICyExprEvalArgs_v2 custArgs,
                ICyExprTypeConverter typeConverter)
 {
     double m_systemVdda = 5.0;
     try
     {
         if (custArgs.InstQuery != null)
         {
             if (custArgs.InstQuery.VoltageQuery != null)
             {
                 m_systemVdda = custArgs.InstQuery.VoltageQuery.VDDA;
             }
         }
     }
     catch
     {
         m_systemVdda = 5.0;
     }
     return m_systemVdda;
 }
        /// <summary>
        /// Calculate the ADC clock frequency as a expression evaluator method.
        /// </summary>
        /// <param name="exprFuncName">Name of the function.</param>
        /// <param name="args">arguments to the function</param>
        /// <param name="typeConverter">Converts types to strings</param>
        /// <returns></returns>
        object AdcClockFrequency(string exprFuncName, object[] args, ICyExprEvalArgs_v2 custArgs, 
                                 ICyExprTypeConverter typeConverter)
        {
            if (args.Length != 3) // How many args do you have?
            {
                // TODO :new CyCustErr("The method "+ exprFuncName + " requires __ paramters");
                return 30720000;
            }
            else
            {

                uint resolution = typeConverter.GetAsUInt(args[0]);
                uint sampleRate = typeConverter.GetAsUInt(args[1]);
                uint conversionMode = typeConverter.GetAsUInt(args[2]);

                // Call the actual frequency with the given parameters
                uint theFreq = SetClock(resolution, sampleRate, conversionMode);
                return theFreq;
            }
        }