background image

 

WIENER, Plein & Baus GmbH  

21 

www.wiener-d.com 

 

The structure of data retrieved in conjunction with direct requests for data addressed to the 
Register Block and to the CAMAC Stacks is simple, such that the buffer consists only of the 
requested data. 
The data buffers read during the data acquisition process have a structure depending on the 
mode of buffering, i.e., whether event data are allowed to span two buffers (bit 3 of BoffOpt 
set). Additionally, there are special rules for treating long events. These are discussed at the 
end of this section. 
 
For the Integer Event Mode, the data buffer has the following structure: 
1. Header word 

Bit 15 set indicates a watchdog buffer, bit 14 set  indicates a 
scaler buffer. Bits 0 – 9 represent the number of events in the 
buffer. 

2. Optional 2

nd

 Header Word  Bits 0-11 represent the number of words in the buffer. 

3. Event Length 

 

Event length including terminator words. 

4-N1. Event Data 
N2. Event Terminator  

hexadecimal FFFF 

N3. Optional 2

nd

 Terminator 

hexadecimal FFFF 

.  
.   Subsequent Events 

N5. Buffer Terminator 

hex FFFF 

The unpacking of the events must be done in accordance with the CAMAC Stack that is 
involved in generating the buffer. 
In the Split-Event mode, when events span two or more buffers, no buffer terminator is 
written. 
For the direct access of the CAMAC NAFGEN (Interactive CAMAC operations), no header 
words are written and the In Packet contains only one event.  
CC-USB has dedicated 2kWords-long event FIFO to assemble events. To handle longer 
events, CC-USB splits the long event into parts, each of which appears as a separate event in 
the output buffer. The partial events are distinguishable by bit 12 of the Event Length word 
set, except for the last part. Also, only the last “installment” is terminated by the Event 
Terminator word (s). 
CC-USB has a provision to automatically change the output buffer packing mode to Split-
Event mode, whenever the Event Length exceeds the length of the Integer-Event buffer. The 
fact of such a change is indicated by setting of bit 13 in the buffer header word.   

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: