versions at the beamline

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@136 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2012-03-08 08:23:33 +00:00
parent 461fd8824f
commit b070938f57
5 changed files with 431 additions and 22 deletions

View File

@ -22,7 +22,7 @@ int connect_channel(const char *name, chid *ch_id) {
int status = ECA_NORMAL;
status = ca_create_channel(name, NULL, NULL, CA_PRIORITY_DEFAULT, ch_id);
if (status != ECA_NORMAL)
return status;
return status;
status = ca_pend_io(timeout);
return status;
@ -152,7 +152,7 @@ float get_position() {
pos=value;
} else
printf(ca_message(status));
#endif
#endif;
@ -171,12 +171,12 @@ int go_to_position(float p) {
int status;
if (ch_pos<0) return -1;
/* /\* caput and wait until done *\/ */
if ((status = caput(ch_pos, p)) == ECA_NORMAL) {
if ((status = caput(ch_pos, p)) == ECA_NORMAL)
;
#ifdef VERBOSE
printf("caput: success\n");
#endif
} else
else
printf(ca_message(status));
#else
pos=p;
@ -199,12 +199,13 @@ int go_to_position_no_wait(float p) {
int status;
if (ch_pos<0) return -1;
/* /\* caput and wait until done *\/ */
if ((status = caputq(ch_pos, p)) == ECA_NORMAL) {
if ((status = caputq(ch_pos, p)) == ECA_NORMAL)
;
#ifdef VERBOSE
printf("caputq: success\n");
#endif
} else
else
printf(ca_message(status));
#else
pos=p;
@ -243,7 +244,7 @@ float get_i0() {
printf(ca_message(status));
#else
i0++;
#endif
#endif;
//"ca_get X04SA-ES2-SC:CH6"
return i0;
@ -292,11 +293,12 @@ int connect_channels() {
printf(ca_message(status));
//ch_getpos=-1;;
}
// caget X04SA-ES2-TH2:RO.RBV
//cawait -nounit -timeout 3600 X04SA-ES2-TH2:RO.DMOV '==1'
#endif
return 0;
}
int disconnect_channels() {
@ -309,6 +311,7 @@ int disconnect_channels() {
/* delete channel access context before program exits */
ca_context_destroy();
#endif
return 0;
}