⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pb_fmb.h

📁 profibus dp主站于从站通信
💻 H
📖 第 1 页 / 共 2 页
字号:


/*****************************************************************************/
/*                                                                           */
/*                                SOFTING AG                                 */
/*                        Richard-Reitzner-Allee 6                           */
/*                              D-85540 Haar                                 */
/*                      Phone: (++49)-(0)89-45656-0                          */
/*                      Fax:   (++49)-(0)89-45656-399                        */
/*                                                                           */
/*                    Copyright (C) SOFTING AG 1995-2007                     */
/*                            All Rights Reserved                            */
/*                                                                           */
/*****************************************************************************/
/*****************************************************************************/
/*                  FMB-USER-INTERFACE DEFINES and TYPES                     */
/*                                                                           */
/*  Filename    : PB_FMB.H                                                   */
/*  Version     : 5.21.0.00.release                                          */
/*  Date        : 27-February-1998                                           */
/*  Author      : SOFTING AG                                                 */
/*                                                                           */
/*                                                                           */
/*  Description : This file contains the types and defines of the Fieldbus-  */
/*                Basic Management User-Interface                            */
/*****************************************************************************/

#ifndef __PB_FMB__
#define __PB_FMB__

#pragma warning (disable : 4103)     /* used #pragma pack to change alignment */
#ifdef WIN32
#pragma pack(push,2)
#else
#pragma pack(2)
#endif
#pragma warning (default : 4103)


/*****************************************************************************/
/***     FMB service identifier                                            ***/
/*****************************************************************************/
#define FMB_SET_VALUE             15
#define FMB_READ_VALUE            16
#define FMB_LSAP_STATUS           17
#define FMB_FM2_EVENT             19
#define FMB_RESET                 20
#define FMB_EXIT                  21
#define FMB_SET_BUSPARAMETER      22
#define FMB_READ_BUSPARAMETER     24
#define FMB_VALIDATE_MASTER       25
#define FMB_GET_LIVE_LIST         26
#define FMB_SET_CONFIGURATION     27

#define FMB_EXCEPTION             28

/*****************************************************************************/
/***     FMB data structures                                               ***/
/*****************************************************************************/

/*****************************************************************************/
/* FMB-Configuration-Management                                              */
/*****************************************************************************/

/* VFD-Configuration ------------------------------------------------------- */
typedef struct _T_FMB_CONFIG_VFD
{
  USIGN16     max_no_vfds;                           /* max. number of VFD's */
  USIGN16     max_no_obj_descr;            /* max. number of OD object descr.*/
  USIGN8      max_obj_name_length;            /* max. size of OD object name */
  USIGN8      max_obj_ext_length;        /* max. size of OD object extension */
} T_FMB_CONFIG_VFD;


/* --- CRL-Configuration --------------------------------------------------- */
typedef struct _T_FMB_CONFIG_CRL
{
  USIGN16     max_no_fal_sdbs;                    /* max. number of FAL-SDBs */
  USIGN16     max_no_fdl_sdbs;                    /* max. number of FDL-SDBs */
  USIGN16     max_no_data_buffer;              /* max. number of PDU buffers */
  USIGN16     max_no_api_buffer;               /* max. number of API buffers */
  USIGN16     max_no_poll_entries;       /* max. number of poll list entries */
  USIGN16     max_no_subscr_entries;   /* max. number of subscr.list entries */
  PB_BOOL     resrc_check;                                 /* for future use */
  USIGN8      max_no_parallel_req;                         /* for future use */
  USIGN8      max_no_parallel_ind;                         /* for future use */
  USIGN8      dummy;                                       /* alignment byte */
} T_FMB_CONFIG_CRL;

/* Notes on T_FMB_CONFIG_CRL: ------------------------------------------------

component 'max_no_subscr_entries' is of significance for PROFIBUS-PA only
component 'resrc_check' is introduced for future use - for version 5.10
           set "resrc_check = PB_TRUE;"
component 'max_no_parallel_req' is introduced for future use - for
           version 5.10 set "max_no_parallel_req = 0;"
component 'max_no_parallel_ind' is introduced for future use - for
           version 5.10 set "max_no_parallel_ind = 0;"

end of notes on T_FMB_CONFIG_CRL ------------------------------------------ */


