An Example of a Kinoko Readout Script

The following is an example of a Kinoko Readout Script, which describes data readout procedures from DAQ hardware.

In this example, one CAMAC ADC is installed into a CAMAC crate at station 16. ADC triggers (CAMAC LAM) initiate readout transactions, which read data from ch-0 to ch-3 and reset the ADC.

/* CamacAdc.kts */
/* Edited by Sanshiro E. on 11 October 1999. */
/* Last updated by Sanshiro E. on 8 April 2000. */


datasource CamacAdc
{
    int station_number = 16;
    long readout_channels = #0..#3;
    
    CamacCrate crate;
    CamacController controller("Toyo-CC7x00");
    CamacModule adc("Rinei-RPC022");
    
    crate.installController(controller);
    crate.installModule(adc, station_number);
    
    on trigger(adc) {
	adc.read(readout_channels);
	adc.clear();
    }
}