vppg.h File Reference

Go to the source code of this file.

Data Structures

struct  parameters

Functions

void VPPGInit (MVME_INTERFACE *mvme, const DWORD base_adr)
int VPPGLoad (MVME_INTERFACE *mvme, const DWORD base_adr, char *file)
DWORD VPPGPolmskWrite (MVME_INTERFACE *mvme, const DWORD base_adr, const DWORD pol)
DWORD VPPGPolmskRead (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGStatusRead (MVME_INTERFACE *mvme, const DWORD base_adr)
PARAM lineRead (FILE *input)
void byteOutputOrder (PARAM data, char *array)
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 VPPGPolzSet (MVME_INTERFACE *mvme, const DWORD base_adr, BYTE value)
BYTE VPPGPolzFlip (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGPolzRead (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)
BYTE VPPGBeamCtlRegRead (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 VPPGDisableExtTrig (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGEnableExtTrig (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGStopSequencer (MVME_INTERFACE *mvme, const DWORD base_adr)
void VPPGStartSequencer (MVME_INTERFACE *mvme, const DWORD base_adr)
BYTE VPPGExtTrigRegRead (MVME_INTERFACE *mvme, const DWORD base_adr)


Define Documentation

#define VPPG_BYTES_PER_WORD   0x02

Definition at line 35 of file vppg.h.

Referenced by VPPGLoad(), and VPPGStartpatternWrite().

#define VPPG_CLEAR_ADDR_COUNTER   0x04

Definition at line 37 of file vppg.h.

Referenced by VPPGLoad(), and VPPGStartpatternWrite().

#define VPPG_DEFAULT_PPG_POL_MSK   0x000000

Definition at line 30 of file vppg.h.

Referenced by VPPGInit(), and VPPGStartSequencer().

#define VPPG_LOAD_MEM   0x06

Definition at line 38 of file vppg.h.

Referenced by VPPGLoad(), and VPPGStartpatternWrite().

#define VPPG_OUTP_POL_MASK_HI   0x08

Definition at line 40 of file vppg.h.

Referenced by VPPGPolmskRead(), and VPPGPolmskWrite().

#define VPPG_OUTP_POL_MASK_LO   0x0A

Definition at line 42 of file vppg.h.

Referenced by VPPGPolmskRead(), and VPPGPolmskWrite().

#define VPPG_OUTP_POL_MASK_MID   0x09

Definition at line 41 of file vppg.h.

Referenced by VPPGPolmskRead(), and VPPGPolmskWrite().

#define VPPG_POLZ_SOURCE_CONTROL   0x0B

Definition at line 43 of file vppg.h.

Referenced by VPPGPolzCtlPPG(), and VPPGPolzCtlVME().

#define VPPG_PPG_RESET_REG   0x00

Definition at line 33 of file vppg.h.

Referenced by VPPGLoad(), and VPPGStartpatternWrite().

#define VPPG_PPG_START_TRIGGER   0x01

Definition at line 34 of file vppg.h.

Referenced by VPPGStartpatternWrite(), and VPPGStartSequencer().

#define VPPG_PROGRAMMING_FIN   0x07

Definition at line 39 of file vppg.h.

Referenced by VPPGLoad(), and VPPGStartpatternWrite().

#define VPPG_TOGL_MEM_DEVICE   0x03

Definition at line 36 of file vppg.h.

Referenced by VPPGLoad(), and VPPGStartpatternWrite().

#define VPPG_VME_BEAM_CTL   0X19

Definition at line 57 of file vppg.h.

Referenced by VPPGBeamCtlPPG(), VPPGBeamCtlRegRead(), VPPGBeamOff(), and VPPGBeamOn().

#define VPPG_VME_CYC_COUNT_HI   0X15

Definition at line 53 of file vppg.h.

#define VPPG_VME_CYC_COUNT_LO   0X18

Definition at line 56 of file vppg.h.

#define VPPG_VME_CYC_COUNT_MH   0X16

Definition at line 54 of file vppg.h.

#define VPPG_VME_CYC_COUNT_ML   0X17

Definition at line 55 of file vppg.h.

#define VPPG_VME_MCS_COUNT_HI   0X11

Definition at line 49 of file vppg.h.

#define VPPG_VME_MCS_COUNT_LO   0X14

Definition at line 52 of file vppg.h.

#define VPPG_VME_MCS_COUNT_MH   0X12

Definition at line 50 of file vppg.h.

#define VPPG_VME_MCS_COUNT_ML   0X13

Definition at line 51 of file vppg.h.

#define VPPG_VME_POLZ_SET   0x0C

Definition at line 44 of file vppg.h.

Referenced by VPPGPolzRead(), and VPPGPolzSet().

#define VPPG_VME_READ_STAT_REG   0x0D

Definition at line 45 of file vppg.h.

Referenced by VPPGStatusRead().

#define VPPG_VME_RESET   0x0F

Definition at line 47 of file vppg.h.

Referenced by VPPGStopSequencer().

#define VPPG_VME_RESET_COUNTERS   0x10

Definition at line 48 of file vppg.h.

#define VPPG_VME_TRIG_CTL   0X1A

Definition at line 58 of file vppg.h.

Referenced by VPPGDisableExtTrig(), VPPGEnableExtTrig(), and VPPGExtTrigRegRead().

#define VPPG_VME_TRIGGER_REG   0x0E

Definition at line 46 of file vppg.h.


Typedef Documentation

typedef char BYTE

Definition at line 19 of file vppg.h.

typedef unsigned long int DWORD

Definition at line 23 of file vppg.h.

typedef int INT

Definition at line 18 of file vppg.h.

typedef struct parameters PARAM

Definition at line 71 of file vppg.h.

typedef unsigned short int WORD

Definition at line 17 of file vppg.h.


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 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.

void VPPGDisable ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

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().

void VPPGEnable ( MVME_INTERFACE mvme,
const DWORD  base_adr 
)

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().

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.


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