Home
Vpcic32D.VXD, PCICC32.SYS & PCICC32_NI - W-IE-NE
Contents
1. User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH Vpcic32D V XD PCICC32 SYS amp PCICC32_NI Windows 95 98 driver Windows NT driver for PCI to CAMAC Interface User s Manual April 2001 1 00527 A1 User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH General Remarks The only purpose of this manual is a description of the product It must not be interpreted a declaration of conformity for this product including the product and software W Ie Ne R revises this product and manual without notice Differences of the description in manual and product are possible W Ie Ne R excludes completely any liability for loss of profits loss of business loss of use or data interrupt of business or for indirect special incidental or consequential damages of any kind even if W Ie Ne R has been advises of the possibility of such damages arising from any defect or error in this manual or product Any use of the product which may influence health of human beings requires the express written permission of W Ie Ne R Products mentioned in this manual are mentioned for identification purposes only Product names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies No part of this product including the product and the software may be reproduced transmitted transcribed stored in a retrieval system or translated into any language in any for
2. 25 0 26 0 27 bTimeout 28 LAM BUS OR 29 LAM NOT OR 30 LAM AND OR 31 LAM Flip Flop The PCIADA timeout interrupt flag bTimeout is mapped into bit 27 of dwInterruptFlags 6 9 Access LCR VPCIC32 _ ACCESS_LCR or PCICC32_ACCESS_LCR 0x00220020 April 2001 17 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH VPCIC32_ACCESS_LCR or PCICC32_ACCESS provides a way to access the Local Configuration Registers LCR of the PLX chip hosted on PCIADA This feature is for test and debug only typedef struct ULONG dwlnterface here dummy cause of compatibility to WIN95 ULONG dwContent content to write and or USHORT wRegisterAddress address offset of LCR register UCHAR bAccessMode LCR_READ write or and UCHAR bBytesLane the data access width PCICC32_LCR_ACCESS data lane size constants for PCICC32_ACCESS_LCR define BYTE_ACCESS UCHAR I write byte wise illegal define WORD_ACCESS UCHAR 2 word define LONG_ACCESS UCHAR long PCICC32_ACCESS_LCR access constants define LCR_READ 0 read only access define LCR_WRITE 1 write and read back access define LCR_OR 2 read bitwise or content and read back access define LCR_AND 3 read bitwise and content and read back access define LCR_WRITE_ONLY 4 do not read back after write With the bAccessMode constant you can define the type of access Even a atomic OR or AND of the content with th
3. 13 IL CLOSE DRIVER a Ne nee Ener EN NEAR Re RR CT ra 13 6 VPCIC32D AND PCICC32 SERVICES jasssscescsssssesecsnssnacsesssonscocesacedssssosvaseasssocessasensesessnnasossesasssosesasxecsassorssasonsoesosen 14 6 1 ATTACH WINDOW VPCIC32_ATTACH_CC32 0x00220000 cccessccsccssecsscesseeseeesecseceseeesseseeeecseseseessees 14 6 2 DETACH WINDOW VPCIC32_DETACH_CC32 0X00220004 ene 14 6 3 GET STATUS VPCIC32_GET_STATUS or PCICC32_GET_STATUS 0x00220008 14 6 4 CLEAR STATUS VPCIC32_CLEAR_STATUS OR PCICC32_CLEAR_STATUS 0X0022000C 15 6 5 SETACCESSPARAMETER VPCIC32_SET_ACCESS_PARA OR PCICC32_SET_ 0X00220010 15 6 6 CONTROLINTERRUPTS VPCIC32_CONTROL_INTERRUPTS or PCICC32_CONTROL 16 6 7 IRQHANDLER VPCIVME_INSTALL_IRQ_HANDLER 0x00220018 6 8 IRQRESPONSE PCICC32_INSTALL_IRQ_ BLOCK 0xX0022001C uu ee 17 6 9 ACCESS LCR VPCIC32_ACCESS_LCR or PCICC32_ACCESS_LCR 0X00220020 cece cece eeeeeeeeee 17 7 CAMAC LIBRARY PCICC32_NLDLL cscssssssscssssssessssscsssssssssscsssscsssssssnsssssesessssssnsssssesossssesssssssceseesessessssecesees 19 TZ INITIALIZE AND CLOSE CALES a riekot aE ERTE R ANE EE AEE EA IEEE GIENE e ISEO TIAE ETETETT ENEN 7 2 CAMAC READ AND WRITE CALLS 7 3 GENERAL CAM AC COMMANDS 7 4 LAM OPERATIONS AND CALLS 7 5 SOFTWARE INTERFACE 8 LABVIEW VI Sisteesiekecscsdieosstlensssorcsecdestacsesisecests
4. D27 D24 0 D28 LAM BUS OR D29 LAM NOT OR D30 LAM AND OR D31 LAM FF Any pending LAM of an enabled station is shown in the LAM FF register depending on the LAM mask LAM interrupt status cc32_poll_error handle nTimeout nLam CC32_HANDLE handle handle to driver char nTimeout time out flag char nLam LAM flag Examples Enable all LAMs cc32_write_word handle 28 1 16 OxF FFF Reset LAM FF cc32_write_word handle 28 0 16 0 Poll LAM cc32_poll_error handle nTimeout nLam April 2001 22 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 7 5 Software interface The interface to the pcicc32_ni dll is defined in the Libcc32 h header file DEFINES define SW_UNTIL_NOT_Q 1 switches for cc32_access_switch uSwitch define SW_AUTOREAD 2 open a path to a device E g dev pcicc32_1 int __declspec dllexport cc32_open char cszPath int nModuleNumber CC32_HANDLE handle close the opened path nt __declspec dllexport cc32_close CC32_HANDLE handle read only a word 16 bits from a address made out of N A F nsigned short __declspec dllexport cc32_read_word CC32_HANDLE handle unsigned int N nsigned int A unsigned int F read a long 32 bits from a address made out of N A F and get the result Q and X nsigned long __declspec dllexport cc32_read_long CC32_HANDLE handle unsigned int N n
5. wBlockTransfer_ Cd TS UNTIL_NOT_Q__ read until not Q only applicable for WINNT AUTOREAD PCIADA reads 1itemahead sS amp Y Table wBlockTransfer modes Output structure There is nothing to output Pointer to structure is NULL size of structure is 0 6 6 ControlInterrupts VPCIC32_CONTROL_INTERRUPTS or PCICC32_ CONTROL VPCIC32_CONTROL_INTERRUPTS WIN95 98 or PCICC32_CONTROL_INTERRUPTS WIN NT enables or disables interrupt requests for this path Note that interrupt requests are associated to a CC32 module and not to a special path This implies that only one of the paths accessing a special CC32 module can provide interrupt handling for this module Input structure typedef struct DWORD dwinterface CC32 module number idle for WIN NT WORD wEnable a 1 enables a O disables interrupt requests VPCIC32D_IRQ_ CONTROL WIN95 98 PCICC32_IRQ CONTROL Output structure There is nothing to output Pointer to structure is NULL size of structure is 0 6 7 IROHandler VPCIVME INSTALL IRQ HANDLER 0x00220018 This is not applicable to WIN NT VPCIC32_INSTALL_IRQ HANDLER install a callback routine to a CC32 module This function is called whenever interrupts are enabled and the handler is installed To prevent interrupt overflows the driver itself clears the LAM Flip Flop or resets the PCIADA depending on the interrupt source Input structure typedef struct DWORD dwiInterface CC32 module number
6. D00 W16 W1 cc32_read_word_buffer handle N A F pwBuffer pdwLen CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned long pwBuffer April 2001 handle to path CAMAC station N CAMAC sub address A CAMAC function F pointer to a word 16 bit buffer 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH unsigned long pdwLen Read 32 bit data into a buffer with N A F pointer to the length of the buffer in words cc32_read_long_buffer handle N A F pdwBuffer pdwLen CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned long pdwBuffer unsigned long pdwLen handle to path CAMAC station N CAMAC sub address A CAMAC function F pointer to a long 32 bit buffer pointer to the length of the buffer in longs Read 32 bit data into a buffer with N A F without any masking of X Q information cc32_read_long_all_buffer handle N A F pdwBuffer pdwLen CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned long pdwBuffer unsigned long pdwLen Set the access features for the next transfers handle to path CAMAC station N CAMAC sub address A CAMAC function F pointer to a long 32 bit buffer pointer to the length of the buffer in longs cc32_access_switch handle unsigned short wSwitch CC32_HANDLE handle unsigned short wSwitch 7 3 General CAMAC commands handle to path Co
7. a different driver however the driver interface will be partially compatible Be sure that PCIADA card of the PCI CAMAC system is installed in your PC Please refer to the PCI CAMAC user manual to insert the card Now start your computer running Windows NT and login as administrator Open a dos box and change to the CDROM path with the driver and the install program Then call the install program with following parameters If your CD ROM drive is the D drive type D cd PCICAMAC WINNT DRIVER install d pcicc32 sys v In the following installation process the driver is copied to the Windows driver directory WINNT S YSTEM32 DRIVERS pcicc32 sys and some information is added to the registry The driver is started immediately To check the driver installation and settings you will find the interface at the systems settings devices with the entry PCICC32 started automatic April 2001 7 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH Ger t Status Startart Deaktiviert Parallel Gestartet Automatisc Parport Gestartet Automatisc starten Gestartet Automatisc Beenden Jul Gestartet Automatisci PCIDump System PCIVME Manuel __Stattat Pemcia Deaktiviert HW Profie PrP ISA Enabler Driver System psidisp Deaktiviert xl Hilfe Picture 2 Example of System Settings Devices Note You can remove the driver with the install program too Please invo
8. controller with loop functions and NAF R W display 25 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 9 DRIVER LIMITATIONS e Presently the driver for LINUX does not support hardware interrupt servicing however all interrupt sources time out and LAM can be monitored by polling the VPCIC32D_GET_STATUS WIN95 98 or the PCICC32_GET_STATUS WIN NT function e Presently the Labview VT s for LINUX is not adopted to the shared library for LINUX e Presently some of the DLL entries does not have a Labview NI counterpart April 2001 26 00527 Al Seite 2 1 Kommentar vH1 Dr L der von Horn Versionen dieses Dokuments Wann Was Wer 8 Juli 99 Manual erstellt L von Horn 19 Juli 99 nderungen von K Hitschler ber cksichtigt L von Horn vergl vpcivmed hitschler doc
9. idle for WIN NT DWORD dwlrgHandler void IrqHandler DWORD User Handler VPCIC32D_IRQ HANDLER April 2001 16 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH Output structure There is nothing to output Pointer to structure is NULL size of structure is 0 When called the IRQ handler callback function is called with the current LAM vector as argument For all possible LAM vectors see 6 8 6 8 IRQResponse PCICC32_ INSTALL_IRO BLOCK 0x0022001C This is not applicable to WIN95 98 PCICC32_INSTALL_IRQ_BLOCK installs a blocking IO Control call which waits for a interrupt to occur The call returns only if a interrupt has raised and the interrupt is enabled It returns immediately without error when a interrupt was pending To prevent interrupt overflows you have to re enable interrupts when the call returns without error No input structure is needed the output structure provides information about what interrupts ceased the blocking Input structure There is nothing to input Pointer to structure is NULL size of structure is 0 Output structure typedef struct DWORD dwiInterface CC32 module number DWORD dwlnterruptFlags flags to mark pending interrupts PCICC32_IRQ RESPONSE The dwInterruptFlags correspond to the LAM AND Status of the CC32 associated to this path Bit Function 0 LAMO AND LAM_MASKO 1 LAM1 AND LAM_MASK1 23 LAM23 AND LAM_MASK23 24 0
10. ated from the NAF code is used to reference the access location Since a file read write does not know if the element to read or write should be 16 bit or 32 bit in size this property has to be set before the read write operation This setup is done with a special I O call to the driver The access to the drivers are not limited to one process Multiple processes can use the drivers Even one driver supports multiple CAMAC interfaces Two different hardware interrupts LAM and time out are handled by the interface The driver provides several services to operate these interrupts 1 Windows95 and Windows98 are trademarks of the Microsoft Corporation LINUX is a trademark of Linus Torvalds April 2001 4 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 2 INSTALLATION OF THE WIN95 98 DRIVER The PCI CAMAC system consisting of PCIADA and CC32 has been delivered with software drivers and applications on a CD ROM This CD ROM includes in the PCICAMAC directory the following files Subdirectory WIN95 DRIVER Vpcic32D vxd Win95 98 driver peiC32 inf INF file for installation Subdirectory WIN95 DRIVER SOURCE Vpcic32D h driver interface header file for applications vpcic32d vxd driver source Note The driver only works with Windows 95 98 in 32 bit mode including console applications Only real 32 bit applications can use the driver It does not work with MS DOS or WINDOWS 3 11 pr
11. c32_read_long_all_buffer CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned long pdwBuffer unsigned long pdwLen switch UNTIL_NOT_Q or AUTOREAD on or off int __declspec dllexport cc32_access_switch CC32_HANDLE handle unsigned short uwSwitch m SEE ES RPE EFS a QUIZT AI User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH April 2001 24 00527 Al User s Manual PCI CC32 W Ie_Ne R Plein amp Baus GmbH Together with the pcicc32_ni dll the following virtual instruments VT s for the National Instruments graphical programming software for instrumentation LabView are provided c32Init vi c32Close vi c32PollError vi C32ReadLong vi C32ReadLongS vi C32ReadWord vi C32WriteLong vi C32WriteWord vi c32Test1_95 vi c32Test1_NT vi C32Test2_95 vi C32Test2_NT vi pcicamac vi April 2001 the VI to initialize a path to a interface the VI to close a path opened with c32Init vi the VI to get a pending LAM or an interface connection timeout the VI to read a longword 32 bit containing X and Q the same as above but with resolved X and Q the VI to read a word 16 bit without reading X and Q the VI to write a longword 24 bit CAMAC the VI to write a word 16 bit only a simple write read test configured for WIN95 98 the same as above but for WIN NT a simple LAM test the same as above but configured for WIN NT CAMAC example
12. culation of access address from NAF code According to the PCICC32 hardware manual the access address is calculated like define NAF n a f unsigned long n lt lt 10 a lt lt 6 f amp Oxf lt lt 2 It is advisable to use this macro for all calculations 5 5 Close driver After using the driver it has to be closed before finishing the application CloseHandle hHandle The driver will be automatically removed from the system when closed by the last application previously using it April 2001 13 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 6 VPCIC32D AND PCICC32 SERVICES Please see for reference the vpcic32d h header file WIN95 98 or the pcicc32 h header file WIN NT 6 1 Attach Window VPCIC32_ATTACH_CC32 0x00220000 This call is not applicable to WIN NT VPCIC32_ATTACH_CC32 generates a memory window into the CC32 CAMAC address space Input structure typedef struct DWORD dwinterface CC32 module number VPCIC32D_DEVICE Output structure typedef struct DWORD dwinterface CC32 module number void pvWindowBase the base address into the 32 kbyte Window VPCIC32D_WINDOW 6 2 Detach Window _ VPCIC32_DETACH_CC32 0x00220004 This call is not applicable to WIN NT VPCIC32_DETACH_CC32 deinitializes the PCIADA with the corresponding CC32 controller The CAMAC windows is released Input structure typedef struct DWORD
13. d service is VPCIC32_ATTACH_CC32 with a single DWORD input structure sInterface containing the CC32 number The size of this input structure is sizeof sInterface The call returns the structure VPCIC32D_WINDOW sWindow with size sizeof sWindow which contains the base address for the CC32 window The variable DIOC_count contains the real size of the returned data from the driver 5 3 Read and Write This applies only to WIN NT with WIN95 98 all reads and writes are done via a direct accessible 32 kbyte memory segment First you have to set the file pointer to the address location calculated from the NAF code If the address pointer still is set nothing is to do Then you can read or write a block of data which size is a multiple of the preset data access width 2 or 4 bytes DWORD ReadCAMAC HANDLE hHandle unsigned long adr void buffer int nBytesToRead DWORD bytesRead SetFilePointer hHandle adr NULL FILE_BEGIN April 2001 12 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH if IReadFile hHandle buffer nBytesToRead amp bytesRead NULL printf Can t read 0x 08x n GetLastError return bytesRead Note To improve performance you can open a path to each block read or block write NAF codes even if they are accessed through the same CC32 interface Then you have to set the file pointer only once at initial setup of the path 5 4 cal
14. dwinterface CC32 module number VPCIC32D_DEVICE Output structure There is nothing to output Pointer to structure is NULL size of structure is 0 6 3 Get Status VPCIC32_GET_STATUS or PCICC32_GET_STATUS 0x00220008 VPCIC32_GET_STATUS WIN95 98 or PCICC32_GET_STATUS WIN NT allows to obtain the status of the PCIADA interface card time out as well as of the CC32 crate controller LAM This call can be used for LAM polling April 2001 14 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH Input structure typedef struct DWORD dwinterface CC32 module number idle for WIN NT VPCIC32D_DEVICE Output structure typedef struct DWORD dwiInterface CC32 module number idle for WIN NT WORD bTimeout PCIADA timeout WORD binterrupt pending LAM interrupt of CC32 VPCIC32D_DEVICE WIN95 98 PCICC32_ DEVICE WIN NT The returned bTimeout indicates a hardware error or disconnection of the CC32 controller or CAMAC power off The output bLAM shows any active pending LAM interrupt Look At Me Note The LAM interrupt depends in addition to a LAM request from a CAMAC station on the LAM mask setting of the controller Please see the PCI CAMAC manual for reference 6 4 Clear Status VPCIC32_CLEAR_STATUS or PCICC32_CLEAR_STATUS 0x0022000C VPCIC32_CLEAR_STATUS WIN95 98 or PCICC32_CLEAR_STATUS WIN NT can be used to clear a pending bTimeout interrupt The pending bLam ha
15. e given register is possible Please note that using this feature in parallel to normal use of the driver can make the driver and even the operating system unstable April 2001 18 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 7 CAMAC LIBRARY PCICC32_NI DLL The pcicc32_ni dll adds a user friendly CAMAC library to the PCI CAMAC driver This layer standardizes the CAMAC calls for the different operating systems Windows 95 98 Windows NT and LINUX allowing to port application programs between these operating systems with minimum changes The following paragraph describes the CC32 PCIADA CAMAC calls based on the use of the peicc32_ni dll and pcicc32_ni lib Library Please refer to the CC32 manual and the driver description in this manual The PCICC32dem C file supplied on the driver and application CD ROM shows examples for the use of this library Please note the different device driver path declarations for use within Windows 95 98 and Windows NT and LINUX 7 1 Initialize and Close calls cc32_open cszPath nModuleNumber handle char cszPath path to driver or device depends on OS int nModuleNumber number of CC32 default 1 CC32_HANDLE handle handle to path cc32_close handle CC32_HANDLE handle handle to path 7 2 CAMAC Read and Write calls Read 16 bits with N A F cc32_read_word handle N A F CC32_HANDLE handle handle to path unsigned int N CAMAC station N unsigned in
16. esescsensudsenecduecseisescassencnssentendosendseussaveceassesduecessscseroussseseucsseessecescesadecdos 25 9 DRIVER LIMITATIONS scssscccesscssssedscccaccscsesdcvescecssossossbsccsssesoaseccotecesessodsscdesesecsescecoscoreedsceconsodestecisedoessasesiessoveteses ent 26 April 2001 3 00527 A1 User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 1 GENERAL DESCRIPTION Vpcic32D VXD provides an easy access to the CC32 CAMAC crate controller for Windows95 and 98 users The same does PCICC32 SYS for Windows NT A separate driver is provided for use with LINUX The properties of this driver are not explained here It is easy to use the drivers for your own CAMAC application The driver is independent from the chosen programming language since WIN32 standard I O functions are used for communication to the drivers There are small differences in the application interface These differences are mentioned when appropriate noted WIN95 98 or WIN NT WIN95 98 CAMAC access is performed via an interface window of an area of virtual memory which is defined by the driver For user applications this window looks like normal memory Read and write operations to the CAMAC controller and or bus are converted into simple read and write operations whereas the destination address corresponds to the NAF code of the operation WIN NT CAMAC access is performed with normal file read and write operations A file offset calcul
17. he service to be called This can be done by using the pre defined service names or the corresponding numbers see Vpcic32d h for WIN95 98 or pcicc32 h for WIN NT as for instance VPCIC32_ATTACH_CC32 defined with 0x00220000 In addition each service is associated with a particular input and output structure This requires the definition of pointers to the structures as well as to their sizes as shown in the following example The call of DevicelOControl returns a result value which indicates in case of 0 the correct operation If an error occurred the value is different to 0 In this case the Windows function GetLastError will return the error number All error numbers are defined in the winerror h header file WIN95 98 Example for requesting a memory window into the CC32 address space VPCIC32D_ DEVICE sInterface VPCIC32D_WINDOW sWindow DWORD DIOC_count DWORD dwResult April 2001 11 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH sInterface dwinterface 1 selection of CC32 with Module 1 request for a memory window into CAMAC CC32 dwResult DeviceloControl hHandle VPCIC32_ATTACH_CC32 amp siInterface sizeof sInterface amp sWindow sizeof sWindow amp DIOC_count NULL if IdwResult printf Error d occured n GetLastError else printf I have got a memory window 0x 08x n sWindow pvWindowBase The calle
18. ime parameters calling pcic32_test exe Note The default driver path for WIN NT is PCICC32 CC32_1 The _1 pinpoints the CC32 interface configured for module number 1 For further information about the module number see the PCICC32 hardware users manual April 2001 9 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 5 DRIVER DESCRIPTION WIN95 98 The Vpcic32D vxd is a dynamically loadable Driver i e it will not be implemented during the start of the operating system Every application using the driver has to load it first and has to release it before closing Up to 16 PCI interface cards PCIADA corresponding up to 16 CAMAC controllers CC32 can be accessed via the driver They all are distinguished only by the different CC32 module number WIN NT The driver is loaded during the start of WINDOWS NT Every application using the driver has to create a path to the device first and removes it when closing Up to 16 PCI interface cards PCIADA corresponding up to 16 CAMAC controllers CC32 can be accessed via the driver They all are distinguished only by a different CC32 path number e g PCICC32 CC32_1 PCICC32 CC32_2 The VpciC32D driver establishes a well defined software interface to the PCI CAMAC hardware It works in the processor ring O WIN95 98 or as kernel driver WIN NT and is available to all calling applications with equal rights Thus it can be used simultaneously b
19. ke install for more information Note The PCIADA interface card can work with both VME VMEMM and CAMAC CC32 systems Normally the PCIADA is configured for use with CC32 If you have to change the PCIADA configuration for any reason please look for the description of the program PLXeep exe April 2001 8 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 4 TEST OF DRIVER INSTALLATION To test the correct driver installation as well as the hardware operation there is the program pcicc32_test exe which can be found on the on the driver and application CD ROM To avoid interference with any other CAMAC hardware please use the program first with only the CC32 inserted into the CAMAC crate To run the program use either the RUN option of the Windows START menu or open the MS DOS box and start the application with pcic32_test exe after setting the path to the directory on the CD ROM containing it The program can be started with different run time parameters the call pcic32_test prints a short help text including the parameter list If working correctly the pcic32_test exe program performs for about 20 seconds multiple accesses to all CAMAC station numbers N with all possible sub addresses A and function codes F Note The default driver path for WIN95 98 is C WINDOWS SYSTEM Vpcic32D vxd If using a different path this has to be considered in the run t
20. m by any means with the express written permission of W Ie Ne R VPCICC32D is designed by ARW Elektronik Germany Windows95 98 und Windows NT are trade marks of Microsoft Corp LINUX is a Linus Torvalds trade mark April 2001 2 00527 A1 Kommentar vH1 Versionen dieses Dokuments Wann dl User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH Table of contents 1 GENERAL DESCRIPTION a ssissscssossoasesacssasesesonssonsscnsosnssesoessseessesseassasesoseosnsnsesooosnsess sosbesebouss sosaseenioabeseosnsosesbentesesosests 4 2 INSTALLATION OF THE WIN95 98 DRIVER ccscsscssscssscssssscssescsscsscsessssssssscsscsenssssscnsssnssensensssssssnssenscensssseses 5 3 INSTALLATION OF THE WIN NT DRIVER sssscssscssscesssssssssssscesssesssenssescssssensssascnsssscsenssesssssssessenscssssssoes 7 4 TEST OF DRIVER INSTALLATION sccsssssscossssssssscssecenscsscsssssescenssesssesssossssssscssnsssnscnsssnscsassnassssssessenssonsssssses 9 5 DRIVER DESCRIPTION ssisiecsiavesssstssscsesssvesstossatencsedsvocosensscnsecetacededssecessenev dessetesacsdassndoscesesasesedecesescesnsbecesnssesceueses 10 3 1 EOAD DRIVER 25 00 i o Cute tae ARs AN ae Aas E E OEE GSS GOTH TEIE AEE 10 3 25 DRIVER ACCESS sn ran R EE E TEE EEEE Ua Sat a Sa tad ash oad sad AS AALS ARAB ES 11 SA READ AND WRITE kera cbs cestdssabetscdesietsbesdsavass cuca siesenees 12 5 4 CALCULATION OF ACCESS ADDRESS FROM NAF CODE
21. nik PCICC32 Driver amp CD ROM Diskettenlaufwerk Controller Festplattencontroller Grafikkarten Laufwerke TA Maus Monitore lt Multifunktionskarten E Netzwerkkarten m Systemkomponenten E Tastatur Eigenschaften Aktualisieren Entfernen Drucken Fe A E Abbrechen Picture 1 Example of settings control panel system device manager Note The PCIADA interface card can work with both VME VMEMM and CAMAC CC32 systems Normally the PCIADA is configured for use with CC32 If you have to change the PCIADA configuration for any reason please look for the description of the program PLXeep exe April 2001 6 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH 3 INSTALLATION OF THE WIN NT DRIVER The PCI CAMAC system consisting of PCIADA and CC32 has been delivered with software drivers and applications on a CD ROM This CD ROM includes in the PCICAMAC directory the following files Subdirectory WINNT DRIVER Pcicc32 sys Windows NT kernel driver install exe installation program to install and start the driver Subdirectory WINNT DRIVER SOURCE Pcicc32 h driver interface header file for applications pcicc32 sys driver source The driver only works with Windows NT including console applications running on Windows NT Windows 95 98 systems require
22. nstants SW_UNTIL_NOT_Q or SW_AUTOREAD see driver manual All CC32 commands are based on NAF mapping System commands as CAMAC C Z I and LAM mask broadcast are using station numbers N higher than 24 Please see the CC32 hardware manual for reference NO A0 Fx C Camac Clear NO A1 Fx Z Camac Initialize NO A2 Fx C Inhibit reset NO A3 Fx Z Inhibit set N27 A0 Fx Inhibit set N27 A1 Fx Inhibit reset April 2001 21 Write Word Write Word Write Word Write Word Write Word Write Word 00527 A1 User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH Examples CAMAC C cc32_write_word handle 0 0 16 0 CAMAC Z cc32_write_word handle 0 1 16 0 Set Inhibit cc32_write_word handle 27 0 16 0 Reset Inhibit cc32_write_word handle 27 1 16 0 7 4 LAM Operations and Calls N28 A0 Fx LAM FF reset Write Read Word N28 A1 Fx LAM mask Write Read Long With D23 D00 lt lt MASK24 LMASKI D27 D24 0 D28 LAM BUS OR D29 LAM NOT OR D30 LAM AND OR D31 LAM FF N28 A2 Fx LAM AND mask Read Long With D23 D00 lt lt AND24 AND1 D27 D24 0 D28 LAM BUS OR D29 LAM NOT OR D30 LAM AND OR D31 LAM FF N28 A3 Fx LAM NOT mask Read Long With D23 D00 lt lt NOT24 NOTI D27 D24 0 D28 LAM BUS OR D29 LAM NOT OR D30 LAM AND OR D31 LAM FF N28 A4 Fx LAM no mask Read Long With D23 D00 lt lt LAM24 LAMI
23. oad Driver hHandle CreateFile PathName 0 0 NULL O April 2001 10 00527 A1 User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH FILE_FLAG_DELETE_ON_CLOSE NULL During this procedure number and IDs of connected CC32 CAMAC controllers is determined Note The pathname differs for WIN95 98 and WIN NT The WIN NT pathname carries the module number to access while the WIN95 98 path opens a more general path to all available CC32 interfaces connected to this computer This implies for WIN NT that the dwInterface variable used with the input structure of the DevciceloControl calls is only a idle placeholder With the WIN95 98 application interface this dwInterface variable selects the called CC32 module number 5 2 Driver access The driver provides different services which can be called from a user application via the Windows function DeviceIoControl result DeviceloControl hHandle handle to CC32 service service code called amp input reference to input structure sizeof input size of input structure amp output reference to output structure sizeof output size of output structure amp DIOC_ count reference of real size of returned data NULL The first parameter hHandle indicates a particular CC32 controller i e the driver itself considers the connection between the CC32 with given CC32 module number and the corresponding PCIADA interface card The second parameters describes t
24. ograms Note Windows NT systems require a different driver however the driver interface will be partially compatible Be sure that PCIADA card of the PCI CAMAC system is installed in your PC Please refer to the PCI CAMAC user manual to insert the card After switching on the computer the MS Windows operating system recognizes automatically the new hardware in your system and asks for the driver and INF file Insert the supplied CD into your CD ROM drive and enter the driver s path If your CD ROM drive is the D drive type D PCICAMAC WIN9S DRIVER In the following installation process the driver is copied to the Windows system directory WINDOWS SYSTEM Vpcic32D VXD and the interface is entered into the Windows Registry under HKEY_LOCAL_MACHINE ENUM PCIAVENIOBS amp DEV2258 To check the driver installation and settings you will find the interface at the systems settings of the control panel start settings control panel system device manager where interrupt and I O settings can be verified 2 MS DOS and Windows 3 11 are trademarks of the Microsoft Corporation April 2001 5 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH Eigenschaften von System 2lx Allgemein Ger te Manager Hardwareprofil Leistungsmerkmale Modelle nach Typ anzeigen Modelle nach Anschluss anzeigen Andere Komponenten 3 Anschl sse COM und LPT Vv CC32 x ARW Elektro
25. s to be cleared at the appropriate CAMAC slave station with corresponding calls from the user Input structure typedef struct DWORD dwinterface CC32 module number idle for WIN NT VPCIC32D_DEVICE wIN95 98 PCICC32_DEVICE WIN NT Output structure There is nothing to output Pointer to structure is NULL size of structure is 0 6 5 SetAccessParameter VPCIC32_SET_ACCESS_PARA or PCICC32_SET _ 0x00220010 PCICC32_SET_ACCESS_PARA allows to set the further data access width for this path to 16 bit or 2 byte or 32 bit or 4 byte With the wBlock Transfer parameter you can enable or disable some features for fast data readout The UNTIL_NOT_Q enables the next read into the provided buffer until not Q is signaled from the slave device or the buffer is filled AUTOREAD enables the PCIADA to read one item ahead to increase readout speed through overlapp of PC read and CAMAC read Please note that the parameter wAccessType at WIN95 98 is determined with the access itself Also the UNTIL_NOT_Q has no function at WIN95 98 Due to the direct access mechanism the access code has to manage this feature itself April 2001 15 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH Input structure typedef struct ULONG dwlnterface II USHORT wAccessType set the current access type see pcicc32 h idle WIN95 USHORT wBlockTransfer see table PCICC32_ACCESS_COMMAND
26. signed int A unsigned int F char Q char X read a long 32 bits without any interpretation nsigned long __declspec dllexport cc32_read_long_all CC32_HANDLE handle unsigned int N nsigned int A unsigned int F write a word 16 bits to a destination made out of N A F void __declspec dllexport cc32_write_word CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned short uwData write a long 32 bits uninterpreted to a destination made out of N A F void __declspec dllexport cc32_write_long CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned long ulData poll the state of the timeout line and the LAM state The timeout line is cleared if it was set int __declspec dllexport cc32_poll_error CC32_HANDLE handle char nTimeout char nLam read len words or UNTIL_NOT_Q from a address made out of N A F into a buffer int __declspec dllexport cc32_read_word_buffer CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned short pwBuffer unsigned long pdwLen read len longs or UNTIL_NOT_Q from a address made out of N A F into a buffer int __declspec dllexport cc32_read_long_buffer CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned long pdwBuffer unsigned long pdwLen read len longs or UNTIL_NOT_Q from a address made out of N A F into a buffer no interpretation int __declspec dllexport c
27. t A CAMAC sub address A unsigned int F CAMAC function F return unsigned short data 16 bit data D15 D00 R16 R1 Read 32 bits with N A F and get the result Q and X cc32_read_long handle N A F Q X CC32_HANDLE handle handle to path unsigned int N CAMAC station N April 2001 19 00527 Al User s Manual PCI CC32 W Ie Ne R Plein amp Baus GmbH unsigned int A unsigned int F char Q char X return unsigned long data Read 32 bits with N A F cc32_read_long_all handle N A F CC32_HANDLE handle unsigned int N unsigned int A unsigned int F return unsigned long data Write 16 bits with N A F cc32_write_word handle N A F uwData CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned short data Write 32 bits with N A F cc32_write_long handle N A F ulData CC32_HANDLE handle unsigned int N unsigned int A unsigned int F unsigned long data Read 16 bit data into a buffer with N A F CAMAC sub address A CAMAC function F Q response X response 32 bit data D23 D00 R24 R1 D29 D24 0 D31 D30 Q X handle to path CAMAC station N CAMAC sub address A CAMAC function F 32 bit data D23 D00 R24 R1 D29 D24 0 D31 D30 Q X handle to path CAMAC station N CAMAC sub address A CAMAC function F 16 bit data D15 D00 W16 W1 handle to path CAMAC station N CAMAC sub address A CAMAC function F 32 bit data D15
28. y multiple applications however it does not support asynchronous calls Access to the driver is managed by Windows Standard I O functions which are independent from the programming language Header files for c programs are supplied with the interface They can be easily adapted to other languages All driver parameters addresses will be taken from the Windows Registry This simplifies the calls in the user application WIN95 98 For a maximum performance the PCI to CAMAC access is done using a 32kB memory segment for NAF coding and data transfer User applications can directly read or write to the CAMAC dataway via this memory segment without further hardware consideration To do this the application has to request first the window to the CAMAC address space The driver returns a pointer to it which can be used as the base address of the segment Within the window the relative address corresponds to the NAF code of the CAMAC call The windows can be accessed by multiple applications simultaneously without further restrictions WIN NT For compatibility with standard file access mechanisms all reads and writes to CAMAC are done via standard file read and file write calls A special IO control call is used to setup the data access width for further reads or writes With the standard SetFilePointer call the next access address calculated from the NAF code is set No auto increment or decrement of access addresses is supported 5 1 L
Download Pdf Manuals
Related Search
Related Contents
Legacy of Clean® Adoucisseur de Tissus, Senteur Florale Nano Soldering station Note II Glentel Pedestal Installation Manual De'Longhi TRH0715SH User's Manual Kenmore 596.762627 Refrigerator User Manual Kineduo 2 - Utilisation WAGAN 2003-5 mobile device charger Manual do usuário Copyright © All rights reserved.
Failed to retrieve file