background image

 

WIENER, Plein & Baus GmbH  

27 

www.wiener-d.com 

 

The physical length of the regular stack is 768 16-bit words for CC-USB and 768 32-bit 
words for VM-USB.

 

The physical length of the periodic (scaler) stack is 256 16-bit words for CC-USB and 256 
32-bit words for VM-USB. 
While the stack is expected to contain properly encoded sequence of CAMAC (CC-USB) or 
VME (VM-USB) commands to be performed by XX-USB, it can store any sequence of 
numbers.  
 

6.8 xxusb_stack_read 

 
The xxusb_stack_read function first, sends a buffer to XX-USB, causing the latter to write 
the content of a desired stack to its USB port FIFO and then, obtains this content by reading a 
buffer from the XX-USB. 
 

WORD xxusb_stack_read{ 
 HANDLE 

hDevice, 

 WORD 

wStackType, 

 LPDWORD 

lpStackData 

}; 

 

Parameters 

hDevice 
 

[in] Handle to the XX-USB device. 

 
wStackAddress 

[in] Type of the XX-USB stack, the content of which is to be read. Valid types are 0, 
for the regular stack and 1, for the periodic (scaler) readout stack. 

 

lpStackData 

[out] Pointer to a variable array that receives the data returned by the operation, i.e., the 
content of a XX-USB stack. 

 

 
Return Values 

On success, the function returns the number of bytes read from XX-USB. The valid value is 
twice the length of the stack, as the latter stores 2-byte words.  
Function returns a negative number on a failure. 
 

6.9 xxusb_stack_execute 

 
The xxusb_stack_execute function first, sends a buffer to XX-USB, causing the latter to 
interprete its content as a series of simple and complex CAMAC commands and to actually 
execute these commands and to write the returned CAMAC data to the USB port FIFO. 
Then, xxusb_stack_execute reads a buffer from XX-USB, containing the desired CAMAC 
data. 
 

Содержание CC-USB

Страница 1: ...WIENER Plein Baus GmbH 1 www wiener d com CC USB User Manual...

Страница 2: ...d 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 req...

Страница 3: ...13 3 1 6 LAM Mask Register 15 3 1 7 Action Register 15 3 1 8 Serial Number Register 15 3 2 CAMAC Command Stacks 15 3 3 CAMAC NAF Generator 15 3 4 USB In FIFO 15 4 Communicating with CC USB 16 4 1 Gen...

Страница 4: ...WIENER Plein Baus GmbH 4 www wiener d com 6 9 xxusb_stack_execute 27 6 10 xxusb_usbfifo_read 28 6 11 xxusb_bulk_read 29 6 12 xxusb_bulk_write 30 6 13 xxusb_flashblock_program 31...

Страница 5: ...able NIM inputs with LEMO connectors 3 user programmable NIM outputs with LEMO connectors Visual data and status display with 54 red green and yellow LEDs N F A R W Data Q X C Z user definable host co...

Страница 6: ...Failure LED USB 1 or 2 indicator 3 user outputs Lemo NIM USB port 3 user inputs Lemo NIM Aux Controller RQ G in G out Firmware selector 1 4 P1 P4 for programming C1 C4 for use operation INH B Q X C Z...

Страница 7: ...and Stacks 2 kBytes NAF NAF Sequence Generator CAMAC CAMAC Bus Including Arbitration FIFOs Three Stage Piplined FIFO Array 22 kBytes Master Control Unit USB Controller FX2 CY7C68013 IC OUT FIFO USB Ou...

Страница 8: ...te should be disconnected from AC mains 2 1 Installation for Windows Operating Systems 1 Switch off the CAMAC crate and remove the power cord Plug in the CC USB on the far right slots normally slot 24...

Страница 9: ...D ROM e g D F and locate the file CC USB inf Press Enter to select this driver and to close the window 7 The WIENER CC USB driver should be listed and highlighted in the driver list The driver is not...

Страница 10: ...WIENER Plein Baus GmbH 10 www wiener d com 8 The New Hardware Wizard should copy all driver files into the Windows System32 folders and report a successful installation...

Страница 11: ...ntation and the library is available from http libusb sourceforge net Fortunately it is also included in modern Linux distributions as is the USB2 EHCI driver The prerequisites are i EHCI driver loade...

