#include <stdio.h>
#include <math.h>
#include <string.h>
#include "mscbemb.h"
Defines | |
#define | MAX_VOLTAGE 28000 |
#define | MAX_CURRENT 75 |
#define | MINDEL 100 |
#define | TPC_R 393.4 |
#define | IOFF -0.1718 |
#define | GPIB_ADDR_0 4 |
#define | DEMAND_CHANGED (1<<0) |
#define | RAMP_UP (1<<1) |
#define | RAMP_DOWN (1<<2) |
#define | HV_LIMIT_CHANGED (1<<3) |
#define | CUR_LIMIT_CHANGED (1<<4) |
#define | CUR_LIMIT_BYPASS (1<<7) |
#define | STATUS_RAMP_UP (1<<0) |
#define | STATUS_RAMP_DOWN (1<<1) |
#define | STATUS_VLIMIT (1<<2) |
#define | STATUS_ILIMIT (1<<3) |
#define | STATUS_LOWCUR (1<<4) |
#define | STATUS_HICUR (1<<5) |
Functions | |
void | user_write (unsigned char index) reentrant |
unsigned char | send (unsigned char adr, char *str) |
unsigned char | send_byte (unsigned char b) |
unsigned char | enter (unsigned char adr, char *str, unsigned char maxlen) |
void | set_voltage_limit (float value) |
void | set_hv (float value) reentrant |
void | read_hvi (void) |
void | ramp_hv (void) |
void | set_current_limit (float value) |
void | user_init (unsigned char init) |
unsigned char | user_read (unsigned char index) |
unsigned char | user_func (unsigned char *data_in, unsigned char *data_out) |
void | user_loop (void) |
Variables | |
unsigned char idata | _n_sub_addr = 1 |
char code | node_name [] = "CCBERTAN410" |
char xdata | svn_rev_code [] = "$Rev: 1399 $" |
unsigned char idata | chn_bits = 0 |
int | Ibypass = 0 |
float xdata | u_actual |
unsigned long xdata | t_ramp |
char xdata | str [32] |
char xdata * | buf |
unsigned char xdata | tiwp |
struct { | |
unsigned char status | |
float u_demand | |
float u_meas | |
float i_meas | |
unsigned int ramp_up | |
unsigned int ramp_down | |
float u_limit | |
float i_limit | |
char warning [32] | |
char date [24] | |
unsigned char gpib_adr | |
unsigned long mytime | |
} | user_data |
MSCB_INFO_VAR code | vars [] |
MSCB_INFO_VAR * | variables = vars |
SYS_INFO | sys_info |
#define CUR_LIMIT_BYPASS (1<<7) |
#define CUR_LIMIT_CHANGED (1<<4) |
#define DEMAND_CHANGED (1<<0) |
#define GPIB_ADDR_0 4 |
#define HV_LIMIT_CHANGED (1<<3) |
#define IOFF -0.1718 |
#define MAX_CURRENT 75 |
#define MAX_VOLTAGE 28000 |
#define MINDEL 100 |
#define RAMP_DOWN (1<<2) |
#define RAMP_UP (1<<1) |
#define STATUS_HICUR (1<<5) |
#define STATUS_ILIMIT (1<<3) |
#define STATUS_LOWCUR (1<<4) |
#define STATUS_RAMP_DOWN (1<<1) |
#define STATUS_RAMP_UP (1<<0) |
#define STATUS_VLIMIT (1<<2) |
#define TPC_R 393.4 |
unsigned char enter | ( | unsigned char | adr, | |
char * | str, | |||
unsigned char | maxlen | |||
) |
void ramp_hv | ( | void | ) |
void read_hvi | ( | void | ) |
unsigned char send | ( | unsigned char | adr, | |
char * | str | |||
) |
unsigned char send_byte | ( | unsigned char | b | ) |
void set_current_limit | ( | float | value | ) |
void set_hv | ( | float | value | ) |
void set_voltage_limit | ( | float | value | ) |
unsigned char user_func | ( | unsigned char * | data_in, | |
unsigned char * | data_out | |||
) |
void user_init | ( | unsigned char | init | ) |
void user_loop | ( | void | ) |
unsigned char user_read | ( | unsigned char | index | ) |
void user_write | ( | unsigned char | index | ) |
unsigned char idata _n_sub_addr = 1 |
char xdata * buf |
unsigned char idata chn_bits = 0 |
char date[24] |
unsigned char gpib_adr |
float i_limit |
float i_meas |
int Ibypass = 0 |
unsigned long mytime |
char code node_name[] = "CCBERTAN410" |
unsigned int ramp_down |
unsigned int ramp_up |
unsigned char status |
char xdata str[32] |
char xdata svn_rev_code[] = "$Rev: 1399 $" |
SYS_INFO sys_info |
unsigned long xdata t_ramp |
unsigned char xdata tiwp |
float xdata u_actual |
float u_demand |
float u_limit |
float u_meas |
struct { ... } user_data |
MSCB_INFO_VAR code vars[] |
{ 1, UNIT_BYTE, 0, 0, 0, "Status", &user_data.status, 4, UNIT_VOLT, 0, 0, MSCBF_FLOAT, "Udemand", &user_data.u_demand, 4, UNIT_VOLT, 0, 0, MSCBF_FLOAT, "Umeas", &user_data.u_meas, 4, UNIT_AMPERE, PRFX_MICRO, 0, MSCBF_FLOAT, "Imeas", &user_data.i_meas, 2, UNIT_VOLT, 0, 0, 0, "RampUp", &user_data.ramp_up, 2, UNIT_VOLT, 0, 0, 0, "RampDown",&user_data.ramp_down, 4, UNIT_VOLT, 0, 0, MSCBF_FLOAT, "Ulimit", &user_data.u_limit, 4, UNIT_AMPERE, PRFX_MICRO, 0, MSCBF_FLOAT, "Ilimit", &user_data.i_limit, 32, UNIT_STRING, 0, 0, 0, "warning", &user_data.warning, 1, UNIT_BYTE, 0, 0, MSCBF_HIDDEN, "GPIB Adr",&user_data.gpib_adr, 0 }
char warning[32] |