19 #include "class/multi.h"
20 #include "phytron_mcc.h"
21 #include "tcpip_rs232.h"
52 {
"mirror_in", phytron_mcc_in, 3, tcpip_rs232, DF_INPUT | DF_PRIO_DEVICE },
53 {
"mirror_out", phytron_mcc_out, 2, tcpip_rs232, DF_OUTPUT },
95 INT
poll_event(INT source, INT count, BOOL test) {
return 1;};
106 cm_deregister_transition(TR_START);
107 cm_deregister_transition(TR_STOP);
108 cm_deregister_transition(TR_PAUSE);
109 cm_deregister_transition(TR_RESUME);
134 static DWORD change_time;
135 static float prev_demand=294.76;
140 cm_get_experiment_database(&hDB, NULL);
143 sprintf(str,
"/Equipment/Mirror/Variables/Input");
144 db_find_key(hDB, 0, str, &hKey);
145 size =
sizeof(float);
146 db_get_data_index(hDB, hKey, &measured, &size, 0, TID_FLOAT);
149 sprintf(str,
"/Equipment/Mirror/Variables/Output");
150 db_find_key(hDB, 0, str, &hKey);
151 size =
sizeof(float);
152 db_get_data_index(hDB, hKey, &demand, &size, 0, TID_FLOAT);
154 if (fabs(demand-prev_demand) > 0.1) {
155 change_time = ss_time();
157 if (ss_time() - change_time > 60) {
158 if (fabs(demand-measured) > 0.1) {
159 sprintf(str,
"Mirror Demand = %0.1f, Measured = %0.1f: something is wrong!", demand, measured);
160 al_trigger_alarm(
"mirror_scfe", str,
"Warning", str, AT_INTERNAL);
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
DEVICE_DRIVER mirror_driver[]
INT display_period
a frontend status page is displayed with this frequency in ms
INT event_buffer_size
buffer size to hold events
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 max_event_size_frag
maximum event size for fragmented events (EQ_FRAGMENTED)
BOOL equipment_common_overwrite
INT end_of_run(INT run_number, char *error)
INT poll_event(INT source, INT count, BOOL test)
INT pause_run(INT run_number, char *error)
const char * frontend_file_name
The frontend file name, don't change it.