3/25/91 READING LECROY 6810 FROM A CAMAC FRONT END M. Glass Right now, the function the front end will support is reading back data buffers from the 6810. Setup and control are not supported, although we can easily add these functions. I am being quick and dirty. If you think of the 6810 as simply memory full of data to be read back, it is divided into 1k sample (2k byte) blocks. The address of a single block is a three-tuple: There are one to four channels. The segment size is adjustable. The smallest it can be is one block, the largest is 2**13 blocks. Unfortunately Acnet supports only linear addresses, so we must linearize the above. Also unfortunately, the maximum that can be acquired in one chunk is a trifle less than 4k bytes. Let me suggest the following: 1) Each channel has a different database device. 2) The memory for a single channel is linearized in the obvious manner: logical block offset = (segment no.) * (segment size) + block no. The largest possible logical block offset is 2**13. With no expansion memory, the largest possible block offset is 2**9 (=512k samples). This number is used as the "offset" parameter in a one-shot DPREQ, specifying which block is desired. 3) The user always reads exactly one block (1k samples, 2k bytes). The "length" parameter in the DPREQ call is therefore always exactly 2048 bytes. Using this scheme, reading a single channel becomes a simple loop of one-shot DPREQ/DPPROC calls, incrementing the "offset" from zero to the number of blocks desired. Database details: Right now, reading property only. SSDNHX READNG (8AFF/nncc/000x/0000) nn = slot cc = crate x = channel (1 to 4) PRO READNG (2, 2560, 60) 2560 = 2048 (max length) + 512 (max "offset") This assumes that your memory is big enough for 512k samples. If you are using expansion memory increase it accordingly. The gritty details of reading a single block, in the unlikely event that anybody but me is interested, are as follows: 1) F(1)A(10) / F(2)A(1) read and compute segment size 2) Divide "logical block offset" (offset parameter in DPREQ call) by segment size to obtain segment no. and block no. 3) F(16)A(5) data = 0 set the block size for reading (fixed at 1k samples). 4) F(16)A(6) / F(16)A(7) write the block no. 5) F(18)A(c) data = segment no. "c" is the channel number obtained from the SSDN. 6) F(2)A(0) 1024 times to read data 7) F(25)A(1) / F(2)A(0) to clean up after reading.