meas.c

来自「HART协议编程例程」· C语言 代码 · 共 109 行

C
109
字号
/**********************************************************************
 * Function Block Factory Files Generator V 1.0                       *
 * This file was generated automatically!                             *
 * ==============================================                     *
 * DO NEVER MAKE CHANGES IN THIS FILE MANUALLY!!!                     *
 * ==============================================                     *
 * Date/Time: 31.07.00 12:54:28                                       *
 *                                                                    *
 *                                                                    *
 * Copyright 2000, Borst Automation, Fachingen                        *
 * All Rights Reserved                                                *
 *                                                                    *
 *         File Name: Meas.c                                          *
 *            Device: MyDevice                                        *
 *         Author(s):                                                 *
 *                    Walter Borst                                    *
 *                                                                    *
 * Revision History                                                   *
 * ================                                                   *
 * Jul-24-00: Function Block Created                                  *
 *                                                                    *
 **********************************************************************/

/**********************************************************************
 * The standard include                                               *
 **********************************************************************/
#define __MEAS_H__
#include "..\Meas\Meas.h"

/**********************************************************************
 * Function Block Parameters                                          *
 **********************************************************************/
/*
 * Measured Pv 1
 */
   RAM  FLOAT re_flMeasPv1;
   RAM  FLOAT rl_flMeasPv1 = 0;

/*
 * Measured Pv2
 */
   RAM  FLOAT re_flMeasPv2;
   RAM  FLOAT rl_flMeasPv2 = 0;

/*
 * Vol percent water
 */
   ROM  UINT8 co_ui8MeasPv1unit = 57;

/*
 * Material temperature
 */
   ROM  UINT8 co_ui8MeasPv2unit = 32;

/*
 * Upper Sensor Limit
 */
   ROM  FLOAT co_flMeasUpperSensLimit = 110;

/*
 * Lower Sensor Limit
 */
   ROM  FLOAT co_flMeasLowerSensLimit = 0;

/*
 * Minimum Measuring Span
 */
   ROM  FLOAT co_flMeasMinSpan = 5;

/*
 * Serial Number of Sensoring Element
 */
   ROM UINT24 co_ui24MeasSensSerNum = 4711;

/*
 * Percent
 */
   ROM  UINT8 co_ui8MeasSensLimUnit = 57;


/**********************************************************************
 * Automatically generated semaphores                                 *
 **********************************************************************/
   RAM   BOOL se_bMeasDynChanged;


/**********************************************************************
 * Standard Methods                                                   *
 **********************************************************************/

   /*IIIIIIII*/
void MeasInit(void)
   /*IIIIIIII*/
{
  /* Trigger watchdog in initialization routines, system not yet running */
  M_API_TRIGGER_WATCHDOG;
}

   /*#############*/
void MeasPutParams(void)
   /*#############*/
{ if (!bLowLevelLocked)
  { rl_flMeasPv1 = re_flMeasPv1;
    rl_flMeasPv2 = re_flMeasPv2;
    se_bMeasDynChanged = TRUE;
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?