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

📄 acph_h.h

📁 SERCOSII卡驱动,通过该驱动程序可以在windowXp与RTX环境下运行自己编写的数控软件实现对数控设备的驱动。
💻 H
字号:
#ifndef ACPH_H
#define ACPH_H

typedef struct
{
  // Max. Anzahl Konfiguration A-2(Bytes) 
  USHORT usAccessRing;
  USHORT usControl;
  USHORT usData[64];
}T_CYC_DATA;

typedef struct
{

  char ACPH_CNL[20];//ACPH SharedMemory
  char ACPH_FLAG[20];
  char ACPH_BUSY[20];
  char ACPH_READY[20];
  char CYCLE_DATA_MDT[20];
  char CYCLE_DATA_AT[20];
  char DIAG_FLAG[20];
  char DIAG_CNL[20];//Diag SharedMemory
  char REAL_CNL[20];//SyncData Semaphore
  char SOFT_SYNC[20];
  char SYST_CNL[20];//syst sharedMemory
  char SYST_FLAG[20];
  char SYST_BUSY[20];
  char SYST_READY[20];
 } T_IPC_NAMES;

typedef struct
{
  USHORT          drv_nbr;    /* Drive number */
  USHORT          usRingIdx;  /* Ring-Index */ 
  ULONG      	  ident_nbr;  /* Ident. number */
  USHORT          element;    /* Code for requested data block element */
  USHORT          rd_wrt;     /* read=0   write=1 */
  BOOL			  bSinglePara;/*single parameter =TRUE  else =FALSE*/		  
  USHORT  	      size;       /* Data length in words */
  short           *data;      /* Variable Daten bei read */
  short           vdata[0x7FFF];/* Variable Daten bei write */
  ULONG           ldata;      /* word/long data */
  ULONG           attribute;  /* Attrribute*/
  USHORT  	      srv_cont_nbr;	/* actual service container number 	*/
  SHORT			  ret;	/*return value */
  USHORT		  NCsvch_HMIsvch;/* NCSVCH=0   HMISVCH=1 */
}
SERC_ARGS_t;

typedef struct
{
  DWORD  dwDiagnosestatus;    /* Aktuelle Fehlercode */
  USHORT usZustandsklasse_1;  /* S-0-0011 */
  USHORT usDiagnosenummer;    /* S-0-0390 */
  USHORT usDiagnose_laenge;   /* Laenge von Diagnosetext */
  char   chDiagnosetext[60];  /* S-0-0095 */
} DIAGNOSE;

typedef struct
{
	USHORT SYST_TYPE;
	char  chData[64];
	USHORT usData;
} SYST_t;

#define PAR_LESEN               (0)     /* Lesezugriff auf einen Parameter  */
#define PAR_SCHREIBEN           (1)     /* Schreibzugriff auf einen Param.  */
#define NC_SVCH               (0)     /* deal with the parameters through NC service channel  */
#define HMI_SVCH           (1)      /* deal with the parameters through HMI service channel  */
//parameter handler task
#define OK              (0x00L)         /* Null: Alles in Ordnung - o.k.    */
#define NOT_OK          (0x01L)         /* Ungleich Null: Nicht in Ordnung  */
	/* syst type of system channle */
#define CLEAR_ERROR				(0)
#define CHANGE_PHASE			(1)
#define SAVE_SYSTEM_PARA		(2)
#define CLEAR_ALL_ERRORS		(3)
#define SET_LIFECOUNTER_DIF		(4)
#define GET_PHASE				(5)
#define GET_DIAG_MESSAGE		(6)

USHORT Read_A_Name(USHORT	usParaNum,char*	pchName);
USHORT Read_A_Attribute(USHORT	usParaNum,ULONG* pulAttribute);
USHORT Read_A_Unit(USHORT	usParaNum,char*	pchUnit);
USHORT Read_A_Minimum(USHORT	usParaNum,ULONG* pulMinimum);
USHORT Read_A_Maximum(USHORT	usParaNum,ULONG* pulMaximum);
USHORT Read_A_Parameter(USHORT usParaNum,USHORT usDriveAddr,ULONG* pulData);
USHORT Write_A_Parameter(USHORT usParaNum,USHORT usDriveAddr, ULONG ulData);

USHORT Read_Y_Name(USHORT	usParaNum,char*	pchName);
USHORT Read_Y_Attribute(USHORT	usParaNum,ULONG* pulAttribute);
USHORT Read_Y_Unit(USHORT	usParaNum,char*	pchUnit);
USHORT Read_Y_Minimum(USHORT	usParaNum,ULONG* pulMinimum);
USHORT Read_Y_Maximum(USHORT	usParaNum,ULONG* pulMaximum);
USHORT Read_Y_Parameter(USHORT usParaNum, ULONG* pulData);
USHORT Write_Y_Parameter(USHORT usParaNum, ULONG ulData);

USHORT Read_S_Name(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,char*	pchName);
USHORT Read_S_Attribute(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,ULONG* pulAttribute);
USHORT Read_S_Unit(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,char*	pchUnit);
USHORT Read_S_Minimum(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,ULONG* pulMinimum);
USHORT Read_S_Maximum(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,ULONG* pulMaximum);
USHORT Read_S_Parameter(USHORT usParaSet,USHORT usParaNum,USHORT usDriveAddr, ULONG* pulData);
USHORT Write_S_Parameter(USHORT usParaSet,USHORT usParaNum,USHORT usDriveAddr, ULONG ulData);

USHORT Read_P_Name(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,char*	pchName);
USHORT Read_P_Attribute(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,ULONG* pulAttribute);
USHORT Read_P_Unit(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,char*	pchUnit);
USHORT Read_P_Minimum(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,ULONG* pulMinimum);
USHORT Read_P_Maximum(USHORT usParaSet,USHORT	usParaNum,USHORT usDriveAddr,ULONG* pulMaximum);
USHORT Read_P_Parameter(USHORT usParaSet,USHORT usParaNum,USHORT usDriveAddr, ULONG* pulData);
USHORT Write_P_Parameter(USHORT usParaSet,USHORT usParaNum,USHORT usDriveAddr, ULONG ulData);
//synchronize NC access. The NC program will be trigered by the function
ULONG Synch_Cycle_Data( HANDLE synch );
ULONG Init_Sync(HANDLE * synch);
//synchronize NC access. After the NC access ,the function give a message to SERCANS_ISR to triger MDT copy
ULONG Trigger_Lifecounter( HANDLE Synch);
ULONG Init_Lifecounter(HANDLE * synch);
// Cyclic data channel
ULONG Open_MDT_Channel( T_CYC_DATA** spCylMdtData, HANDLE* hpMdtData);
ULONG Open_AT_channel( T_CYC_DATA** spCylAtData, HANDLE* hpAtData);
//system channel
ULONG ClearError( void );
ULONG ChangePhase( USHORT usNewPhase );
ULONG SaveSystemParameter(void);
ULONG ClearAllErrors( void );
ULONG SetLifecounterDif(USHORT usDifNum);
ULONG GetPhase( USHORT *usActPhase);
ULONG GetDiagMessage( char *pDiagMessage);
#endif

⌨️ 快捷键说明

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