diff --git a/motorApp/AerotechSrc/AerotechRegister.cc b/motorApp/AerotechSrc/AerotechRegister.cc index f8c1baaf..73bd1b26 100644 --- a/motorApp/AerotechSrc/AerotechRegister.cc +++ b/motorApp/AerotechSrc/AerotechRegister.cc @@ -1,59 +1,59 @@ -/* -FILENAME... AerotechRegister.cc -USAGE... Register Aerotech motor device driver shell commands. - -Version: 1.0 -Modified By: weimer -Last Modified: 2008/04/10 05:52:37 PM -*/ - -/***************************************************************** - COPYRIGHT NOTIFICATION -***************************************************************** - -(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO - -This software was developed under a United States Government license -described on the COPYRIGHT_UniversityOfChicago file included as part -of this distribution. -**********************************************************************/ - -#include -#include "AerotechRegister.h" -#include "epicsExport.h" - -extern "C" -{ - -// Aerotech Setup arguments -static const iocshArg setupArg0 = {"Max. controller count", iocshArgInt}; -static const iocshArg setupArg1 = {"Polling rate", iocshArgInt}; -// Aerotech Config arguments -static const iocshArg configArg0 = {"Card being configured", iocshArgInt}; -static const iocshArg configArg1 = {"asyn port name", iocshArgString}; -static const iocshArg configArg2 = {"asyn address", iocshArgInt}; - -static const iocshArg * const EnsembleSetupArgs[2] = {&setupArg0, &setupArg1}; -static const iocshArg * const EnsembleConfigArgs[3] = {&configArg0, &configArg1, &configArg2}; - -static const iocshFuncDef setupEnsemble = {"EnsembleSetup", 2, EnsembleSetupArgs}; -static const iocshFuncDef configEnsemble = {"EnsembleConfig", 2, EnsembleConfigArgs}; - -static void setupEnsembleCallFunc(const iocshArgBuf *args) -{ - EnsembleSetup(args[0].ival, args[1].ival); -} -static void configEnsembleCallFunc(const iocshArgBuf *args) -{ - EnsembleConfig(args[0].ival, args[1].sval, args[2].ival); -} - -static void AerotechRegister(void) -{ - iocshRegister(&setupEnsemble, setupEnsembleCallFunc); - iocshRegister(&configEnsemble, configEnsembleCallFunc); -} - -epicsExportRegistrar(AerotechRegister); - -} // extern "C" +/* +FILENAME... AerotechRegister.cc +USAGE... Register Aerotech motor device driver shell commands. + +Version: 1.0 +Modified By: weimer +Last Modified: 2008/04/10 05:52:37 PM +*/ + +/***************************************************************** + COPYRIGHT NOTIFICATION +***************************************************************** + +(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO + +This software was developed under a United States Government license +described on the COPYRIGHT_UniversityOfChicago file included as part +of this distribution. +**********************************************************************/ + +#include +#include "AerotechRegister.h" +#include "epicsExport.h" + +extern "C" +{ + +// Aerotech Setup arguments +static const iocshArg setupArg0 = {"Max. controller count", iocshArgInt}; +static const iocshArg setupArg1 = {"Polling rate", iocshArgInt}; +// Aerotech Config arguments +static const iocshArg configArg0 = {"Card being configured", iocshArgInt}; +static const iocshArg configArg1 = {"asyn port name", iocshArgString}; +static const iocshArg configArg2 = {"asyn address", iocshArgInt}; + +static const iocshArg * const EnsembleSetupArgs[2] = {&setupArg0, &setupArg1}; +static const iocshArg * const EnsembleConfigArgs[3] = {&configArg0, &configArg1, &configArg2}; + +static const iocshFuncDef setupEnsemble = {"EnsembleSetup", 2, EnsembleSetupArgs}; +static const iocshFuncDef configEnsemble = {"EnsembleConfig", 2, EnsembleConfigArgs}; + +static void setupEnsembleCallFunc(const iocshArgBuf *args) +{ + EnsembleSetup(args[0].ival, args[1].ival); +} +static void configEnsembleCallFunc(const iocshArgBuf *args) +{ + EnsembleConfig(args[0].ival, args[1].sval, args[2].ival); +} + +static void AerotechRegister(void) +{ + iocshRegister(&setupEnsemble, setupEnsembleCallFunc); + iocshRegister(&configEnsemble, configEnsembleCallFunc); +} + +epicsExportRegistrar(AerotechRegister); + +} // extern "C" diff --git a/motorApp/AerotechSrc/AerotechRegister.h b/motorApp/AerotechSrc/AerotechRegister.h old mode 100755 new mode 100644 index a218a754..48f08078 --- a/motorApp/AerotechSrc/AerotechRegister.h +++ b/motorApp/AerotechSrc/AerotechRegister.h @@ -1,46 +1,46 @@ -/* -FILENAME... AerotechRegister.h -USAGE... This file contains function prototypes for ACS IOC shell commands. - -Version: 1.0 -Modified By: weimer -Last Modified: 2008/04/10 05:52:48 PM -*/ - -/* - * Original Author: Ron Sluiter - * Date: 05/19/03 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - */ - -#include "motor.h" -#include "motordrvCom.h" -#include "drvEnsemble.h" - -/* Function prototypes. */ -//extern RTN_STATUS EnsembleSetup(int, int); -//extern RTN_STATUS EnsembleConfig(int, const char *, int); - +/* +FILENAME... AerotechRegister.h +USAGE... This file contains function prototypes for ACS IOC shell commands. + +Version: 1.0 +Modified By: weimer +Last Modified: 2008/04/10 05:52:48 PM +*/ + +/* + * Original Author: Ron Sluiter + * Date: 05/19/03 + * + * Experimental Physics and Industrial Control System (EPICS) + * + * Copyright 1991, the Regents of the University of California, + * and the University of Chicago Board of Governors. + * + * This software was produced under U.S. Government contracts: + * (W-7405-ENG-36) at the Los Alamos National Laboratory, + * and (W-31-109-ENG-38) at Argonne National Laboratory. + * + * Initial development by: + * The Controls and Automation Group (AT-8) + * Ground Test Accelerator + * Accelerator Technology Division + * Los Alamos National Laboratory + * + * Co-developed with + * The Controls and Computing Group + * Accelerator Systems Division + * Advanced Photon Source + * Argonne National Laboratory + * + * Modification Log: + * ----------------- + */ + +#include "motor.h" +#include "motordrvCom.h" +#include "drvEnsemble.h" + +/* Function prototypes. */ +//extern RTN_STATUS EnsembleSetup(int, int); +//extern RTN_STATUS EnsembleConfig(int, const char *, int); + diff --git a/motorApp/AerotechSrc/Makefile b/motorApp/AerotechSrc/Makefile index a6bd23c0..69c6d5cc 100644 --- a/motorApp/AerotechSrc/Makefile +++ b/motorApp/AerotechSrc/Makefile @@ -1,20 +1,20 @@ -# Makefile -TOP = ../.. -include $(TOP)/configure/CONFIG - -# The following are used for debugging messages. -#USR_CXXFLAGS += -DDEBUG - -DBD += devAerotech.dbd - -LIBRARY_IOC = Aerotech - -# Aerotech driver support. -SRCS += AerotechRegister.cc -SRCS += devEnsemble.cc drvEnsemble.cc - -Aerotech_LIBS += motor asyn -Aerotech_LIBS += $(EPICS_BASE_IOC_LIBS) - -include $(TOP)/configure/RULES - +# Makefile +TOP = ../.. +include $(TOP)/configure/CONFIG + +# The following are used for debugging messages. +#USR_CXXFLAGS += -DDEBUG + +DBD += devAerotech.dbd + +LIBRARY_IOC = Aerotech + +# Aerotech driver support. +SRCS += AerotechRegister.cc +SRCS += devEnsemble.cc drvEnsemble.cc + +Aerotech_LIBS += motor asyn +Aerotech_LIBS += $(EPICS_BASE_IOC_LIBS) + +include $(TOP)/configure/RULES + diff --git a/motorApp/AerotechSrc/devAerotech.dbd b/motorApp/AerotechSrc/devAerotech.dbd old mode 100755 new mode 100644 index 70d80253..ab832d73 --- a/motorApp/AerotechSrc/devAerotech.dbd +++ b/motorApp/AerotechSrc/devAerotech.dbd @@ -1,5 +1,5 @@ -# Aerotech Ensemble Driver support. -device(motor,VME_IO,devEnsemble,"Ensemble") -driver(drvEnsemble) -registrar(AerotechRegister) - +# Aerotech Ensemble Driver support. +device(motor,VME_IO,devEnsemble,"Ensemble") +driver(drvEnsemble) +registrar(AerotechRegister) + diff --git a/motorApp/AerotechSrc/drvEnsemble.cc b/motorApp/AerotechSrc/drvEnsemble.cc old mode 100755 new mode 100644 index 6b27aed5..14462847 --- a/motorApp/AerotechSrc/drvEnsemble.cc +++ b/motorApp/AerotechSrc/drvEnsemble.cc @@ -1,759 +1,759 @@ -/* -FILENAME... drvEnsemble.cc -USAGE... Motor record driver level support for Aerotech Ensemble. - -Version: $Revision: 1.7 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-09-08 18:24:33 $ -*/ - -/* - * Original Author: Chad Weimer - * Date: 04/04/08 - * Current Author: Chad Weimer - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * NOTES - * ----- - * Verified with firmware: - * - ver: 2.5.2 - * - * Modification Log: - * ----------------- - * .01 04-04-08 caw initialized from drvMM4000.cc (Newport) - * .02 05-01-09 rls - Using EOT fault indicators rather than LS's to set - * RA_PLUS/MINUS_LS indicators. - * - Fix HOME_LIMIT/MARKER_BIT mask. - * - More extensive comm. error checks in set_status(); handle - * ASCII_ACK_CHAR as error. - * - cntrl->drive_resolution must be initialized with fabs(). - * - */ - - -#include -#include -#include -#include -#include -#include -#include "motor.h" -#include "drvEnsemble.h" -#include "asynOctetSyncIO.h" -#include "epicsExport.h" - -/* Status byte bits */ -#define ENABLED_BIT 0x00000001 -#define IN_POSITION_BIT 0x00000004 -#define IN_MOTION_BIT 0x00000008 -#define DIRECTION_BIT 0x00000200 -#define HOME_LIMIT_BIT 0x01000000 -#define HOME_MARKER_BIT 0x02000000 - -/* Fault status bits */ -#define CW_FAULT_BIT 0x004 -#define CCW_FAULT_BIT 0x008 - -// This can really be any number, because there isn't any theoretical -// restriction on the number of Ensembles that can be on a network. -// However, a relatively low number was picked for practical purposes -#define Ensemble_NUM_CARDS 10 - -// Due to the way some of the commands are implemented in the Ensemble, -// such as HOME, the command response is not returned until the command -// has actually finished executing. This requires a fairly large timeout -// value. However, even a large value will not guarantee that the response will -// be sent back in the time alloted. -#define TIMEOUT 20.0 /* Command timeout in sec. */ - -/*----------------debugging-----------------*/ -#ifdef __GNUG__ - #ifdef DEBUG - #define Debug(l, f, args...) { if(l<=drvEnsembledebug) printf(f,## args); } - #else - #define Debug(l, f, args...) - #endif -#else - #define Debug() -#endif -volatile int drvEnsembledebug = 0; -extern "C" {epicsExportAddress(int, drvEnsembledebug);} - -/* --- Local data. --- */ -int Ensemble_num_cards = 0; -int num_cmds = 0; - -/* Local data required for every driver; see "motordrvComCode.h" */ -#include "motordrvComCode.h" - - - -/*----------------functions-----------------*/ -static int recv_mess(int, char *, int); -static RTN_STATUS send_mess(int, char const *, char *name); -static int set_status(int card, int signal); -static long report(int level); -static long init(); -static int motor_init(); -static void query_done(int, int, struct mess_node *); - -/*----------------functions-----------------*/ - -struct driver_table Ensemble_access = -{ - motor_init, - motor_send, - motor_free, - motor_card_info, - motor_axis_info, - &mess_queue, - &queue_lock, - &free_list, - &freelist_lock, - &motor_sem, - &motor_state, - &total_cards, - &any_motor_in_motion, - send_mess, - recv_mess, - set_status, - query_done, - NULL, - &initialized, - NULL -}; - -struct drvEnsemble_drvet -{ - long number; - long (*report) (int); - long (*init) (void); -} drvEnsemble = {2, report, init}; - -extern "C" {epicsExportAddress(drvet, drvEnsemble);} - -static struct thread_args targs = {SCAN_RATE, &Ensemble_access, 0.0}; - -/********************************************************* - * Print out driver status report - *********************************************************/ -static long report(int level) -{ - int card; - - if (Ensemble_num_cards <=0) - printf(" No Ensemble controllers configured.\n"); - else - { - for (card = 0; card < Ensemble_num_cards; card++) - { - struct controller *brdptr = motor_state[card]; - - if (brdptr == NULL) - printf(" Ensemble controller %d connection failed.\n", card); - else - { - struct Ensemblecontroller *cntrl; - - cntrl = (struct Ensemblecontroller *) brdptr->DevicePrivate; - printf(" Ensemble controller %d, port=%s, address=%d, id: %s \n", - card, cntrl->asyn_port, cntrl->asyn_address, - brdptr->ident); - } - } - } - return(OK); -} - - -static long init() -{ - /* - * We cannot call motor_init() here, because that function can do GPIB I/O, - * and hence requires that the drvGPIB have already been initialized. - * That cannot be guaranteed, so we need to call motor_init from device - * support - */ - /* Check for setup */ - if (Ensemble_num_cards <= 0) - { - Debug(1, "init(): Ensemble driver disabled. EnsembleSetup() missing from startup script.\n"); - } - return((long) 0); -} - - -static void query_done(int card, int axis, struct mess_node *nodeptr) -{ -} - - -/************************************************************** - * Parse status and position strings for a card and signal - * set_status() - ************************************************************/ - -static int set_status(int card, int signal) -{ - struct Ensemblecontroller *cntrl; - struct mess_node *nodeptr; - register struct mess_info *motor_info; - double motorData, pfbk; - bool plusdir, ls_active = false; - msta_field status; - int rtn_state, comm_status, axis_status; - char buff[BUFF_SIZE]; - - cntrl = (struct Ensemblecontroller *) motor_state[card]->DevicePrivate; - motor_info = &(motor_state[card]->motor_info[signal]); - status.All = motor_info->status.All; - - // get the axis status - sprintf(buff, "AXISSTATUS(@%d)", signal); - send_mess(card, buff, (char) NULL); - comm_status = recv_mess(card, buff, 1); - - if (comm_status > 0 && buff[0] == ASCII_ACK_CHAR) - { - cntrl->status = NORMAL; - status.Bits.CNTRL_COMM_ERR = 0; - } - else if (comm_status <= 0) - { - if (cntrl->status == NORMAL) - { - cntrl->status = RETRY; - rtn_state = OK; - } - else - { - cntrl->status = COMM_ERR; - status.Bits.CNTRL_COMM_ERR = 1; - status.Bits.RA_PROBLEM = 1; - rtn_state = 1; - } - goto exit; - } - else if (buff[0] != ASCII_ACK_CHAR) - { - cntrl->status = COMM_ERR; - status.Bits.CNTRL_COMM_ERR = 1; - status.Bits.RA_PROBLEM = 1; - rtn_state = 1; - goto exit; - } - - cntrl->status = NORMAL; - status.Bits.CNTRL_COMM_ERR = 0; - - // convert to an integer - axis_status = atoi(&buff[1]); - - nodeptr = motor_info->motor_motion; - - status.Bits.EA_SLIP = 0; - status.Bits.EA_SLIP_STALL = 0; - - // fill in the status - status.Bits.RA_DIRECTION = axis_status & DIRECTION_BIT ? 0 : 1; - status.Bits.RA_DONE = axis_status & IN_POSITION_BIT ? 1 : 0; - status.Bits.RA_HOME = axis_status & HOME_LIMIT_BIT ? 1 : 0; - status.Bits.EA_POSITION = axis_status & ENABLED_BIT ? 1 : 0; - status.Bits.EA_HOME = axis_status & HOME_MARKER_BIT ? 1 : 0; - status.Bits.RA_MOVING = axis_status & IN_MOTION_BIT ? 1 : 0; - - /* get the axis fault status */ - sprintf(buff, "AXISFAULT(@%d)", signal); - send_mess(card, buff, (char) NULL); - comm_status = recv_mess(card, buff, 1); - axis_status = atoi(&buff[1]); - status.Bits.RA_PLUS_LS = axis_status & CCW_FAULT_BIT ? 1 : 0; - status.Bits.RA_MINUS_LS = axis_status & CW_FAULT_BIT ? 1 : 0; - - plusdir = status.Bits.RA_DIRECTION ? true : false; - if ((status.Bits.RA_PLUS_LS && plusdir) || (status.Bits.RA_MINUS_LS && !plusdir)) - { - ls_active = true; - } - - // get the position - sprintf(buff, "PFBKPROG(@%d)", signal); - send_mess(card, buff, (char) NULL); - recv_mess(card, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - { - // convert to an integer - pfbk = atof(&buff[1]); - } - else - { - pfbk = 0; - } - - // fill in the position - motorData = pfbk / cntrl->drive_resolution[signal]; - - if (motorData == motor_info->position) - { - // only increment the counter if the motor is moving - if (nodeptr != 0) - { - motor_info->no_motion_count++; - } - } - else - { - motor_info->position = NINT(motorData); - if (motor_info->encoder_present == YES) - { - motor_info->encoder_position = NINT(motorData); - } - else - { - motor_info->encoder_position = 0; - } - - motor_info->no_motion_count = 0; - } - - // velocity is not used, so don't bother doing a command down - // to the controller to get it - motor_info->velocity = 0; - - // do this "last", so that we know no errors occurred - status.Bits.RA_PROBLEM = 0; - - rtn_state = (!motor_info->no_motion_count || ls_active || - status.Bits.RA_DONE | status.Bits.RA_PROBLEM) ? 1 : 0; - - // test for post-move string - if ((status.Bits.RA_DONE || ls_active) && nodeptr != 0 && nodeptr->postmsgptr != 0) - { - strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); - nodeptr->postmsgptr = NULL; - } - -exit: - motor_info->status.All = status.All; - return(rtn_state); -} - - -/*****************************************************/ -/* send a message to the Ensemble board */ -/* send_mess() */ -/*****************************************************/ -static RTN_STATUS send_mess(int card, char const *com, char *name) -{ - struct Ensemblecontroller *cntrl; - int size; - size_t nwrite; - char *eos_tok, com_cpy[BUFF_SIZE]; - asynStatus status; - - size = strlen(com); - - if (size > MAX_MSG_SIZE) - { - errlogMessage("drvEnsemble.c:send_mess(); message size violation.\n"); - return(ERROR); - } - else if (size == 0) - { - return(OK); - } - - if (!motor_state[card]) - { - errlogMessage("drvEnsemble.c:send_mess() - invalid card #%d\n"); - return(ERROR); - } - - if (name != NULL) - { - errlogMessage("drvEnsemble.c:send_mess() - invalid argument = %s\n"); - return(ERROR); - } - - Debug(2, "send_mess(): message = %s\n", com); - - // We need to track the number of individual Ensemble commands that are - // being sent, so that we can read back the same number of responses. - // This is necessary, because the Ensemble will send individual responses - // terminated by the EOS char for each command sent, even if those commands - // were all sent as part of one motor record command, such as LOAD_POS - - num_cmds = 0; - strcpy(com_cpy, com); - eos_tok = strtok(com_cpy, ASCII_EOS_STR); - while (eos_tok != NULL) - { - num_cmds++; - eos_tok = strtok(NULL, ASCII_EOS_STR); - } - - cntrl = (struct Ensemblecontroller *) motor_state[card]->DevicePrivate; - - status = pasynOctetSyncIO->write(cntrl->pasynUser, com, size, TIMEOUT, &nwrite); - - if (status != asynSuccess || nwrite <= 0) - { - errlogMessage(cntrl->pasynUser->errorMessage); - return(ERROR); - } - - return(OK); -} - - -/* - * FUNCTION... recv_mess(int card, char *com, int flag) - * - * INPUT ARGUMENTS... - * card - controller card # (0,1,...). - * *com - caller's response buffer. - * flag | FLUSH = flush controller's output buffer; set timeout = 0. - * | !FLUSH = retrieve response into caller's buffer; set timeout. - * - * LOGIC... - * IF controller card does not exist. - * ERROR RETURN. - * ENDIF - * NORMAL RETURN. - */ - -static int recv_mess(int card, char *com, int flag) -{ - struct Ensemblecontroller *cntrl; - double timeout = 0; - size_t nread = 0; - asynStatus status; - int eomReason, i; - char buff[BUFF_SIZE]; - - if (!motor_state[card]) - { - return(ERROR); - } - - cntrl = (struct Ensemblecontroller *) motor_state[card]->DevicePrivate; - - timeout = TIMEOUT; - com[0] = '\0'; - for (i = 0; i < num_cmds; i++) - { - status = pasynOctetSyncIO->read(cntrl->pasynUser, buff, BUFF_SIZE, timeout, &nread, &eomReason); - - if (status == asynSuccess && nread > 0) - { - strcat(com, buff); - } - else - { - com[0] = '\0'; - nread = 0; - break; - } - } - - Debug(2, "recv_mess(): message = \"%s\"\n", com); - return(nread); -} - - -/*****************************************************/ -/* Setup system configuration */ -/* EnsembleSetup() */ -/*****************************************************/ -RTN_STATUS EnsembleSetup(int num_cards, /* maximum number of controllers in system. */ - int scan_rate) /* polling rate - 1/60 sec units. */ -{ - int i; - - if (num_cards < 1 || num_cards > Ensemble_NUM_CARDS) - { - Ensemble_num_cards = Ensemble_NUM_CARDS; - } - else - { - Ensemble_num_cards = num_cards; - } - - // Set motor polling task rate - if (scan_rate >= 1 && scan_rate <= 60) - { - targs.motor_scan_rate = scan_rate; - } - else - { - targs.motor_scan_rate = SCAN_RATE; - } - - /* - * Allocate space for motor_state structures. Note this must be done - * before EnsembleConfig is called, so it cannot be done in motor_init() - * This means that we must allocate space for a card without knowing - * if it really exists, which is not a serious problem - */ - motor_state = (struct controller **) malloc(Ensemble_num_cards * sizeof(struct controller *)); - - for (i = 0; i < Ensemble_num_cards; i++) - { - motor_state[i] = (struct controller *) NULL; - } - - return(OK); -} - - -/*****************************************************/ -/* Configure a controller */ -/* EnsembleConfig() */ -/*****************************************************/ -RTN_STATUS EnsembleConfig(int card, /* card being configured */ - const char *name, /* asyn port name */ - int addr) /* asyn address (GPIB) */ -{ - struct Ensemblecontroller *cntrl; - - if (card < 0 || card >= Ensemble_num_cards) - { - return(ERROR); - } - - motor_state[card] = (struct controller *) malloc(sizeof(struct controller)); - motor_state[card]->DevicePrivate = malloc(sizeof(struct Ensemblecontroller)); - cntrl = (struct Ensemblecontroller *) motor_state[card]->DevicePrivate; - - strcpy(cntrl->asyn_port, name); - cntrl->asyn_address = addr; - - return(OK); -} - - - -/*****************************************************/ -/* initialize all software and hardware */ -/* This is called from the initialization routine in */ -/* device support. */ -/* motor_init() */ -/*****************************************************/ -static int motor_init() -{ - struct controller *brdptr; - struct Ensemblecontroller *cntrl; - int card_index, motor_index, status, digits; - char buff[BUFF_SIZE]; - asynStatus success_rtn; - - // Indicates that the driver is initialized - initialized = true; - - if (Ensemble_num_cards <= 0) - { - return(ERROR); - } - - for (card_index = 0; card_index < Ensemble_num_cards; card_index++) - { - if (!motor_state[card_index]) - { - continue; - } - - brdptr = motor_state[card_index]; - brdptr->cmnd_response = true; - total_cards = card_index + 1; - cntrl = (struct Ensemblecontroller *)brdptr->DevicePrivate; - - // Initialize communications channel - success_rtn = pasynOctetSyncIO->connect(cntrl->asyn_port, cntrl->asyn_address, &cntrl->pasynUser, NULL); - - if (success_rtn == asynSuccess) - { - int retry = 0; - - // Send a message to the baord, see if it exists - // flush any junk at input port - should not be any data available - pasynOctetSyncIO->flush(cntrl->pasynUser); - - do - { - // we only care if we get a response - // so we don't need to send a valid command - strcpy(buff, "NONE"); - send_mess(card_index, buff, (char) NULL); - status = recv_mess(card_index, buff, 1); - - retry++; - } while (!status && retry < 3); - - if (status > 0) - { - brdptr->localaddr = (char *) NULL; - brdptr->motor_in_motion = 0; - // Read controller ID string - strcpy(buff, "GETPARM(CONTROL, 265)"); //UserString1 - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - { - strcpy(brdptr->ident, &buff[1]); - } - else - { - sprintf(brdptr->ident, "Ensemble%d", card_index); - } - - // Get the number of axes - brdptr->total_axis = 0; - for (motor_index = 0; motor_index < 10; motor_index++) - { - // Does this axis actually exist? - sprintf(buff, "GETPARM(@%d, 257)", motor_index); //AxisName - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - - // We know the axis exists if we got an ACK response - if (buff[0] == ASCII_ACK_CHAR) - { - cntrl->axes[motor_index] = 1; - brdptr->total_axis++; - } - } - - for (motor_index = 0; motor_index < 10; motor_index++) - { - if (cntrl->axes[motor_index]) - { - struct mess_info *motor_info = &brdptr->motor_info[motor_index]; - - motor_info->status.All = 0; - motor_info->no_motion_count = 0; - motor_info->encoder_position = 0; - motor_info->position = 0; - brdptr->motor_info[motor_index].motor_motion = NULL; - - // Determine if encoder present based on open/closed loop mode. - sprintf(buff, "GETPARM(@%d, 58)", motor_index); //CfgFbkPosType - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - { - if (atoi(&buff[1]) > 0) - { - motor_info->encoder_present = YES; - motor_info->status.Bits.EA_PRESENT = 1; - } - } - - // Determine if gains are supported based on the motor type. - sprintf(buff, "GETPARM(@%d, 33)", motor_index); //CfgMotType - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - { - if (atoi(&buff[1]) != 3) - { - motor_info->pid_present = YES; - motor_info->status.Bits.GAIN_SUPPORT = 1; - } - } - - // Stop all motors - sprintf(buff, "ABORT @%d", motor_index); - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - - // Determive drive resolution - sprintf(buff, "GETPARM(@%d, 3)", motor_index); //PosScaleFactor - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - cntrl->drive_resolution[motor_index] = 1 / fabs(atof(&buff[1])); - else - cntrl->drive_resolution[motor_index] = 1; - - digits = (int) -log10(cntrl->drive_resolution[motor_index]) + 2; - if (digits < 1) - digits = 1; - cntrl->res_decpts[motor_index] = digits; - - // Save home preset position - sprintf(buff, "GETPARM(@%d, 108)", motor_index); //HomeOffset - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - cntrl->home_preset[motor_index] = atof(&buff[1]); - - // Determine low limit - sprintf(buff, "GETPARM(@%d, 47)", motor_index); //ThresholdSoftCCW - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - motor_info->low_limit = atof(&buff[1]); - - // Determine high limit - sprintf(buff, "GETPARM(@%d, 48)", motor_index); //ThresholdSoftCW - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - motor_info->high_limit = atof(&buff[1]); - - // Save the HomeDirection parameter - sprintf(buff, "GETPARM(@%d, 106)", motor_index); //HomeDirection - send_mess(card_index, buff, (char) NULL); - recv_mess(card_index, buff, 1); - if (buff[0] == ASCII_ACK_CHAR) - cntrl->home_dparam[motor_index] = atoi(&buff[1]); - - // Read status of each motor - set_status(card_index, motor_index); - } - } - } - else - { - motor_state[card_index] = (struct controller *) NULL; - } - } - } - - any_motor_in_motion = 0; - - mess_queue.head = (struct mess_node *) NULL; - mess_queue.tail = (struct mess_node *) NULL; - - free_list.head = (struct mess_node *) NULL; - free_list.tail = (struct mess_node *) NULL; - - epicsThreadCreate((char *) "Ensemble_motor", - epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) motor_task, (void *) &targs); - - return(OK); -} - +/* +FILENAME... drvEnsemble.cc +USAGE... Motor record driver level support for Aerotech Ensemble. + +Version: $Revision: 1.7 $ +Modified By: $Author: sluiter $ +Last Modified: $Date: 2009-09-08 18:24:33 $ +*/ + +/* + * Original Author: Chad Weimer + * Date: 04/04/08 + * Current Author: Chad Weimer + * + * Experimental Physics and Industrial Control System (EPICS) + * + * Copyright 1991, the Regents of the University of California, + * and the University of Chicago Board of Governors. + * + * This software was produced under U.S. Government contracts: + * (W-7405-ENG-36) at the Los Alamos National Laboratory, + * and (W-31-109-ENG-38) at Argonne National Laboratory. + * + * Initial development by: + * The Controls and Automation Group (AT-8) + * Ground Test Accelerator + * Accelerator Technology Division + * Los Alamos National Laboratory + * + * Co-developed with + * The Controls and Computing Group + * Accelerator Systems Division + * Advanced Photon Source + * Argonne National Laboratory + * + * NOTES + * ----- + * Verified with firmware: + * - ver: 2.5.2 + * + * Modification Log: + * ----------------- + * .01 04-04-08 caw initialized from drvMM4000.cc (Newport) + * .02 05-01-09 rls - Using EOT fault indicators rather than LS's to set + * RA_PLUS/MINUS_LS indicators. + * - Fix HOME_LIMIT/MARKER_BIT mask. + * - More extensive comm. error checks in set_status(); handle + * ASCII_ACK_CHAR as error. + * - cntrl->drive_resolution must be initialized with fabs(). + * + */ + + +#include +#include +#include +#include +#include +#include +#include "motor.h" +#include "drvEnsemble.h" +#include "asynOctetSyncIO.h" +#include "epicsExport.h" + +/* Status byte bits */ +#define ENABLED_BIT 0x00000001 +#define IN_POSITION_BIT 0x00000004 +#define IN_MOTION_BIT 0x00000008 +#define DIRECTION_BIT 0x00000200 +#define HOME_LIMIT_BIT 0x01000000 +#define HOME_MARKER_BIT 0x02000000 + +/* Fault status bits */ +#define CW_FAULT_BIT 0x004 +#define CCW_FAULT_BIT 0x008 + +// This can really be any number, because there isn't any theoretical +// restriction on the number of Ensembles that can be on a network. +// However, a relatively low number was picked for practical purposes +#define Ensemble_NUM_CARDS 10 + +// Due to the way some of the commands are implemented in the Ensemble, +// such as HOME, the command response is not returned until the command +// has actually finished executing. This requires a fairly large timeout +// value. However, even a large value will not guarantee that the response will +// be sent back in the time alloted. +#define TIMEOUT 20.0 /* Command timeout in sec. */ + +/*----------------debugging-----------------*/ +#ifdef __GNUG__ + #ifdef DEBUG + #define Debug(l, f, args...) { if(l<=drvEnsembledebug) printf(f,## args); } + #else + #define Debug(l, f, args...) + #endif +#else + #define Debug() +#endif +volatile int drvEnsembledebug = 0; +extern "C" {epicsExportAddress(int, drvEnsembledebug);} + +/* --- Local data. --- */ +int Ensemble_num_cards = 0; +int num_cmds = 0; + +/* Local data required for every driver; see "motordrvComCode.h" */ +#include "motordrvComCode.h" + + + +/*----------------functions-----------------*/ +static int recv_mess(int, char *, int); +static RTN_STATUS send_mess(int, char const *, char *name); +static int set_status(int card, int signal); +static long report(int level); +static long init(); +static int motor_init(); +static void query_done(int, int, struct mess_node *); + +/*----------------functions-----------------*/ + +struct driver_table Ensemble_access = +{ + motor_init, + motor_send, + motor_free, + motor_card_info, + motor_axis_info, + &mess_queue, + &queue_lock, + &free_list, + &freelist_lock, + &motor_sem, + &motor_state, + &total_cards, + &any_motor_in_motion, + send_mess, + recv_mess, + set_status, + query_done, + NULL, + &initialized, + NULL +}; + +struct drvEnsemble_drvet +{ + long number; + long (*report) (int); + long (*init) (void); +} drvEnsemble = {2, report, init}; + +extern "C" {epicsExportAddress(drvet, drvEnsemble);} + +static struct thread_args targs = {SCAN_RATE, &Ensemble_access, 0.0}; + +/********************************************************* + * Print out driver status report + *********************************************************/ +static long report(int level) +{ + int card; + + if (Ensemble_num_cards <=0) + printf(" No Ensemble controllers configured.\n"); + else + { + for (card = 0; card < Ensemble_num_cards; card++) + { + struct controller *brdptr = motor_state[card]; + + if (brdptr == NULL) + printf(" Ensemble controller %d connection failed.\n", card); + else + { + struct Ensemblecontroller *cntrl; + + cntrl = (struct Ensemblecontroller *) brdptr->DevicePrivate; + printf(" Ensemble controller %d, port=%s, address=%d, id: %s \n", + card, cntrl->asyn_port, cntrl->asyn_address, + brdptr->ident); + } + } + } + return(OK); +} + + +static long init() +{ + /* + * We cannot call motor_init() here, because that function can do GPIB I/O, + * and hence requires that the drvGPIB have already been initialized. + * That cannot be guaranteed, so we need to call motor_init from device + * support + */ + /* Check for setup */ + if (Ensemble_num_cards <= 0) + { + Debug(1, "init(): Ensemble driver disabled. EnsembleSetup() missing from startup script.\n"); + } + return((long) 0); +} + + +static void query_done(int card, int axis, struct mess_node *nodeptr) +{ +} + + +/************************************************************** + * Parse status and position strings for a card and signal + * set_status() + ************************************************************/ + +static int set_status(int card, int signal) +{ + struct Ensemblecontroller *cntrl; + struct mess_node *nodeptr; + register struct mess_info *motor_info; + double motorData, pfbk; + bool plusdir, ls_active = false; + msta_field status; + int rtn_state, comm_status, axis_status; + char buff[BUFF_SIZE]; + + cntrl = (struct Ensemblecontroller *) motor_state[card]->DevicePrivate; + motor_info = &(motor_state[card]->motor_info[signal]); + status.All = motor_info->status.All; + + // get the axis status + sprintf(buff, "AXISSTATUS(@%d)", signal); + send_mess(card, buff, (char) NULL); + comm_status = recv_mess(card, buff, 1); + + if (comm_status > 0 && buff[0] == ASCII_ACK_CHAR) + { + cntrl->status = NORMAL; + status.Bits.CNTRL_COMM_ERR = 0; + } + else if (comm_status <= 0) + { + if (cntrl->status == NORMAL) + { + cntrl->status = RETRY; + rtn_state = OK; + } + else + { + cntrl->status = COMM_ERR; + status.Bits.CNTRL_COMM_ERR = 1; + status.Bits.RA_PROBLEM = 1; + rtn_state = 1; + } + goto exit; + } + else if (buff[0] != ASCII_ACK_CHAR) + { + cntrl->status = COMM_ERR; + status.Bits.CNTRL_COMM_ERR = 1; + status.Bits.RA_PROBLEM = 1; + rtn_state = 1; + goto exit; + } + + cntrl->status = NORMAL; + status.Bits.CNTRL_COMM_ERR = 0; + + // convert to an integer + axis_status = atoi(&buff[1]); + + nodeptr = motor_info->motor_motion; + + status.Bits.EA_SLIP = 0; + status.Bits.EA_SLIP_STALL = 0; + + // fill in the status + status.Bits.RA_DIRECTION = axis_status & DIRECTION_BIT ? 0 : 1; + status.Bits.RA_DONE = axis_status & IN_POSITION_BIT ? 1 : 0; + status.Bits.RA_HOME = axis_status & HOME_LIMIT_BIT ? 1 : 0; + status.Bits.EA_POSITION = axis_status & ENABLED_BIT ? 1 : 0; + status.Bits.EA_HOME = axis_status & HOME_MARKER_BIT ? 1 : 0; + status.Bits.RA_MOVING = axis_status & IN_MOTION_BIT ? 1 : 0; + + /* get the axis fault status */ + sprintf(buff, "AXISFAULT(@%d)", signal); + send_mess(card, buff, (char) NULL); + comm_status = recv_mess(card, buff, 1); + axis_status = atoi(&buff[1]); + status.Bits.RA_PLUS_LS = axis_status & CCW_FAULT_BIT ? 1 : 0; + status.Bits.RA_MINUS_LS = axis_status & CW_FAULT_BIT ? 1 : 0; + + plusdir = status.Bits.RA_DIRECTION ? true : false; + if ((status.Bits.RA_PLUS_LS && plusdir) || (status.Bits.RA_MINUS_LS && !plusdir)) + { + ls_active = true; + } + + // get the position + sprintf(buff, "PFBKPROG(@%d)", signal); + send_mess(card, buff, (char) NULL); + recv_mess(card, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + { + // convert to an integer + pfbk = atof(&buff[1]); + } + else + { + pfbk = 0; + } + + // fill in the position + motorData = pfbk / cntrl->drive_resolution[signal]; + + if (motorData == motor_info->position) + { + // only increment the counter if the motor is moving + if (nodeptr != 0) + { + motor_info->no_motion_count++; + } + } + else + { + motor_info->position = NINT(motorData); + if (motor_info->encoder_present == YES) + { + motor_info->encoder_position = NINT(motorData); + } + else + { + motor_info->encoder_position = 0; + } + + motor_info->no_motion_count = 0; + } + + // velocity is not used, so don't bother doing a command down + // to the controller to get it + motor_info->velocity = 0; + + // do this "last", so that we know no errors occurred + status.Bits.RA_PROBLEM = 0; + + rtn_state = (!motor_info->no_motion_count || ls_active || + status.Bits.RA_DONE | status.Bits.RA_PROBLEM) ? 1 : 0; + + // test for post-move string + if ((status.Bits.RA_DONE || ls_active) && nodeptr != 0 && nodeptr->postmsgptr != 0) + { + strcpy(buff, nodeptr->postmsgptr); + send_mess(card, buff, (char) NULL); + nodeptr->postmsgptr = NULL; + } + +exit: + motor_info->status.All = status.All; + return(rtn_state); +} + + +/*****************************************************/ +/* send a message to the Ensemble board */ +/* send_mess() */ +/*****************************************************/ +static RTN_STATUS send_mess(int card, char const *com, char *name) +{ + struct Ensemblecontroller *cntrl; + int size; + size_t nwrite; + char *eos_tok, com_cpy[BUFF_SIZE]; + asynStatus status; + + size = strlen(com); + + if (size > MAX_MSG_SIZE) + { + errlogMessage("drvEnsemble.c:send_mess(); message size violation.\n"); + return(ERROR); + } + else if (size == 0) + { + return(OK); + } + + if (!motor_state[card]) + { + errlogMessage("drvEnsemble.c:send_mess() - invalid card #%d\n"); + return(ERROR); + } + + if (name != NULL) + { + errlogMessage("drvEnsemble.c:send_mess() - invalid argument = %s\n"); + return(ERROR); + } + + Debug(2, "send_mess(): message = %s\n", com); + + // We need to track the number of individual Ensemble commands that are + // being sent, so that we can read back the same number of responses. + // This is necessary, because the Ensemble will send individual responses + // terminated by the EOS char for each command sent, even if those commands + // were all sent as part of one motor record command, such as LOAD_POS + + num_cmds = 0; + strcpy(com_cpy, com); + eos_tok = strtok(com_cpy, ASCII_EOS_STR); + while (eos_tok != NULL) + { + num_cmds++; + eos_tok = strtok(NULL, ASCII_EOS_STR); + } + + cntrl = (struct Ensemblecontroller *) motor_state[card]->DevicePrivate; + + status = pasynOctetSyncIO->write(cntrl->pasynUser, com, size, TIMEOUT, &nwrite); + + if (status != asynSuccess || nwrite <= 0) + { + errlogMessage(cntrl->pasynUser->errorMessage); + return(ERROR); + } + + return(OK); +} + + +/* + * FUNCTION... recv_mess(int card, char *com, int flag) + * + * INPUT ARGUMENTS... + * card - controller card # (0,1,...). + * *com - caller's response buffer. + * flag | FLUSH = flush controller's output buffer; set timeout = 0. + * | !FLUSH = retrieve response into caller's buffer; set timeout. + * + * LOGIC... + * IF controller card does not exist. + * ERROR RETURN. + * ENDIF + * NORMAL RETURN. + */ + +static int recv_mess(int card, char *com, int flag) +{ + struct Ensemblecontroller *cntrl; + double timeout = 0; + size_t nread = 0; + asynStatus status; + int eomReason, i; + char buff[BUFF_SIZE]; + + if (!motor_state[card]) + { + return(ERROR); + } + + cntrl = (struct Ensemblecontroller *) motor_state[card]->DevicePrivate; + + timeout = TIMEOUT; + com[0] = '\0'; + for (i = 0; i < num_cmds; i++) + { + status = pasynOctetSyncIO->read(cntrl->pasynUser, buff, BUFF_SIZE, timeout, &nread, &eomReason); + + if (status == asynSuccess && nread > 0) + { + strcat(com, buff); + } + else + { + com[0] = '\0'; + nread = 0; + break; + } + } + + Debug(2, "recv_mess(): message = \"%s\"\n", com); + return(nread); +} + + +/*****************************************************/ +/* Setup system configuration */ +/* EnsembleSetup() */ +/*****************************************************/ +RTN_STATUS EnsembleSetup(int num_cards, /* maximum number of controllers in system. */ + int scan_rate) /* polling rate - 1/60 sec units. */ +{ + int i; + + if (num_cards < 1 || num_cards > Ensemble_NUM_CARDS) + { + Ensemble_num_cards = Ensemble_NUM_CARDS; + } + else + { + Ensemble_num_cards = num_cards; + } + + // Set motor polling task rate + if (scan_rate >= 1 && scan_rate <= 60) + { + targs.motor_scan_rate = scan_rate; + } + else + { + targs.motor_scan_rate = SCAN_RATE; + } + + /* + * Allocate space for motor_state structures. Note this must be done + * before EnsembleConfig is called, so it cannot be done in motor_init() + * This means that we must allocate space for a card without knowing + * if it really exists, which is not a serious problem + */ + motor_state = (struct controller **) malloc(Ensemble_num_cards * sizeof(struct controller *)); + + for (i = 0; i < Ensemble_num_cards; i++) + { + motor_state[i] = (struct controller *) NULL; + } + + return(OK); +} + + +/*****************************************************/ +/* Configure a controller */ +/* EnsembleConfig() */ +/*****************************************************/ +RTN_STATUS EnsembleConfig(int card, /* card being configured */ + const char *name, /* asyn port name */ + int addr) /* asyn address (GPIB) */ +{ + struct Ensemblecontroller *cntrl; + + if (card < 0 || card >= Ensemble_num_cards) + { + return(ERROR); + } + + motor_state[card] = (struct controller *) malloc(sizeof(struct controller)); + motor_state[card]->DevicePrivate = malloc(sizeof(struct Ensemblecontroller)); + cntrl = (struct Ensemblecontroller *) motor_state[card]->DevicePrivate; + + strcpy(cntrl->asyn_port, name); + cntrl->asyn_address = addr; + + return(OK); +} + + + +/*****************************************************/ +/* initialize all software and hardware */ +/* This is called from the initialization routine in */ +/* device support. */ +/* motor_init() */ +/*****************************************************/ +static int motor_init() +{ + struct controller *brdptr; + struct Ensemblecontroller *cntrl; + int card_index, motor_index, status, digits; + char buff[BUFF_SIZE]; + asynStatus success_rtn; + + // Indicates that the driver is initialized + initialized = true; + + if (Ensemble_num_cards <= 0) + { + return(ERROR); + } + + for (card_index = 0; card_index < Ensemble_num_cards; card_index++) + { + if (!motor_state[card_index]) + { + continue; + } + + brdptr = motor_state[card_index]; + brdptr->cmnd_response = true; + total_cards = card_index + 1; + cntrl = (struct Ensemblecontroller *)brdptr->DevicePrivate; + + // Initialize communications channel + success_rtn = pasynOctetSyncIO->connect(cntrl->asyn_port, cntrl->asyn_address, &cntrl->pasynUser, NULL); + + if (success_rtn == asynSuccess) + { + int retry = 0; + + // Send a message to the baord, see if it exists + // flush any junk at input port - should not be any data available + pasynOctetSyncIO->flush(cntrl->pasynUser); + + do + { + // we only care if we get a response + // so we don't need to send a valid command + strcpy(buff, "NONE"); + send_mess(card_index, buff, (char) NULL); + status = recv_mess(card_index, buff, 1); + + retry++; + } while (!status && retry < 3); + + if (status > 0) + { + brdptr->localaddr = (char *) NULL; + brdptr->motor_in_motion = 0; + // Read controller ID string + strcpy(buff, "GETPARM(CONTROL, 265)"); //UserString1 + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + { + strcpy(brdptr->ident, &buff[1]); + } + else + { + sprintf(brdptr->ident, "Ensemble%d", card_index); + } + + // Get the number of axes + brdptr->total_axis = 0; + for (motor_index = 0; motor_index < 10; motor_index++) + { + // Does this axis actually exist? + sprintf(buff, "GETPARM(@%d, 257)", motor_index); //AxisName + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + + // We know the axis exists if we got an ACK response + if (buff[0] == ASCII_ACK_CHAR) + { + cntrl->axes[motor_index] = 1; + brdptr->total_axis++; + } + } + + for (motor_index = 0; motor_index < 10; motor_index++) + { + if (cntrl->axes[motor_index]) + { + struct mess_info *motor_info = &brdptr->motor_info[motor_index]; + + motor_info->status.All = 0; + motor_info->no_motion_count = 0; + motor_info->encoder_position = 0; + motor_info->position = 0; + brdptr->motor_info[motor_index].motor_motion = NULL; + + // Determine if encoder present based on open/closed loop mode. + sprintf(buff, "GETPARM(@%d, 58)", motor_index); //CfgFbkPosType + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + { + if (atoi(&buff[1]) > 0) + { + motor_info->encoder_present = YES; + motor_info->status.Bits.EA_PRESENT = 1; + } + } + + // Determine if gains are supported based on the motor type. + sprintf(buff, "GETPARM(@%d, 33)", motor_index); //CfgMotType + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + { + if (atoi(&buff[1]) != 3) + { + motor_info->pid_present = YES; + motor_info->status.Bits.GAIN_SUPPORT = 1; + } + } + + // Stop all motors + sprintf(buff, "ABORT @%d", motor_index); + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + + // Determive drive resolution + sprintf(buff, "GETPARM(@%d, 3)", motor_index); //PosScaleFactor + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + cntrl->drive_resolution[motor_index] = 1 / fabs(atof(&buff[1])); + else + cntrl->drive_resolution[motor_index] = 1; + + digits = (int) -log10(cntrl->drive_resolution[motor_index]) + 2; + if (digits < 1) + digits = 1; + cntrl->res_decpts[motor_index] = digits; + + // Save home preset position + sprintf(buff, "GETPARM(@%d, 108)", motor_index); //HomeOffset + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + cntrl->home_preset[motor_index] = atof(&buff[1]); + + // Determine low limit + sprintf(buff, "GETPARM(@%d, 47)", motor_index); //ThresholdSoftCCW + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + motor_info->low_limit = atof(&buff[1]); + + // Determine high limit + sprintf(buff, "GETPARM(@%d, 48)", motor_index); //ThresholdSoftCW + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + motor_info->high_limit = atof(&buff[1]); + + // Save the HomeDirection parameter + sprintf(buff, "GETPARM(@%d, 106)", motor_index); //HomeDirection + send_mess(card_index, buff, (char) NULL); + recv_mess(card_index, buff, 1); + if (buff[0] == ASCII_ACK_CHAR) + cntrl->home_dparam[motor_index] = atoi(&buff[1]); + + // Read status of each motor + set_status(card_index, motor_index); + } + } + } + else + { + motor_state[card_index] = (struct controller *) NULL; + } + } + } + + any_motor_in_motion = 0; + + mess_queue.head = (struct mess_node *) NULL; + mess_queue.tail = (struct mess_node *) NULL; + + free_list.head = (struct mess_node *) NULL; + free_list.tail = (struct mess_node *) NULL; + + epicsThreadCreate((char *) "Ensemble_motor", + epicsThreadPriorityMedium, + epicsThreadGetStackSize(epicsThreadStackMedium), + (EPICSTHREADFUNC) motor_task, (void *) &targs); + + return(OK); +} + diff --git a/motorApp/AerotechSrc/drvEnsemble.h b/motorApp/AerotechSrc/drvEnsemble.h index 621f65ed..c2152eba 100644 --- a/motorApp/AerotechSrc/drvEnsemble.h +++ b/motorApp/AerotechSrc/drvEnsemble.h @@ -1,81 +1,81 @@ -/* -FILENAME... drvEnsemble.h -USAGE... This file contains Aerotech Ensemble driver "include" information. - -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-05-01 18:13:42 $ -*/ - -/* - * Original Author: Chad Weimer - * Date: 10/16/97 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .00 04-01-08 caw initialized from drvMM4000.h (Newport) - */ - -#ifndef INCdrvEnsembleh -#define INCdrvEnsembleh 1 - -#include "motor.h" -#include "motordrvCom.h" -#include "asynDriver.h" -#include "asynOctetSyncIO.h" - - -// The following should be defined to have the same value as -// the Ensemble parameters specified -#define ASCII_EOS_CHAR '\n' // AsciiCmdEOSChar -#define ASCII_EOS_STR "\n" -#define ASCII_ACK_CHAR '%' // AsciiCmdAckChar -#define ASCII_NAK_CHAR '!' // AsciiCmdNakChar -#define ASCII_FAULT_CHAR '#' // AsciiCmdFaultChar -#define ASCII_TIMEOUT_CHAR '$' // AsciiCmdTimeoutChar - -#define BUFF_SIZE 100 /* Maximum length of string to/from Ensemble */ - - -/* Ensemble specific data is stored in this structure. */ -struct Ensemblecontroller -{ - asynUser *pasynUser; /* For RS-232/Ethernet */ - int asyn_address; /* Use for GPIB or other address with asyn */ - char asyn_port[80]; /* asyn port name */ - int axes[MAX_AXIS]; - double drive_resolution[MAX_AXIS]; - int res_decpts[MAX_AXIS]; /* Drive resolution significant dec. pts. */ - double home_preset[MAX_AXIS]; /* Controller's home preset position (XF command). */ - epicsUInt32 home_dparam[MAX_AXIS]; /* Controller's HomeDirection parameter. */ - CommStatus status; /* Controller communication status. */ -}; - -/* Function prototypes. */ -extern RTN_STATUS EnsembleSetup(int, int); -extern RTN_STATUS EnsembleConfig(int, const char *, int); - - -#endif /* INCdrvEnsembleh */ - +/* +FILENAME... drvEnsemble.h +USAGE... This file contains Aerotech Ensemble driver "include" information. + +Version: $Revision: 1.3 $ +Modified By: $Author: sluiter $ +Last Modified: $Date: 2009-05-01 18:13:42 $ +*/ + +/* + * Original Author: Chad Weimer + * Date: 10/16/97 + * + * Experimental Physics and Industrial Control System (EPICS) + * + * Copyright 1991, the Regents of the University of California, + * and the University of Chicago Board of Governors. + * + * This software was produced under U.S. Government contracts: + * (W-7405-ENG-36) at the Los Alamos National Laboratory, + * and (W-31-109-ENG-38) at Argonne National Laboratory. + * + * Initial development by: + * The Controls and Automation Group (AT-8) + * Ground Test Accelerator + * Accelerator Technology Division + * Los Alamos National Laboratory + * + * Co-developed with + * The Controls and Computing Group + * Accelerator Systems Division + * Advanced Photon Source + * Argonne National Laboratory + * + * Modification Log: + * ----------------- + * .00 04-01-08 caw initialized from drvMM4000.h (Newport) + */ + +#ifndef INCdrvEnsembleh +#define INCdrvEnsembleh 1 + +#include "motor.h" +#include "motordrvCom.h" +#include "asynDriver.h" +#include "asynOctetSyncIO.h" + + +// The following should be defined to have the same value as +// the Ensemble parameters specified +#define ASCII_EOS_CHAR '\n' // AsciiCmdEOSChar +#define ASCII_EOS_STR "\n" +#define ASCII_ACK_CHAR '%' // AsciiCmdAckChar +#define ASCII_NAK_CHAR '!' // AsciiCmdNakChar +#define ASCII_FAULT_CHAR '#' // AsciiCmdFaultChar +#define ASCII_TIMEOUT_CHAR '$' // AsciiCmdTimeoutChar + +#define BUFF_SIZE 100 /* Maximum length of string to/from Ensemble */ + + +/* Ensemble specific data is stored in this structure. */ +struct Ensemblecontroller +{ + asynUser *pasynUser; /* For RS-232/Ethernet */ + int asyn_address; /* Use for GPIB or other address with asyn */ + char asyn_port[80]; /* asyn port name */ + int axes[MAX_AXIS]; + double drive_resolution[MAX_AXIS]; + int res_decpts[MAX_AXIS]; /* Drive resolution significant dec. pts. */ + double home_preset[MAX_AXIS]; /* Controller's home preset position (XF command). */ + epicsUInt32 home_dparam[MAX_AXIS]; /* Controller's HomeDirection parameter. */ + CommStatus status; /* Controller communication status. */ +}; + +/* Function prototypes. */ +extern RTN_STATUS EnsembleSetup(int, int); +extern RTN_STATUS EnsembleConfig(int, const char *, int); + + +#endif /* INCdrvEnsembleh */ + diff --git a/motorApp/MicroMoSrc/devMicroMo.dbd b/motorApp/MicroMoSrc/devMicroMo.dbd index 679d618c..b8f1f078 100644 --- a/motorApp/MicroMoSrc/devMicroMo.dbd +++ b/motorApp/MicroMoSrc/devMicroMo.dbd @@ -1,5 +1,5 @@ -# Micro Mo MVP 2001 Driver support. -device(motor,VME_IO,devMVP2001,"MVP2001") -driver(drvMVP2001) -#variable(drvMVP2001debug) - +# Micro Mo MVP 2001 Driver support. +device(motor,VME_IO,devMVP2001,"MVP2001") +driver(drvMVP2001) +#variable(drvMVP2001debug) + diff --git a/motorApp/MotorSrc/paramLib.c b/motorApp/MotorSrc/paramLib.c old mode 100755 new mode 100644 diff --git a/motorApp/MotorSrc/paramLib.h b/motorApp/MotorSrc/paramLib.h old mode 100755 new mode 100644 diff --git a/motorApp/NewportSrc/MM4005_trajectoryScan.st b/motorApp/NewportSrc/MM4005_trajectoryScan.st old mode 100755 new mode 100644 diff --git a/motorApp/NewportSrc/Socket.cpp b/motorApp/NewportSrc/Socket.cpp old mode 100755 new mode 100644 index 886a6351..2d128814 --- a/motorApp/NewportSrc/Socket.cpp +++ b/motorApp/NewportSrc/Socket.cpp @@ -1,286 +1,286 @@ -/*/////////////////////////////////////////////////////////////////////////////// -* Socket.cpp -*/ -#include "Socket.h" - -#define TIMEOUT 300 -#define SMALL_BUFFER_SIZE 256 -#define MAX_NB_SOCKETS 100 - -void Delay(double timedelay); - -CAsyncSocket m_sConnectSocket[MAX_NB_SOCKETS]; -BOOL UsedSocket[MAX_NB_SOCKETS] = { FALSE}; -double TimeoutSocket[MAX_NB_SOCKETS]; -int NbSockets = 0; - -/***************************************************************************************/ -int ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut) -{ - int flag = 1; - int socketID = 0; - DWORD sockPendingFlag = 1; - - if (!AfxSocketInit()) - { - AfxMessageBox("Fatal Error: MFC Socket initialization failed"); - return -1; - } - /* Select a socket number */ - if (NbSockets < MAX_NB_SOCKETS) - { - while ((UsedSocket[socketID] == TRUE) && (socketID < MAX_NB_SOCKETS)) - socketID++; - - if (socketID == MAX_NB_SOCKETS) - return -1; - } - else - return -1; - UsedSocket[socketID] = TRUE; - NbSockets++; - - /* Socket creation */ - if ((m_sConnectSocket[socketID].Create() == 0) - || (m_sConnectSocket[socketID].SetSockOpt(TCP_NODELAY,(char *)&flag,(int)sizeof( flag ),IPPROTO_TCP) == 0)) - { - UsedSocket[socketID] = FALSE; - NbSockets--; - return -1; - } - - /* Connect */ - if (m_sConnectSocket[socketID].Connect(Ip_Address,Ip_Port) == 0) - { - int SocketError = m_sConnectSocket[socketID].GetLastError(); - if (SocketError != WSAEWOULDBLOCK) - { - UsedSocket[socketID] = FALSE; - NbSockets--; - return -1; - } - } - - /* Set timeout */ - if (TimeOut > 0) - { - if (TimeOut < 1e-3) - TimeoutSocket[socketID] = 1e-3; - else - TimeoutSocket[socketID] = TimeOut; - } - else - TimeoutSocket[socketID] = TIMEOUT; - - /* Socket array */ - struct fd_set *Sockets = new struct fd_set; - FD_ZERO(Sockets); - FD_SET(m_sConnectSocket[socketID], Sockets); - - /* Time structure */ - struct timeval *TimeOutStruct = new struct timeval; - TimeOutStruct->tv_sec = (long) TimeoutSocket[socketID]; - TimeOutStruct->tv_usec = (long) ((TimeoutSocket[socketID] - (long)TimeoutSocket[socketID])* 1e9); - - /* Checking connection is ok */ - int SelectReturn = select(0, NULL, Sockets, NULL, TimeOutStruct); - if (SelectReturn == SOCKET_ERROR - || SelectReturn == 0) - { - UsedSocket[socketID] = FALSE; - NbSockets--; - return -1; - } - - /* Force no pending */ - if (m_sConnectSocket[socketID].IOCtl(FIONBIO,&sockPendingFlag) == 0) - { - m_sConnectSocket[socketID].Close(); - UsedSocket[socketID] = FALSE; - NbSockets--; - return -1; - } - - /* Delay unless -1 return for the first API */ - Sleep(10); - - /* Return socket ID */ - return socketID; -} - -/***************************************************************************************/ -void SetTCPTimeout(int SocketIndex, double TimeOut) -{ - if ((SocketIndex >= 0) && (SocketIndex < MAX_NB_SOCKETS) && (UsedSocket[SocketIndex] == TRUE)) - { - if (TimeOut > 0) - { - if (TimeOut < 1e-3) - TimeoutSocket[SocketIndex] = 1e-3; - else - TimeoutSocket[SocketIndex] = TimeOut; - } - } -} - -/***************************************************************************************/ -void SendAndReceive(int socketID, char sSendString[], char sReturnString[], int iReturnStringSize) -{ - char sSocketBuffer[SMALL_BUFFER_SIZE + 1] = {'\0'}; - int iReceiveByteNumber = 0; - int iErrorNo = 0; - fd_set readFds; - int iSelectStatus; - double dTimeout; - struct timeval cTimeout; - clock_t start, stop; - - if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS) && (UsedSocket[socketID] == TRUE)) - { - /* Clear receive buffer */ - do - { - iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); - } - while (iReceiveByteNumber != SOCKET_ERROR); - sReturnString[0] = '\0'; - - /* Send String to controller and wait for response */ - m_sConnectSocket[socketID].Send(sSendString,strlen(sSendString)); - - /* Get reply with timeout */ - dTimeout = TimeoutSocket[socketID]; - do - { - /* Get time */ - start = clock(); - - /* Check reply */ - iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); - iErrorNo = GetLastError() & 0xffff; - - /* Wait for reply */ - if ((iReceiveByteNumber == SOCKET_ERROR) && (iErrorNo == WSAEWOULDBLOCK)) - { - FD_ZERO(&readFds); - FD_SET(m_sConnectSocket[socketID].m_hSocket, &readFds); - cTimeout.tv_sec = (long)dTimeout; - cTimeout.tv_usec = (long)((dTimeout - (long)dTimeout) * 1e6); - iSelectStatus = select(FD_SETSIZE, (fd_set *)&readFds, (fd_set *) NULL, (fd_set *) NULL, &cTimeout); - if ((iSelectStatus > 0) && (FD_ISSET(m_sConnectSocket[socketID].m_hSocket, &readFds))) - iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); - else - { - iErrorNo = GetLastError() & 0xffff; - sprintf(sSocketBuffer,"-2,%s,EndOfAPI",sSendString); - strncpyWithEOS(sReturnString, sSocketBuffer, strlen(sSocketBuffer), iReturnStringSize); - iReceiveByteNumber = SOCKET_ERROR; - } - } - - /* Concatenation */ - if ((iReceiveByteNumber >= 0) && (iReceiveByteNumber <= SMALL_BUFFER_SIZE)) - { - sSocketBuffer[iReceiveByteNumber] = '\0'; - strncat(sReturnString, sSocketBuffer, iReturnStringSize - strlen(sReturnString) - 1); - } - - /* Calculate new timeout */ - stop = clock(); - dTimeout = dTimeout - (double)(stop - start) / CLOCKS_PER_SEC; - if (dTimeout < 1e-3) - dTimeout = 1e-3; - } - while ((iReceiveByteNumber != SOCKET_ERROR) && (strstr(sReturnString, "EndOfAPI") == NULL)); - } - else - sReturnString[0] = '\0'; - - return; -} - -/***************************************************************************************/ -void CloseSocket(int socketID) -{ - if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS)) - { - if (UsedSocket[socketID] == TRUE) - { - m_sConnectSocket[socketID].Close(); - UsedSocket[socketID] = FALSE; - TimeoutSocket[socketID] = TIMEOUT; - NbSockets--; - } - } -} - -/***************************************************************************************/ -char * GetError(int socketID) -{ - if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS)) - { - int error = m_sConnectSocket[socketID].GetLastError(); - switch (error) - { - case WSANOTINITIALISED: - return (_T("A successful AfxSocketInit must occur before using this API.")); - case WSAENETDOWN: - return(_T("The Windows Sockets implementation detected that the network subsystem failed.")); - case WSAEADDRINUSE: - return(_T("The specified address is already in use.")); - case WSAEINPROGRESS: - return(_T("A blocking Windows Sockets call is in progress.")); - case WSAEADDRNOTAVAIL: - return(_T("The specified address is not available from the local machine.")); - case WSAEAFNOSUPPORT: - return(_T("Addresses in the specified family cannot be used with this socket.")); - case WSAECONNREFUSED: - return(_T("The attempt to connect was rejected.")); - case WSAEDESTADDRREQ: - return(_T("A destination address is required.")); - case WSAEFAULT: - return(_T("The nSockAddrLen argument is incorrect.")); - case WSAEINVAL: - return(_T("Invalid host address.")); - case WSAEISCONN: - return(_T("The socket is already connected.")); - case WSAEMFILE: - return(_T("No more file descriptors are available.")); - case WSAENETUNREACH: - return(_T("The network cannot be reached from this host at this time.")); - case WSAENOBUFS: - return(_T("No buffer space is available. The socket cannot be connected.")); - case WSAENOTSOCK: - return(_T("The descriptor is not a socket.")); - case WSAETIMEDOUT: - return(_T("Attempt to connect timed out without establishing a connection.")); - case WSAEWOULDBLOCK: - return(_T("The socket is marked as nonblocking and the connection cannot be completed immediately.")); - case WSAEPROTONOSUPPORT: - return(_T("The specified port is not supported.")); - case WSAEPROTOTYPE: - return(_T("The specified port is the wrong type for this socket.")); - case WSAESOCKTNOSUPPORT: - return(_T("The specified socket type is not supported in this address family.")); - } - return(_T("")); - } - else - return(_T("")); -} - -/***************************************************************************************/ -void strncpyWithEOS(char * szStringOut, const char * szStringIn, int nNumberOfCharToCopy, int nStringOutSize) -{ - if (nNumberOfCharToCopy < nStringOutSize) - { - strncpy (szStringOut, szStringIn, nNumberOfCharToCopy); - szStringOut[nNumberOfCharToCopy] = '\0'; - } - else - { - strncpy (szStringOut, szStringIn, nStringOutSize - 1); - szStringOut[nStringOutSize - 1] = '\0'; - } -} - +/*/////////////////////////////////////////////////////////////////////////////// +* Socket.cpp +*/ +#include "Socket.h" + +#define TIMEOUT 300 +#define SMALL_BUFFER_SIZE 256 +#define MAX_NB_SOCKETS 100 + +void Delay(double timedelay); + +CAsyncSocket m_sConnectSocket[MAX_NB_SOCKETS]; +BOOL UsedSocket[MAX_NB_SOCKETS] = { FALSE}; +double TimeoutSocket[MAX_NB_SOCKETS]; +int NbSockets = 0; + +/***************************************************************************************/ +int ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut) +{ + int flag = 1; + int socketID = 0; + DWORD sockPendingFlag = 1; + + if (!AfxSocketInit()) + { + AfxMessageBox("Fatal Error: MFC Socket initialization failed"); + return -1; + } + /* Select a socket number */ + if (NbSockets < MAX_NB_SOCKETS) + { + while ((UsedSocket[socketID] == TRUE) && (socketID < MAX_NB_SOCKETS)) + socketID++; + + if (socketID == MAX_NB_SOCKETS) + return -1; + } + else + return -1; + UsedSocket[socketID] = TRUE; + NbSockets++; + + /* Socket creation */ + if ((m_sConnectSocket[socketID].Create() == 0) + || (m_sConnectSocket[socketID].SetSockOpt(TCP_NODELAY,(char *)&flag,(int)sizeof( flag ),IPPROTO_TCP) == 0)) + { + UsedSocket[socketID] = FALSE; + NbSockets--; + return -1; + } + + /* Connect */ + if (m_sConnectSocket[socketID].Connect(Ip_Address,Ip_Port) == 0) + { + int SocketError = m_sConnectSocket[socketID].GetLastError(); + if (SocketError != WSAEWOULDBLOCK) + { + UsedSocket[socketID] = FALSE; + NbSockets--; + return -1; + } + } + + /* Set timeout */ + if (TimeOut > 0) + { + if (TimeOut < 1e-3) + TimeoutSocket[socketID] = 1e-3; + else + TimeoutSocket[socketID] = TimeOut; + } + else + TimeoutSocket[socketID] = TIMEOUT; + + /* Socket array */ + struct fd_set *Sockets = new struct fd_set; + FD_ZERO(Sockets); + FD_SET(m_sConnectSocket[socketID], Sockets); + + /* Time structure */ + struct timeval *TimeOutStruct = new struct timeval; + TimeOutStruct->tv_sec = (long) TimeoutSocket[socketID]; + TimeOutStruct->tv_usec = (long) ((TimeoutSocket[socketID] - (long)TimeoutSocket[socketID])* 1e9); + + /* Checking connection is ok */ + int SelectReturn = select(0, NULL, Sockets, NULL, TimeOutStruct); + if (SelectReturn == SOCKET_ERROR + || SelectReturn == 0) + { + UsedSocket[socketID] = FALSE; + NbSockets--; + return -1; + } + + /* Force no pending */ + if (m_sConnectSocket[socketID].IOCtl(FIONBIO,&sockPendingFlag) == 0) + { + m_sConnectSocket[socketID].Close(); + UsedSocket[socketID] = FALSE; + NbSockets--; + return -1; + } + + /* Delay unless -1 return for the first API */ + Sleep(10); + + /* Return socket ID */ + return socketID; +} + +/***************************************************************************************/ +void SetTCPTimeout(int SocketIndex, double TimeOut) +{ + if ((SocketIndex >= 0) && (SocketIndex < MAX_NB_SOCKETS) && (UsedSocket[SocketIndex] == TRUE)) + { + if (TimeOut > 0) + { + if (TimeOut < 1e-3) + TimeoutSocket[SocketIndex] = 1e-3; + else + TimeoutSocket[SocketIndex] = TimeOut; + } + } +} + +/***************************************************************************************/ +void SendAndReceive(int socketID, char sSendString[], char sReturnString[], int iReturnStringSize) +{ + char sSocketBuffer[SMALL_BUFFER_SIZE + 1] = {'\0'}; + int iReceiveByteNumber = 0; + int iErrorNo = 0; + fd_set readFds; + int iSelectStatus; + double dTimeout; + struct timeval cTimeout; + clock_t start, stop; + + if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS) && (UsedSocket[socketID] == TRUE)) + { + /* Clear receive buffer */ + do + { + iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); + } + while (iReceiveByteNumber != SOCKET_ERROR); + sReturnString[0] = '\0'; + + /* Send String to controller and wait for response */ + m_sConnectSocket[socketID].Send(sSendString,strlen(sSendString)); + + /* Get reply with timeout */ + dTimeout = TimeoutSocket[socketID]; + do + { + /* Get time */ + start = clock(); + + /* Check reply */ + iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); + iErrorNo = GetLastError() & 0xffff; + + /* Wait for reply */ + if ((iReceiveByteNumber == SOCKET_ERROR) && (iErrorNo == WSAEWOULDBLOCK)) + { + FD_ZERO(&readFds); + FD_SET(m_sConnectSocket[socketID].m_hSocket, &readFds); + cTimeout.tv_sec = (long)dTimeout; + cTimeout.tv_usec = (long)((dTimeout - (long)dTimeout) * 1e6); + iSelectStatus = select(FD_SETSIZE, (fd_set *)&readFds, (fd_set *) NULL, (fd_set *) NULL, &cTimeout); + if ((iSelectStatus > 0) && (FD_ISSET(m_sConnectSocket[socketID].m_hSocket, &readFds))) + iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); + else + { + iErrorNo = GetLastError() & 0xffff; + sprintf(sSocketBuffer,"-2,%s,EndOfAPI",sSendString); + strncpyWithEOS(sReturnString, sSocketBuffer, strlen(sSocketBuffer), iReturnStringSize); + iReceiveByteNumber = SOCKET_ERROR; + } + } + + /* Concatenation */ + if ((iReceiveByteNumber >= 0) && (iReceiveByteNumber <= SMALL_BUFFER_SIZE)) + { + sSocketBuffer[iReceiveByteNumber] = '\0'; + strncat(sReturnString, sSocketBuffer, iReturnStringSize - strlen(sReturnString) - 1); + } + + /* Calculate new timeout */ + stop = clock(); + dTimeout = dTimeout - (double)(stop - start) / CLOCKS_PER_SEC; + if (dTimeout < 1e-3) + dTimeout = 1e-3; + } + while ((iReceiveByteNumber != SOCKET_ERROR) && (strstr(sReturnString, "EndOfAPI") == NULL)); + } + else + sReturnString[0] = '\0'; + + return; +} + +/***************************************************************************************/ +void CloseSocket(int socketID) +{ + if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS)) + { + if (UsedSocket[socketID] == TRUE) + { + m_sConnectSocket[socketID].Close(); + UsedSocket[socketID] = FALSE; + TimeoutSocket[socketID] = TIMEOUT; + NbSockets--; + } + } +} + +/***************************************************************************************/ +char * GetError(int socketID) +{ + if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS)) + { + int error = m_sConnectSocket[socketID].GetLastError(); + switch (error) + { + case WSANOTINITIALISED: + return (_T("A successful AfxSocketInit must occur before using this API.")); + case WSAENETDOWN: + return(_T("The Windows Sockets implementation detected that the network subsystem failed.")); + case WSAEADDRINUSE: + return(_T("The specified address is already in use.")); + case WSAEINPROGRESS: + return(_T("A blocking Windows Sockets call is in progress.")); + case WSAEADDRNOTAVAIL: + return(_T("The specified address is not available from the local machine.")); + case WSAEAFNOSUPPORT: + return(_T("Addresses in the specified family cannot be used with this socket.")); + case WSAECONNREFUSED: + return(_T("The attempt to connect was rejected.")); + case WSAEDESTADDRREQ: + return(_T("A destination address is required.")); + case WSAEFAULT: + return(_T("The nSockAddrLen argument is incorrect.")); + case WSAEINVAL: + return(_T("Invalid host address.")); + case WSAEISCONN: + return(_T("The socket is already connected.")); + case WSAEMFILE: + return(_T("No more file descriptors are available.")); + case WSAENETUNREACH: + return(_T("The network cannot be reached from this host at this time.")); + case WSAENOBUFS: + return(_T("No buffer space is available. The socket cannot be connected.")); + case WSAENOTSOCK: + return(_T("The descriptor is not a socket.")); + case WSAETIMEDOUT: + return(_T("Attempt to connect timed out without establishing a connection.")); + case WSAEWOULDBLOCK: + return(_T("The socket is marked as nonblocking and the connection cannot be completed immediately.")); + case WSAEPROTONOSUPPORT: + return(_T("The specified port is not supported.")); + case WSAEPROTOTYPE: + return(_T("The specified port is the wrong type for this socket.")); + case WSAESOCKTNOSUPPORT: + return(_T("The specified socket type is not supported in this address family.")); + } + return(_T("")); + } + else + return(_T("")); +} + +/***************************************************************************************/ +void strncpyWithEOS(char * szStringOut, const char * szStringIn, int nNumberOfCharToCopy, int nStringOutSize) +{ + if (nNumberOfCharToCopy < nStringOutSize) + { + strncpy (szStringOut, szStringIn, nNumberOfCharToCopy); + szStringOut[nNumberOfCharToCopy] = '\0'; + } + else + { + strncpy (szStringOut, szStringIn, nStringOutSize - 1); + szStringOut[nStringOutSize - 1] = '\0'; + } +} + diff --git a/motorApp/NewportSrc/Socket.h b/motorApp/NewportSrc/Socket.h old mode 100755 new mode 100644 index 6987a71c..67e2f69c --- a/motorApp/NewportSrc/Socket.h +++ b/motorApp/NewportSrc/Socket.h @@ -1,14 +1,14 @@ -/*/////////////////////////////////////////////////////////////////////////////// - * Socket.h - */ - -#ifdef _WIN -#include // MFC socket extensions -#endif - -int ConnectToServer (char *Ip_Address, int Ip_Port, double TimeOut); -void SetTCPTimeout (int SocketID, double Timeout); -void SendAndReceive(int socketID, char sSendString[], char sReturnString[], int iReturnStringSize); -void CloseSocket (int SocketID); -char * GetError (int SocketID); -void strncpyWithEOS(char * szStringOut, const char * szStringIn, int nNumberOfCharToCopy, int nStringOutSize); +/*/////////////////////////////////////////////////////////////////////////////// + * Socket.h + */ + +#ifdef _WIN +#include // MFC socket extensions +#endif + +int ConnectToServer (char *Ip_Address, int Ip_Port, double TimeOut); +void SetTCPTimeout (int SocketID, double Timeout); +void SendAndReceive(int socketID, char sSendString[], char sReturnString[], int iReturnStringSize); +void CloseSocket (int SocketID); +char * GetError (int SocketID); +void strncpyWithEOS(char * szStringOut, const char * szStringIn, int nNumberOfCharToCopy, int nStringOutSize); diff --git a/motorApp/NewportSrc/XPS_C8_drivers.h b/motorApp/NewportSrc/XPS_C8_drivers.h index f4ddc72a..4d49ab86 100644 --- a/motorApp/NewportSrc/XPS_C8_drivers.h +++ b/motorApp/NewportSrc/XPS_C8_drivers.h @@ -1,216 +1,216 @@ -/*/////////////////////////////////////////////////////////////////// -// Created header file XPS_C8_drivers.h for API headings -*/ - - -#ifdef _WIN32 - #ifndef DLL - #ifdef _DLL /* _DLL is defined by EPICS if we are being compiled to call DLLs */ - #define DLL _declspec(dllimport) - #else - #define DLL - #endif - #endif -#else - #define DLL - #define __stdcall -#endif - -#ifdef __cplusplus -extern "C" -{ -#else -typedef int bool; -#endif - - -DLL int __stdcall TCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut); -DLL void __stdcall TCP_SetTimeout(int SocketIndex, double Timeout); -DLL void __stdcall TCP_CloseSocket(int SocketIndex); -DLL char * __stdcall TCP_GetError(int SocketIndex); -DLL char * __stdcall GetLibraryVersion(void); -DLL int __stdcall ElapsedTimeGet (int SocketIndex, double * ElapsedTime); /* Return elapsed time from controller power on */ -DLL int __stdcall ErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString); /* Return the error string corresponding to the error code */ -DLL int __stdcall FirmwareVersionGet (int SocketIndex, char * Version); /* Return firmware version */ -DLL int __stdcall TCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList); /* Execute a TCL script from a TCL file */ -DLL int __stdcall TCLScriptExecuteAndWait (int SocketIndex, char * TCLFileName, char * TaskName, char * InputParametersList, char * OutputParametersList); /* Execute a TCL script from a TCL file and wait the end of execution to return */ -DLL int __stdcall TCLScriptKill (int SocketIndex, char * TaskName); /* Kill TCL Task */ -DLL int __stdcall TimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks); /* Get a timer */ -DLL int __stdcall TimerSet (int SocketIndex, char * TimerName, int FrequencyTicks); /* Set a timer */ -DLL int __stdcall Reboot (int SocketIndex); /* Reboot the controller */ -DLL int __stdcall Login (int SocketIndex, char * Name, char * Password); /* Log in */ -DLL int __stdcall CloseAllOtherSockets (int SocketIndex); /* Close all socket beside the one used to send this command */ -DLL int __stdcall EventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3); /* ** OBSOLETE ** Add an event */ -DLL int __stdcall EventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList); /* ** OBSOLETE ** Read events and actions list */ -DLL int __stdcall EventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Delete an event */ -DLL int __stdcall EventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Wait an event */ -DLL int __stdcall EventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List); /* Configure one or several events */ -DLL int __stdcall EventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration); /* Read the event configuration */ -DLL int __stdcall EventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List); /* Configure one or several actions */ -DLL int __stdcall EventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration); /* Read the action configuration */ -DLL int __stdcall EventExtendedStart (int SocketIndex, int * ID); /* Launch the last event and action configuration and return an ID */ -DLL int __stdcall EventExtendedAllGet (int SocketIndex, char * EventActionConfigurations); /* Read all event and action configurations */ -DLL int __stdcall EventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration); /* Read the event and action configuration defined by ID */ -DLL int __stdcall EventExtendedRemove (int SocketIndex, int ID); /* Remove the event and action configuration defined by ID */ -DLL int __stdcall EventExtendedWait (int SocketIndex); /* Wait events from the last event configuration */ -DLL int __stdcall GatheringConfigurationGet (int SocketIndex, char * Type); /*Read different mnemonique type */ -DLL int __stdcall GatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ -DLL int __stdcall GatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ -DLL int __stdcall GatheringStopAndSave (int SocketIndex); /* Stop acquisition and save data */ -DLL int __stdcall GatheringDataAcquire (int SocketIndex); /* Acquire a configured data */ -DLL int __stdcall GatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine); /* Get a data line from gathering buffer */ -DLL int __stdcall GatheringReset (int SocketIndex); /* Empty the gathered data in memory to start new gathering from scratch */ -DLL int __stdcall GatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ -DLL int __stdcall GatheringExternalConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ -DLL int __stdcall GatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ -DLL int __stdcall GatheringExternalStopAndSave (int SocketIndex); /* Stop acquisition and save data */ -DLL int __stdcall GlobalArrayGet (int SocketIndex, int Number, char * ValueString); /* Get global array value */ -DLL int __stdcall GlobalArraySet (int SocketIndex, int Number, char * ValueString); /* Set global array value */ -DLL int __stdcall GPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]); /* Read analog input or analog output for one or few input */ -DLL int __stdcall GPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]); /* Set analog output for one or few output */ -DLL int __stdcall GPIOAnalogGainGet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]); /* Read analog input gain (1, 2, 4 or 8) for one or few input */ -DLL int __stdcall GPIOAnalogGainSet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]); /* Set analog input gain (1, 2, 4 or 8) for one or few input */ -DLL int __stdcall GPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue); /* Read digital output or digital input */ -DLL int __stdcall GPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue); /* Set Digital Output for one or few output TTL */ -DLL int __stdcall GroupAnalogTrackingModeEnable (int SocketIndex, char * GroupName, char * Type); /* Enable Analog Tracking mode on selected group */ -DLL int __stdcall GroupAnalogTrackingModeDisable (int SocketIndex, char * GroupName); /* Disable Analog Tracking mode on selected group */ -DLL int __stdcall GroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]); /* Return corrector outputs */ -DLL int __stdcall GroupHomeSearch (int SocketIndex, char * GroupName); /* Start home search sequence */ -DLL int __stdcall GroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Start home search sequence and execute a displacement */ -DLL int __stdcall GroupInitialize (int SocketIndex, char * GroupName); /* Start the initialization */ -DLL int __stdcall GroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName); /* Start the initialization with encoder calibration */ -DLL int __stdcall GroupJogParametersSet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Modify Jog parameters on selected group and activate the continuous move */ -DLL int __stdcall GroupJogParametersGet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Get Jog parameters on selected group */ -DLL int __stdcall GroupJogCurrentGet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Get Jog current on selected group */ -DLL int __stdcall GroupJogModeEnable (int SocketIndex, char * GroupName); /* Enable Jog mode on selected group */ -DLL int __stdcall GroupJogModeDisable (int SocketIndex, char * GroupName); /* Disable Jog mode on selected group */ -DLL int __stdcall GroupKill (int SocketIndex, char * GroupName); /* Kill the group */ -DLL int __stdcall GroupMoveAbort (int SocketIndex, char * GroupName); /* Abort a move */ -DLL int __stdcall GroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Do an absolute move */ -DLL int __stdcall GroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Do a relative move */ -DLL int __stdcall GroupMotionDisable (int SocketIndex, char * GroupName); /* Set Motion disable on selected group */ -DLL int __stdcall GroupMotionEnable (int SocketIndex, char * GroupName); /* Set Motion enable on selected group */ -DLL int __stdcall GroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]); /* Return current positions */ -DLL int __stdcall GroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]); /* Return setpoint positions */ -DLL int __stdcall GroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Return target positions */ -DLL int __stdcall GroupReferencingActionExecute (int SocketIndex, char * PositionerName, char * ReferencingAction, char * ReferencingSensor, double ReferencingParameter); /* Execute an action in referencing mode */ -DLL int __stdcall GroupReferencingStart (int SocketIndex, char * GroupName); /* Enter referencing mode */ -DLL int __stdcall GroupReferencingStop (int SocketIndex, char * GroupName); /* Exit referencing mode */ -DLL int __stdcall GroupStatusGet (int SocketIndex, char * GroupName, int * Status); /* Return group status */ -DLL int __stdcall GroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString); /* Return the group status string corresponding to the group status code */ -DLL int __stdcall GroupVelocityCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentVelocity[]); /* Return current velocities */ -DLL int __stdcall KillAll (int SocketIndex); /* Put all groups in 'Not initialized' state */ -DLL int __stdcall PositionerAnalogTrackingPositionParametersGet (int SocketIndex, char * PositionerName, char * GPIOName, double * Offset, double * Scale, double * Velocity, double * Acceleration); /* Read dynamic parameters for one axe of a group for a future analog tracking position */ -DLL int __stdcall PositionerAnalogTrackingPositionParametersSet (int SocketIndex, char * PositionerName, char * GPIOName, double Offset, double Scale, double Velocity, double Acceleration); /* Update dynamic parameters for one axe of a group for a future analog tracking position */ -DLL int __stdcall PositionerAnalogTrackingVelocityParametersGet (int SocketIndex, char * PositionerName, char * GPIOName, double * Offset, double * Scale, double * DeadBandThreshold, int * Order, double * Velocity, double * Acceleration); /* Read dynamic parameters for one axe of a group for a future analog tracking velocity */ -DLL int __stdcall PositionerAnalogTrackingVelocityParametersSet (int SocketIndex, char * PositionerName, char * GPIOName, double Offset, double Scale, double DeadBandThreshold, int Order, double Velocity, double Acceleration); /* Update dynamic parameters for one axe of a group for a future analog tracking velocity */ -DLL int __stdcall PositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus); /* Read backlash value and status */ -DLL int __stdcall PositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue); /* Set backlash value */ -DLL int __stdcall PositionerBacklashEnable (int SocketIndex, char * PositionerName); /* Enable the backlash */ -DLL int __stdcall PositionerBacklashDisable (int SocketIndex, char * PositionerName); /* Disable the backlash */ -DLL int __stdcall PositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2); /* Update filters parameters */ -DLL int __stdcall PositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2); /* Read filters parameters */ -DLL int __stdcall PositionerCorrectorPIDFFAccelerationSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainAcceleration); /* Update corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDFFAccelerationGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainAcceleration); /* Read corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDFFVelocitySet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity); /* Update corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDFFVelocityGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity); /* Read corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDDualFFVoltageSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity, double FeedForwardGainAcceleration, double Friction); /* Update corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDDualFFVoltageGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity, double * FeedForwardGainAcceleration, double * Friction); /* Read corrector -parameters */ -DLL int __stdcall PositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime); /* Update corrector parameters */ -DLL int __stdcall PositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime); /* Read corrector parameters */ -DLL int __stdcall PositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType); /* Read corrector type */ -DLL int __stdcall PositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency); /* Set current velocity and acceleration cut off frequencies */ -DLL int __stdcall PositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency); /* Get current velocity and acceleration cut off frequencies */ -DLL int __stdcall PositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus); /* Read positioner driver status */ -DLL int __stdcall PositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString); /* Return the positioner driver status string corresponding to the positioner error code */ -DLL int __stdcall PositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * MaxSinusAmplitude, double * CurrentSinusAmplitude, double * MaxCosinusAmplitude, double * CurrentCosinusAmplitude); /* Read analog interpolated encoder amplitude values */ -DLL int __stdcall PositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation); /* Read analog interpolated encoder calibration parameters */ -DLL int __stdcall PositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read and clear positioner error code */ -DLL int __stdcall PositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read only positioner error code without clear it */ -DLL int __stdcall PositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString); /* Return the positioner status string corresponding to the positioner error code */ -DLL int __stdcall PositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus); /* Read positioner hardware status */ -DLL int __stdcall PositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString); /* Return the positioner hardware status string corresponding to the positioner error code */ -DLL int __stdcall PositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor); /* Get hard interpolator parameters */ -DLL int __stdcall PositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor); /* Set hard interpolator parameters */ -DLL int __stdcall PositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration); /* Return maximum velocity and acceleration of the positioner */ -DLL int __stdcall PositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut); /* Read motion done parameters */ -DLL int __stdcall PositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut); /* Update motion done parameters */ -DLL int __stdcall PositionerPositionCompareGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, double * PositionStep, bool * EnableState); /* Read position compare parameters */ -DLL int __stdcall PositionerPositionCompareSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition, double PositionStep); /* Set position compare parameters */ -DLL int __stdcall PositionerPositionCompareEnable (int SocketIndex, char * PositionerName); /* Enable position compare */ -DLL int __stdcall PositionerPositionCompareDisable (int SocketIndex, char * PositionerName); /* Disable position compare */ -DLL int __stdcall PositionersEncoderIndexDifferenceGet (int SocketIndex, char * PositionerName, double * distance); /* Return the difference between index of primary axis and secondary axis (only after homesearch) */ -DLL int __stdcall PositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement); /* Return adjusted displacement to get exact velocity */ -DLL int __stdcall PositionerSGammaParametersGet (int SocketIndex, char * PositionerName, double * Velocity, double * Acceleration, double * MinimumTjerkTime, double * MaximumTjerkTime); /* Read dynamic parameters for one axe of a group for a future displacement */ -DLL int __stdcall PositionerSGammaParametersSet (int SocketIndex, char * PositionerName, double Velocity, double Acceleration, double MinimumTjerkTime, double MaximumTjerkTime); /* Update dynamic parameters for one axe of a group for a future displacement */ -DLL int __stdcall PositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime); /* Read SettingTime and SettlingTime */ -DLL int __stdcall PositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Return the stage parameter */ -DLL int __stdcall PositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Save the stage parameter */ -DLL int __stdcall PositionerTimeFlasherGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, double * PositionStep, bool * EnableState); /* Read time flasher parameters */ -DLL int __stdcall PositionerTimeFlasherSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition, double TimeInterval); /* Set time flasher parameters */ -DLL int __stdcall PositionerTimeFlasherEnable (int SocketIndex, char * PositionerName); /* Enable time flasher */ -DLL int __stdcall PositionerTimeFlasherDisable (int SocketIndex, char * PositionerName); /* Disable time flasher */ -DLL int __stdcall PositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget); /* Read UserMinimumTarget and UserMaximumTarget */ -DLL int __stdcall PositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget); /* Update UserMinimumTarget and UserMaximumTarget */ -DLL int __stdcall PositionerCorrectorAutoTuning (int SocketIndex, char * PositionerName, int TuningMode, double * KP, double * KI, double * KD); /* Astrom&Hagglund based auto-tuning */ -DLL int __stdcall PositionerAccelerationAutoScaling (int SocketIndex, char * PositionerName, double * Scaling); /* Astrom&Hagglund based auto-scaling */ -DLL int __stdcall MultipleAxesPVTVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* Multiple axes PVT trajectory verification */ -DLL int __stdcall MultipleAxesPVTVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* Multiple axes PVT trajectory verification result get */ -DLL int __stdcall MultipleAxesPVTExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, int ExecutionNumber); /* Multiple axes PVT trajectory execution */ -DLL int __stdcall MultipleAxesPVTParametersGet (int SocketIndex, char * GroupName, char * FileName, int * CurrentElementNumber); /* Multiple axes PVT trajectory get parameters */ -DLL int __stdcall MultipleAxesPVTPulseOutputSet (int SocketIndex, char * GroupName, int StartElement, int EndElement, double TimeInterval); /* Configure pulse output on trajectory */ -DLL int __stdcall MultipleAxesPVTPulseOutputGet (int SocketIndex, char * GroupName, int * StartElement, int * EndElement, double * TimeInterval); /* Get pulse output on trajectory configuration */ -DLL int __stdcall SingleAxisSlaveModeEnable (int SocketIndex, char * GroupName); /* Enable the slave mode */ -DLL int __stdcall SingleAxisSlaveModeDisable (int SocketIndex, char * GroupName); /* Disable the slave mode */ -DLL int __stdcall SingleAxisSlaveParametersSet (int SocketIndex, char * GroupName, char * PositionerName, double Ratio); /* Set slave parameters */ -DLL int __stdcall SingleAxisSlaveParametersGet (int SocketIndex, char * GroupName, char * PositionerName, double * Ratio); /* Get slave parameters */ -DLL int __stdcall SpindleSlaveModeEnable (int SocketIndex, char * GroupName); /* Enable the slave mode */ -DLL int __stdcall SpindleSlaveModeDisable (int SocketIndex, char * GroupName); /* Disable the slave mode */ -DLL int __stdcall SpindleSlaveParametersSet (int SocketIndex, char * GroupName, char * PositionerName, double Ratio); /* Set slave parameters */ -DLL int __stdcall SpindleSlaveParametersGet (int SocketIndex, char * GroupName, char * PositionerName, double * Ratio); /* Get slave parameters */ -DLL int __stdcall GroupSpinParametersSet (int SocketIndex, char * GroupName, double Velocity, double Acceleration); /* Modify Spin parameters on selected group and activate the continuous move */ -DLL int __stdcall GroupSpinParametersGet (int SocketIndex, char * GroupName, double * Velocity, double * Acceleration); /* Get Spin parameters on selected group */ -DLL int __stdcall GroupSpinCurrentGet (int SocketIndex, char * GroupName, double * Velocity, double * Acceleration); /* Get Spin current on selected group */ -DLL int __stdcall GroupSpinModeStop (int SocketIndex, char * GroupName, double Acceleration); /* Stop Spin mode on selected group with specified acceleration */ -DLL int __stdcall XYLineArcVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* XY trajectory verification */ -DLL int __stdcall XYLineArcVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* XY trajectory verification result get */ -DLL int __stdcall XYLineArcExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, double Velocity, double Acceleration, int ExecutionNumber); /* XY trajectory execution */ -DLL int __stdcall XYLineArcParametersGet (int SocketIndex, char * GroupName, char * FileName, double * Velocity, double * Acceleration, int * CurrentElementNumber); /* XY trajectory get parameters */ -DLL int __stdcall XYLineArcPulseOutputSet (int SocketIndex, char * GroupName, double StartLength, double EndLength, double PathLengthInterval); /* Configure pulse output on trajectory */ -DLL int __stdcall XYLineArcPulseOutputGet (int SocketIndex, char * GroupName, double * StartLength, double * EndLength, double * PathLengthInterval); /* Get pulse output on trajectory configuration */ -DLL int __stdcall XYZSplineVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* XYZ trajectory verifivation */ -DLL int __stdcall XYZSplineVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* XYZ trajectory verification result get */ -DLL int __stdcall XYZSplineExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, double Velocity, double Acceleration); /* XYZ trajectory execution */ -DLL int __stdcall XYZSplineParametersGet (int SocketIndex, char * GroupName, char * FileName, double * Velocity, double * Acceleration, int * CurrentElementNumber); /* XYZ trajectory get parameters */ -DLL int __stdcall EEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString); /* XYZ trajectory get parameters */ -DLL int __stdcall EEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset); /* XYZ trajectory get parameters */ -DLL int __stdcall EEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString); /* XYZ trajectory get parameters */ -DLL int __stdcall EEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString); /* XYZ trajectory get parameters */ -DLL int __stdcall CPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB); /* XYZ trajectory get parameters */ -DLL int __stdcall CPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed); /* XYZ trajectory get parameters */ -DLL int __stdcall ActionListGet (int SocketIndex, char * ActionList); /* Action list */ -DLL int __stdcall ActionExtendedListGet (int SocketIndex, char * ActionList); /* Action extended list */ -DLL int __stdcall APIExtendedListGet (int SocketIndex, char * Method); /* API method list */ -DLL int __stdcall APIListGet (int SocketIndex, char * Method); /* API method list without extended API */ -DLL int __stdcall ErrorListGet (int SocketIndex, char * ErrorsList); /* Error list */ -DLL int __stdcall EventListGet (int SocketIndex, char * EventList); /* General event list */ -DLL int __stdcall GatheringListGet (int SocketIndex, char * list); /* Gathering type list */ -DLL int __stdcall GatheringExtendedListGet (int SocketIndex, char * list); /* Gathering type extended list */ -DLL int __stdcall GatheringExternalListGet (int SocketIndex, char * list); /* External Gathering type list */ -DLL int __stdcall GroupStatusListGet (int SocketIndex, char * GroupStatusList); /* Group status list */ -DLL int __stdcall HardwareInternalListGet (int SocketIndex, char * InternalHardwareList); /* Internal hardware list */ -DLL int __stdcall HardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName); /* Smart hardware */ -DLL int __stdcall ObjectsListGet (int SocketIndex, char * ObjectsList); /* Group name and positioner name */ -DLL int __stdcall PositionerErrorListGet (int SocketIndex, char * PositionerErrorList); /* Positioner error list */ -DLL int __stdcall PositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList); /* Positioner hardware status list */ -DLL int __stdcall PositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList); /* Positioner driver status list */ -DLL int __stdcall ReferencingActionListGet (int SocketIndex, char * list); /* Get referencing action list */ -DLL int __stdcall ReferencingSensorListGet (int SocketIndex, char * list); /* Get referencing sensor list */ -DLL int __stdcall GatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8); /* Return UserDatas values */ -DLL int __stdcall TestTCP (int SocketIndex, char * InputString, char * ReturnString); /* Test TCP/IP transfert */ - - -#ifdef __cplusplus -} -#endif +/*/////////////////////////////////////////////////////////////////// +// Created header file XPS_C8_drivers.h for API headings +*/ + + +#ifdef _WIN32 + #ifndef DLL + #ifdef _DLL /* _DLL is defined by EPICS if we are being compiled to call DLLs */ + #define DLL _declspec(dllimport) + #else + #define DLL + #endif + #endif +#else + #define DLL + #define __stdcall +#endif + +#ifdef __cplusplus +extern "C" +{ +#else +typedef int bool; +#endif + + +DLL int __stdcall TCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut); +DLL void __stdcall TCP_SetTimeout(int SocketIndex, double Timeout); +DLL void __stdcall TCP_CloseSocket(int SocketIndex); +DLL char * __stdcall TCP_GetError(int SocketIndex); +DLL char * __stdcall GetLibraryVersion(void); +DLL int __stdcall ElapsedTimeGet (int SocketIndex, double * ElapsedTime); /* Return elapsed time from controller power on */ +DLL int __stdcall ErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString); /* Return the error string corresponding to the error code */ +DLL int __stdcall FirmwareVersionGet (int SocketIndex, char * Version); /* Return firmware version */ +DLL int __stdcall TCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList); /* Execute a TCL script from a TCL file */ +DLL int __stdcall TCLScriptExecuteAndWait (int SocketIndex, char * TCLFileName, char * TaskName, char * InputParametersList, char * OutputParametersList); /* Execute a TCL script from a TCL file and wait the end of execution to return */ +DLL int __stdcall TCLScriptKill (int SocketIndex, char * TaskName); /* Kill TCL Task */ +DLL int __stdcall TimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks); /* Get a timer */ +DLL int __stdcall TimerSet (int SocketIndex, char * TimerName, int FrequencyTicks); /* Set a timer */ +DLL int __stdcall Reboot (int SocketIndex); /* Reboot the controller */ +DLL int __stdcall Login (int SocketIndex, char * Name, char * Password); /* Log in */ +DLL int __stdcall CloseAllOtherSockets (int SocketIndex); /* Close all socket beside the one used to send this command */ +DLL int __stdcall EventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3); /* ** OBSOLETE ** Add an event */ +DLL int __stdcall EventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList); /* ** OBSOLETE ** Read events and actions list */ +DLL int __stdcall EventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Delete an event */ +DLL int __stdcall EventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Wait an event */ +DLL int __stdcall EventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List); /* Configure one or several events */ +DLL int __stdcall EventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration); /* Read the event configuration */ +DLL int __stdcall EventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List); /* Configure one or several actions */ +DLL int __stdcall EventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration); /* Read the action configuration */ +DLL int __stdcall EventExtendedStart (int SocketIndex, int * ID); /* Launch the last event and action configuration and return an ID */ +DLL int __stdcall EventExtendedAllGet (int SocketIndex, char * EventActionConfigurations); /* Read all event and action configurations */ +DLL int __stdcall EventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration); /* Read the event and action configuration defined by ID */ +DLL int __stdcall EventExtendedRemove (int SocketIndex, int ID); /* Remove the event and action configuration defined by ID */ +DLL int __stdcall EventExtendedWait (int SocketIndex); /* Wait events from the last event configuration */ +DLL int __stdcall GatheringConfigurationGet (int SocketIndex, char * Type); /*Read different mnemonique type */ +DLL int __stdcall GatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ +DLL int __stdcall GatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ +DLL int __stdcall GatheringStopAndSave (int SocketIndex); /* Stop acquisition and save data */ +DLL int __stdcall GatheringDataAcquire (int SocketIndex); /* Acquire a configured data */ +DLL int __stdcall GatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine); /* Get a data line from gathering buffer */ +DLL int __stdcall GatheringReset (int SocketIndex); /* Empty the gathered data in memory to start new gathering from scratch */ +DLL int __stdcall GatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ +DLL int __stdcall GatheringExternalConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ +DLL int __stdcall GatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ +DLL int __stdcall GatheringExternalStopAndSave (int SocketIndex); /* Stop acquisition and save data */ +DLL int __stdcall GlobalArrayGet (int SocketIndex, int Number, char * ValueString); /* Get global array value */ +DLL int __stdcall GlobalArraySet (int SocketIndex, int Number, char * ValueString); /* Set global array value */ +DLL int __stdcall GPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]); /* Read analog input or analog output for one or few input */ +DLL int __stdcall GPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]); /* Set analog output for one or few output */ +DLL int __stdcall GPIOAnalogGainGet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]); /* Read analog input gain (1, 2, 4 or 8) for one or few input */ +DLL int __stdcall GPIOAnalogGainSet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]); /* Set analog input gain (1, 2, 4 or 8) for one or few input */ +DLL int __stdcall GPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue); /* Read digital output or digital input */ +DLL int __stdcall GPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue); /* Set Digital Output for one or few output TTL */ +DLL int __stdcall GroupAnalogTrackingModeEnable (int SocketIndex, char * GroupName, char * Type); /* Enable Analog Tracking mode on selected group */ +DLL int __stdcall GroupAnalogTrackingModeDisable (int SocketIndex, char * GroupName); /* Disable Analog Tracking mode on selected group */ +DLL int __stdcall GroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]); /* Return corrector outputs */ +DLL int __stdcall GroupHomeSearch (int SocketIndex, char * GroupName); /* Start home search sequence */ +DLL int __stdcall GroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Start home search sequence and execute a displacement */ +DLL int __stdcall GroupInitialize (int SocketIndex, char * GroupName); /* Start the initialization */ +DLL int __stdcall GroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName); /* Start the initialization with encoder calibration */ +DLL int __stdcall GroupJogParametersSet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Modify Jog parameters on selected group and activate the continuous move */ +DLL int __stdcall GroupJogParametersGet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Get Jog parameters on selected group */ +DLL int __stdcall GroupJogCurrentGet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Get Jog current on selected group */ +DLL int __stdcall GroupJogModeEnable (int SocketIndex, char * GroupName); /* Enable Jog mode on selected group */ +DLL int __stdcall GroupJogModeDisable (int SocketIndex, char * GroupName); /* Disable Jog mode on selected group */ +DLL int __stdcall GroupKill (int SocketIndex, char * GroupName); /* Kill the group */ +DLL int __stdcall GroupMoveAbort (int SocketIndex, char * GroupName); /* Abort a move */ +DLL int __stdcall GroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Do an absolute move */ +DLL int __stdcall GroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Do a relative move */ +DLL int __stdcall GroupMotionDisable (int SocketIndex, char * GroupName); /* Set Motion disable on selected group */ +DLL int __stdcall GroupMotionEnable (int SocketIndex, char * GroupName); /* Set Motion enable on selected group */ +DLL int __stdcall GroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]); /* Return current positions */ +DLL int __stdcall GroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]); /* Return setpoint positions */ +DLL int __stdcall GroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Return target positions */ +DLL int __stdcall GroupReferencingActionExecute (int SocketIndex, char * PositionerName, char * ReferencingAction, char * ReferencingSensor, double ReferencingParameter); /* Execute an action in referencing mode */ +DLL int __stdcall GroupReferencingStart (int SocketIndex, char * GroupName); /* Enter referencing mode */ +DLL int __stdcall GroupReferencingStop (int SocketIndex, char * GroupName); /* Exit referencing mode */ +DLL int __stdcall GroupStatusGet (int SocketIndex, char * GroupName, int * Status); /* Return group status */ +DLL int __stdcall GroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString); /* Return the group status string corresponding to the group status code */ +DLL int __stdcall GroupVelocityCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentVelocity[]); /* Return current velocities */ +DLL int __stdcall KillAll (int SocketIndex); /* Put all groups in 'Not initialized' state */ +DLL int __stdcall PositionerAnalogTrackingPositionParametersGet (int SocketIndex, char * PositionerName, char * GPIOName, double * Offset, double * Scale, double * Velocity, double * Acceleration); /* Read dynamic parameters for one axe of a group for a future analog tracking position */ +DLL int __stdcall PositionerAnalogTrackingPositionParametersSet (int SocketIndex, char * PositionerName, char * GPIOName, double Offset, double Scale, double Velocity, double Acceleration); /* Update dynamic parameters for one axe of a group for a future analog tracking position */ +DLL int __stdcall PositionerAnalogTrackingVelocityParametersGet (int SocketIndex, char * PositionerName, char * GPIOName, double * Offset, double * Scale, double * DeadBandThreshold, int * Order, double * Velocity, double * Acceleration); /* Read dynamic parameters for one axe of a group for a future analog tracking velocity */ +DLL int __stdcall PositionerAnalogTrackingVelocityParametersSet (int SocketIndex, char * PositionerName, char * GPIOName, double Offset, double Scale, double DeadBandThreshold, int Order, double Velocity, double Acceleration); /* Update dynamic parameters for one axe of a group for a future analog tracking velocity */ +DLL int __stdcall PositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus); /* Read backlash value and status */ +DLL int __stdcall PositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue); /* Set backlash value */ +DLL int __stdcall PositionerBacklashEnable (int SocketIndex, char * PositionerName); /* Enable the backlash */ +DLL int __stdcall PositionerBacklashDisable (int SocketIndex, char * PositionerName); /* Disable the backlash */ +DLL int __stdcall PositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2); /* Update filters parameters */ +DLL int __stdcall PositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2); /* Read filters parameters */ +DLL int __stdcall PositionerCorrectorPIDFFAccelerationSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainAcceleration); /* Update corrector parameters */ +DLL int __stdcall PositionerCorrectorPIDFFAccelerationGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainAcceleration); /* Read corrector parameters */ +DLL int __stdcall PositionerCorrectorPIDFFVelocitySet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity); /* Update corrector parameters */ +DLL int __stdcall PositionerCorrectorPIDFFVelocityGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity); /* Read corrector parameters */ +DLL int __stdcall PositionerCorrectorPIDDualFFVoltageSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity, double FeedForwardGainAcceleration, double Friction); /* Update corrector parameters */ +DLL int __stdcall PositionerCorrectorPIDDualFFVoltageGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity, double * FeedForwardGainAcceleration, double * Friction); /* Read corrector +parameters */ +DLL int __stdcall PositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime); /* Update corrector parameters */ +DLL int __stdcall PositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime); /* Read corrector parameters */ +DLL int __stdcall PositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType); /* Read corrector type */ +DLL int __stdcall PositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency); /* Set current velocity and acceleration cut off frequencies */ +DLL int __stdcall PositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency); /* Get current velocity and acceleration cut off frequencies */ +DLL int __stdcall PositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus); /* Read positioner driver status */ +DLL int __stdcall PositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString); /* Return the positioner driver status string corresponding to the positioner error code */ +DLL int __stdcall PositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * MaxSinusAmplitude, double * CurrentSinusAmplitude, double * MaxCosinusAmplitude, double * CurrentCosinusAmplitude); /* Read analog interpolated encoder amplitude values */ +DLL int __stdcall PositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation); /* Read analog interpolated encoder calibration parameters */ +DLL int __stdcall PositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read and clear positioner error code */ +DLL int __stdcall PositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read only positioner error code without clear it */ +DLL int __stdcall PositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString); /* Return the positioner status string corresponding to the positioner error code */ +DLL int __stdcall PositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus); /* Read positioner hardware status */ +DLL int __stdcall PositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString); /* Return the positioner hardware status string corresponding to the positioner error code */ +DLL int __stdcall PositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor); /* Get hard interpolator parameters */ +DLL int __stdcall PositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor); /* Set hard interpolator parameters */ +DLL int __stdcall PositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration); /* Return maximum velocity and acceleration of the positioner */ +DLL int __stdcall PositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut); /* Read motion done parameters */ +DLL int __stdcall PositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut); /* Update motion done parameters */ +DLL int __stdcall PositionerPositionCompareGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, double * PositionStep, bool * EnableState); /* Read position compare parameters */ +DLL int __stdcall PositionerPositionCompareSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition, double PositionStep); /* Set position compare parameters */ +DLL int __stdcall PositionerPositionCompareEnable (int SocketIndex, char * PositionerName); /* Enable position compare */ +DLL int __stdcall PositionerPositionCompareDisable (int SocketIndex, char * PositionerName); /* Disable position compare */ +DLL int __stdcall PositionersEncoderIndexDifferenceGet (int SocketIndex, char * PositionerName, double * distance); /* Return the difference between index of primary axis and secondary axis (only after homesearch) */ +DLL int __stdcall PositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement); /* Return adjusted displacement to get exact velocity */ +DLL int __stdcall PositionerSGammaParametersGet (int SocketIndex, char * PositionerName, double * Velocity, double * Acceleration, double * MinimumTjerkTime, double * MaximumTjerkTime); /* Read dynamic parameters for one axe of a group for a future displacement */ +DLL int __stdcall PositionerSGammaParametersSet (int SocketIndex, char * PositionerName, double Velocity, double Acceleration, double MinimumTjerkTime, double MaximumTjerkTime); /* Update dynamic parameters for one axe of a group for a future displacement */ +DLL int __stdcall PositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime); /* Read SettingTime and SettlingTime */ +DLL int __stdcall PositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Return the stage parameter */ +DLL int __stdcall PositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Save the stage parameter */ +DLL int __stdcall PositionerTimeFlasherGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, double * PositionStep, bool * EnableState); /* Read time flasher parameters */ +DLL int __stdcall PositionerTimeFlasherSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition, double TimeInterval); /* Set time flasher parameters */ +DLL int __stdcall PositionerTimeFlasherEnable (int SocketIndex, char * PositionerName); /* Enable time flasher */ +DLL int __stdcall PositionerTimeFlasherDisable (int SocketIndex, char * PositionerName); /* Disable time flasher */ +DLL int __stdcall PositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget); /* Read UserMinimumTarget and UserMaximumTarget */ +DLL int __stdcall PositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget); /* Update UserMinimumTarget and UserMaximumTarget */ +DLL int __stdcall PositionerCorrectorAutoTuning (int SocketIndex, char * PositionerName, int TuningMode, double * KP, double * KI, double * KD); /* Astrom&Hagglund based auto-tuning */ +DLL int __stdcall PositionerAccelerationAutoScaling (int SocketIndex, char * PositionerName, double * Scaling); /* Astrom&Hagglund based auto-scaling */ +DLL int __stdcall MultipleAxesPVTVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* Multiple axes PVT trajectory verification */ +DLL int __stdcall MultipleAxesPVTVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* Multiple axes PVT trajectory verification result get */ +DLL int __stdcall MultipleAxesPVTExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, int ExecutionNumber); /* Multiple axes PVT trajectory execution */ +DLL int __stdcall MultipleAxesPVTParametersGet (int SocketIndex, char * GroupName, char * FileName, int * CurrentElementNumber); /* Multiple axes PVT trajectory get parameters */ +DLL int __stdcall MultipleAxesPVTPulseOutputSet (int SocketIndex, char * GroupName, int StartElement, int EndElement, double TimeInterval); /* Configure pulse output on trajectory */ +DLL int __stdcall MultipleAxesPVTPulseOutputGet (int SocketIndex, char * GroupName, int * StartElement, int * EndElement, double * TimeInterval); /* Get pulse output on trajectory configuration */ +DLL int __stdcall SingleAxisSlaveModeEnable (int SocketIndex, char * GroupName); /* Enable the slave mode */ +DLL int __stdcall SingleAxisSlaveModeDisable (int SocketIndex, char * GroupName); /* Disable the slave mode */ +DLL int __stdcall SingleAxisSlaveParametersSet (int SocketIndex, char * GroupName, char * PositionerName, double Ratio); /* Set slave parameters */ +DLL int __stdcall SingleAxisSlaveParametersGet (int SocketIndex, char * GroupName, char * PositionerName, double * Ratio); /* Get slave parameters */ +DLL int __stdcall SpindleSlaveModeEnable (int SocketIndex, char * GroupName); /* Enable the slave mode */ +DLL int __stdcall SpindleSlaveModeDisable (int SocketIndex, char * GroupName); /* Disable the slave mode */ +DLL int __stdcall SpindleSlaveParametersSet (int SocketIndex, char * GroupName, char * PositionerName, double Ratio); /* Set slave parameters */ +DLL int __stdcall SpindleSlaveParametersGet (int SocketIndex, char * GroupName, char * PositionerName, double * Ratio); /* Get slave parameters */ +DLL int __stdcall GroupSpinParametersSet (int SocketIndex, char * GroupName, double Velocity, double Acceleration); /* Modify Spin parameters on selected group and activate the continuous move */ +DLL int __stdcall GroupSpinParametersGet (int SocketIndex, char * GroupName, double * Velocity, double * Acceleration); /* Get Spin parameters on selected group */ +DLL int __stdcall GroupSpinCurrentGet (int SocketIndex, char * GroupName, double * Velocity, double * Acceleration); /* Get Spin current on selected group */ +DLL int __stdcall GroupSpinModeStop (int SocketIndex, char * GroupName, double Acceleration); /* Stop Spin mode on selected group with specified acceleration */ +DLL int __stdcall XYLineArcVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* XY trajectory verification */ +DLL int __stdcall XYLineArcVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* XY trajectory verification result get */ +DLL int __stdcall XYLineArcExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, double Velocity, double Acceleration, int ExecutionNumber); /* XY trajectory execution */ +DLL int __stdcall XYLineArcParametersGet (int SocketIndex, char * GroupName, char * FileName, double * Velocity, double * Acceleration, int * CurrentElementNumber); /* XY trajectory get parameters */ +DLL int __stdcall XYLineArcPulseOutputSet (int SocketIndex, char * GroupName, double StartLength, double EndLength, double PathLengthInterval); /* Configure pulse output on trajectory */ +DLL int __stdcall XYLineArcPulseOutputGet (int SocketIndex, char * GroupName, double * StartLength, double * EndLength, double * PathLengthInterval); /* Get pulse output on trajectory configuration */ +DLL int __stdcall XYZSplineVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* XYZ trajectory verifivation */ +DLL int __stdcall XYZSplineVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* XYZ trajectory verification result get */ +DLL int __stdcall XYZSplineExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, double Velocity, double Acceleration); /* XYZ trajectory execution */ +DLL int __stdcall XYZSplineParametersGet (int SocketIndex, char * GroupName, char * FileName, double * Velocity, double * Acceleration, int * CurrentElementNumber); /* XYZ trajectory get parameters */ +DLL int __stdcall EEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString); /* XYZ trajectory get parameters */ +DLL int __stdcall EEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset); /* XYZ trajectory get parameters */ +DLL int __stdcall EEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString); /* XYZ trajectory get parameters */ +DLL int __stdcall EEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString); /* XYZ trajectory get parameters */ +DLL int __stdcall CPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB); /* XYZ trajectory get parameters */ +DLL int __stdcall CPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed); /* XYZ trajectory get parameters */ +DLL int __stdcall ActionListGet (int SocketIndex, char * ActionList); /* Action list */ +DLL int __stdcall ActionExtendedListGet (int SocketIndex, char * ActionList); /* Action extended list */ +DLL int __stdcall APIExtendedListGet (int SocketIndex, char * Method); /* API method list */ +DLL int __stdcall APIListGet (int SocketIndex, char * Method); /* API method list without extended API */ +DLL int __stdcall ErrorListGet (int SocketIndex, char * ErrorsList); /* Error list */ +DLL int __stdcall EventListGet (int SocketIndex, char * EventList); /* General event list */ +DLL int __stdcall GatheringListGet (int SocketIndex, char * list); /* Gathering type list */ +DLL int __stdcall GatheringExtendedListGet (int SocketIndex, char * list); /* Gathering type extended list */ +DLL int __stdcall GatheringExternalListGet (int SocketIndex, char * list); /* External Gathering type list */ +DLL int __stdcall GroupStatusListGet (int SocketIndex, char * GroupStatusList); /* Group status list */ +DLL int __stdcall HardwareInternalListGet (int SocketIndex, char * InternalHardwareList); /* Internal hardware list */ +DLL int __stdcall HardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName); /* Smart hardware */ +DLL int __stdcall ObjectsListGet (int SocketIndex, char * ObjectsList); /* Group name and positioner name */ +DLL int __stdcall PositionerErrorListGet (int SocketIndex, char * PositionerErrorList); /* Positioner error list */ +DLL int __stdcall PositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList); /* Positioner hardware status list */ +DLL int __stdcall PositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList); /* Positioner driver status list */ +DLL int __stdcall ReferencingActionListGet (int SocketIndex, char * list); /* Get referencing action list */ +DLL int __stdcall ReferencingSensorListGet (int SocketIndex, char * list); /* Get referencing sensor list */ +DLL int __stdcall GatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8); /* Return UserDatas values */ +DLL int __stdcall TestTCP (int SocketIndex, char * InputString, char * ReturnString); /* Test TCP/IP transfert */ + + +#ifdef __cplusplus +} +#endif diff --git a/motorApp/NewportSrc/strtok_r.cpp b/motorApp/NewportSrc/strtok_r.cpp old mode 100755 new mode 100644 index 5ac6491b..642d9d41 --- a/motorApp/NewportSrc/strtok_r.cpp +++ b/motorApp/NewportSrc/strtok_r.cpp @@ -1,49 +1,49 @@ - -#include "strtok_r.h" -#include - -char* strtok_r(char *s, const char *delim, char **lasts) -{ - char *spanp; - int c, sc; - char *tok; - - - if (s == NULL && (s = *lasts) == NULL) - return (NULL); - - /* - * Skip (span) leading delimiters (s += strspn(s, delim), sort of). - */ - cont: - c = *s++; - for (spanp = (char *)delim; (sc = *spanp++) != 0;) { - if (c == sc) - goto cont; - } - - if (c == 0) { /* no non-delimiter characters */ - *lasts = NULL; - return (NULL); - } - tok = s - 1; - - /* - * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). - * Note that delim must have one NUL; we stop if we see that, too. - */ - for (;;) { - c = *s++; - spanp = (char *)delim; - do { - if ((sc = *spanp++) == c) { - if (c == 0) - s = NULL; - else - s[-1] = 0; - *lasts = s; - return (tok); - } - } while (sc != 0); - } -} + +#include "strtok_r.h" +#include + +char* strtok_r(char *s, const char *delim, char **lasts) +{ + char *spanp; + int c, sc; + char *tok; + + + if (s == NULL && (s = *lasts) == NULL) + return (NULL); + + /* + * Skip (span) leading delimiters (s += strspn(s, delim), sort of). + */ + cont: + c = *s++; + for (spanp = (char *)delim; (sc = *spanp++) != 0;) { + if (c == sc) + goto cont; + } + + if (c == 0) { /* no non-delimiter characters */ + *lasts = NULL; + return (NULL); + } + tok = s - 1; + + /* + * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). + * Note that delim must have one NUL; we stop if we see that, too. + */ + for (;;) { + c = *s++; + spanp = (char *)delim; + do { + if ((sc = *spanp++) == c) { + if (c == 0) + s = NULL; + else + s[-1] = 0; + *lasts = s; + return (tok); + } + } while (sc != 0); + } +} diff --git a/motorApp/NewportSrc/strtok_r.h b/motorApp/NewportSrc/strtok_r.h old mode 100755 new mode 100644 index a6d15b25..0695d97e --- a/motorApp/NewportSrc/strtok_r.h +++ b/motorApp/NewportSrc/strtok_r.h @@ -1,2 +1,2 @@ -/* strtok_r prototype */ -char* strtok_r(char *, const char *, char **); +/* strtok_r prototype */ +char* strtok_r(char *, const char *, char **); diff --git a/motorApp/OrielSrc/Makefile b/motorApp/OrielSrc/Makefile old mode 100755 new mode 100644 diff --git a/motorApp/OrielSrc/OrielRegister.cc b/motorApp/OrielSrc/OrielRegister.cc old mode 100755 new mode 100644 diff --git a/motorApp/OrielSrc/OrielRegister.h b/motorApp/OrielSrc/OrielRegister.h old mode 100755 new mode 100644 diff --git a/motorApp/OrielSrc/README b/motorApp/OrielSrc/README old mode 100755 new mode 100644 diff --git a/motorApp/OrielSrc/devEMC18011.cc b/motorApp/OrielSrc/devEMC18011.cc old mode 100755 new mode 100644 diff --git a/motorApp/OrielSrc/devOriel.dbd b/motorApp/OrielSrc/devOriel.dbd old mode 100755 new mode 100644 diff --git a/motorApp/OrielSrc/drvEMC18011.cc b/motorApp/OrielSrc/drvEMC18011.cc old mode 100755 new mode 100644 diff --git a/motorApp/OrielSrc/drvEMC18011.h b/motorApp/OrielSrc/drvEMC18011.h old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/6K_STARTP_EXAMPLE b/motorApp/PC6KSrc/6K_STARTP_EXAMPLE old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/Makefile b/motorApp/PC6KSrc/Makefile old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/ParkerRegister.cc b/motorApp/PC6KSrc/ParkerRegister.cc old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/ParkerRegister.h b/motorApp/PC6KSrc/ParkerRegister.h old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/README b/motorApp/PC6KSrc/README old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/devPC6K.cc b/motorApp/PC6KSrc/devPC6K.cc old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/devPC6K.dbd b/motorApp/PC6KSrc/devPC6K.dbd old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/drvPC6K.cc b/motorApp/PC6KSrc/drvPC6K.cc old mode 100755 new mode 100644 diff --git a/motorApp/PC6KSrc/drvPC6K.h b/motorApp/PC6KSrc/drvPC6K.h old mode 100755 new mode 100644 diff --git a/motorApp/SmartMotorSrc/README b/motorApp/SmartMotorSrc/README index 6ea72c43..50cec3d4 100644 --- a/motorApp/SmartMotorSrc/README +++ b/motorApp/SmartMotorSrc/README @@ -1,32 +1,32 @@ -The Animatics SmartMotor EPICS device driver supports both single and daisy -chained serial connections. - -For RS232 daisy chained applications, the following program must be down loaded -to each motor in the chain. Set "#" below to the address of each consecutive -motor; starting with 1. - -SADDR# -ECHO -LIMD <- Omit from firmware 4.77 and above. -LIMH -END - -For RS232 or RS485 non-daisy-chained applications, the EPICS device driver -requires that echo mode be turned off (ECHO_OFF). - -From the Animatics "SmartMotor User's Guide"; -"A single RS-232 SmartMotor can operate in either state, but a daisy chain of -RS-232 SmartMotors must operate in ECHO mode for data to get through the -network. RS-485 SmartMotors must operate in the ECHO_OFF mode or there will be -data collisions." - -Device Driver Design Restriction and Limitations -================================================ - -- This device driver only supports SmartMotor firmware versions 4.15 - and above. - -- A network of RS-485 SmartMotor's is not supported by this device driver. - -- Non-daisy-chained SmartMotor's (i.e., a serial port for each SmartMotor) must - have their echo mode turned off (ECHO_OFF). +The Animatics SmartMotor EPICS device driver supports both single and daisy +chained serial connections. + +For RS232 daisy chained applications, the following program must be down loaded +to each motor in the chain. Set "#" below to the address of each consecutive +motor; starting with 1. + +SADDR# +ECHO +LIMD <- Omit from firmware 4.77 and above. +LIMH +END + +For RS232 or RS485 non-daisy-chained applications, the EPICS device driver +requires that echo mode be turned off (ECHO_OFF). + +From the Animatics "SmartMotor User's Guide"; +"A single RS-232 SmartMotor can operate in either state, but a daisy chain of +RS-232 SmartMotors must operate in ECHO mode for data to get through the +network. RS-485 SmartMotors must operate in the ECHO_OFF mode or there will be +data collisions." + +Device Driver Design Restriction and Limitations +================================================ + +- This device driver only supports SmartMotor firmware versions 4.15 + and above. + +- A network of RS-485 SmartMotor's is not supported by this device driver. + +- Non-daisy-chained SmartMotor's (i.e., a serial port for each SmartMotor) must + have their echo mode turned off (ECHO_OFF). diff --git a/motorApp/op/adl/XPSAuxBi_more.adl b/motorApp/op/adl/XPSAuxBi_more.adl old mode 100755 new mode 100644 index 98bff61c..4cb747cf --- a/motorApp/op/adl/XPSAuxBi_more.adl +++ b/motorApp/op/adl/XPSAuxBi_more.adl @@ -1,162 +1,162 @@ - -file { - name="i:\epics\synApps5-1beta2\ipUnidig\ipUnidigApp\op\adl\IpUnidig_more.adl" - version=030003 -} -display { - object { - x=140 - y=349 - width=180 - height=100 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -text { - object { - x=-10 - y=8 - width=200 - height=20 - } - "basic attribute" { - clr=14 - } - textix="$(P)$(R)" - align="horiz. centered" -} -menu { - object { - x=40 - y=70 - width=100 - height=20 - } - control { - chan="$(P)$(R).SCAN" - clr=14 - bclr=51 - } -} -oval { - object { - x=115 - y=39 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)" - } -} -"text update" { - object { - x=46 - y=39 - width=60 - height=20 - } - monitor { - chan="$(P)$(R).VAL" - clr=14 - bclr=51 - } - align="horiz. centered" - format="hexadecimal" - limits { - } -} -oval { - object { - x=115 - y=39 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)" - } -} + +file { + name="i:\epics\synApps5-1beta2\ipUnidig\ipUnidigApp\op\adl\IpUnidig_more.adl" + version=030003 +} +display { + object { + x=140 + y=349 + width=180 + height=100 + } + clr=14 + bclr=4 + cmap="" + gridSpacing=5 + gridOn=0 + snapToGrid=0 +} +"color map" { + ncolors=65 + colors { + ffffff, + ececec, + dadada, + c8c8c8, + bbbbbb, + aeaeae, + 9e9e9e, + 919191, + 858585, + 787878, + 696969, + 5a5a5a, + 464646, + 2d2d2d, + 000000, + 00d800, + 1ebb00, + 339900, + 2d7f00, + 216c00, + fd0000, + de1309, + be190b, + a01207, + 820400, + 5893ff, + 597ee1, + 4b6ec7, + 3a5eab, + 27548d, + fbf34a, + f9da3c, + eeb62b, + e19015, + cd6100, + ffb0ff, + d67fe2, + ae4ebc, + 8b1a96, + 610a75, + a4aaff, + 8793e2, + 6a73c1, + 4d52a4, + 343386, + c7bb6d, + b79d5c, + a47e3c, + 7d5627, + 58340f, + 99ffff, + 73dfff, + 4ea5f9, + 2a63e4, + 0a00b8, + ebf1b5, + d4db9d, + bbc187, + a6a462, + 8b8239, + 73ff6b, + 52da3b, + 3cb420, + 289315, + 1a7309, + } +} +text { + object { + x=-10 + y=8 + width=200 + height=20 + } + "basic attribute" { + clr=14 + } + textix="$(P)$(R)" + align="horiz. centered" +} +menu { + object { + x=40 + y=70 + width=100 + height=20 + } + control { + chan="$(P)$(R).SCAN" + clr=14 + bclr=51 + } +} +oval { + object { + x=115 + y=39 + width=20 + height=20 + } + "basic attribute" { + clr=15 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)$(R)" + } +} +"text update" { + object { + x=46 + y=39 + width=60 + height=20 + } + monitor { + chan="$(P)$(R).VAL" + clr=14 + bclr=51 + } + align="horiz. centered" + format="hexadecimal" + limits { + } +} +oval { + object { + x=115 + y=39 + width=20 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)$(R)" + } +} diff --git a/motorApp/op/adl/trajectoryPlot.adl b/motorApp/op/adl/trajectoryPlot.adl old mode 100755 new mode 100644 index 35dfbf92..96c2904c --- a/motorApp/op/adl/trajectoryPlot.adl +++ b/motorApp/op/adl/trajectoryPlot.adl @@ -1,146 +1,146 @@ - -file { - name="j:\epics\R3.13.1\CARS\CARSApp\op\adl\trajectoryPlot.adl" - version=020306 -} -display { - object { - x=729 - y=391 - width=400 - height=230 - } - clr=14 - bclr=0 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -"cartesian plot" { - object { - x=0 - y=30 - width=400 - height=200 - } - plotcom { - xlabel="Point" - ylabel="Position" - clr=14 - bclr=0 - } - style="line" - count="2000" - trace[0] { - ydata="$(Y)" - data_clr=20 - } - x_axis { - rangeStyle="auto-scale" - } - y1_axis { - rangeStyle="auto-scale" - } - y2_axis { - rangeStyle="auto-scale" - } -} -"text update" { - object { - x=69 - y=11 - width=85 - height=20 - } - monitor { - chan="$(M).DESC" - clr=14 - bclr=0 - } - align="horiz. right" - limits { - } -} -text { - object { - x=161 - y=11 - width=80 - height=20 - } - "basic attribute" { - clr=14 - } - textix="$(TITLE)" -} + +file { + name="j:\epics\R3.13.1\CARS\CARSApp\op\adl\trajectoryPlot.adl" + version=020306 +} +display { + object { + x=729 + y=391 + width=400 + height=230 + } + clr=14 + bclr=0 + cmap="" + gridSpacing=5 + gridOn=0 + snapToGrid=0 +} +"color map" { + ncolors=65 + colors { + ffffff, + ececec, + dadada, + c8c8c8, + bbbbbb, + aeaeae, + 9e9e9e, + 919191, + 858585, + 787878, + 696969, + 5a5a5a, + 464646, + 2d2d2d, + 000000, + 00d800, + 1ebb00, + 339900, + 2d7f00, + 216c00, + fd0000, + de1309, + be190b, + a01207, + 820400, + 5893ff, + 597ee1, + 4b6ec7, + 3a5eab, + 27548d, + fbf34a, + f9da3c, + eeb62b, + e19015, + cd6100, + ffb0ff, + d67fe2, + ae4ebc, + 8b1a96, + 610a75, + a4aaff, + 8793e2, + 6a73c1, + 4d52a4, + 343386, + c7bb6d, + b79d5c, + a47e3c, + 7d5627, + 58340f, + 99ffff, + 73dfff, + 4ea5f9, + 2a63e4, + 0a00b8, + ebf1b5, + d4db9d, + bbc187, + a6a462, + 8b8239, + 73ff6b, + 52da3b, + 3cb420, + 289315, + 1a7309, + } +} +"cartesian plot" { + object { + x=0 + y=30 + width=400 + height=200 + } + plotcom { + xlabel="Point" + ylabel="Position" + clr=14 + bclr=0 + } + style="line" + count="2000" + trace[0] { + ydata="$(Y)" + data_clr=20 + } + x_axis { + rangeStyle="auto-scale" + } + y1_axis { + rangeStyle="auto-scale" + } + y2_axis { + rangeStyle="auto-scale" + } +} +"text update" { + object { + x=69 + y=11 + width=85 + height=20 + } + monitor { + chan="$(M).DESC" + clr=14 + bclr=0 + } + align="horiz. right" + limits { + } +} +text { + object { + x=161 + y=11 + width=80 + height=20 + } + "basic attribute" { + clr=14 + } + textix="$(TITLE)" +} diff --git a/motorApp/op/adl/trajectoryScan.adl b/motorApp/op/adl/trajectoryScan.adl old mode 100755 new mode 100644 index 7ab631e4..df9c9a61 --- a/motorApp/op/adl/trajectoryScan.adl +++ b/motorApp/op/adl/trajectoryScan.adl @@ -1,1418 +1,1418 @@ - -file { - name="j:\epics\R3.13.1\CARS\CARSApp\op\adl\trajectoryScan.adl" - version=020306 -} -display { - object { - x=195 - y=166 - width=530 - height=755 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=10 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -rectangle { - object { - x=5 - y=51 - width=524 - height=205 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } -} -text { - object { - x=20 - y=55 - width=210 - height=20 - } - "basic attribute" { - clr=14 - } - textix="# trajectory elements" -} -"text entry" { - object { - x=234 - y=55 - width=100 - height=20 - } - control { - chan="$(P)$(R)Nelements" - clr=14 - bclr=51 - } - limits { - } -} -rectangle { - object { - x=73 - y=10 - width=384 - height=35 - } - "basic attribute" { - clr=56 - } -} -text { - object { - x=103 - y=16 - width=324 - height=25 - } - "basic attribute" { - clr=14 - } - textix="$(TITLE)" - align="horiz. centered" -} -rectangle { - object { - x=4 - y=263 - width=524 - height=230 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } -} -text { - object { - x=168 - y=266 - width=100 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Move axis?" -} -menu { - object { - x=168 - y=315 - width=100 - height=20 - } - control { - chan="$(P)$(R)M2Move" - clr=14 - bclr=51 - } -} -menu { - object { - x=168 - y=340 - width=100 - height=20 - } - control { - chan="$(P)$(R)M3Move" - clr=14 - bclr=51 - } -} -menu { - object { - x=168 - y=290 - width=100 - height=20 - } - control { - chan="$(P)$(R)M1Move" - clr=14 - bclr=51 - } -} -menu { - object { - x=168 - y=365 - width=100 - height=20 - } - control { - chan="$(P)$(R)M4Move" - clr=14 - bclr=51 - } -} -menu { - object { - x=168 - y=390 - width=100 - height=20 - } - control { - chan="$(P)$(R)M5Move" - clr=14 - bclr=51 - } -} -text { - object { - x=300 - y=266 - width=100 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Current Pos." -} -"text update" { - object { - x=291 - y=290 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)M1Current" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=291 - y=315 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)M2Current" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=291 - y=340 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)M3Current" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=291 - y=365 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)M4Current" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=291 - y=390 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)M5Current" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -text { - object { - x=456 - y=266 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Plots" -} -"related display" { - object { - x=440 - y=290 - width=75 - height=20 - } - display[0] { - label="Output" - name="trajectoryPlot.adl" - args="M=$(P)$(M1),TITLE=Output_Trajectory, Y=$(P)$(R)M1Traj" - } - display[1] { - label="Readback" - name="trajectoryPlot.adl" - args="M=$(P)$(M1),TITLE=Actual_Trajectory, Y=$(P)$(R)M1Actual" - } - display[2] { - label="Following error" - name="trajectoryPlot.adl" - args="M=$(P)$(M1),TITLE=Following_Error, Y=$(P)$(R)M1Error" - } - clr=14 - bclr=51 -} -"related display" { - object { - x=440 - y=315 - width=75 - height=20 - } - display[0] { - label="Output" - name="trajectoryPlot.adl" - args="M=$(P)$(M2),TITLE=Output_Trajectory, Y=$(P)$(R)M2Traj" - } - display[1] { - label="Readback" - name="trajectoryPlot.adl" - args="M=$(P)$(M2),TITLE=Actual_Trajectory, Y=$(P)$(R)M2Actual" - } - display[2] { - label="Following error" - name="trajectoryPlot.adl" - args="M=$(P)$(M2),TITLE=Following_Error, Y=$(P)$(R)M2Error" - } - clr=14 - bclr=51 -} -"related display" { - object { - x=440 - y=340 - width=75 - height=20 - } - display[0] { - label="Output" - name="trajectoryPlot.adl" - args="M=$(P)$(M3),TITLE=Output_Trajectory, Y=$(P)$(R)M3Traj" - } - display[1] { - label="Readback" - name="trajectoryPlot.adl" - args="M=$(P)$(M3),TITLE=Actual_Trajectory, Y=$(P)$(R)M3Actual" - } - display[2] { - label="Following error" - name="trajectoryPlot.adl" - args="M=$(P)$(M3),TITLE=Following_Error, Y=$(P)$(R)M3Error" - } - clr=14 - bclr=51 -} -"related display" { - object { - x=440 - y=365 - width=75 - height=20 - } - display[0] { - label="Output" - name="trajectoryPlot.adl" - args="M=$(P)$(M4),TITLE=Output_Trajectory, Y=$(P)$(R)M4Traj" - } - display[1] { - label="Readback" - name="trajectoryPlot.adl" - args="M=$(P)$(M4),TITLE=Actual_Trajectory, Y=$(P)$(R)M4Actual" - } - display[2] { - label="Following error" - name="trajectoryPlot.adl" - args="M=$(P)$(M4),TITLE=Following_Error, Y=$(P)$(R)M4Error" - } - clr=14 - bclr=51 -} -"related display" { - object { - x=440 - y=390 - width=75 - height=20 - } - display[0] { - label="Output" - name="trajectoryPlot.adl" - args="M=$(P)$(M5),TITLE=Output_Trajectory, Y=$(P)$(R)M5Traj" - } - display[1] { - label="Readback" - name="trajectoryPlot.adl" - args="M=$(P)$(M5),TITLE=Actual_Trajectory, Y=$(P)$(R)M5Actual" - } - display[2] { - label="Following error" - name="trajectoryPlot.adl" - args="M=$(P)$(M5),TITLE=Following_Error, Y=$(P)$(R)M5Error" - } - clr=14 - bclr=51 -} -rectangle { - object { - x=4 - y=500 - width=524 - height=250 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } -} -text { - object { - x=111 - y=530 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Build" -} -"message button" { - object { - x=167 - y=530 - width=96 - height=20 - } - control { - chan="$(P)$(R)Build" - clr=14 - bclr=51 - } - label="Build" - press_msg="1" - release_msg="0" -} -text { - object { - x=31 - y=580 - width=130 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Simulate/Real" -} -menu { - object { - x=165 - y=580 - width=100 - height=20 - } - control { - chan="$(P)$(R)SimMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=168 - y=556 - width=350 - height=20 - } - monitor { - chan="$(P)$(R)BuildMessage" - clr=14 - bclr=56 - } - limits { - } -} -text { - object { - x=31 - y=555 - width=130 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Build message" -} -"text update" { - object { - x=272 - y=530 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)BuildState" - clr=50 - bclr=13 - } - clrmod="alarm" - limits { - } -} -"text update" { - object { - x=272 - y=605 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)ExecState" - clr=50 - bclr=14 - } - clrmod="alarm" - limits { - } -} -"text update" { - object { - x=386 - y=530 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)BuildStatus" - clr=50 - bclr=14 - } - clrmod="alarm" - limits { - } -} -"text update" { - object { - x=386 - y=605 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)ExecStatus" - clr=50 - bclr=14 - } - clrmod="alarm" - limits { - } -} -text { - object { - x=180 - y=505 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Command" -} -text { - object { - x=298 - y=505 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="State" -} -text { - object { - x=407 - y=505 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Status" -} -composite { - object { - x=91 - y=605 - width=172 - height=20 - } - "composite name"="" - children { - text { - object { - x=91 - y=605 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Execute" - } - "message button" { - object { - x=167 - y=605 - width=96 - height=20 - } - control { - chan="$(P)$(R)Execute" - clr=14 - bclr=51 - } - label="Execute" - press_msg="1" - release_msg="0" - } - } -} -text { - object { - x=111 - y=660 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Abort" -} -"message button" { - object { - x=167 - y=655 - width=150 - height=30 - } - control { - chan="$(P)$(R)Abort" - clr=14 - bclr=20 - } - label="Abort!" - press_msg="1" - release_msg="0" -} -text { - object { - x=11 - y=630 - width=150 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Execute message" -} -"text update" { - object { - x=168 - y=631 - width=350 - height=20 - } - monitor { - chan="$(P)$(R)ExecMessage" - clr=14 - bclr=56 - } - limits { - } -} -"message button" { - object { - x=167 - y=695 - width=96 - height=20 - } - control { - chan="$(P)$(R)Readback" - clr=14 - bclr=51 - } - label="Readback" - press_msg="1" - release_msg="0" -} -text { - object { - x=81 - y=695 - width=80 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Readback" -} -"text update" { - object { - x=272 - y=695 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)ReadState" - clr=50 - bclr=14 - } - clrmod="alarm" - limits { - } -} -"text update" { - object { - x=386 - y=695 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)ReadStatus" - clr=50 - bclr=14 - } - clrmod="alarm" - limits { - } -} -text { - object { - x=41 - y=720 - width=120 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Read message" -} -"text update" { - object { - x=168 - y=721 - width=350 - height=20 - } - monitor { - chan="$(P)$(R)ReadMessage" - clr=14 - bclr=56 - } - limits { - } -} -menu { - object { - x=168 - y=415 - width=100 - height=20 - } - control { - chan="$(P)$(R)M6Move" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=291 - y=415 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)M6Current" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"related display" { - object { - x=440 - y=415 - width=75 - height=20 - } - display[0] { - label="Output" - name="trajectoryPlot.adl" - args="M=$(P)$(M6),TITLE=Output_Trajectory, Y=$(P)$(R)M6Traj" - } - display[1] { - label="Readback" - name="trajectoryPlot.adl" - args="M=$(P)$(M6),TITLE=Actual_Trajectory, Y=$(P)$(R)M6Actual" - } - display[2] { - label="Following error" - name="trajectoryPlot.adl" - args="M=$(P)$(M6),TITLE=Following_Error, Y=$(P)$(R)M6Error" - } - clr=14 - bclr=51 -} -menu { - object { - x=168 - y=440 - width=100 - height=20 - } - control { - chan="$(P)$(R)M7Move" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=291 - y=440 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)M7Current" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"related display" { - object { - x=440 - y=440 - width=75 - height=20 - } - display[0] { - label="Output" - name="trajectoryPlot.adl" - args="M=$(P)$(M7),TITLE=Output_Trajectory, Y=$(P)$(R)M7Traj" - } - display[1] { - label="Readback" - name="trajectoryPlot.adl" - args="M=$(P)$(M7),TITLE=Actual_Trajectory, Y=$(P)$(R)M7Actual" - } - display[2] { - label="Following error" - name="trajectoryPlot.adl" - args="M=$(P)$(M7),TITLE=Following_Error, Y=$(P)$(R)M7Error" - } - clr=14 - bclr=51 -} -menu { - object { - x=168 - y=465 - width=100 - height=20 - } - control { - chan="$(P)$(R)M8Move" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=291 - y=465 - width=103 - height=20 - } - monitor { - chan="$(P)$(R)M8Current" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"related display" { - object { - x=440 - y=465 - width=75 - height=20 - } - display[0] { - label="Output" - name="trajectoryPlot.adl" - args="M=$(P)$(M8),TITLE=Output_Trajectory, Y=$(P)$(R)M8Traj" - } - display[1] { - label="Readback" - name="trajectoryPlot.adl" - args="M=$(P)$(M8),TITLE=Actual_Trajectory, Y=$(P)$(R)M8Actual" - } - display[2] { - label="Following error" - name="trajectoryPlot.adl" - args="M=$(P)$(M8),TITLE=Following_Error, Y=$(P)$(R)M8Error" - } - clr=14 - bclr=51 -} -"text update" { - object { - x=6 - y=290 - width=150 - height=20 - } - monitor { - chan="$(P)$(M1).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=6 - y=315 - width=150 - height=20 - } - monitor { - chan="$(P)$(M2).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=6 - y=340 - width=150 - height=20 - } - monitor { - chan="$(P)$(M3).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=6 - y=365 - width=150 - height=20 - } - monitor { - chan="$(P)$(M4).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=6 - y=390 - width=150 - height=20 - } - monitor { - chan="$(P)$(M5).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=6 - y=415 - width=150 - height=20 - } - monitor { - chan="$(P)$(M6).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=6 - y=440 - width=150 - height=20 - } - monitor { - chan="$(P)$(M7).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=6 - y=465 - width=150 - height=20 - } - monitor { - chan="$(P)$(M8).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -text { - object { - x=359 - y=105 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Actual" -} -"text update" { - object { - x=422 - y=108 - width=100 - height=15 - } - monitor { - chan="$(P)$(R)Nactual" - clr=14 - bclr=56 - } - limits { - } -} -text { - object { - x=80 - y=105 - width=150 - height=20 - } - "basic attribute" { - clr=14 - } - textix="# output pulses" -} -"text entry" { - object { - x=234 - y=105 - width=100 - height=20 - } - control { - chan="$(P)$(R)Npulses" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=60 - y=230 - width=170 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Acceleration time" -} -"text entry" { - object { - x=234 - y=230 - width=100 - height=20 - } - control { - chan="$(P)$(R)Accel" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=140 - y=155 - width=90 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Time mode" -} -menu { - object { - x=234 - y=155 - width=100 - height=20 - } - control { - chan="$(P)$(R)TimeMode" - clr=14 - bclr=51 - } -} -text { - object { - x=130 - y=180 - width=100 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Total time" -} -"text entry" { - object { - x=234 - y=180 - width=100 - height=20 - } - control { - chan="$(P)$(R)Time" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=234 - y=205 - width=100 - height=20 - } - control { - chan="$(P)$(R)TimeScale" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=29 - y=205 - width=200 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Execution time scale" -} -"related display" { - object { - x=423 - y=223 - width=99 - height=24 - } - display[0] { - label="Debug/more" - name="trajectoryScanDebug.adl" - args="P=$(P),R=$(R),TITLE=$(TITLE),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6),M7=$(M7),M8=$(M8)" - } - clr=14 - bclr=4 - label=" More" -} -"text entry" { - object { - x=234 - y=130 - width=100 - height=20 - } - control { - chan="$(P)$(R)StartPulses" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=387 - y=130 - width=30 - height=20 - } - "basic attribute" { - clr=14 - } - textix="End" -} -"text entry" { - object { - x=422 - y=130 - width=100 - height=20 - } - control { - chan="$(P)$(R)EndPulses" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=10 - y=130 - width=210 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Range of pulses: Start" -} -text { - object { - x=20 - y=80 - width=210 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Trajectory definition" -} -menu { - object { - x=234 - y=80 - width=100 - height=20 - } - control { - chan="$(P)$(R)MoveMode" - clr=14 - bclr=51 - } -} -"related display" { - object { - x=447 - y=180 - width=75 - height=20 - } - display[0] { - label="Time per element" - name="trajectoryPlot.adl" - args="TITLE=Time_per_element, Y=$(P)$(R)TimeTraj" - } - clr=14 - bclr=51 -} -text { - object { - x=352 - y=180 - width=90 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Plot time" -} + +file { + name="j:\epics\R3.13.1\CARS\CARSApp\op\adl\trajectoryScan.adl" + version=020306 +} +display { + object { + x=195 + y=166 + width=530 + height=755 + } + clr=14 + bclr=4 + cmap="" + gridSpacing=10 + gridOn=0 + snapToGrid=0 +} +"color map" { + ncolors=65 + colors { + ffffff, + ececec, + dadada, + c8c8c8, + bbbbbb, + aeaeae, + 9e9e9e, + 919191, + 858585, + 787878, + 696969, + 5a5a5a, + 464646, + 2d2d2d, + 000000, + 00d800, + 1ebb00, + 339900, + 2d7f00, + 216c00, + fd0000, + de1309, + be190b, + a01207, + 820400, + 5893ff, + 597ee1, + 4b6ec7, + 3a5eab, + 27548d, + fbf34a, + f9da3c, + eeb62b, + e19015, + cd6100, + ffb0ff, + d67fe2, + ae4ebc, + 8b1a96, + 610a75, + a4aaff, + 8793e2, + 6a73c1, + 4d52a4, + 343386, + c7bb6d, + b79d5c, + a47e3c, + 7d5627, + 58340f, + 99ffff, + 73dfff, + 4ea5f9, + 2a63e4, + 0a00b8, + ebf1b5, + d4db9d, + bbc187, + a6a462, + 8b8239, + 73ff6b, + 52da3b, + 3cb420, + 289315, + 1a7309, + } +} +rectangle { + object { + x=5 + y=51 + width=524 + height=205 + } + "basic attribute" { + clr=14 + fill="outline" + width=2 + } +} +text { + object { + x=20 + y=55 + width=210 + height=20 + } + "basic attribute" { + clr=14 + } + textix="# trajectory elements" +} +"text entry" { + object { + x=234 + y=55 + width=100 + height=20 + } + control { + chan="$(P)$(R)Nelements" + clr=14 + bclr=51 + } + limits { + } +} +rectangle { + object { + x=73 + y=10 + width=384 + height=35 + } + "basic attribute" { + clr=56 + } +} +text { + object { + x=103 + y=16 + width=324 + height=25 + } + "basic attribute" { + clr=14 + } + textix="$(TITLE)" + align="horiz. centered" +} +rectangle { + object { + x=4 + y=263 + width=524 + height=230 + } + "basic attribute" { + clr=14 + fill="outline" + width=2 + } +} +text { + object { + x=168 + y=266 + width=100 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Move axis?" +} +menu { + object { + x=168 + y=315 + width=100 + height=20 + } + control { + chan="$(P)$(R)M2Move" + clr=14 + bclr=51 + } +} +menu { + object { + x=168 + y=340 + width=100 + height=20 + } + control { + chan="$(P)$(R)M3Move" + clr=14 + bclr=51 + } +} +menu { + object { + x=168 + y=290 + width=100 + height=20 + } + control { + chan="$(P)$(R)M1Move" + clr=14 + bclr=51 + } +} +menu { + object { + x=168 + y=365 + width=100 + height=20 + } + control { + chan="$(P)$(R)M4Move" + clr=14 + bclr=51 + } +} +menu { + object { + x=168 + y=390 + width=100 + height=20 + } + control { + chan="$(P)$(R)M5Move" + clr=14 + bclr=51 + } +} +text { + object { + x=300 + y=266 + width=100 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Current Pos." +} +"text update" { + object { + x=291 + y=290 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)M1Current" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=291 + y=315 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)M2Current" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=291 + y=340 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)M3Current" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=291 + y=365 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)M4Current" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=291 + y=390 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)M5Current" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +text { + object { + x=456 + y=266 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Plots" +} +"related display" { + object { + x=440 + y=290 + width=75 + height=20 + } + display[0] { + label="Output" + name="trajectoryPlot.adl" + args="M=$(P)$(M1),TITLE=Output_Trajectory, Y=$(P)$(R)M1Traj" + } + display[1] { + label="Readback" + name="trajectoryPlot.adl" + args="M=$(P)$(M1),TITLE=Actual_Trajectory, Y=$(P)$(R)M1Actual" + } + display[2] { + label="Following error" + name="trajectoryPlot.adl" + args="M=$(P)$(M1),TITLE=Following_Error, Y=$(P)$(R)M1Error" + } + clr=14 + bclr=51 +} +"related display" { + object { + x=440 + y=315 + width=75 + height=20 + } + display[0] { + label="Output" + name="trajectoryPlot.adl" + args="M=$(P)$(M2),TITLE=Output_Trajectory, Y=$(P)$(R)M2Traj" + } + display[1] { + label="Readback" + name="trajectoryPlot.adl" + args="M=$(P)$(M2),TITLE=Actual_Trajectory, Y=$(P)$(R)M2Actual" + } + display[2] { + label="Following error" + name="trajectoryPlot.adl" + args="M=$(P)$(M2),TITLE=Following_Error, Y=$(P)$(R)M2Error" + } + clr=14 + bclr=51 +} +"related display" { + object { + x=440 + y=340 + width=75 + height=20 + } + display[0] { + label="Output" + name="trajectoryPlot.adl" + args="M=$(P)$(M3),TITLE=Output_Trajectory, Y=$(P)$(R)M3Traj" + } + display[1] { + label="Readback" + name="trajectoryPlot.adl" + args="M=$(P)$(M3),TITLE=Actual_Trajectory, Y=$(P)$(R)M3Actual" + } + display[2] { + label="Following error" + name="trajectoryPlot.adl" + args="M=$(P)$(M3),TITLE=Following_Error, Y=$(P)$(R)M3Error" + } + clr=14 + bclr=51 +} +"related display" { + object { + x=440 + y=365 + width=75 + height=20 + } + display[0] { + label="Output" + name="trajectoryPlot.adl" + args="M=$(P)$(M4),TITLE=Output_Trajectory, Y=$(P)$(R)M4Traj" + } + display[1] { + label="Readback" + name="trajectoryPlot.adl" + args="M=$(P)$(M4),TITLE=Actual_Trajectory, Y=$(P)$(R)M4Actual" + } + display[2] { + label="Following error" + name="trajectoryPlot.adl" + args="M=$(P)$(M4),TITLE=Following_Error, Y=$(P)$(R)M4Error" + } + clr=14 + bclr=51 +} +"related display" { + object { + x=440 + y=390 + width=75 + height=20 + } + display[0] { + label="Output" + name="trajectoryPlot.adl" + args="M=$(P)$(M5),TITLE=Output_Trajectory, Y=$(P)$(R)M5Traj" + } + display[1] { + label="Readback" + name="trajectoryPlot.adl" + args="M=$(P)$(M5),TITLE=Actual_Trajectory, Y=$(P)$(R)M5Actual" + } + display[2] { + label="Following error" + name="trajectoryPlot.adl" + args="M=$(P)$(M5),TITLE=Following_Error, Y=$(P)$(R)M5Error" + } + clr=14 + bclr=51 +} +rectangle { + object { + x=4 + y=500 + width=524 + height=250 + } + "basic attribute" { + clr=14 + fill="outline" + width=2 + } +} +text { + object { + x=111 + y=530 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Build" +} +"message button" { + object { + x=167 + y=530 + width=96 + height=20 + } + control { + chan="$(P)$(R)Build" + clr=14 + bclr=51 + } + label="Build" + press_msg="1" + release_msg="0" +} +text { + object { + x=31 + y=580 + width=130 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Simulate/Real" +} +menu { + object { + x=165 + y=580 + width=100 + height=20 + } + control { + chan="$(P)$(R)SimMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=168 + y=556 + width=350 + height=20 + } + monitor { + chan="$(P)$(R)BuildMessage" + clr=14 + bclr=56 + } + limits { + } +} +text { + object { + x=31 + y=555 + width=130 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Build message" +} +"text update" { + object { + x=272 + y=530 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)BuildState" + clr=50 + bclr=13 + } + clrmod="alarm" + limits { + } +} +"text update" { + object { + x=272 + y=605 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)ExecState" + clr=50 + bclr=14 + } + clrmod="alarm" + limits { + } +} +"text update" { + object { + x=386 + y=530 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)BuildStatus" + clr=50 + bclr=14 + } + clrmod="alarm" + limits { + } +} +"text update" { + object { + x=386 + y=605 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)ExecStatus" + clr=50 + bclr=14 + } + clrmod="alarm" + limits { + } +} +text { + object { + x=180 + y=505 + width=70 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Command" +} +text { + object { + x=298 + y=505 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="State" +} +text { + object { + x=407 + y=505 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Status" +} +composite { + object { + x=91 + y=605 + width=172 + height=20 + } + "composite name"="" + children { + text { + object { + x=91 + y=605 + width=70 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Execute" + } + "message button" { + object { + x=167 + y=605 + width=96 + height=20 + } + control { + chan="$(P)$(R)Execute" + clr=14 + bclr=51 + } + label="Execute" + press_msg="1" + release_msg="0" + } + } +} +text { + object { + x=111 + y=660 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Abort" +} +"message button" { + object { + x=167 + y=655 + width=150 + height=30 + } + control { + chan="$(P)$(R)Abort" + clr=14 + bclr=20 + } + label="Abort!" + press_msg="1" + release_msg="0" +} +text { + object { + x=11 + y=630 + width=150 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Execute message" +} +"text update" { + object { + x=168 + y=631 + width=350 + height=20 + } + monitor { + chan="$(P)$(R)ExecMessage" + clr=14 + bclr=56 + } + limits { + } +} +"message button" { + object { + x=167 + y=695 + width=96 + height=20 + } + control { + chan="$(P)$(R)Readback" + clr=14 + bclr=51 + } + label="Readback" + press_msg="1" + release_msg="0" +} +text { + object { + x=81 + y=695 + width=80 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Readback" +} +"text update" { + object { + x=272 + y=695 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)ReadState" + clr=50 + bclr=14 + } + clrmod="alarm" + limits { + } +} +"text update" { + object { + x=386 + y=695 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)ReadStatus" + clr=50 + bclr=14 + } + clrmod="alarm" + limits { + } +} +text { + object { + x=41 + y=720 + width=120 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Read message" +} +"text update" { + object { + x=168 + y=721 + width=350 + height=20 + } + monitor { + chan="$(P)$(R)ReadMessage" + clr=14 + bclr=56 + } + limits { + } +} +menu { + object { + x=168 + y=415 + width=100 + height=20 + } + control { + chan="$(P)$(R)M6Move" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=291 + y=415 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)M6Current" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"related display" { + object { + x=440 + y=415 + width=75 + height=20 + } + display[0] { + label="Output" + name="trajectoryPlot.adl" + args="M=$(P)$(M6),TITLE=Output_Trajectory, Y=$(P)$(R)M6Traj" + } + display[1] { + label="Readback" + name="trajectoryPlot.adl" + args="M=$(P)$(M6),TITLE=Actual_Trajectory, Y=$(P)$(R)M6Actual" + } + display[2] { + label="Following error" + name="trajectoryPlot.adl" + args="M=$(P)$(M6),TITLE=Following_Error, Y=$(P)$(R)M6Error" + } + clr=14 + bclr=51 +} +menu { + object { + x=168 + y=440 + width=100 + height=20 + } + control { + chan="$(P)$(R)M7Move" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=291 + y=440 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)M7Current" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"related display" { + object { + x=440 + y=440 + width=75 + height=20 + } + display[0] { + label="Output" + name="trajectoryPlot.adl" + args="M=$(P)$(M7),TITLE=Output_Trajectory, Y=$(P)$(R)M7Traj" + } + display[1] { + label="Readback" + name="trajectoryPlot.adl" + args="M=$(P)$(M7),TITLE=Actual_Trajectory, Y=$(P)$(R)M7Actual" + } + display[2] { + label="Following error" + name="trajectoryPlot.adl" + args="M=$(P)$(M7),TITLE=Following_Error, Y=$(P)$(R)M7Error" + } + clr=14 + bclr=51 +} +menu { + object { + x=168 + y=465 + width=100 + height=20 + } + control { + chan="$(P)$(R)M8Move" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=291 + y=465 + width=103 + height=20 + } + monitor { + chan="$(P)$(R)M8Current" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"related display" { + object { + x=440 + y=465 + width=75 + height=20 + } + display[0] { + label="Output" + name="trajectoryPlot.adl" + args="M=$(P)$(M8),TITLE=Output_Trajectory, Y=$(P)$(R)M8Traj" + } + display[1] { + label="Readback" + name="trajectoryPlot.adl" + args="M=$(P)$(M8),TITLE=Actual_Trajectory, Y=$(P)$(R)M8Actual" + } + display[2] { + label="Following error" + name="trajectoryPlot.adl" + args="M=$(P)$(M8),TITLE=Following_Error, Y=$(P)$(R)M8Error" + } + clr=14 + bclr=51 +} +"text update" { + object { + x=6 + y=290 + width=150 + height=20 + } + monitor { + chan="$(P)$(M1).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=6 + y=315 + width=150 + height=20 + } + monitor { + chan="$(P)$(M2).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=6 + y=340 + width=150 + height=20 + } + monitor { + chan="$(P)$(M3).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=6 + y=365 + width=150 + height=20 + } + monitor { + chan="$(P)$(M4).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=6 + y=390 + width=150 + height=20 + } + monitor { + chan="$(P)$(M5).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=6 + y=415 + width=150 + height=20 + } + monitor { + chan="$(P)$(M6).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=6 + y=440 + width=150 + height=20 + } + monitor { + chan="$(P)$(M7).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=6 + y=465 + width=150 + height=20 + } + monitor { + chan="$(P)$(M8).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +text { + object { + x=359 + y=105 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Actual" +} +"text update" { + object { + x=422 + y=108 + width=100 + height=15 + } + monitor { + chan="$(P)$(R)Nactual" + clr=14 + bclr=56 + } + limits { + } +} +text { + object { + x=80 + y=105 + width=150 + height=20 + } + "basic attribute" { + clr=14 + } + textix="# output pulses" +} +"text entry" { + object { + x=234 + y=105 + width=100 + height=20 + } + control { + chan="$(P)$(R)Npulses" + clr=14 + bclr=51 + } + limits { + } +} +text { + object { + x=60 + y=230 + width=170 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Acceleration time" +} +"text entry" { + object { + x=234 + y=230 + width=100 + height=20 + } + control { + chan="$(P)$(R)Accel" + clr=14 + bclr=51 + } + limits { + } +} +text { + object { + x=140 + y=155 + width=90 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Time mode" +} +menu { + object { + x=234 + y=155 + width=100 + height=20 + } + control { + chan="$(P)$(R)TimeMode" + clr=14 + bclr=51 + } +} +text { + object { + x=130 + y=180 + width=100 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Total time" +} +"text entry" { + object { + x=234 + y=180 + width=100 + height=20 + } + control { + chan="$(P)$(R)Time" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=234 + y=205 + width=100 + height=20 + } + control { + chan="$(P)$(R)TimeScale" + clr=14 + bclr=51 + } + limits { + } +} +text { + object { + x=29 + y=205 + width=200 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Execution time scale" +} +"related display" { + object { + x=423 + y=223 + width=99 + height=24 + } + display[0] { + label="Debug/more" + name="trajectoryScanDebug.adl" + args="P=$(P),R=$(R),TITLE=$(TITLE),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6),M7=$(M7),M8=$(M8)" + } + clr=14 + bclr=4 + label=" More" +} +"text entry" { + object { + x=234 + y=130 + width=100 + height=20 + } + control { + chan="$(P)$(R)StartPulses" + clr=14 + bclr=51 + } + limits { + } +} +text { + object { + x=387 + y=130 + width=30 + height=20 + } + "basic attribute" { + clr=14 + } + textix="End" +} +"text entry" { + object { + x=422 + y=130 + width=100 + height=20 + } + control { + chan="$(P)$(R)EndPulses" + clr=14 + bclr=51 + } + limits { + } +} +text { + object { + x=10 + y=130 + width=210 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Range of pulses: Start" +} +text { + object { + x=20 + y=80 + width=210 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Trajectory definition" +} +menu { + object { + x=234 + y=80 + width=100 + height=20 + } + control { + chan="$(P)$(R)MoveMode" + clr=14 + bclr=51 + } +} +"related display" { + object { + x=447 + y=180 + width=75 + height=20 + } + display[0] { + label="Time per element" + name="trajectoryPlot.adl" + args="TITLE=Time_per_element, Y=$(P)$(R)TimeTraj" + } + clr=14 + bclr=51 +} +text { + object { + x=352 + y=180 + width=90 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Plot time" +} diff --git a/motorApp/op/adl/trajectoryScanDebug.adl b/motorApp/op/adl/trajectoryScanDebug.adl old mode 100755 new mode 100644 index cdc67f84..4b2edb15 --- a/motorApp/op/adl/trajectoryScanDebug.adl +++ b/motorApp/op/adl/trajectoryScanDebug.adl @@ -1,1675 +1,1675 @@ - -file { - name="/home/epics/devel/motor/6-4beta/motorApp/op/adl/trajectoryScanDebug.adl" - version=030000 -} -display { - object { - x=106 - y=113 - width=1015 - height=365 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -rectangle { - object { - x=242 - y=7 - width=450 - height=35 - } - "basic attribute" { - clr=56 - } -} -text { - object { - x=272 - y=13 - width=396 - height=25 - } - "basic attribute" { - clr=14 - } - textix="$(TITLE) Debug" - align="horiz. centered" -} -rectangle { - object { - x=5 - y=51 - width=1000 - height=275 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } -} -"text entry" { - object { - x=242 - y=334 - width=100 - height=20 - } - control { - chan="$(P)$(R)TimeTraj" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=7 - y=334 - width=230 - height=20 - } - "basic attribute" { - clr=14 - } - textix="DT of 1st time element:" -} -text { - object { - x=199 - y=66 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="First" -} -text { - object { - x=435 - y=67 - width=160 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Max. Speed Error" -} -text { - object { - x=395 - y=95 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Allowed" -} -text { - object { - x=493 - y=96 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Actual" -} -text { - object { - x=565 - y=96 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Element" -} -text { - object { - x=659 - y=97 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Actual" -} -text { - object { - x=737 - y=97 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Element" -} -text { - object { - x=667 - y=68 - width=120 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Max. velocity" -} -text { - object { - x=840 - y=97 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Actual" -} -text { - object { - x=922 - y=97 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Element" -} -text { - object { - x=829 - y=68 - width=150 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Max acceleration" -} -text { - object { - x=194 - y=91 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Output" -} -text { - object { - x=299 - y=66 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="First" -} -text { - object { - x=284 - y=91 - width=80 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Readback" -} -"text update" { - object { - x=273 - y=195 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M4Actual" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=175 - y=195 - width=90 - height=20 - } - control { - chan="$(P)$(R)M4Traj" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=384 - y=195 - width=90 - height=20 - } - control { - chan="$(P)$(R)M4MDVS" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=576 - y=195 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M4MDVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=749 - y=195 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M4MVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=930 - y=195 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M4MAE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=828 - y=195 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M4MAA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=651 - y=195 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M4MVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=478 - y=195 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M4MDVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=273 - y=220 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M5Actual" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=175 - y=220 - width=90 - height=20 - } - control { - chan="$(P)$(R)M5Traj" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=384 - y=220 - width=90 - height=20 - } - control { - chan="$(P)$(R)M5MDVS" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=576 - y=220 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M5MDVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=749 - y=220 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M5MVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=930 - y=220 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M5MAE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=828 - y=220 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M5MAA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=651 - y=220 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M5MVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=478 - y=220 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M5MDVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=273 - y=245 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M6Actual" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=175 - y=245 - width=90 - height=20 - } - control { - chan="$(P)$(R)M6Traj" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=384 - y=245 - width=90 - height=20 - } - control { - chan="$(P)$(R)M6MDVS" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=576 - y=245 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M6MDVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=749 - y=245 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M6MVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=930 - y=245 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M6MAE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=828 - y=245 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M6MAA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=651 - y=245 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M6MVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=478 - y=245 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M6MDVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=273 - y=120 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M1Actual" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=175 - y=120 - width=90 - height=20 - } - control { - chan="$(P)$(R)M1Traj" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=384 - y=120 - width=90 - height=20 - } - control { - chan="$(P)$(R)M1MDVS" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=576 - y=120 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M1MDVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=749 - y=120 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M1MVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=930 - y=120 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M1MAE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=828 - y=120 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M1MAA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=651 - y=120 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M1MVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=478 - y=120 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M1MDVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=273 - y=145 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M2Actual" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=175 - y=145 - width=90 - height=20 - } - control { - chan="$(P)$(R)M2Traj" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=384 - y=145 - width=90 - height=20 - } - control { - chan="$(P)$(R)M2MDVS" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=576 - y=145 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M2MDVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=749 - y=145 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M2MVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=930 - y=145 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M2MAE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=828 - y=145 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M2MAA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=651 - y=145 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M2MVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=478 - y=145 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M2MDVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=273 - y=170 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M3Actual" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=175 - y=170 - width=90 - height=20 - } - control { - chan="$(P)$(R)M3Traj" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=384 - y=170 - width=90 - height=20 - } - control { - chan="$(P)$(R)M3MDVS" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=576 - y=170 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M3MDVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=749 - y=170 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M3MVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=930 - y=170 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M3MAE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=828 - y=170 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M3MAA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=651 - y=170 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M3MVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=478 - y=170 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M3MDVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -composite { - object { - x=171 - y=58 - width=826 - height=261 - } - "composite name"="" - children { - rectangle { - object { - x=171 - y=58 - width=200 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - rectangle { - object { - x=378 - y=58 - width=260 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - rectangle { - object { - x=643 - y=58 - width=170 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - rectangle { - object { - x=822 - y=58 - width=175 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - } -} -"text update" { - object { - x=273 - y=295 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M8Actual" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=175 - y=295 - width=90 - height=20 - } - control { - chan="$(P)$(R)M8Traj" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=384 - y=295 - width=90 - height=20 - } - control { - chan="$(P)$(R)M8MDVS" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=576 - y=295 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M8MDVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=749 - y=295 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M8MVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=930 - y=295 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M8MAE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=828 - y=295 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M8MAA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=651 - y=295 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M8MVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=478 - y=295 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M8MDVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=273 - y=270 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M7Actual" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=175 - y=270 - width=90 - height=20 - } - control { - chan="$(P)$(R)M7Traj" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=384 - y=270 - width=90 - height=20 - } - control { - chan="$(P)$(R)M7MDVS" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=576 - y=270 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M7MDVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=749 - y=270 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M7MVE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=930 - y=270 - width=50 - height=20 - } - monitor { - chan="$(P)$(R)M7MAE" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=828 - y=270 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M7MAA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=651 - y=270 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M7MVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=478 - y=270 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M7MDVA" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=120 - width=150 - height=20 - } - monitor { - chan="$(P)$(M1).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=145 - width=150 - height=20 - } - monitor { - chan="$(P)$(M2).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=170 - width=150 - height=20 - } - monitor { - chan="$(P)$(M3).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=195 - width=150 - height=20 - } - monitor { - chan="$(P)$(M4).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=220 - width=150 - height=20 - } - monitor { - chan="$(P)$(M5).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=245 - width=150 - height=20 - } - monitor { - chan="$(P)$(M6).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=270 - width=150 - height=20 - } - monitor { - chan="$(P)$(M7).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=295 - width=150 - height=20 - } - monitor { - chan="$(P)$(M8).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -text { - object { - x=359 - y=334 - width=300 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Debugging level (0=off, 1=on):" -} -"text entry" { - object { - x=664 - y=334 - width=100 - height=20 - } - control { - chan="$(P)$(R)DebugLevel" - clr=14 - bclr=51 - } - limits { - } -} + +file { + name="/home/epics/devel/motor/6-4beta/motorApp/op/adl/trajectoryScanDebug.adl" + version=030000 +} +display { + object { + x=106 + y=113 + width=1015 + height=365 + } + clr=14 + bclr=4 + cmap="" + gridSpacing=5 + gridOn=0 + snapToGrid=0 +} +"color map" { + ncolors=65 + colors { + ffffff, + ececec, + dadada, + c8c8c8, + bbbbbb, + aeaeae, + 9e9e9e, + 919191, + 858585, + 787878, + 696969, + 5a5a5a, + 464646, + 2d2d2d, + 000000, + 00d800, + 1ebb00, + 339900, + 2d7f00, + 216c00, + fd0000, + de1309, + be190b, + a01207, + 820400, + 5893ff, + 597ee1, + 4b6ec7, + 3a5eab, + 27548d, + fbf34a, + f9da3c, + eeb62b, + e19015, + cd6100, + ffb0ff, + d67fe2, + ae4ebc, + 8b1a96, + 610a75, + a4aaff, + 8793e2, + 6a73c1, + 4d52a4, + 343386, + c7bb6d, + b79d5c, + a47e3c, + 7d5627, + 58340f, + 99ffff, + 73dfff, + 4ea5f9, + 2a63e4, + 0a00b8, + ebf1b5, + d4db9d, + bbc187, + a6a462, + 8b8239, + 73ff6b, + 52da3b, + 3cb420, + 289315, + 1a7309, + } +} +rectangle { + object { + x=242 + y=7 + width=450 + height=35 + } + "basic attribute" { + clr=56 + } +} +text { + object { + x=272 + y=13 + width=396 + height=25 + } + "basic attribute" { + clr=14 + } + textix="$(TITLE) Debug" + align="horiz. centered" +} +rectangle { + object { + x=5 + y=51 + width=1000 + height=275 + } + "basic attribute" { + clr=14 + fill="outline" + width=2 + } +} +"text entry" { + object { + x=242 + y=334 + width=100 + height=20 + } + control { + chan="$(P)$(R)TimeTraj" + clr=14 + bclr=51 + } + limits { + } +} +text { + object { + x=7 + y=334 + width=230 + height=20 + } + "basic attribute" { + clr=14 + } + textix="DT of 1st time element:" +} +text { + object { + x=199 + y=66 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="First" +} +text { + object { + x=435 + y=67 + width=160 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Max. Speed Error" +} +text { + object { + x=395 + y=95 + width=70 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Allowed" +} +text { + object { + x=493 + y=96 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Actual" +} +text { + object { + x=565 + y=96 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Element" +} +text { + object { + x=659 + y=97 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Actual" +} +text { + object { + x=737 + y=97 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Element" +} +text { + object { + x=667 + y=68 + width=120 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Max. velocity" +} +text { + object { + x=840 + y=97 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Actual" +} +text { + object { + x=922 + y=97 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Element" +} +text { + object { + x=829 + y=68 + width=150 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Max acceleration" +} +text { + object { + x=194 + y=91 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Output" +} +text { + object { + x=299 + y=66 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="First" +} +text { + object { + x=284 + y=91 + width=80 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Readback" +} +"text update" { + object { + x=273 + y=195 + width=90 + height=20 + } + monitor { + chan="$(P)$(R)M4Actual" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text entry" { + object { + x=175 + y=195 + width=90 + height=20 + } + control { + chan="$(P)$(R)M4Traj" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=384 + y=195 + width=90 + height=20 + } + control { + chan="$(P)$(R)M4MDVS" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=576 + y=195 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M4MDVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=749 + y=195 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M4MVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=930 + y=195 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M4MAE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=828 + y=195 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M4MAA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=651 + y=195 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M4MVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=478 + y=195 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M4MDVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=273 + y=220 + width=90 + height=20 + } + monitor { + chan="$(P)$(R)M5Actual" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text entry" { + object { + x=175 + y=220 + width=90 + height=20 + } + control { + chan="$(P)$(R)M5Traj" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=384 + y=220 + width=90 + height=20 + } + control { + chan="$(P)$(R)M5MDVS" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=576 + y=220 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M5MDVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=749 + y=220 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M5MVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=930 + y=220 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M5MAE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=828 + y=220 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M5MAA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=651 + y=220 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M5MVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=478 + y=220 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M5MDVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=273 + y=245 + width=90 + height=20 + } + monitor { + chan="$(P)$(R)M6Actual" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text entry" { + object { + x=175 + y=245 + width=90 + height=20 + } + control { + chan="$(P)$(R)M6Traj" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=384 + y=245 + width=90 + height=20 + } + control { + chan="$(P)$(R)M6MDVS" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=576 + y=245 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M6MDVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=749 + y=245 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M6MVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=930 + y=245 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M6MAE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=828 + y=245 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M6MAA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=651 + y=245 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M6MVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=478 + y=245 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M6MDVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=273 + y=120 + width=90 + height=20 + } + monitor { + chan="$(P)$(R)M1Actual" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text entry" { + object { + x=175 + y=120 + width=90 + height=20 + } + control { + chan="$(P)$(R)M1Traj" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=384 + y=120 + width=90 + height=20 + } + control { + chan="$(P)$(R)M1MDVS" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=576 + y=120 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M1MDVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=749 + y=120 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M1MVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=930 + y=120 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M1MAE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=828 + y=120 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M1MAA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=651 + y=120 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M1MVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=478 + y=120 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M1MDVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=273 + y=145 + width=90 + height=20 + } + monitor { + chan="$(P)$(R)M2Actual" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text entry" { + object { + x=175 + y=145 + width=90 + height=20 + } + control { + chan="$(P)$(R)M2Traj" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=384 + y=145 + width=90 + height=20 + } + control { + chan="$(P)$(R)M2MDVS" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=576 + y=145 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M2MDVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=749 + y=145 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M2MVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=930 + y=145 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M2MAE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=828 + y=145 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M2MAA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=651 + y=145 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M2MVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=478 + y=145 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M2MDVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=273 + y=170 + width=90 + height=20 + } + monitor { + chan="$(P)$(R)M3Actual" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text entry" { + object { + x=175 + y=170 + width=90 + height=20 + } + control { + chan="$(P)$(R)M3Traj" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=384 + y=170 + width=90 + height=20 + } + control { + chan="$(P)$(R)M3MDVS" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=576 + y=170 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M3MDVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=749 + y=170 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M3MVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=930 + y=170 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M3MAE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=828 + y=170 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M3MAA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=651 + y=170 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M3MVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=478 + y=170 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M3MDVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +composite { + object { + x=171 + y=58 + width=826 + height=261 + } + "composite name"="" + children { + rectangle { + object { + x=171 + y=58 + width=200 + height=261 + } + "basic attribute" { + clr=14 + fill="outline" + width=2 + } + } + rectangle { + object { + x=378 + y=58 + width=260 + height=261 + } + "basic attribute" { + clr=14 + fill="outline" + width=2 + } + } + rectangle { + object { + x=643 + y=58 + width=170 + height=261 + } + "basic attribute" { + clr=14 + fill="outline" + width=2 + } + } + rectangle { + object { + x=822 + y=58 + width=175 + height=261 + } + "basic attribute" { + clr=14 + fill="outline" + width=2 + } + } + } +} +"text update" { + object { + x=273 + y=295 + width=90 + height=20 + } + monitor { + chan="$(P)$(R)M8Actual" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text entry" { + object { + x=175 + y=295 + width=90 + height=20 + } + control { + chan="$(P)$(R)M8Traj" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=384 + y=295 + width=90 + height=20 + } + control { + chan="$(P)$(R)M8MDVS" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=576 + y=295 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M8MDVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=749 + y=295 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M8MVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=930 + y=295 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M8MAE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=828 + y=295 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M8MAA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=651 + y=295 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M8MVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=478 + y=295 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M8MDVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=273 + y=270 + width=90 + height=20 + } + monitor { + chan="$(P)$(R)M7Actual" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text entry" { + object { + x=175 + y=270 + width=90 + height=20 + } + control { + chan="$(P)$(R)M7Traj" + clr=14 + bclr=51 + } + limits { + } +} +"text entry" { + object { + x=384 + y=270 + width=90 + height=20 + } + control { + chan="$(P)$(R)M7MDVS" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=576 + y=270 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M7MDVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=749 + y=270 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M7MVE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=930 + y=270 + width=50 + height=20 + } + monitor { + chan="$(P)$(R)M7MAE" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=828 + y=270 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M7MAA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=651 + y=270 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M7MVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=478 + y=270 + width=80 + height=20 + } + monitor { + chan="$(P)$(R)M7MDVA" + clr=54 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=9 + y=120 + width=150 + height=20 + } + monitor { + chan="$(P)$(M1).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=9 + y=145 + width=150 + height=20 + } + monitor { + chan="$(P)$(M2).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=9 + y=170 + width=150 + height=20 + } + monitor { + chan="$(P)$(M3).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=9 + y=195 + width=150 + height=20 + } + monitor { + chan="$(P)$(M4).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=9 + y=220 + width=150 + height=20 + } + monitor { + chan="$(P)$(M5).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=9 + y=245 + width=150 + height=20 + } + monitor { + chan="$(P)$(M6).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=9 + y=270 + width=150 + height=20 + } + monitor { + chan="$(P)$(M7).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +"text update" { + object { + x=9 + y=295 + width=150 + height=20 + } + monitor { + chan="$(P)$(M8).DESC" + clr=14 + bclr=4 + } + align="horiz. right" + limits { + } +} +text { + object { + x=359 + y=334 + width=300 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Debugging level (0=off, 1=on):" +} +"text entry" { + object { + x=664 + y=334 + width=100 + height=20 + } + control { + chan="$(P)$(R)DebugLevel" + clr=14 + bclr=51 + } + limits { + } +}