/* DP-Configuration -------------------------------------------------------- */
typedef struct _T_FMB_CONFIG_DP
{
  USIGN8      max_number_slaves;       /* maximum number DP Slaves supported */
  USIGN8      max_slave_output_len;      /* max. length of slave output data */
  USIGN8      max_slave_input_len;        /* max. length of slave input data */
  USIGN8      max_slave_diag_len;           /* max. length of one diag entry */
  USIGN16     max_slave_diag_entries;  /* max. number entries in diag buffer */
  USIGN16     max_bus_para_len;          /* max. length of bus parameter set */
  USIGN16     max_slave_para_len;      /* max. length of slave parameter set */
} T_FMB_CONFIG_DP;


/* FDLIF-Configuration ----------------------------------------------------- */
typedef struct _T_FMB_CONFIG_FDLIF
{
  USIGN8      send_req_credits;  /* max. number of send credits for SDA and SDN services */
  USIGN8      srd_req_credits;   /* max. number of send credits for SRD services */
  USIGN8      receive_credits;             /* max. number of receive credits */
  USIGN8      max_no_resp_saps;         /* max. number of FDL responder SAPs */
} T_FMB_CONFIG_FDLIF;


/* SM7-Configuration ------------------------------------------------------- */
typedef struct _T_FMB_CONFIG_SM7
{
   USIGN16    reserved;
} T_FMB_CONFIG_SM7;


/* Fieldbus-Basic-Management-Configuration --------------------------------- */
typedef struct _T_FMB_SET_CONFIGURATION_REQ
{
  PB_BOOL             fms_active;         /* FMS and FM7 services are usable */
  PB_BOOL             dp_active;                   /* DP services are usable */
  PB_BOOL             fdlif_active;             /* FDLIF services are usable */
  PB_BOOL             sm7_active;                 /* SM7 services are usable */
  USIGN16             fdl_evt_receiver;  /* receiver of FDL events:
                                            FMB_USR,FM7_USR,DP_USR,FDLIF_USR */
  USIGN16             data_buffer_length;         /* max. size of PDU buffer */
  T_FMB_CONFIG_VFD    vfd;                   /* VFD configuration parameters */
  T_FMB_CONFIG_CRL    crl;                   /* CRL configuration parameters */
  T_FMB_CONFIG_DP     dp;                      /* DP configuration parameter */
  T_FMB_CONFIG_FDLIF  fdlif;                /* FDLIF configuration parameter */
  T_FMB_CONFIG_SM7    sm7;                   /* SM7 configuration parameters */
} T_FMB_SET_CONFIGURATION_REQ;


/*****************************************************************************/
/* FMB-Set-FDL-Busparameter                                                  */
/*****************************************************************************/

/* Baudrate ---------------------------------------------------------------- */
#define KBAUD_9_6                  0x00
#define KBAUD_19_2                 0x01
#define KBAUD_45_45                0x0B
#define KBAUD_93_75                0x02
#define KBAUD_187_5                0x03
#define KBAUD_500                  0x04
#define KBAUD_750                  0x05
#define MBAUD_1_5                  0x06
#define MBAUD_3                    0x07
#define MBAUD_6                    0x08
#define MBAUD_12                   0x09

#define AUTO_BAUD                  0xFF


/* Medium-Redundancy ------------------------------------------------------- */
#define NO_REDUNDANCY              0x00
#define BUS_A_HIGHPRIOR            0x01
#define BUS_B_HIGHPRIOR            0x02
#define REDUNDANCY                 0x03

/* In-Ring-Desired --------------------------------------------------------- */
#define IN_RING_DESIRED            PB_TRUE
#define NOT_IN_RING_DESIRED        PB_FALSE


typedef struct _T_FMB_SET_BUSPARAMETER_REQ
{
  USIGN8         loc_add;                                   /* local station */
  USIGN8         loc_segm;                                  /* local segment */
  USIGN8         baud_rate;                                     /* baud rate */

⌨️ 快捷键说明

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