#include "vxWorks.h"
#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "application.conf"
Defines | |
#define | P1NAM0 " Electron energy " |
#define | P1NAM1 " " |
#define | P1NAM2 " Ion charge " |
#define | P1NAM3 " Ion mass " |
#define | P1NAM4 " Ion energy " |
#define | P1NAM5 " Efficiency " |
#define | P1NAM6 " Angular position indicator " |
#define | P1NAM7 " Divider " |
#define | P1NAM8 " WWR potential " |
#define | P1NAM9 " Ring potential " |
#define | P1UNIT0 " [eV]" |
#define | P1UNIT1 " " |
#define | P1UNIT2 " [q]" |
#define | P1UNIT3 " [amu]" |
#define | P1UNIT4 " [keV]" |
#define | P1UNIT5 " [%%]" |
#define | P1UNIT6 " [Imp/10mm]" |
#define | P1UNIT7 " " |
#define | P1UNIT8 " [%%]" |
#define | P1UNIT9 " [%%]" |
#define | P2NAM00 " Time base spectrum 4:" |
#define | P2NAM01 " Divider [2**(-n) MHz] " |
#define | P2NAM02 " Frequency " |
#define | P2NAM10 " Electron current converter:" |
#define | P2NAM11 " Range " |
#define | P2NAM12 " Full scale constant " |
#define | P2NAM20 " Ion current converter:" |
#define | P2NAM21 " Range " |
#define | P2NAM22 " Full scale constant " |
#define | P2UNIT00 " " |
#define | P2UNIT01 " " |
#define | P2UNIT02 " " |
#define | P2UNIT10 " " |
#define | P2UNIT11 " " |
#define | P2UNIT12 " [Hz]" |
#define | P2UNIT20 " " |
#define | P2UNIT21 " " |
#define | P2UNIT22 " [Hz]" |
#define | BITMIN 0. |
#define | BITMAX 65535. |
#define | EMINDAC1 0. |
#define | EMAXDAC1 256. |
#define | EMINDAC2 0. |
#define | EMAXDAC2 1024. |
#define | EMINDAC3 0. |
#define | EMAXDAC3 1024. |
#define | EMINPSa -100. |
#define | EMAXPSa +100. |
#define | EMINPSb 0. |
#define | EMAXPSb 1024. |
#define | E2BIT1 ((BITMAX-BITMIN) / (EMAXDAC1-EMINDAC1)) |
#define | E2BIT2 ((BITMAX-BITMIN) / (EMAXDAC2-EMINDAC2)) |
#define | E2BIT3 ((BITMAX-BITMIN) / (EMAXDAC3-EMINDAC3)) |
#define | DAC1ADR 0x0010 |
#define | DAC2ADR 0x0011 |
#define | DAC3ADR 0x0012 |
#define | CHANADR 0x0013 |
#define | TONADR 0x0014 |
#define | TOFFADR 0x0015 |
#define | NZTADR 0x0016 |
#define | CRNGADR 0x0017 |
#define | DAC4ADR 0x0070 |
#define | BITMIN 0. |
#define | BITMAX 65535. |
#define | EMINDAC1 0. |
#define | EMAXDAC1 256. |
#define | EMINDAC2 0. |
#define | EMAXDAC2 6553.5 |
#define | EMINDAC3 0. |
#define | EMAXDAC3 6553.5 |
#define | EMINPSa -100. |
#define | EMAXPSa +100. |
#define | EMINPSb 0. |
#define | EMAXPSb 6500. |
#define | E2BIT1 ((BITMAX-BITMIN) / (EMAXDAC1-EMINDAC1)) |
#define | E2BIT2 ((BITMAX-BITMIN) / (EMAXDAC2-EMINDAC2)) |
#define | E2BIT3 ((BITMAX-BITMIN) / (EMAXDAC3-EMINDAC3)) |
#define | DAC1ADR 0x0010 |
#define | DAC2ADR 0x0011 |
#define | DAC3ADR 0x0012 |
#define | CHANADR 0x0013 |
#define | TONADR 0x0014 |
#define | TOFFADR 0x0015 |
#define | NZTADR 0x0016 |
#define | CRNGADR 0x0017 |
#define | DAC4ADR 0x0070 |
#define | BITMIN 0. |
#define | BITMAX 65535. |
#define | EMINDAC1 0. |
#define | EMAXDAC1 255.998 |
#define | EMINDAC2 0. |
#define | EMAXDAC2 2048. |
#define | EMINDAC3 0. |
#define | EMAXDAC3 1500. |
#define | EMINPSa -100. |
#define | EMAXPSa +100. |
#define | EMINPSb 0. |
#define | EMAXPSb 1500. |
#define | E2BIT1 ((BITMAX-BITMIN) / (EMAXDAC1-EMINDAC1)) |
#define | E2BIT2 ((BITMAX-BITMIN) / (EMAXDAC2-EMINDAC2)) |
#define | E2BIT3 ((BITMAX-BITMIN) / (EMAXDAC3-EMINDAC3)) |
#define | DAC1ADR 0x0010 |
#define | DAC2ADR 0x0011 |
#define | DAC3ADR 0x0012 |
#define | CHANADR 0x0013 |
#define | TONADR 0x0014 |
#define | TOFFADR 0x0015 |
#define | NZTADR 0x0016 |
#define | CRNGADR 0x0017 |
#define | DAC4ADR 0x0070 |
Functions | |
static int | inxgun0 (int mode) |
static int | inxgun2 (int mode) |
static int | inxgun3 (int mode) |
static int | rdconv (int crngadr) |
void | Setcfes (void) |
void | Setcfis (void) |
void | Setlimit (void) |
int | Shoxhdr (void) |
int | Inxpar (int mode) |
void | Cnvxpar (FILE *fd1) |
Variables | |
float | ulnold = 80. |
char * | chzeit [16] |
char * | chestr [8] |
char * | chistr [16] |
modification history -------------------- 15aug08 kHu DOXYGEN comments added 16apr03 kHu Fit gemacht fuer -Wall GCC-Option 14jan03 kHu neu: Edit header of spectrum 07may02 kHu "Update parameters" in inxgun..() 18feb02 kHu von esw24.c nach esw25.c 03apr01 kHu Cnvxpar() neu 08mar01 kHu Inxpar() update converter data 25jan01 kHu inxallgun(int crngadr) 17jan01 kHu Set e-gun soft limit Setlimit 16jan01 kHu nach Kanonentypen aufgeteilt 05jan01 kHu tReadp() -> tMenu 19dec00 kHu Ion-/Elektr.-Strom Konversionsfaktoren veraenderbar 16oct00 kHu ECread() ohne Invertieren 07sep00 kHu ECinit(void) -> ECinit(BOOL initIT) 24jan00 kHu GUNPAR, GUNTYP 11nov99 kHu Newprog Standard 22okt99 kHu mit ESS abgeglichen 21sep99 kHu ueberarbeitet 20jan99 kHu include Header Files geaendert 22dec98 kHu Trennen in daclib und exlib 22oct98 kHu Umstellung auf tReadp() 08oct98 kHu VxWorks Portierung (C) 25apr97 mSt neuer Schrittmotor 20jan92 kHu Scal. fact. spec. 5 14feb91 gHo 30jan91 kHu 29mar90 gHo 28sep88 kHu PDP11 Version (F77, Macro-11)
#define BITMAX 65535. |
#define BITMAX 65535. |
#define BITMAX 65535. |
#define BITMIN 0. |
#define BITMIN 0. |
#define BITMIN 0. |
#define CHANADR 0x0013 |
#define CHANADR 0x0013 |
#define CHANADR 0x0013 |
#define CRNGADR 0x0017 |
#define CRNGADR 0x0017 |
#define CRNGADR 0x0017 |
#define DAC1ADR 0x0010 |
#define DAC1ADR 0x0010 |
#define DAC1ADR 0x0010 |
#define DAC2ADR 0x0011 |
#define DAC2ADR 0x0011 |
#define DAC2ADR 0x0011 |
#define DAC3ADR 0x0012 |
#define DAC3ADR 0x0012 |
#define DAC3ADR 0x0012 |
#define DAC4ADR 0x0070 |
#define DAC4ADR 0x0070 |
#define DAC4ADR 0x0070 |
#define E2BIT1 ((BITMAX-BITMIN) / (EMAXDAC1-EMINDAC1)) |
#define E2BIT1 ((BITMAX-BITMIN) / (EMAXDAC1-EMINDAC1)) |
#define E2BIT1 ((BITMAX-BITMIN) / (EMAXDAC1-EMINDAC1)) |
#define E2BIT2 ((BITMAX-BITMIN) / (EMAXDAC2-EMINDAC2)) |
#define E2BIT2 ((BITMAX-BITMIN) / (EMAXDAC2-EMINDAC2)) |
#define E2BIT2 ((BITMAX-BITMIN) / (EMAXDAC2-EMINDAC2)) |
#define E2BIT3 ((BITMAX-BITMIN) / (EMAXDAC3-EMINDAC3)) |
#define E2BIT3 ((BITMAX-BITMIN) / (EMAXDAC3-EMINDAC3)) |
#define E2BIT3 ((BITMAX-BITMIN) / (EMAXDAC3-EMINDAC3)) |
#define EMAXDAC1 255.998 |
#define EMAXDAC1 256. |
#define EMAXDAC1 256. |
#define EMAXDAC2 2048. |
#define EMAXDAC2 6553.5 |
#define EMAXDAC2 1024. |
#define EMAXDAC3 1500. |
#define EMAXDAC3 6553.5 |
#define EMAXDAC3 1024. |
#define EMAXPSa +100. |
#define EMAXPSa +100. |
#define EMAXPSa +100. |
#define EMAXPSb 1500. |
#define EMAXPSb 6500. |
#define EMAXPSb 1024. |
#define EMINDAC1 0. |
#define EMINDAC1 0. |
#define EMINDAC1 0. |
#define EMINDAC2 0. |
#define EMINDAC2 0. |
#define EMINDAC2 0. |
#define EMINDAC3 0. |
#define EMINDAC3 0. |
#define EMINDAC3 0. |
#define EMINPSa -100. |
#define EMINPSa -100. |
#define EMINPSa -100. |
#define EMINPSb 0. |
#define EMINPSb 0. |
#define EMINPSb 0. |
#define NZTADR 0x0016 |
#define NZTADR 0x0016 |
#define NZTADR 0x0016 |
#define P1NAM0 " Electron energy " |
#define P1NAM1 " " |
#define P1NAM2 " Ion charge " |
#define P1NAM3 " Ion mass " |
#define P1NAM4 " Ion energy " |
#define P1NAM5 " Efficiency " |
#define P1NAM6 " Angular position indicator " |
#define P1NAM7 " Divider " |
#define P1NAM8 " WWR potential " |
#define P1NAM9 " Ring potential " |
#define P1UNIT0 " [eV]" |
#define P1UNIT1 " " |
#define P1UNIT2 " [q]" |
#define P1UNIT3 " [amu]" |
#define P1UNIT4 " [keV]" |
#define P1UNIT5 " [%%]" |
#define P1UNIT6 " [Imp/10mm]" |
#define P1UNIT7 " " |
#define P1UNIT8 " [%%]" |
#define P1UNIT9 " [%%]" |
#define P2NAM00 " Time base spectrum 4:" |
#define P2NAM01 " Divider [2**(-n) MHz] " |
#define P2NAM02 " Frequency " |
#define P2NAM10 " Electron current converter:" |
#define P2NAM11 " Range " |
#define P2NAM12 " Full scale constant " |
#define P2NAM20 " Ion current converter:" |
#define P2NAM21 " Range " |
#define P2NAM22 " Full scale constant " |
#define P2UNIT00 " " |
#define P2UNIT01 " " |
#define P2UNIT02 " " |
#define P2UNIT10 " " |
#define P2UNIT11 " " |
#define P2UNIT12 " [Hz]" |
#define P2UNIT20 " " |
#define P2UNIT21 " " |
#define P2UNIT22 " [Hz]" |
#define TOFFADR 0x0015 |
#define TOFFADR 0x0015 |
#define TOFFADR 0x0015 |
#define TONADR 0x0014 |
#define TONADR 0x0014 |
#define TONADR 0x0014 |
void Cnvxpar | ( | FILE * | fd1 | ) |
static int inxgun0 | ( | int | mode | ) | [static] |
static int inxgun2 | ( | int | mode | ) | [static] |
static int inxgun3 | ( | int | mode | ) | [static] |
int Inxpar | ( | int | mode | ) |
static int rdconv | ( | int | crngadr | ) | [static] |
void Setcfes | ( | void | ) |
void Setcfis | ( | void | ) |
void Setlimit | ( | void | ) |
int Shoxhdr | ( | void | ) |
char* chestr[8] |
Initial value:
{ "500 [mA]","150 [mA]"," 50 [mA]"," 15 [mA]", " 5 [mA]","1.5 [mA]","500 [ľA]","150 [ľA]" }
char* chistr[16] |
Initial value:
{ "100 [ľA]"," 30 [ľA]"," 10 [ľA]"," 3 [ľA]", " 1 [ľA]","300 [nA]","100 [nA]"," 30 [nA]", " 10 [nA]"," 3 [nA]"," 1 [nA]","300 [pA]", "100 [pA]"," 30 [pA]"," 10 [pA]"," 3 [pA]" }
char* chzeit[16] |
Initial value:
{ " 1 [MHz]"," 500 [kHz]"," 250 [kHz]"," 125 [kHz]", " 62.5 [kHz]","31.25 [kHz]","15.63 [kHz]","7.813 [kHz]", "3.906 [kHz]","1.953 [kHz]"," 976.6 [Hz]"," 488.3 [Hz]", " 244.1 [Hz]"," 122.1 [Hz]"," 61.04 [Hz]"," 30.52 [Hz]" }
float ulnold = 80. |