vppg.c File Reference

Go to the source code of this file.

Functions

void VPPGPolzSet (MVME_INTERFACE *mvme, const DWORD base_adr, BYTE value)
BYTE VPPGPolzRead (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGPolzFlip (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGRegWrite (MVME_INTERFACE *mvme, const DWORD base_adr, DWORD reg_offset, BYTE value)
BYTE VPPGRegRead (MVME_INTERFACE *mvme, const DWORD base_adr, DWORD reg_offset)
void VPPGInit (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGStatusRead (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGBeamOn (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGBeamOff (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGBeamCtlPPG (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGPolzCtlVME (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGPolzCtlPPG (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGBeamCtlRegRead (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGStartSequencer (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGStopSequencer (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGEnableExtTrig (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGDisableExtTrig (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGExtTrigRegRead (MVME_INTERFACE *mvme, const DWORD base_adr)
DWORD VPPGPolmskWrite (MVME_INTERFACE *mvme, const DWORD base_adr, const DWORD pol)
DWORD VPPGPolmskRead (MVME_INTERFACE *mvme, const DWORD base_adr)
DWORD VPPGStartpatternWrite (MVME_INTERFACE *mvme, const DWORD base_adr, const DWORD pol)
void byteOutputOrder (PARAM data, char *array)
PARAM lineRead (FILE *infile)
int VPPGLoad (MVME_INTERFACE *mvme, const DWORD base_adr, char *file)


Define Documentation

#define BRANCH1_MASK   0X000FF000

Referenced by byteOutputOrder().

#define BRANCH2_MASK   0X00000FF0

Referenced by byteOutputOrder().

#define BRANCH3_MASK   0X0000000F

Referenced by byteOutputOrder().

#define HIGH_MASK   0xFF000000

Referenced by byteOutputOrder().

#define HIGH_MID_MASK   0x00FF0000

Referenced by byteOutputOrder().

#define LOW_MASK   0x000000FF

Referenced by byteOutputOrder().

#define LOW_MID_MASK   0x0000FF00

Referenced by byteOutputOrder().


Function Documentation

void byteOutputOrder ( PARAM  data,
char *  array 
)

byteOutputOrder byte swap for output byte swap for PPG.

Parameters:
data 
array 
Returns:
void

Definition at line 490 of file vppg.c.

Referenced by VPPGLoad().

PARAM lineRead ( FILE *  infile  ) 

lineRead Read line of input file read line.

Parameters:
*input FILE pointer
Returns:
PARAM data structure

Definition at line 530 of file vppg.c.

Referenced by VPPGLoad().

void ppg ( void   ) 

Definition at line 24 of file vppg.c.

void VPPGBeamCtlPPG ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGBeamCtlPPG PPG controls the Beam On/Off signal. Give PPG script control of Beam On/Off signal (ch14)

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 267 of file vppg.c.

Referenced by VPPGInit().

BYTE VPPGBeamCtlRegRead ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGBeamCtlRegRead Read the Beam Control Register Read the Beam Control Register

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 307 of file vppg.c.

void VPPGBeamOff ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGBeamOff Directly set Beam Off signal. Set Beam Off (independent of PPG script)

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 253 of file vppg.c.

void VPPGBeamOn ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGBeamOn Directly set Beam On signal. Set Beam On (independent of ppg script)

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 237 of file vppg.c.

BYTE VPPGDisableExtTrig ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGDisableExtTrig(ppg_base) Disable front panel trigger input so external inputs cannot start the sequence Disable external trigger input so external inputs cannot start the sequence

Parameters:
base\_adr PPG VME base address
Returns:
data

Definition at line 373 of file vppg.c.

Referenced by VPPGInit().

BYTE VPPGEnableExtTrig ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGEnableExtTrig(ppg_base) Enable front panel trigger input so external inputs can start the sequence Enable external trigger input so external inputs can start the sequence

Parameters:
base\_adr PPG VME base address
Returns:
data

Definition at line 357 of file vppg.c.

BYTE VPPGExtTrigRegRead ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGExtTrigRegRead Read external trig register (bit 0 int/ext trigger is enabled bit 1 trigger active/inactive) Read PPG.

Parameters:
base\_adr PPG VME base addroless
Returns:
value (8bit)

Definition at line 386 of file vppg.c.

void VPPGInit ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGInit Initialize the PPG Initialize PPG

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 173 of file vppg.c.

int VPPGLoad ( MVME_INTERFACE mvme,
const DWORD  base_adr,
char *  file 
)

ppgLoad Load PPG file into sequencer. Load file PPG.

Parameters:
base\_adr PPG VME base address
Returns:
1=SUCCESS, -1=file not found

Definition at line 557 of file vppg.c.

DWORD VPPGPolmskRead ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGPolmskRead Read the Polarity mask. Read polarity mask.

Parameters:
base\_adr PPG VME base address
Returns:
polarity (24bit)

Definition at line 431 of file vppg.c.

Referenced by VPPGPolmskWrite(), and VPPGStartpatternWrite().

DWORD VPPGPolmskWrite ( MVME_INTERFACE mvme,
const DWORD  base_adr,
const DWORD  pol 
)

VPPG Write the Polarity mask. Write and read back polarity mask.

Parameters:
base\_adr PPG VME base address
pol polarity (24bit)
Returns:
polarity (24bit)

Definition at line 405 of file vppg.c.

Referenced by VPPGInit(), and VPPGStartSequencer().

void VPPGPolzCtlPPG ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGPolzCtlPPG PPG controls the Pol On/Off signal for helicity Give PPG script control of Pol On/Off signal (DRV POL) which now follows ch15

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 294 of file vppg.c.

Referenced by VPPGInit().

void VPPGPolzCtlVME ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGPolzCtlVME VME controls the Pol On/Off signal for helicity Give VME control of Pol On/Off signal (DRV POL) (PPG script ignored)

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 281 of file vppg.c.

BYTE VPPGPolzFlip ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGPolzFlip Flip the polarization bit. Read PPG.

Parameters:
base\_adr PPG VME base address

Definition at line 81 of file vppg.c.

BYTE VPPGPolzRead ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

ppgPolzRead Read Polarization bit. Read PPG.

Parameters:
base\_adr PPG VME base addroless
Returns:
value (8bit)

Definition at line 64 of file vppg.c.

Referenced by VPPGPolzFlip().

void VPPGPolzSet ( MVME_INTERFACE mvme,
const DWORD  base_adr,
BYTE  value 
)

ppgPolzSet Set Polarization bit to a given value. Write PPG.

Parameters:
base\_adr PPG VME base addroless
value (8bit)

Definition at line 51 of file vppg.c.

Referenced by VPPGPolzFlip().

BYTE VPPGRegRead ( MVME_INTERFACE mvme,
const DWORD  base_adr,
DWORD  reg_offset 
)

VPPGRegRead Read PPG register. Read PPG.

Parameters:
base\_adr PPG VME base addroless
reg\_offset PPG register
Returns:
status register (8 bit)

Definition at line 145 of file vppg.c.

Referenced by VPPGBeamCtlRegRead(), VPPGExtTrigRegRead(), VPPGPolmskRead(), VPPGPolzRead(), and VPPGStatusRead().

BYTE VPPGRegWrite ( MVME_INTERFACE mvme,
const DWORD  base_adr,
DWORD  reg_offset,
BYTE  value 
)

VPPGRegWrite Write into PPG register. Write PPG.

Parameters:
base\_adr PPG VME base address
reg\_offset PPG register
value (8bit)
Returns:
status register

Definition at line 111 of file vppg.c.

Referenced by VPPGBeamCtlPPG(), VPPGBeamOff(), VPPGBeamOn(), VPPGDisableExtTrig(), VPPGEnableExtTrig(), VPPGLoad(), VPPGPolmskWrite(), VPPGPolzCtlPPG(), VPPGPolzCtlVME(), VPPGPolzSet(), VPPGStartpatternWrite(), VPPGStartSequencer(), and VPPGStopSequencer().

DWORD VPPGStartpatternWrite ( MVME_INTERFACE mvme,
const DWORD  base_adr,
const DWORD  pol 
)

ppg ????????????????????? Write the Start(Power up or Reset)Pattern. Write and read back startup pattern.

Parameters:
base\_adr PPG VME base address
pol polarity (24bit)
Returns:
polarity (24bit)

Definition at line 462 of file vppg.c.

void VPPGStartSequencer ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGStartSequencer Start the PPG sequencer (internal trigger) start the PPG sequencer.

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 328 of file vppg.c.

BYTE VPPGStatusRead ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGStatusRead Read Status register. Read status.

Parameters:
base\_adr PPG VME base address
Returns:
status register

Definition at line 194 of file vppg.c.

void VPPGStopSequencer ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

VPPGStopSequencer Stop the PPG sequencer. Stop the PPG sequencer.

Parameters:
base\_adr PPG VME base address
Returns:
void

Definition at line 343 of file vppg.c.


Variable Documentation

int ddd = 1

Definition at line 18 of file vppg.c.

Referenced by byteOutputOrder(), VPPGBeamCtlRegRead(), VPPGLoad(), VPPGPolmskRead(), VPPGPolmskWrite(), VPPGPolzFlip(), VPPGPolzRead(), VPPGRegRead(), and VPPGRegWrite().

FILE* ppginput

Definition at line 19 of file vppg.c.

Referenced by VPPGLoad().


Midas DOC Version 2.0.2 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Exaos Lee - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk