A Perkin Elmer detector is introduced to Online by the following entry in /online_dir/online.xml:
<hw>
...
<device>
    <name>pe</name> 
    <type>type_tango</type> 
    <module>module_tango</module>
    <device>p02/pedetector/xrd.01</device> 
    <control>tango</control> 
    <hostname>haspp02XXX:10000</hostname>
</device>
...
</hw>
Here is the virtual counter code for a Perkin Elmer:
if( $method =~ /reset/i)
{
    return Spectra::perkinElmer_startSubtracted( "pe_detector", 
                                                $Spectra::SYM{ scan_name} . "_",
                                                $Spectra::SYM{ sample_time},  
                                                $Spectra::SYM{ sindex}); 
}
if( $method =~ /read/i)
{
    while( Spectra::tng_state( "pe_detector"))
    {
       Util::log( "waiting for pe_detector"); 
       Spectra::wait( 0.1); 
    }
    return 1;
}
The following example shows how a single shot can be taken from a .gra file:
! ! ~/prog/perkinElmerSubtracted.gra ! fname_pe = arg(1) st_pe = arg(2) no_pe = arg(3) eval [Spectra::perkinElmer_singleShotSubtracted( "pe_detector", "fname_pe", "st_pe", "no_pe")] st_pe = fname_pe = no_pe =
The file exp_ini.exp contains a symbol assignment:
! ! /online_dir/exp_ini.exp ! pe_subtracted = "run prog:perkinElmerSubtracted.gra"
The user can invoke the .gra file from the command line:
ONLINE> pe_subtracted someFileName 2 1
Note that the online -tki manual contains the description of a beamline-specific-code widget for the Perkin Elmer detector.