19 #include "class/multi.h"
20 #include "LakeShore336.h"
22 #include "eurotherm2416.h"
25 #include "tcpip_rs232.h"
27 #define MOD_CF1_DEMAND 9
28 #define MOD_CF1_MEASURED 0
29 #define MOD_HE_SHIELD_DEMAND 17
30 #define MOD_HE_SHIELD_MEASURED 3
60 {
"Lake336_Moderator", ls336_in, 24, tcpip_rs232, DF_INPUT },
61 {
"Lake336_Moderator", ls336_out, 14, tcpip_rs232, DF_OUTPUT },
62 {
"Eurotherm2416_In", eurotherm2416_in, 8, tcpip_rs232, DF_INPUT },
63 {
"Eurotherm2416_Out", eurotherm2416_out, 7, tcpip_rs232, DF_OUTPUT },
64 {
"W6100_In",
w6100_in, 6, tcpip_rs232, DF_INPUT },
65 {
"W6100_Out",
w6100_out, 8, tcpip_rs232, DF_OUTPUT },
66 {
"XTC",
xtc, 2, tcpip_rs232, DF_INPUT },
67 {
"LN2_Moddy",
twickenham, 1, tcpip_rs232, DF_INPUT },
111 INT
poll_event(INT source, INT count, BOOL test) {
return 1;};
125 static int cf1_fired = 0;
126 static int he_shield_fired = 0;
132 sprintf(str,
"Moderator CF1 Demand = %0.1f, Measured = %0.1f: Heater off??",
135 sprintf(str,
"Moderator CF1 Demand = %0.1f, Measured = %0.1f: intentionally??",
136 input[MOD_CF1_DEMAND],
input[MOD_CF1_MEASURED]);
137 al_trigger_alarm(
"mod_cryo_checks", str,
"Warning", str, AT_INTERNAL);
146 if (!he_shield_fired) {
148 sprintf(str,
"Moderator He Shield Demand = %0.1f, Measured = %0.1f: Heater off??",
151 sprintf(str,
"Moderator He Shield Demand = %0.1f, Measured = %0.1f: intentionally??",
152 input[MOD_HE_SHIELD_DEMAND],
input[MOD_HE_SHIELD_MEASURED]);
153 al_trigger_alarm(
"mod_cryo_checks", str,
"Warning", str, AT_INTERNAL);
174 cm_deregister_transition(TR_START);
175 cm_deregister_transition(TR_STOP);
176 cm_deregister_transition(TR_PAUSE);
177 cm_deregister_transition(TR_RESUME);
180 cm_get_experiment_database(&hDB, NULL);
183 strcpy(str,
"/Equipment/ModCryo/Variables/Input");
184 status = db_find_key(hDB, 0, str, &hKey);
185 if (status != DB_SUCCESS) {
186 cm_msg(MERROR,
"frontend_init",
"mod_cryo_scfe: Couldn't find %s", str);
191 status = db_get_key(hDB, hKey, &key);
192 if (status != DB_SUCCESS) {
193 cm_msg(MERROR,
"frontend_init",
"mod_cryo_scfe: Couldn't get ODB key for %s", str);
198 input = (
float *) malloc(key.total_size);
218 cm_get_experiment_database(&hDB, NULL);
221 strcpy(str,
"/Equipment/ModCryo/Variables/Input");
222 status = db_find_key(hDB, 0, str, &hKey);
223 if (status != DB_SUCCESS) {
224 cm_msg(MERROR,
"frontend_exit",
"mod_cryo_scfe: Couldn't find %s, status=%d", str, status);
227 db_close_record(hDB, hKey);
const char * frontend_name
< created by ODBedit, command "make"
INT max_event_size
maximum event size produced by this frontend
BOOL frontend_call_loop
frontend_loop is called periodically if this variable is TRUE
INT display_period
a frontend status page is displayed with this frequency in ms
INT event_buffer_size
buffer size to hold events
INT w6100_in(INT cmd,...)
#define MOD_HE_SHIELD_MEASURED
#define MOD_HE_SHIELD_DEMAND
INT begin_of_run(INT run_number, char *error)
INT interrupt_configure(INT cmd, INT source, PTYPE adr)
INT resume_run(INT run_number, char *error)
INT twickenham(INT cmd,...)
INT max_event_size_frag
maximum event size for fragmented events (EQ_FRAGMENTED)
BOOL equipment_common_overwrite
void mod_cryo_checks(HNDLE hDB, HNDLE hKey, void *dummy)
INT end_of_run(INT run_number, char *error)
INT poll_event(INT source, INT count, BOOL test)
DEVICE_DRIVER mod_cryo_driver[]
device driver list
INT pause_run(INT run_number, char *error)
INT w6100_out(INT cmd,...)
const char * frontend_file_name
The frontend file name, don't change it.