Страница 12: ...nality Sub address Register Note 0 Firmware ID Read only 1 Global Mode Read Write 2 Delays Read Write 5 Scaler Readout Frequency Read Write 6 User LED Source Selector Read Write 7 User NIM Output Sour...

Страница 13: ...ta acquisition The three bit number represents the time interval in seconds counting from the end of an event after which the watchdog triggers when no new event has been observed The Arbitr Bit when...

Страница 14: ...s follows Code Red LED Green LED Yellow LED 0 Event Trigger Acquire NIM I3 1 Busy Camac F1 Busy 2 USB Trigger Reserved NIM I2 3 USB Out FIFO not empty Event Trigger Camac S1 4 USB In FIFO not full Dat...

Страница 15: ...ut is triggered by a signal applied to the NIM input 3 1 7 Action Register Bit 0 of the Action Register activates data acquisition in list mode when event readout is triggered either by a start signal...

Страница 16: ...requested CAMAC operation and returns the CAMAC data in the Common Output Buffer Both In and Out Packets are of a variable length depending on which internal address is involved and what the content o...

Страница 17: ...the Out Packet depends on the address and represents the sub address in the case of the Register Block and the number of words to follow in the case of the CAMAC Stacks CDS and CSS and the CAMAC NAF G...

Страница 18: ...MAC Stacks when CC USB is in data acquiring mode or in the Out Packet received from the USB port when CC USB is in interactive mode 4 5 Structure of the CAMAC Stack The CAMAC stack consists of a seque...

Страница 19: ...command of the stack first command in an event The Number of Product Terms used to condition the readout must be specified as well QS Q stop mode the command is to be repeated as long as Q 1 Q respon...

Страница 20: ...it is advisable to write a proper routine to set up the stack As an option one may utilize the CC USBWin Windows application to build the stack and save it to disk 4 6 CAMAC common functions The commo...

Страница 21: ...2 Event Terminator hexadecimal FFFF N3 Optional 2nd Terminator hexadecimal FFFF Subsequent Events N5 Buffer Terminator hex FFFF The unpacking of the events must be done in accordance with the CAMAC St...

Страница 22: ...xxusb_stack_read to verify that the stack is correctly stored 3 When the setup calls for it build and load the scaler stack 4 Set up the data acquisition trigger mode By default CC USB commences exec...

Страница 23: ...ctures This is the first command to be issued when attempting to establish communication with an XX USB WORD xxusb_devices_find XXUSB_DEVICE_TYPE lpXXUSBDevice Parameters lpXXUSBDevice out Pointer to...

Страница 24: ...close The xxusb_device_close function closes the handle to the desired XX USB device obtained by a xxusb_device_open call This function is to be called upon termination of an XX USB session WORD xxusb...

Страница 25: ...ress of the XX USB register For a list of XX USB addresses see Remarks dwRegisterData in Data to be stored in the register Return Values On success the function returns the number of bytes sent to XX...

Страница 26: ...ausing the latter to store this content in a dedicated block RAM for use when data acquisition mode is active This content can be read back using xxusb_stack_read function WORD xxusb_stack_write HANDL...

Страница 27: ...Data Parameters hDevice in Handle to the XX USB device wStackAddress in Type of the XX USB stack the content of which is to be read Valid types are 0 for the regular stack and 1 for the periodic scale...

Страница 28: ...Values On success the function returns the number of bytes read from XX USB The valid value is twice the number of 16 bit data words returned plus 2 CC USB or 4 VM USB The latter overhead bytes contai...

Страница 29: ...he host application receives the control and may reissue the command or terminate the acquisition 6 11 xxusb_bulk_read The xxusb_bulk_read function reads the content of the USB port FIFO of XX USB or...

Страница 30: ...ters hDevice in Handle to the XX USB device pData out Pointer to a character array that receives the data returned by the operation i e the content of the USB port output FIFO of the XX USB wDataLen i...

Страница 31: ...correct number is 518 Function returns a negative number on a failure which in most cases signifies a timeout condition Remarks To program the flash memory one must call repeatedly xxusb_flashblock_pr...

Отзывы: