ACC-72EX User Manual
Software setup
92
Global Header for Power PMAC Projects
This section provides example for header files which allow use of native netX variable names rather than
using Power PMAC structures. The following header file is written as generically as possible allowing
access to most used registers in System, Handshake and Communication Channels.
/***********************************************************************************************/
/* ACC-72EX Power PMAC Project Header
/* This header file provides macro definitions for most common registers in Hilsche COMX modules
/* used in ACC-72EX.
/*
/* Instructions:
/* Uncomment the related #define depending on ACC-72EX option
/*
/***********************************************************************************************/
//#define __PROFIBUS_DP_Master__
//#define __PROFIBUS_DP_Slave__
//#define __DeviceNet_Master__
//#define __DeviceNet_Slave__
//#define __CANopen_Master__
//#define __CANopen_Slave__
//#define __CC_Link_Slave__
//#define __EtherCAT_Master__
//#define __EtherCAT_Slave__
//#define __EtherNetIP_Scanner_Master__
//#define __EtherNetIP_Adapter_Slave__
#define __Open_Modbus_TCP__
//#define __PROFINET_IO_Controller_Master__
//#define __PROFINET_IO_Device_Slave__
// System Information Block Structure
#define SI_abCookie_0_ Acc72Ex[0].Data8[0]
#define SI_abCookie_1_ Acc72Ex[0].Data8[1]
#define SI_abCookie_2_ Acc72Ex[0].Data8[2]
#define SI_abCookie_3_ Acc72Ex[0].Data8[3]
#define SI_ulDpmTotalSize Acc72Ex[0].Udata32[1]
#define SI_ulDeviceNumber Acc72Ex[0].Udata32[2]
#define SI_ulSerialNumber Acc72Ex[0].Udata32[3]
#define SI_ausHwOptions_0_ Acc72Ex[0].Udata16[8]
#define SI_ausHwOptions_1_ Acc72Ex[0].Udata16[9]
#define SI_ausHwOptions_2_ Acc72Ex[0].Udata16[10]
#define SI_ausHwOptions_3_ Acc72Ex[0].Udata16[11]
#define SI_usManufacturer Acc72Ex[0].Udata16[12]
#define SI_usProductionDate Acc72Ex[0].Udata16[13]
#define SI_ulLicenseFlags1 Acc72Ex[0].Udata32[7]
#define SI_ulLicenseFlags2 Acc72Ex[0].Udata32[8]
#define SI_usNetxLicenseID Acc72Ex[0].Udata16[18]
#define SI_usNetxLicenseFlags Acc72Ex[0].Udata16[19]
#define SI_usDeviceClass Acc72Ex[0].Udata16[20]
#define SI_bHwRevision Acc72Ex[0].Data8[42]
#define SI_bHwCompatibility Acc72Ex[0].Data8[43]
#define SI_bDevIdNumber Acc72Ex[0].Data8[44]
// System Channel Information Structure
#define SCI_bChannelType Acc72Ex[0].Data8[48]
#define SCI_bSizePositionOfHandshake Acc72Ex[0].Data8[50]
#define SCI_bNumberOfBlocks Acc72Ex[0].Data8[51]
#define SCI_ulSizeOfChannel Acc72Ex[0].Udata32[13]
#define SCI_usSizeOfMailbox Acc72Ex[0].Udata16[28]
#define SCI_usMailboxStartOffset Acc72Ex[0].Udata16[29]
// Handshake Channel Information Structure
#define HCI_bChannelType Acc72Ex[0].Data8[64]
#define HCI_ulSizeOfChannel Acc72Ex[0].Udata32[17]
// Communication Channel 0 Information Structure
#define CC0I_bChannelType Acc72Ex[0].Data8[80]
#define CC0I_bChannelId Acc72Ex[0].Data8[81]
#define CC0I_bSizePositionOfHandshake Acc72Ex[0].Data8[82]