Wiener CC-USB User Manual Download Page 22

 

WIENER, Plein & Baus GmbH  

22 

www.wiener-d.com 

 

5  GUIDE TO LIST MODE DATA ACQUISITION WITH CC-USB 
 

CC-USB is intended for use in list mode data acquisition, where it performs sequences of 
desired CAMAC operations pursuant to stack(s) stored in it, upon receipt of event trigger. 
CC-USB then formats the data read form the CAMAC bus and buffers them in a data buffer. 
When the buffer is full, CC-USB transfers its content to the In FIFO of the USB controller IC 
for a readout by host software. 
 
To set up CC-USB for data acquisition in list mode one nedds to do the following: 
 

1.  Build the regular stack by adding all the desired simple and complex commands to it. 

One must make sure that the stack sequence will clear all CAMAC modules. It is 
recommended to first execute the stack from the host software to verify that it 
performes as intended. One may use here the libxxusb library function 
xxusb_stack_execute. 

2.  Load the stack into the CC-USB memory, e.g., by calling the libxxusb library 

function xxusb_stack_write. It is recommended to read back the stack (function 
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 execution 

of the stack upon receipt of a NIM signal at its user NIM input I1.  

5.  Set the trigger delay (time from the receipt of an event to the commencement of the 

stack execution) and LAM timeout. 

6.  Set up event termination mode. By default, CC-USB terminates every event by one 

terminator word 0xFFFF. 

7.  Set up buffering mode and data buffer length by writing a suitable 4-bit code into bits 

0-3 of the Global Mode Register. The default is buffer length of 4096 words and 
events fitting into one buffer. 

8.  Set up CAMAC bus arbitration, if necessary. The default is no arbitration. 
9.  Set buffer header option. By default, CC-USB writes one buffer header word 

containig information on the number of events in the buffer, buffer type (regular, or 
periodic scaler), and the buffer termination mode (regular or watchdog). 

10. Start acquisition by setting bit 0 of the Action Register to 1. End acquisition by 

resetting this bit to “0”. While in acquisition mode, the host software is expected to 
read the USB port In FIFO in a loop, to empty it and make space for subsequent 
events. 

Summary of Contents for CC-USB

Page 1: ...WIENER Plein Baus GmbH 1 www wiener d com CC USB User Manual...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Reviews: