background image

S p e z i a l e l e k t r o n i k     G m b H

 

 

 

iseg Spezialelektronik GmbH 

Email: [email protected] 

Phone  ++ 49 351 / 26 996 - 0 

 

Bautzner Landstr. 23 

http://www.iseg-hv.com 

Fax 

++ 49 351 / 26 996 - 21 

 

D - 01454 Radeberg / Rossendorf 

Germany 

 

 

 

7. Program example 

 

/**********************************************************************************/ 
/* vhq.c 

*/ 

/* 

example program for iseg vme hv boards 

*/ 

/* mki, 

24.1.96 

*/ 

/* 

this code was compiled and run on an E6 under OS9 

*/ 

/* 

please contact iseg for the source files 

*/ 

/**********************************************************************************/ 

#include <stdio.h> 
#include "vhq.h" 
#define base 0xFFFFDD00 
int main() 


 ushort 

value_s; 

 ushort 

serial; 

 ushort 

imaxa,imaxb,vmaxa,vmaxb; 

 
 

value_s = *(ushort*) (base+MOD_ID); 

/* read board id */ 

 

serial   =  (value_s >> 12)* 1000 + ((value_s & 0x0f00) >> 8) * 100  

 

 

 

+ ((value_s & 0x00f0 >> 4) * 10 + (value_s & 0x000f); 

 

printf("This board is serial no.: %d\n",serial); 

 
 

value_s = *(ushort*) (base+STAT_REG1);  

/* check on DAC/manual switch setting */ 

 

if ((value_s & 0x202) != 0) 

  { 
 

 

printf("one of the two channels is in manual mode\n"); 

  printf("program 

terminating\n"); 

  return(-1); 
  } 
 

printf("both channels in DAC mode, ok.\n"); 

 
 

if ((value_s & 0x808) != 0)  

/* check on HV ON/OFF switch setting */ 

  { 
 

 

printf("one of the two channels is OFF\n"); 

  printf("program 

terminating\n"); 

  return(-1); 
  } 
 

printf("both channels ON, ok.\n"); 

 
 

if ((value_s & 0x4) != 0)  

/* whats the output polarity? */ 

 

 

printf("polarity of channel A is positive\n"); 

 else 
 

 

printf("polarity of channel A is negative\n"); 

 

if ((value_s & 0x400) != 0) 

 

 

printf("polarity of channel B is positive\n"); 

 else 
 

 

printf("polarity of channel B is negative\n"); 

 sleep(1); 
 
 

value_s = *(ushort*) (base+LIMITS_A)  

/* read Vmax and Imax */; 

 

vmaxa=((value_s & 0xf0) >> 4) * 10; 

 

imaxa=(value_s & 0x0f) * 10; 

 

 

printf("Vmax(A): %4d % %, Imax(A): %4d % %\n",vmaxa,imaxa); 

 sleep(1); 

 

value_s = *(ushort*) (base+LIMITS_B); 

 

vmaxb=((value_s & 0xf0) >> 4) * 10; 

 

imaxa=(value_s & 0x0f) * 10; 

 

 

printf("Vmax(B): %4d % %, Imax(B): %4d % %\n",vmaxb,imaxb); 

 
 

*(ushort*) (base+RAMP_SPEED_A) = 100; 

/* set ramp speed 100 V/s */ 

 

 

printf("ramp A set\n"); 

 

*(ushort*) (base+RAMP_SPEED_B) = 100; 

 

 

printf("ramp B set\n"); 

 
 

*(ushort*) (base+SET_CTRIP_A) = 100; 

/* set channel A software current trip to 100 µA

 */ 
 

printf("channel A current trip set\n"); 

 

*(ushort*) (base+SET_CTRIP_B) = 0; 

/* channel B without software current trip 

*/ 

 

printf("channel B current trip set\n"); 

Содержание VHQ 202M

Страница 1: ... diagram Appendix B Rotary switch locations Attention It is not allowed to use the unit if the covers have been removed We decline all responsibility for damages and injuries caused by an improper use of the module It is highly recommended to read the operators manual before any kind of operation Note The information in this manual is subject to change without notice We take no responsibility what...

Страница 2: ... 2 mA 0 1 mA 0 1 mA with option M h 0 6 mA 0 4 mA 0 3 mA 0 2 mA with option _104 100 µA 100 µA 100 µA 100 µA Ripple typ 0 5 mVP P 0 5 mVP P 1 mVP P 2 mVP P max 2 mVP P 2 mVP P 2 mVP P 5 mVP P Stability VO 5 10 5 idle to max load VO VINPUT 5 10 5 Temperature coefficient 5 10 5 K LCD Display 4 digits with sign switch controlled voltage display in V current display in µA Resolution of measurement Cur...

Страница 3: ...ed with very high precision to the set point Separate security circuits prevent exceeding the front panel switch settings for the current Imax and voltage Vmax limits A monitoring circuit prevents malfunction caused by low supply voltage The internal error detection logic evaluates the corresponding error signals and the external INHIBIT signal It allows the detection of short overcurrent due to s...

Страница 4: ...on the cover side see appendix B The chosen polarity is displayed by a LED on the front panel 14 and a sign on the LCD display 1 Attention It is not allowed to change the polarity under power An undefined switch setting not at one of the end positions will cause no output voltage High voltage output is switched on with HV ON switch 8 at the front panel The viability is signaled by the yellow LED 1...

Страница 5: ... is signaled by the red error LED on the front panel 6 Function of KILL switch 10 Switch to the right position ENABLE KILL The output voltage will be shut off permanently without ramp on exceeding Vmax Imax or in the presence of an INHIBIT signal Low active at the INHIBIT input 11 Restoring the output voltage is possible after operating the switches HV ON or KILL or reading Status register 2 and t...

Страница 6: ...3 A2 A1 Read Write 0 0 0 0 0 0 0 Status register 1 0 0 0 0 0 1 0 Set voltage Channel A V Set voltage Channel A Vset Vmax V 0 0 0 0 1 0 0 Set voltage Channel B V Set voltage Channel B Vset Vmax V 0 0 0 0 1 1 0 Ramp speed Channel A 2 255 V s Ramp speed Channel A 2 255 V s 0 0 0 1 0 0 0 Ramp speed Channel B 2 255 V s Ramp speed Channel B 2 255 V s 0 0 0 1 0 1 0 Actual voltage Channel A V 0 0 0 1 1 0 ...

Страница 7: ...0 Vout 0 This register is representing the general status of the VHQ Error is formed by the logic or of REG2ER_ REG1ER_ EXTINH_ RANGE_ and ILIM_ from Status register 2 Vout 0 is formed by DAC output 0 and actual voltage 5 V Set voltage Channel A B BA 0x04 BA 0x08 Set voltage Vset from 0 to Vmax in V If Vset greater then Vmax BA 0x24 BA 0x28 Vset will be not changed Ramp speed Channel A B BA 0x0C B...

Страница 8: ...LE KILL resp Current trip or INHIBIT respectively the error bits REG1ER_ EXTINH_ ILIM_ have to be reset by reading Status register 2 before an output voltage can be set again Start voltage change BA 0x34 Ba 0x38 A change in the output voltage of set voltage BA 0x04 BA 0x08 is performed by reading these registers Writing to the registers stores the data as new set voltage Vset Vmax and starts the v...

Страница 9: ...h channels in DAC mode ok n if value_s 0x808 0 check on HV ON OFF switch setting printf one of the two channels is OFF n printf program terminating n return 1 printf both channels ON ok n if value_s 0x4 0 whats the output polarity printf polarity of channel A is positive n else printf polarity of channel A is negative n if value_s 0x400 0 printf polarity of channel B is positive n else printf pola...

Страница 10: ...ushort base ACT_VOLT_B printf channel B is at d V n value_s printf press any key to ramp down and exit n ramp channels down getc stdin ushort base START_VOLT_A 0 set channel A voltage to 0 V sleep 1 ushort base START_VOLT_B 0 set channel B voltage to 0 V return 0 vhq h header file for iseg vme hv boards mki 24 1 96 vhq registers define STAT_REG1 0x00 define SET_VOLT_A 0x04 define SET_VOLT_B 0x08 d...

Страница 11: ...ecoder Data bus buffer LCD display driver Micro Controller Filter Reference voltage ADC MUX DAC 1 DAC 2 Front panel switches Resonance converter HV Transformer Rectifier Polarity switch HV Filter HV OUTPUT A Channel A rectifier AGC amplifier Precision Vmax Imax Error logic Inhibit Supply voltage monitoring Hardware voltage ramp Filter HV OUTPUT B Channel B 5V 12V monitoring monitoring Appendix A B...

Страница 12: ...g hv de Phone 49 351 26 996 0 Bautzner Landstr 23 http www iseg hv com Fax 49 351 26 996 21 D 01454 Radeberg Rossendorf Germany 12 POLARITY NEG POS A NEG POS B Appendix B VHQ side cover Polarity rotary switch eg channel A Polarity negative channel B Polarity positive ...

Отзывы: