Home

CIF Device Driver

image

Contents

1. Filename Description project wrproject wrmakefile makefile Eclipse workspace files CIFVxWTest c h Test application main module CIFVxWTestFunctions c h CIF API test functions CIFVxWTestlOTransfer c h I O data transfer functions CIFVxWTestMessageTransfer c h Message transfer functions CIFVxWTestConfig c h Configuration functions Subdirectory Description CifConfiguration CIF configuration depending helper functions and definitions Filename Description CifConfiguration c h Helper functions Table 11 Directory Overview for VxWorks 6 2 CIF Device Driver VxWorks DOC021002DRVO04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Compiling the Driver 18 41 CIFVxWDriver h This is the driver definition file It offers the function prototypes from the CIFVxW driver and some general definitions It requires the standard CIF API definition file CIFUSER H and the hardware specific definitions from RCS_USER H Example include CIFVxWTest h gt Application dependent include file include Cifuser h gt Standard CIF API definitions include CifVxWDriver h gt VxWorks VxWin specific definitions cl EE erer oo la gt Copie ee sein SEET ale eE CifConfiguration h Holds the definitions for the module CifConfiguration c This one needs also the VxWorks driver definitions from CIFVxWD
2. C104IBM IBM C104IBM IBM H78 C50IBM IBM C50IBM IBM H69 Slave devices COM IBS IBS COM IBS IBS H5H C 104IBS IBS C 104IBS IBS H7A C4IBSIDR IBS C4IBSIDR IBS H7I C104IBSR IBS C104IBSR IBS H7O CIF30IBS IBS CIF30IBS IBS H3A Table 5 Supported CIF Cards InterBus Protocol 1 4 5 ASI Interface Fieldbus system ASI Device Type Firmware Name Firmware File Name Master devices COM ASM ASIM COM ASM ASIM H5L C104 ASM ASIM C104 ASM ASIM H7Q CIF50ASM ASIM CIF50ASM ASIM H6I Table 6 Supported CIF Cards AS Interface Protocol CIF Device Driver VxWorks DOC021002DRVO04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 1 4 6 Protocol 9 41 System Device Type Firmware Name Firmware File Name Protocol ASCII C30 ASC ASIM COM ASM ASIM H5L C50 ASC ASIM C104 ASM ASIM H7Q CIF50ASM ASIM CIF50ASM ASIM H6I Modnet 1N C50 M1N MODIN CIF50 M1N H60 Modbus RTU C50 MBR MODBUS CIF50 MBR H60 3964R C104 NVR 3964R CIF104 NVR H70 C30 NVR 3964R CIF30 NVR H21 C50 NVR 3964R CIF50 NVR H60 RK512 C30 RK RK512 CIF30 RK H21 C50 RK RK512 CIF50 RK H60 Table 7 Supported CIF Cards Serial Protocols CIF Device Driver VxWorks DOC021002DRVO04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 10 41 1 5 Legal Notes 1 5 1 Copyright 2002 2011
3. Hilscher Gesellschaft f r Systemautomation mbH All rights reserved The images photographs and texts in the accompanying material user manual accompanying texts documentation etc are protected by German and international copyright law as well as international trade and protection provisions You are not authorized to duplicate these in whole or in part using technical or mechanical methods printing photocopying or other methods to manipulate or transfer using electronic systems without prior written consent You are not permitted to make changes to copyright notices markings trademarks or ownership declarations The included diagrams do not take the patent situation into account The company names and product descriptions included in this document may be trademarks or brands of the respective owners and may be trademarked or patented Any form of further use requires the explicit consent of the respective rights owner 1 5 2 Important Notes The user manual accompanying texts and the documentation were created for the use of the products by qualified experts however errors cannot be ruled out For this reason no guarantee can be made and neither juristic responsibility for erroneous information nor any liability can be assumed Descriptions accompanying texts and documentation included in the user manual do not present a guarantee nor any information about proper use as stipulated in the contract or a warranted feature It cannot be
4. for DMA cards otherwise not used Number of bytes to send to the hardware Transfer will always start with offset O in the send process data image unsigned short usReceiveSize Only for DMA cards otherwise not used Number of bytes to read from the hardware Transfer will always start with offset O in the receive process data image unsigned long ulTimeout Not used Table 16 Parameter DevExchangePLCData A working test program is included The functions are located in the module CIFVxWTestlOTransfer c CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Programming 5 2 2 DevisPLCDataReady Description 31 41 DevisPLCDataReaay is used to check if a data exchange between a host an the CIF card is complete short DevIsPLCDataReady DRIVERHANDLE hDriver CIFHANDLE ICALE unsigned short pusState Parameter Type Parameter Description DRIVERHANDLE hDriver Driver handle for this device CIFHANDLE hCIF Device handle unsigned short pusstate Pointer to state buffer TRUE data transfer done FALSE data transfer active Table 17 Parameter DevisPLCDataReady CIF Device Driver VxWorks DOC021002DRVO04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Programming 5 2 3 DevGetlnfo 32 41 The function DevGetinfo offers the new selectio
5. no license for the used operating system or customer software No firmware or no data base on the device loaded Error 17 No message could be send during the timeout period given in the DevPutMessage function Using device interrupts Wrong or no interrupt selected Check interrupt on the device and in driver registration They have to be the same Interrupt already used by an other PC component Device internal segment buffer full PutMessage function not possible because all segments on the device are in use This error occurs when only PutMessage is used but not GetMessage HOST flag not set for the device No messages are taken by the device Use DevSetHostState to signal a board an application is available Error 18 No message received during the timeout period given in the DevGetMessage function Using device interrupts CIF Device Driver VxWorks DOC021002DRVO4EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Error Codes 39 41 Wrong or no interrupt selected Check interrupt on the device and in driver registration They have to be the same Interrupt already used by an other PC component The used protocol on the device needs longer than the timeout period given in the DevGetMessage function Error 20 The device needs longer than the timeout period given in the DevReset function Using device interrupts This error occurs when for example inte
6. 31 5 2 3 EE le e KEE 32 5 3 Example Program CIFVxWTest eee mean ana manea aaa ana 33 Additional Information science 34 Error Codes EE a 35 eh TO Ben reel TEEN 35 7 2 Additional Error Information cc eee ceeace eee ee eee eee nene neoane eee nea ea ea aa aaa aaa aaa aaa aaa nenne 38 8 A A 40 SCT Listot Tablesi egent a ias 40 8 2 SLISUOTRIQUIES EE 40 CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 3 41 33 eu Te EEN 41 CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 4 41 1 Introduction 1 1 About this Document Wind River VxWorks is a real time operating system RTOS and the fundamental run time component of the Tornado II embedded development platform VxWorks is flexible scalable reliable and available on all popular CPU platforms LP VxWin is a product family of the company LP Elektronik which combines the Wind River VxWorks and the Microsoft Windows operating systems on one PC The development of the Hilscher VxWorks driver CIFVxW is done by using a LP VxWin V4 2 environment running on Windows NT 4 The driver is a function library which can be called from a VxWorks application and supports CIF ISA and CIF PCI cards Please refer to section Supported CIF Cards and Fieldbus Systems which fieldbus systems and devices are curr
7. ATE_ERROR DRIVER Error in internal init state 3 DRV_READ_STATE_ERROR DRIVER Error in internal read state 4 DRV_CMD_ACTIVE DRIVER Command on this channel is active 5 DRV_PARAMETER_UNKNOWN DRIVER Unknown parameter in function occurred 6 DRV_WRONG_DRIVER_VERSION DRIVER Version is incompatible with DLL 7 DRV_PCI_SET_CONFIG_MODE DRIVER Error during PCI set run mode 8 DRV_PCI_READ_DPM_LENGTH DRIVER Could not read PCI dual port memory length 9 DRV_PCI_SET_RUN_MODE DRIVER Error during PCI set run mode 10 DRV_DEV_DPM_ACCESS_ERROR DEVICE Dual port ram not accessible yes board not found 11 DRV_DEV_NOT_READY DEVICE Not ready ready flag failed yes 12 DRV_DEV_NOT_RUNNING DEVICE Not running running flag failed yes 13 DRV_DEV_WATCHDOG_FAILED DEVICE Watchdog test failed yes 14 DRV_DEV_OS_VERSION_ERROR DEVICE Signals wrong OS version yes 15 DRV_DEV_SYSERR DEVICE Error in dual port flags 16 DRV_DEV_MAILBOX_FULL DEVICE Send mailbox is full 17 DRV_DEV_PUT_TIMEOUT DEVICE PutMessage timeout yes 18 DRV_DEV_GET_TIMEOUT DEVICE GetMessage timeout yes 19 DRV_DEV_GET_NO_MESSAGE DEVICE No message available 20 DRV_DEV_RESET_TIMEOUT DEVICE RESET command timeout yes 21 DRV_DEV_NO_COM_FLAG DEVICE COM flag not set yes 22 DRV_DEV_EXCHANGE_ FAILED DEVICE IO data exchange failed 23 DRV_DEV_EXCHANGE_TIMEOUT DEVICE IO data exchange timeout yes 24 DRV_DEV_COM_MODE_UNKNOWN DEVICE lO data mode unknown 25 DRV_DEV_FUNCTION_FAILED DEVICE Functi
8. CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Fieldbus Configuration Details 21 41 3 2 Fieldbus Startup Behaviour SyCon allows to configure the start up behaviour of a fieldbus system It can be Automatic release of the communication by the device which means the master starts the fieldbus system as soon as the card has finished its power on sequence The fieldbus becomes active and slaves are able to driver there outputs The option Controlled release of the communication by the application program can be used to prevent an automatic startup of the field bus system This enables the application to be fully initialized before starting the fieldbus In this case the application has to use the function DevSethostState HOST_READY to signal the master to start the fieldbus system SyCon settings Automatic release of the communication by the device The fieldbus system will start up as soon as the card has finished it s power on sequence Controlled release of the communication by the The start of the fieldbus system can be controlled by an application program recommended application CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Fieldbus Configuration Details 22 41 3 3 Supported Handshake Modes Handshake modes are used to control the a
9. DMA hardware unsigned short Size of the users data buffer and length of data to be read Table 15 Parameter DevgetBoardinto CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Programming 30 41 5 2 Additional API Functions In addition to the standard CIF Device Driver interface the API is extended by functions which allowing an application to directly access the I O process data image 5 2 1 DevExchangePLCData Description DevExchangePL CData works only in conjunction with DevGet nfo and DevisPLCDataReady The function only starts a data exchange between the host PC and the device CIF card No data will be copied into the I O process image of the CIF card This must be done by the application by using the I O image pointers returned from the DevGetinfo function DevisPLCDataReady is used to determine if a previously started data exchange is complete Attention During an active data transfer it is not allowed to access the I O process image and to mix this function with other DevExchangelO functions short DevExchangePLCData DRIVERHANDLE hDriver CIFHANDLE lol ilie unsigned short usSendSize unsigned short usReceiveSize unsigned long ulTimeout Parameter Type Parameter Description DRIVERHANDLE hDriver Driver handle for this device CIFHANDLE hCIF Device handle unsigned short usSendSize Only
10. Driver Do not define for VxWin INCLUDE_MMU_BASIC Driver specific Defined in or MakeDriver Only for for VxWorks target systems If defined INCLUDE_MMU_FULL driver dynamically adds the memory areas for CIF Used in CifOSDependend c CIF_TKIT Driver and Application Defined in Needed to replace the standard Win32 API function ae dee definitions with the function definitions from the CIF MakeTestProg toolkit Used in CIFUSER H CIF_TKIT_VXWORKS Driver and Application Defined in Necessary to distinguish between different ee hes operating systems in the source code e g include MakeTestFrog files etc Used in CifVxWDriver c CifVxWDriver h CifLowAPI c CifConfiguration c Table 8 Driver Settings Definitions CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 2 3 Driver Make Files 2 3 1 VxWorks 5 5 Tornado Il The compilation of the source is done by using three make files From the Tornado Il environment the project make file is used This one includes the global make file prjrules mak and depending of the project driver or test program either prjdefsdrv mak or prideftest mak Make Files Project Make Files Located in the Root Directory MakeDriver Main make to generate the driver Includes prjrules mak and prjdefsdrv mak MakeTestProg Main make to generate the test program Inclu
11. EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Error Codes 38 41 7 2 Additional Error Information This section contains more information about possible reasons to certain error numbers Error 1 The communication board is not initialized by the driver No or wrong configuration found for the given board Check the driver configuration Driver function used without calling DevOpenDriver first Error 6 The device driver version does not corresponds to the driver DLL version From version V1 200 the internal command structure between DLL and driver has changed Make sure to use the same version of the device driver and the driver DLL Error 10 Dual ported RAM DPM not accessible no hardware found This error occurs when the driver is not able to read or write to the DPM Check the BIOS setting of the PC Memory address conflict with other PC components try another memory address Check the driver configuration for this board Check the jumper setting of the board Error 11 Board is not ready This is a general error the board has a hardware malfunction Error 12 At least one task is not initialized The board is ready but not all tasks are running No data base is loaded into the device Wrong parameter that causes that a task can t initialize Use ComPro menu Online task version Error 14 No license code found on the communication board Device has
12. FA hilscher COMPETENCE IN COMMUNICATION Driver Manual CIF Device Driver VxWorks V5 5 V6 2 Hilscher Gesellschaft f r Systemautomation mbH www hilscher com DOC021002DRVOAEN Revision 4 English 2011 06 Released Public Introduction 2 41 Table of Contents 1 aie fe LU CTI ON ii A A adaa a aaa adaa eaaa uea 4 151 7 sADOUT THIS DOCUMENT Ha sie aice cet t le tat A dd 4 1 1 1 Listof Revisions i iata rea pa aa nina 4 BCE une EE e EE 5 1 3 Requirements Features and Limitations 440s0nssnnsennnnnnennnnnnnnnnnnnnnnnnannnnnnnnnnnnnnnnnnnnnnn 5 Limita io TEE 5 1 4 Supported CIF Cards Fieldbus Systems and Protocols ooooncinnnnnnnicinnnccnnncnnnccccnancnnnnrn canario 6 1 431 PROFIBUS Herera nren dein A A AE oe eee tee T acte 6 124 2 DeviceNEt coc etait Sai o Bt E OS A tata OPEL te EE e 7 143 CAN OP o 7 BET A E O ial au 8 145 A Da d rn Oda t cati da EES AE 8 1456 O 9 to Legal Notes cect sia a e a E IA a dicta 10 E GOPYFiQN te sce er ne EE 10 15 2 ImportantiNotes cascata aaa ea pa REESEN aaa aaa ai Dia a date E 3 ct aaa a ali E Ea a a ai 3 ea 10 1 5 3 Exclusion of BC TE 11 E4 EXPO n E a A e A E a TE E NEN A 11 2 Compiling the Driver sme amiini ain i arr ada du d led na ud aaa 0 du a d da iaaii 12 21 Target System Settings iii ata nee dci a d 12 2 1 1 MMU Support and Settings AAA 12 2 1 2 a oad GE e EE EE EE 12 e En E e EE 13 223 Driver Make iFileSi
13. READ_FAILED USER firmware file read failed 114 DRV_FW_INVALID_FILETYPE USER firmware file type invalid 115 DRV_FW_FILENAME_INVALID USER firmware file name not valid 116 DRV_FW_DOWNLOAD_ERROR USER firmware file download error 117 DRV_FW_FILENAME_NOT_FOUND USER firmware file not found in the internal table 118 DRV_FW_BOOTLOADER_ACTIVE USER firmware file BOOTLOADER active 119 DRV_FW_NO_FILE_PATH USER firmware file not file path 120 DRV_CF_FILE_OPEN_FAILED USER configuration file not opened 121 DRV_CF_FILE_SIZE_ZERO USER configuration file size zero 122 DRV_CF_FILE_NO_MEMORY USER not enough memory to load configuration file 123 DRV_CF_FILE_READ_FAILED USER configuration file read failed 124 DRV_CF_INVALID_FILETYPE USER configuration file type invalid 125 DRV_CF_FILENAME_INVALID USER configuration file name not valid CIF Device Driver VxWorks DOC021002DRVO04EN Revision 4 English 2011 06 Released Public O Hilscher 2002 2011 Error Codes 37 41 Value Parameter Description Hint 126 DRV_CF_DOWNLOAD_ERROR USER configuration file download error 127 DRV_CF_FILE_NO_SEGMENT USER no flash segment in the configuration file 128 DRV_CF_DIFFERS_FROM_DBM USER configuration file differs from database 131 DRV_DBM_SIZE_ZERO USER database
14. RV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Programming 28 41 5 1 1 DevinitBoard Description After an application has opened the driver with DevOpenDriver it must call Dev nitBoard The application has to supply either a driver type or a device name and a device number between 0 3 because the driver is able to handle more than one device at a time If a device is installed and running the function returns a driver and device handle These handles are necessary for all other driver function DevinitBoard is also able to check the actual firmware and configuration against given files and if they are different a download will be carried out To run the firmware check only a directory path is necessary The driver will choose the firmware file by itself according to the hardware For the configuration check a filename including the path full file name must be provided by the application short DevInitBoard unsigned short usDriverType char pszDevName unsigned short usDevNumber char pszFWFilePath char pszCFFullFileName DRIVERHANDLE pDriver CIFHANDLE pDevInstance Parameter Type Parameter Description unsigned char usDriverType Select a device by a driver type CIF_ISA 1 ISA hardware CIF_PCI 2 PCI hardware CIF_DMA 3 DMA hardware If usDriverType 0 pszDevName is used to select the device char pszDevName Device name as a
15. Rename etc I List Directories Figure 2 User Rights and Security 4 2 2 File Selection Firmware and configuration files for a specific CIF card are selected during the call to the driver function DevinitBoard Firmware files are selected only by a directory path pszFirmwareFileFolder The driver already knows the exact filename defined in CIFTKitFirmwareDef h for a given CIF device extends the given string by the name and tries to open the file To select a configuration file the driver requires the whole directory path including the name of the configuration file pszConfigurationFile Example Firmware file folder pc TestFiles Configuration file pc TestFiles ExampleConfig dbm Note DC is the VxWorks VxWin device name which is used to access the files CIF Device Driver VxWorks DOC021002DRVO4EN Revision 4 English 2011 06 Released Public Hilscher 2002 201 1 Driver Functions 26 41 4 3 Extended Configuration Checking An extended configuration check can be implemented in the application by using an external program module CIFConfiguration c This module includes functions to run a configuration check on a per slave module base Following information can be checked Station address Data type Data size Data offset in the I O process image 4 4 New I O Data Exchange Function Some of the SoftPLCs are reading there input values on the beginning of the SPS c
16. Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 7 41 1 4 2 DeviceNet Fieldbus system Device Type Firmware Name Firmware File Name DeviceNet Master devices COM DNM DNM COM DNM DNM H5F CIF30DNM DNM CIF3ODNM DNM H38 C104 DNM DNM C104 DNM DNM H7L CIF50DNM DNM CIF5ODNM DNM H68 CIF80DNM DNM CIF80DNM DNMC80 E03 Slave devices COM COS DNS COM DNS DNS H7G C104 DNS DNS C104 DNS DNS H7G CIF30DNS DNS CIF30DNS DNS H39 CIF50DNS DNS CIF50DNS DNS H6H Table 3 Supported CIF Cards DeviceNet Protocol 1 4 3 CANopen Fieldbus system Device Type Firmware Name Firmware File Name CANopen Master devices COM COM CANopen COM COM COM H5E CIF30CAN CANopen CIF3OCAN COM H36 C104 CAN CANopen C104 CAN COM H7N CIF50CAN CANopen CIF50CAN COM H66 CIF80COM CANopen CIF80COM COM E02 Slave devices COM COS COS COM COS COS H5I C104 COS COS C104 COS COS H7E CIF30COS COS CIF30COS COS H3C CIF50COS COS CIF50COS COS H6F Table 4 Supported CIF Cards CANopen Protocol CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 1 4 4 InterBus 8 41 Fieldbus system InterBus Device Type Firmware Name Firmware File Name Master devices COM IBM IBM COM IBM IBM H53 CIF30IBM IBM CIF30IBM IBM H35
17. VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Fieldbus Configuration Details 20 41 3 1 Module CIFConfiguration CIFConfiguration c is a C module which enables an application to check the own local configuration against a configuration which is already loaded on a CIF card It also includes functions for configuration dependent aspecis like reading the configured watchdog time or functions which can be used during runtime to check a fieldbus station Note These functions are not available on all CIF cards e g ASI and all serial protocols Function overview CNFisStationConfigured Check if a given station is configured CNFGetStationDescription Read the station description of a given station CNFCalculateSyconldx Create the values Slot and Idx from a SyCon configuration CNFTestModuleConfig Compare the module information against a module previously found by Slot and Idx Check values Direction DataType Offset Size CNFTestModuleConfigNoSlotldx Compare the module information only using module parameters no Slot and ldx used Check values Direction DataType Offset Size CNFIsStationInDataExchangeMode Check if station is in data exchange mode CNFGetWatchdogTime Read the watchdog time configured by SyCon CNFSwapWord Word swap function CNFSwapDword Double word swap function Table 12 Function Overview CIFConfiguration
18. ZE_ TOO LONG USER Parameter ReceiveSize too long 48 DRV_USR_SENDBUF_PTR_NULL USER Pointer to send buffer is a null pointer 49 DRV_USR_RECVBUF_PTR_NULL USER Pointer to receive buffer is a null pointer 50 DRV_DMA_TIMEOUT_CH4 DMA read IO timeout 51 DRV_DMA_TIMEOUT_CH5 DMA write IO timeout 52 DRV_DMA_TIMEOUT_CH6 DMA PCI transfer timeout 53 DRV_DMA_TIMEOUT_CH7 DMA download timeout 54 DRV_DMA_INSUFF_RES_MEM DMA Memory allocation error 70 DRV_ERR_ERROR DRIVER General error 71 DRV_DMA_ERROR DRIVER General DMA error 72 DRV_BATT_ERROR DRIVER Battery error 73 DRV_PWF_ERROR DRIVER Power failed error 80 DRV_USR_DRIVER_UNKNOWN USER driver unknown 81 DRV_USR_DEVICE_NAME_INVALID USER device name invalid 82 DRV_USR_DEVICE_NAME_UKNOWN USER device name unknown 83 DRV_USR_DEVICE_FUNC_NOTIMPL USER device function not implemented 100 DRV_USR_FILE_OPEN_FAILED USER file not opened 101 DRV_USR_FILE_SIZE_ZERO USER file size zero 102 DRV_USR_FILE_NO_MEMORY USER not enough memory to load file 103 DRV_USR_FILE_READ_FAILED USER file read failed 104 DRV_USR_INVALID_FILETYPE USER file type invalid 105 DRV_USR_FILENAME_INVALID USER file name not valid 110 DRV_FW_FILE_OPEN_FAILED USER firmware file not opened 111 DRV_FW_FILE_SIZE_ZERO USER firmware file size zero 112 DRV_FW_FILE_NO_MEMORY USER not enough memory to load firmware file 113 DRV_FW_FILE_
19. are not necessarily matching your CIF hardware Please check the source of the program which devices are currently used CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Additional Information 6 Additional Information 34 41 Please use the listed manuals if you are searching additional information xxx protocol abbreviation Manual name File name Content CIF Device Driver devdrv pdf General driver description functions and API General Definitions tke pdf Toolkit Manual Protocol Manual xxx_pre pdf General protocol information and definition Protocol Interface Manual xxx_pie paf xxx protocol abbreviation Protocol specific definitions and functions Table 19 Documentation Overview Additional Information CIF Device Driver VxWorks DOC021002DRVO04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Error Codes 7 Error Codes 7 1 List of Error Codes 35 41 The column Hint shows if there is additional error information available If Yes then see section Additional Error Information which is the next section Value Parameter Description Hint 0 DRV_NO_ERROR no error 1 DRV_BOARD_NOT_INITIALIZED DRIVER Board not initialized yes 2 DRV_INIT_ST
20. c taitsicescse E aa Dat ENEE eeh E 14 2 31 VXWorks D 5 Tomado ccoo ia bo EHI 14 2 3 2 VxWorks 6 2 ECIIPSE aa iata ami ec ae eat ea aaa i at aaa aaa ate aaa iia 14 2 4 File and Directory Overview mmm nana aaa manea aaa ana ana nana ana 15 2 41 VxWorks 5 5 suzi ceace an an EEN a da Dag ENEE o dada i da 15 PR EE elt EE 17 3 Fieldbus Configuration Details nn ana 19 3 1 Module CIFConfiguration eee eee nene nenea nenea nenea anna 20 3 2 Fieldbus Startup Behaviouri se aice it iaca shiva tiie dora i hein oala a 21 3 3 Supported Handshake Modes AAA 22 4 Driver FUNC IONS ege A e 23 41 Initialization Process m nannte 23 4 2 Firmware and Configuration File Access men eee en e e ennan 24 4 2 1 ETP Server Example iii tea io re ei i bedded nat a ti zi eel at ti ged 24 4 2 2 File Selection ze pice sata EE 25 4 3 Extended Configuration Checking nenea anemia nn ana na 26 4 4 New I O Data Exchange Functon nenea nea amana ana ana ana ana 26 5 Programming mi coaie a ai ceai dieta dez EEE E Datarea ice atata ct E ET 27 Bali Standard AP insert Area a eat aaa a atac aia af Aa ata atu Pi tbn 27 Dal DevinitBoard u cas ae gat aaa ee ee a ad al lg aa 28 5 1 2 RE TEE lee rte EG 29 5 2 Additional APl FEunctionsz ca a des a vg saat a da D AEN 30 5 2 1 Devkschangebl CGDetg 22100 ined aaa shad a pu i a at DD ada a elie dere 30 5 2 2 DevisPLCDataReady ccoo a i Da tt a d aa ba aa at a ated
21. ccess to the I O process data image between the PC Host and the CIF card Device The setting of the transfer mode is very important because it will influence the consistency of the process data and the fieldbus behaviour Transfer modes are only available on master cards The modes are configured via SyCon which offers up to six modes depending on the used CIF hardware and fieldbus system Mode Supported Bus synchronous device controlled NO Only possible on dedicated systems because the system must respond during a bus data cycle which can be less than 350 micro seconds Buffered device controlled YES No consistence uncontrolled YES Not recommended process data which are not of the type byte can be transferred inconsistent Buffered host controlled YES recommended Bus synchronous host controlled YES Not on all fieldbus systems and CIF cards available System is responsible to drive the bus Buffered extended host controlled NO Table 13 Supported Handshake Modes Note For more information about transfer modes consult the TOOLKIT manual section IO Communication with a Process Image CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Driver Functions 23 41 4 Driver Functions The following section describes the internal driver handling and new functions specially designed for some SoftPLC requirement
22. des prjrules mak and prjdefstest mak Global Make Files Located in the Subdirectory MAKE prjrules mak Global project rules compiler settings and dependencies should be used from all subprojects Used by the driver and test program prjdefsdrv mak Global settings for the driver VxWorks target and directory settings Extended compiler settings Search path settings pridefstest Global settings for the test program VxWorks target and directory settings Extended compiler settings Search path settings Table 9 Driver Make Files VxWorks 5 5 2 3 2 VxWorks 6 2 Eclipse VxWorks 6 x uses an Eclipse based integrated development environment supported by the CIFX driver V1 2xx version CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Compiling the Driver 15 41 2 4 File and Directory Overview The driver source is located in a directory named CIFVxWDriverx xxx where the x represents the driver version 2 4 1 VxWorks 5 5 Directory Overview Driver Directory CIFVxWDriverx xxx Filename Description CIFVxWDriver h Driver main header CIFVxWDriver c Driver main module CifVxW o Driver object file compiled for VxWin CifVxWTestProg o Driver test program object file compiled for VxWin MakeDriver Make file to create the driver MakeTestProg Make file to create t
23. driver needs access to the firmware and configuration files of a CIF card to carry out automatic firmware and configuration checking File access in the CifVxW driver is implemented via the standard open function of VxWorks VxWin which allows to open any pre existing device and file 4 2 1 FTP Server Example TCP IP is used by VxWorks VxWin as a standard way to communicate with other systems This example shows how to setup a FTP Server WFTPD to enable file access for the CIFVxW driver WFTPD is included in the Tornado II development environment Note FTP functionality s are only tested with LP VxWin and Windows NT running WFTPD which is included in the Tornado II environment General Security EN IV Enable Security OK M Allow Anonymous Cancel T Allow Uploads T Allow Anonymous Uploads Pre i Maximum Number of Users Each user takes at least one 5 socket at most two Timeout for inactive connections seconds o Figure 1 General Security Settings CIF Device Driver VxWorks DOC021002DRVO4EN Revision 4 English 2011 06 Released Public O Hilscher 2002 2011 Driver Functions 25 41 User Rights Security Dialog EN User Name target User target New User Delete Change Pass Home Directory IC IT Restricted to home Help Rights lt lt Rights for user target Directory E gt Remove Rights for directory V Read T Write Delete
24. ently supported by the driver 1 1 1 List of Revisions Rev Date Name Chapter Revision 1 2002 10 09 RM All Created 2 2002 11 19 RM All Review 3 2003 01 23 RM All New parameter in function DevinitBoard and DevGetBoardInfo 4 2011 06 15 RM All Added VxWorks 6 2 support ControlNet removed Table 1 List of Revisions CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 5 41 1 2 Implementation The CIFVxW driver API is based on the existing CIF device driver API for Windows The driver offers transparent access to the different devices Therefore it hides the functionality s for ISA and PCI cards The cards can be selected by the original Device Type string and a board number between 0 to 3 For better performance and easier access to the hardware the standard API functions are extended by new parameters These parameters are used to pass a driver and device handle down to the driver 1 3 Requirements Features and Limitations Requirements CIF VxWorks Driver V1 003 VxWorks V5 4 or VxWorks VxWin V4 2 for Windows NT 4 Tornado II CIF VxWorks Driver V1 200 VxWorks V6 2 Wind River Eclipse based development environment Features Automatic hardware detection for ISA and PCI hardware Device selection by name and board number All devices can be used simultaneously ISA PCI Up to fou
25. he driver test program Subdirectory Description CIFTKitx xxx Driver functions and header files Subdirectory Description CifCommon Common driver functions e g Database upload CifDPM Functions for dual port based CIF cards ISA PCI CifDMA Functions for direct memory access based CIF cards DMA CifOSDependend Operating system dependent functions CifConfiguration Support functions for applications e g configuration checking Subdirectory Description CIFVxWTest Directory containing the driver test and example program MAKE Directory containing the global make files OBJ Directory to store the object files TestFiles Directory containing test files for firmware and configuration download Table 10 Directory Overview for VxWorks 5 5 CIFVxW o Precompiled Hilscher VxWorks VxWin driver object file for VxWin CIFVxWTestProg o Precompiled driver test program for VxWin CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Compiling the Driver 16 41 CIFVxWDriver h This is the driver definition file It offers the function prototypes from the CIFVxW driver and some general definitions It requires the standard CIF API definition file CIFUSER H and the hardware specific definitions from RCS_USER H Example include CIFVxWTest h gt Application dependent include file include Cifuser h gt Standard CIF API definitions include CifVxWDriver h gt V
26. n GET CIF_PLC_DRIVER_INFO to get the pointer to the I O process image and the size of it The pointers are needed to directly access the I O process data image of a CIF card short DevGetInfo DRIVERHANDLE hDriver CIFHANDLE ACA unsigned short usFunction unsigned short usSize void pvData Parameter Type Parameter Description DRIVERHANDLE hDriver Driver handle for this device CIFHANDLE hCIF Device handle unsigned short usFunction Mode of the information to read GET_CIF_PLC_DRIVER_INFO unsigned short usSize Size of information buffer void pvData Pointer to information structure Table 18 Parameter DevGeitinfo PLC information structure typedef struct tagCIF_PLC_DRIVER_INFO void pvInput fo WOapIeeIe To aliajele Cera unsigned long ullnputSize Size of the input image void pvOutput Eeer ro licjoblie Cera s unsigned long ulOutputSize fe Salze Cie as tert maes y TASKSTATE ptTaskState fe protocol Specific Eeer CIF_PLC_DRIVER_INFO CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Programming 33 41 5 3 Example Program CIFVxWTest CIFVxWTest is an example and test program which shows the initialization of a device and how the configuration checking function from the module CifConfiguration c can be used Note The test program uses some example CIF devices which
27. on call failed 26 DRV_DEV_DPMSIZE_MISMATCH DEVICE DPM size differs from configuration 27 DRV_DEV_STATE_MODE_UNKNOWN DEVICE State mode unknown 30 DRV_USR_OPEN_ERROR USER Driver not opened device driver not yes loaded 31 DRV_USR_INIT_DRV_ERROR USER Can t connect with device 32 DRV_USR_NOT_INITIALIZED USER Board not initialized DevinitBoard not called 33 DRV_USR_COMM_ERR USER IOCTRL function failed 34 DRV_USR_DEV_NUMBER_INVALID USER Parameter DeviceNumber invalid 35 DRV_USR_INFO_AREA_INVALID USER Parameter InfoArea unknown 36 DRV_USR_NUMBER_INVALID USER Parameter Number invalid 37 DRV_USR_MODE_INVALID USER Parameter Mode invalid 38 DRV_USR_MSG_BUF_NULL_PTR USER NULL pointer assignment CIF Device Driver VxWorks DOC021002DRVO04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Error Codes 36 41 Value Parameter Description Hint 39 DRV_USR_MSG_BUF_TOO_SHORT USER Message buffer too short 40 DRV_USR_SIZE_INVALID USER Parameter Size invalid 42 DRV_USR_SIZE_ZERO USER Parameter Size with zero length 43 DRV_USR_SIZE_TOO_LONG USER Parameter Size too long 44 DRV_USR_DEV_PTR_NULL USER Device address null pointer 45 DRV_USR_BUF_PTR_NULL USER Pointer to buffer is a null pointer 46 DRV_USR_SENDSIZE_ TOO LONG USER Parameter SendSize too long 47 DRV_USR_RECVSI
28. port Phone 81 0 3 5362 0521 E Mail jp support hilscher com Korea Hilscher Korea Inc Suwon 443 734 Phone 82 0 31 695 5515 E Mail info hilscher kr Switzerland Hilscher Swiss GmbH 4500 Solothurn Phone 41 0 32 623 6633 E Mail info hilscher ch Support Phone 49 0 6190 9907 99 E Mail ch support hilscher com USA Hilscher North America Inc Lisle IL 60532 Phone 1 630 505 5301 E Mail info hilscher us Support Phone 1 630 505 5301 E Mail us support hilscher com Hilscher 2002 2011
29. r devices of the same type ISA or PCI possible Automatic firmware comparison and download during startup possible Automatic configuration comparison and download during startup possible Limitations Only device polling is supported DMA cards CIF100 not supported CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 6 41 1 4 Supported CIF Cards Fieldbus Systems and Protocols The following table shows the currently supported CIF cards fieldbus systems and protocols 1 4 1 PROFIBUS Fieldbus system Device Type Firmware Name Firmware File Name PROFIBUS Master devices CPS1 DPM DPM CPS1 DPM DPM X52 COM DPM DPM COM DPM DPM H58 COM PB PB COMBICOM PB PB H5C CIF30PB PB COMBICIF30PB PB H32 CIF30FMS PB FMS CIF30FMS FMS H33 CIF30DPM DPM CIF30DPM DPM H33 CIF104DP DPM CIF104DP DPM H73 CIF104P PB PB COMBIC104P PB PBC104P E01 C104DPMR DPM C104DPMR DPM H7B C104 PB PB COMBIC104 PB PB H7C CIF50 PB PB COMBICIF50 PB PB H62 CIF80 PB PB COMBICIF80 PB PBC80 E01 Slave devices COM DPS DPS COM DPS DPS H57 CPS1 DPS DPS CPS1 DPS DPS X51 C104 DPS DPS C104 DPS DPS H74 C104 DPS DPS C104 DPS DPS H7F C104 DPS DPS C104 DPS DPS H7P CIF30DPS DPS CIF30DPS DPS H34 CIF50DPS DPS CIF50DPS DPS H6D Table 2 Supported CIF Cards PROFIBUS Protocol CIF Device Driver VxWorks DOC021002DRVO04EN
30. re or related documents is limited to cases of intent or grossly negligent violation of significant contractual obligations Indemnity claims for the violation of significant contractual obligations are limited to damages that are foreseeable and typical for this type of contract It is strictly prohibited to use the software in the following areas for military purposes or in weapon systems for the design construction maintenance or operation of nuclear facilities in air traffic control systems air traffic or air traffic communication systems in life support systems in systems in which failures in the software could lead to personal injury or injuries leading to death We inform you that the software was not developed for use in dangerous environments requiring fail proof control mechanisms Use of the software in such an environment occurs at your own risk No liability is assumed for damages or losses due to unauthorized use 1 5 4 Export The delivered product including the technical data is subject to export or import laws as well as the associated regulations of different counters in particular those of Germany and the USA The software may not be exported to countries where this is prohibited by the United States Export Administration Act and its additional provisions You are obligated to comply with the regulations at your personal responsibility We wish to inform you that you may require permission from state authorities to e
31. reas during system startup VxWorks also allows to dynamically add memory area definitions sysMmuMapAda by applications drivers and the re initialization of the MMU usrMmulnit during runtime A disadvantage of this functionality is the limited space available in the table sysPhysMemDesc for dynamically added areas and the time needed for the re initialization The CIFVxWDriver supports both static and dynamic memory configuration but it must be defined during driver compilation 2 1 2 SYS CLOCK_RATE The clock rate of the target system must be a minimum of 1000 This is necessary for the driver timeout function If the clock rate is less than 1000 the timeout value in the driver functions is not millisecond based SYS_CLOCK_RATE 1000 CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Compiling the Driver 13 41 2 2 Driver Settings For a correct compilation the drive code needs some definitions These definitions are depending on the used target system VxWorks VxWin and if the driver or an application is generated Definitions Definition Description Location USE_VxWIN Driver specific Defined in Needed to use specific functions for VxWin e g MakeDriver access to PCI bus specific information during Used in runtime If not defined target system is VxWorks CifOSDependend c cards to the MMU and restarts the MMU in DevOpen
32. river h and the following fieldbus specific header files COM _user h CANopen Master COS_user h CANopen Slave DNM_user h DeviceNet Master DNS_user h DeviceNet Slave DPM_user h PROFIBUS DP Master DPS_user h PROFIBUS DP Slave IBM_user h InterBus Master CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Fieldbus Configuration Details 19 41 3 Fieldbus Configuration Details This section describes how to configure a CIF device and how to check a configuration which already exists on the CIF hardware against an application local configuration Usually a fieldbus configuration is created and checked by SyCon System Configurator After creating a valid configuration SyCon is able to export the configuration into a database file DBM This exported file can be used in the driver to run the automatic database checking and download see DevinitBoard function By using this functionality an application can always be sure the CIF card is correctly configured If an applications generates an own configuration mostly SoftPLCs it could be necessary to compared it against an actual CIF configuration To enable a configuration check in such cases the external C module CifConfiguration c can be used This module includes all necessary functions to read the actual configuration from the hardware and to compare it against an application local configuration CIF Device Driver
33. rrupt 9 is set in the driver registration but no or a wrong interrupt is jumpered on the device device in pollmode Interrupt already used by an other PC component The timeout period can differ between fieldbus protocols Error 21 The device can not reach communication state Device not connected to the fieldbus No station found on the fieldbus Wrong configuration on the device Error 23 The device needs longer than the timeout period given in the DevExchangelo0 function Using device interrupts Wrong or no interrupt selected Check interrupt on the device and in driver registration They have to be the same Interrupt already used by an other PC component Error 30 The device driver could not be opened Device driver not installed Wrong parameters in the driver configuration If the driver finds invalid parameters for a communication board and no other boards with valid parameters are available the driver will not be loaded Error 33 A driver function could not be called This is an internal error between the device driver and the DLL Make sure to use a device driver and a DLL with the same version An incompatible old driver DLL is used CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Appendix 40 41 8 Appendix 8 1 List of Tables EE List Of REVISIONS TEE 4 Table 2 Supported CIF Cards PROFIBUS Pro
34. ruled out that the user manual the accompanying texts and the documentation do not correspond exactly to the described features standards or other data of the delivered product No warranty or guarantee regarding the correctness or accuracy of the information is assumed We reserve the right to change our products and their specification as well as related user manuals accompanying texts and documentation at all times and without advance notice without obligation to report the change Changes will be included in future manuals and do not constitute any obligations There is no entitlement to revisions of delivered documents The manual delivered with the product applies Hilscher Gesellschaft fur Systemautomation mbH is not liable under any circumstances for direct indirect incidental or follow on damage or loss of earnings resulting from the use of the information contained in this publication CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Introduction 11 41 1 5 3 Exclusion of Liability The software was produced and tested with utmost care by Hilscher Gesellschaft fur Systemautomation mbH and is made available as is No warranty can be assumed for the performance and flawlessness of the software for all usage conditions and cases and for the results produced when utilized by the user Liability for any damages that may result from the use of the hardware or softwa
35. s 4 1 Initialization Process The following work will be carried out by the driver during initialization Hardware scan Scanning for installed CIF hardware This includes ISA and PCI cards Hardware reset Each CIF card will be restart by processing a cold reboot This will be done to get boards working which have been previously stopped by a watchdog hit Firmware download If the application supports a firmware file directory the driver will check the firmware file version against the version currently running on the CIF card If the they are different the driver carries out an automatic firmware download Configuration download If the application supports a configuration database file directory and name the driver will check the configuration database against the database currently located on the CIF card If the databases are different the driver carries out an automatic database download Fieldbus Communication The fieldbus communication will be always stopped before leaving the driver After the initialization procedure the CIF card is ready to start From this point the configuration generated by SyCon decides if the fieldbus system starts up automatically or controlled by the application see function DevSetHostState CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Driver Functions 24 41 4 2 Firmware and Configuration File Access The CifVxW
36. size zero 132 DRV_DBM_NO_MEMORY USER not enough memory to upload database 133 DRV_DBM_READ_FAILED USER database read failed 136 DRV_DBM_NO_FLASH_SEGMENT USER database segment unknown 150 DEV_CF_INVALID_DESCRIPT_VERSION CONFIG version of the descript table invalid 151 DEV_CF_INVALID_INPUT_OFFSET CONFIG input offset is invalid 152 DEV_CF_NO_INPUT_SIZE CONFIG input size is O 153 DEV_CF_MISMATCH_INPUT_SIZE CONFIG input size does not match configuration 154 DEV_CF_INVALID_OUTPUT_OFFSET CONFIG invalid output offset 155 DEV_CF_NO_OUTPUT_SIZE CONFIG output size is 0 156 DEV_CF_MISMATCH_OUTPUT_SIZE CONFIG output size does not match configuration 157 DEV_CF_STN_NOT_CONFIGURED CONFIG Station not configured 158 DEV_CF_CANNOT_GET_STN_CONFIG CONFIG cannot get the Station configuration 159 DEV_CF_MODULE_DEF_MISSING CONFIG Module definition is missing 160 DEV_CF_MISMATCH_EMPTY_SLOT CONFIG empty slot mismatch 161 DEV_CF_MISMATCH_INPUT_OFFSET CONFIG input offset mismatch 162 DEV_CF_MISMATCH_OUTPUT_OFFSET CONFIG output offset mismatch 163 DEV_CF_MISMATCH_DATA_TYPE CONFIG data type mismatch 164 DEV_CF_MODULE_DEF_MISSING_NO_SI CONFIG Module definition is missing no Slot Idx gt 1000 RCS_ERROR Board operation system errors will be passed with this offset e g error 1234 means RCS error 234 Only if a ready fault occurred during board initialization Table 20 Error Codes CIF Device Driver VxWorks DOC021002DRVO04
37. tocol mmm nana anna 6 Table 3 Supported CIF Cards DeviceNet Protocol nenea nana anna 7 Table 4 Supported CIF Cards CANopen Protocol nenea nana 7 Table 5 Supported CIF Cards InterBus Protocol nana nana nana 8 Table 6 Supported CIF Cards AS Interface Protocol nenea nenea nana 8 Table 7 Supported CIF Cards Serial Protocols nana nana nana anna 9 Table 8 Driver Settings Definitions men eee eee eee eee rare narrar 13 Table 9 DriverMake Files VxWorks 5 3 rear aa d e oui dE dee i da ala Da 14 Table 10 Directory Overview for VxWorks Bb 15 Table 11 Directory Overview for VxWorks D 3 17 Table 12 Function Overview CIFConfguraton nenea maneaua emana 20 Table 13 Supported Handshake M des e e aceia i tote tota a a Da ale ee da ad sc aa ad d aci 22 Fable 14 Parameter DevinitBoard Jsir cata cote entdecke edd ege pt teal reet er 28 Table 15 Parameter DevgetBoardInfo cccesesceecsseneeeeseneeteseeeetesseeeeeneeneeseseneesesuecenesseeeeeesenseseaeenesseneesseseneeseseesenees 29 Table 16 Parameter DevExchangePLCData cocoocconcccnoccconocanonccnnnccnoncnrnncnnnn cc nan nnr rra 30 Table 17 Parameter DevisPLCDataReady A 31 Table 18 ParameterDevGetInto aber li ile td 32 Table 19 Documentation Overview Additional Information ccccccccesssseeceeeeseeeeeneeeeeeeeeeeseaeeeeecaeeesseneeeseneeeeseieeeees 34 Table 20 Gelee 37 8 2 List of Fig
38. ures Figure 13 General Security Setting Sae ce ras cca coda Ham en ren 24 Figure 2 Us6r Rights and Security a i cica oaz ca a ace a aaa LIRA aaa aaa aae ei REESEN 25 CIF Device Driver VxWorks DOC021002DRVO4EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Appendix 8 3 Contacts Headquarters Germany Hilscher Gesellschaft fiir Systemautomation mbH Rheinstrasse 15 65795 Hattersheim Phone 49 0 6190 9907 0 Fax 49 0 6190 9907 50 E Mail info hilscher com Support Phone 49 0 6190 9907 99 E Mail de support hilscher com Subsidiaries China Hilscher Systemautomation Shanghai Co Ltd 200010 Shanghai Phone 86 0 21 6355 5161 E Mail info hilscher cn Support Phone 86 0 21 6355 5161 E Mail cn support hilscher com France Hilscher France S a r l 69500 Bron Phone 33 0 4 72 37 98 40 E Mail info hilscher fr Support Phone 33 0 4 72 37 98 40 E Mail fr support hilscher com India Hilscher India Pvt Ltd New Delhi 110 025 Phone 91 11 40515640 E Mail info hilscher in Italy Hilscher Italia srl 20090 Vimodrone MI Phone 39 02 25007068 E Mail info hilscher it Support Phone 39 02 25007068 E Mail it support hilscher com CIF Device Driver VxWorks DOC021002DRVO4EN Revision 4 English 2011 06 Released Public 41 41 Japan Hilscher Japan KK Tokyo 160 0022 Phone 81 0 3 5362 0521 E Mail info hilscher jp Sup
39. xWorks VxWin specific definitions cl EE erer oo la gt Copie ee sein SEET ale eE CifConfiguration h Holds the definitions for the module CifConfiguration c This one needs also the VxWorks driver definitions from CIFVxWDriver h and the following fieldbus specific header files COM _user h CANopen Master COS_user h CANopen Slave DNM_user h DeviceNet Master DNS_user h DeviceNet Slave DPM_user h PROFIBUS DP Master DPS_user h PROFIBUS DP Slave IBM_user h InterBus Master CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Compiling the Driver 2 4 2 VxWorks 6 2 Directory Overview 17 41 Driver Directory CIFVxWDriverx xxx Directory Description metadata Eclipse workspace information Directory Description cifdrv CIF VxWorks driver sources Filename Description CIFVxWDriver h Driver main header CIFVxWDriver c Driver main module project wrproject Eclipse workspace files wrmakefile makefile Subdirectory Description CIFTKitx xxx CIF toolkit functions Subdirectory Description CIFCommon Common driver functions e g Database upload CifDPM Functions for dual port based CIF cards ISA PCI CifOSDependend Operating system dependent functions CIFCommon Common driver functions e g Database upload Directory Description ciftest Directory containing the driver test and example program
40. xport re export or import the product CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Compiling the Driver 12 41 2 Compiling the Driver The Hilscher VxWorks VxWin driver is available in a precompiled version for VxWin For other target system the driver must be re compiled Depending on the target system there are some important target system and driver settings necessary to compile and run the CIFVxW driver 2 1 Target System Settings 2 1 1 MMU Support and Settings The CIFVxWDriver needs direct access to the dual port memory areas of the ISA and PCI cards it supports Furthermore the driver searches memory areas to find ISA devices and it also searches the PCI bus to find PCI devices Depending on the used CIF cards the target system must provide the correct memory mappings and memory access masks read write and non cached or the driver fails during hardware access VxWin systems are getting their memory information from the Windows host system and do not need any further settings In difference a VxWorks target system requires a complete configuration of the hardware including all necessary system memory areas and areas used by the ISA and PCI hardware The configuration takes place in the sysPhysMemDesc table located in sysLib c This table is used by the MMU memory management unit to setup the target hardware and to provide access to the defined a
41. ycle than processing the data and writing the data on the end of the cycle Therefore the driver offers two new function DevExchangePLCData and DevisPLCDataReaay It is also possibility to write directly to the I O image without to handle an internal process data map Refer to the section Programming for a detailed description CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Programming 27 41 5 Programming The Application Programming Interface API of the Hilscher VxWorks driver is based on the already known CIF Device Driver Interface see CIF Device Driver manual Since the VxWorks driver supports ISA and PCI cards in one driver the original driver functions have been extended by a DRIVERHANDLE and DEVICEHANDLE which replaces the original board number usDevNumber These new parameters are used in all function calls and necessary to simplify the internal driver handling and to eliminate driver overhead during the function calls DevinitBoard will return the driver and device handles which are needed Also the automatic firmware and configuration file download will be handled during this function 5 1 Standard API Because of the new functionality s in DevinitBoard you will find the description in the following section All other functions from the standard API are described in the CIF Device Driver manual CIF Device Driver VxWorks DOC021002D
42. zero terminated string See section Supported CIF Cards Fieldbus Systems and Protocols for valid names e g CIF50 PB Device name is ignored if usDriverType is not 0 unsigned short usDevNumber Device number 0 3 char pszFWFilePath File path to the directory where the firmware files are located as a zero terminated string char pszCFFullFileName File path and filename for the configuration database file as a zero terminated string DRIVERHANDLE pDriver Buffer pointer to store the driver handle for this device CIFHANDLE pCIF Buffer pointer to store the device handle for this device Table 14 Parameter DevinitBoard CIF Device Driver VxWorks DOC021002DRV04EN Revision 4 English 2011 06 Released Public Hilscher 2002 2011 Programming 29 41 5 1 2 DevGetBoardinfo Description With DevGetBoardiInfo the user can read global information of all communication boards the device driver knows The users interface offers a data structure which describes the board information The function copies the number of data given in the parameter usSize This function can be used after DevOpenDriver and before opening a specific device with DevinitBoard short DevGetBoardInfo unsigned short usDriverType unsigned short usSize void pvData Type Parameter Description unsigend short usDriverTyper Select a device by a driver type CIF_ISA 1 ISA hardware CIF_PCI 2 PCI hardware CIF_DMA 3

Download Pdf Manuals

image

Related Search

Related Contents

MSC.Marc® and MSC.Marc® Mentat® 2005 r3  Chamberlain 3900PLD Garage Door Opener User Manual  Panasonic VDR-D300 Camcorder User Manual  Saveo-Scan-R11D  VR1® Row/Rear Delt Owner`s and Service Manual  Polaroid PIC-300  Samsung SGH-Z107V Benutzerhandbuch  "取扱説明書"  Bedienungsanleitung KOG  

Copyright © All rights reserved.
Failed to retrieve file