diff --git a/.ci/travis-prepare.sh b/.ci/travis-prepare.sh new file mode 100755 index 0000000..7beb7b4 --- /dev/null +++ b/.ci/travis-prepare.sh @@ -0,0 +1,164 @@ +#!/bin/sh +set -e -x + +SUPPORT=$HOME/.cache/support + +install -d $SUPPORT + +# Conditionally build IPAC +if [ -n "$IPAC" ]; then + IPAC_PATH=$SUPPORT/ipac +else + IPAC_PATH= +fi + +RELEASE_PATH=$TRAVIS_BUILD_DIR/configure/RELEASE +EPICS_BASE=$SUPPORT/epics-base + +cat << EOF > $RELEASE_PATH +IPAC=$IPAC_PATH +SNCSEQ=$SUPPORT/seq +ASYN=$SUPPORT/asyn +EPICS_BASE=$SUPPORT/epics-base +EOF + +# use default selection for MSI +sed -i -e '/MSI/d' configure/CONFIG_SITE + +if [ ! -e "$EPICS_BASE/built" ] +then + + git clone --depth 10 --branch $BASE https://github.com/epics-base/epics-base.git $EPICS_BASE + + EPICS_HOST_ARCH=`sh $EPICS_BASE/startup/EpicsHostArch` + + case "$STATIC" in + static) + cat << EOF >> "$EPICS_BASE/configure/CONFIG_SITE" +SHARED_LIBRARIES=NO +STATIC_BUILD=YES +EOF + ;; + *) ;; + esac + + case "$CMPLR" in + clang) + echo "Host compiler is clang" + cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH +GNU = NO +CMPLR_CLASS = clang +CC = clang +CCC = clang++ +EOF + ;; + *) echo "Host compiler is default";; + esac + + # requires wine and g++-mingw-w64-i686 + if [ "$WINE" = "32" ] + then + echo "Cross mingw32" + sed -i -e '/CMPLR_PREFIX/d' $EPICS_BASE/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw + cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw +CMPLR_PREFIX=i686-w64-mingw32- +EOF + cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE +CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw +EOF + fi + + # set RTEMS to eg. "4.9" or "4.10" + if [ -n "$RTEMS" ] + then + echo "Cross RTEMS${RTEMS} for pc386" + install -d /home/travis/.cache + curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \ + | tar -C /home/travis/.cache -xj + + sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' $EPICS_BASE/configure/os/CONFIG_SITE.Common.RTEMS + cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.Common.RTEMS +RTEMS_VERSION=$RTEMS +RTEMS_BASE=/home/travis/.cache/rtems${RTEMS}-i386 +EOF + cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE +CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386 +EOF + + fi + + make -C "$EPICS_BASE" -j2 + # get MSI for 3.14 + case "$BASE" in + 3.14*) + echo "Build MSI" + install -d "$HOME/msi/extensions/src" + curl https://epics.anl.gov/download/extensions/extensionsTop_20120904.tar.gz | tar -C "$HOME/msi" -xvz + curl https://epics.anl.gov/download/extensions/msi1-7.tar.gz | tar -C "$HOME/msi/extensions/src" -xvz + mv "$HOME/msi/extensions/src/msi1-7" "$HOME/msi/extensions/src/msi" + + cat << EOF > "$HOME/msi/extensions/configure/RELEASE" +EPICS_BASE=$EPICS_BASE +EPICS_EXTENSIONS=\$(TOP) +EOF + make -C "$HOME/msi/extensions" + cp "$HOME/msi/extensions/bin/$EPICS_HOST_ARCH/msi" "$EPICS_BASE/bin/$EPICS_HOST_ARCH/" + echo 'MSI:=$(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)/msi' >> "$EPICS_BASE/configure/CONFIG_SITE" + + cat <> configure/CONFIG_SITE +MSI = \$(EPICS_BASE)/bin/\$(EPICS_HOST_ARCH)/msi +EOF + + ;; + *) echo "Use MSI from Base" + ;; + esac + + touch $EPICS_BASE/built +else + echo "Using cached epics-base!" +fi + +# IPAC +if [ -n "$IPAC" ]; then + if [ ! -e "$SUPPORT/ipac/built" ]; then + echo "Build ipac" + install -d $SUPPORT/ipac + git clone --depth 10 --branch $IPAC https://github.com/epics-modules/ipac.git $SUPPORT/ipac + cat << EOF > $SUPPORT/ipac/configure/RELEASE +EPICS_BASE=$SUPPORT/epics-base +EOF + make -C $SUPPORT/ipac + touch $SUPPORT/ipac/built + else + echo "Using cached ipac" + fi +else + echo "Skipping ipac" +fi + + +# sequencer +if [ ! -e "$SUPPORT/seq/built" ]; then + echo "Build sequencer" + install -d $SUPPORT/seq + curl -L "http://www-csr.bessy.de/control/SoftDist/sequencer/releases/seq-${SEQ}.tar.gz" | tar -C $SUPPORT/seq -xvz --strip-components=1 + cp $RELEASE_PATH $SUPPORT/seq/configure/RELEASE + make -C $SUPPORT/seq + touch $SUPPORT/seq/built +else + echo "Using cached seq" +fi + + +# asyn +if [ ! -e "$SUPPORT/asyn/built" ]; then + echo "Build asyn" + install -d $SUPPORT/asyn + curl -L "https://epics.anl.gov/download/modules/asyn${ASYN}.tar.gz" | tar -C $SUPPORT/asyn -xvz --strip-components=1 + cp $RELEASE_PATH $SUPPORT/asyn/configure/RELEASE + make -C "$SUPPORT/asyn" -j2 + touch $SUPPORT/asyn/built +else + echo "Using cached asyn" +fi diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9712a09 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +#Which files need CRLF handling +* text=auto +*.sh eol=lf +*.bat eol=crlf +*.cmd -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fae3cab --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*~ +O.* +*.swp +*BAK.adl +bin/ +db/ +dbd/ +html/ +include/ +lib/ +templates/ +cdCommands +envPaths +dllPath.bat +auto_settings.sav* +auto_positions.sav* +.ccfxprepdir/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0f4036e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +sudo: false +dist: trusty +language: c +compiler: + - gcc +cache: + directories: + - $HOME/.cache +addons: + apt: + packages: + - libreadline6-dev + - libncurses5-dev + - perl + - clang + - g++-mingw-w64-i686 + - re2c +env: + - BASE=3.14 STATIC=shared SEQ=2.2.4 ASYN=4-31 IPAC=2.14 + - BASE=3.14 STATIC=static SEQ=2.2.4 ASYN=4-31 IPAC=2.14 + - BASE=R3.15.5 STATIC=shared SEQ=2.2.4 ASYN=4-31 IPAC=2.14 + - BASE=R3.15.5 STATIC=static SEQ=2.2.4 ASYN=4-31 IPAC=2.14 + - BASE=3.16 STATIC=shared RTEMS=4.10 SEQ=2.2.4 ASYN=4-31 IPAC=2.14 + - BASE=3.16 STATIC=shared CMPLR=clang WINE=32 SEQ=2.2.4 ASYN=4-31 IPAC= + - BASE=3.16 STATIC=static WINE=32 SEQ=2.2.4 ASYN=4-31 IPAC= +install: ./.ci/travis-prepare.sh +script: make diff --git a/README b/README index 10defa7..10ca6a5 100644 --- a/README +++ b/README @@ -1,4 +1,13 @@ -Motor Module R6-9 Release Notes +Notice +====== + +This file was historically used to document changes to the motor module that +were relevant to developers. It is largely obsolete now that the motor module +has moved github. It will not be updated in the future and is likely to move +to the documentation directory. + + +Motor Module R6-10 Release Notes =============================================================================== The motor module software in this release is compatible with EPICS base @@ -144,6 +153,74 @@ Known Problems - Tapping the Jog button can cause the motor to move past the soft-travel limit when backlash is nonzero. +Modification Log for R6-10 +========================== + +2) Fix for OMS controllers that do not have the correct deceleration rate at + the end of a JOG. Bug introduced with item #9 under R6-6. + + File modified: OmsSrc/devOmsCom.cc + +3) - If the user request UEIP be set true and the MSTA's EA_PRESENT indicator + is off, then special() denies the request and sets UEIP false. In other + words, UEIP can only be set true if the device/driver has set the + "Encoder is Present" MSTA indicator true. Replaced six occurrences of + logic that tested both UEIP and EA_PRESENT with just UEIP. + + - UEIP and URIP are mutually exclusive. For example, if the user request + UEIP be set true when URIP is also true, then the special() function + will set URIP off and vice versa. Added the special attribute to URIP. + + - If URIP is true and the RDBL link points to a valid DBR_DOUBLE, then the + value pointed to by RDBL will be multiplied by RRES, divided by MRES + and stored in RRBV. This fixes a problem with all previous releases + where RRBV was inconsistent with DRBV when URIP was true. + + Files modified: motorApp/MotorSrc/motorRecord.cc + motorApp/MotorSrc/motorRecord.dbd + +4) Fix for build errors when SNCSEQ isn't defined in the RELEASE file. + + Files added: motorApp/AerotechSrc/devAerotechSeq.dbd + motorApp/NewportSrc/devNewportSeq.dbd + Files modified: motorApp/AerotechSrc/Makefile + motorApp/AerotechSrc/devAerotech.dbd + motorApp/NewportSrc/Makefile + motorApp/NewportSrc/devNewport.dbd + +5) Márcio Paduan Donadio (LNLS) fixed a bug with SYNC field processing. SYNC + was being ignored when URIP == True. + + Files modified: syncTargetPosition() in motorRecord.cc + +6) Kevin Peterson discovered an initialization bug when the motor record is + configured to do retries. When configured to do retries, the motor + record issues incremental rather than absolute moves. If the motor + behaves badly (e.g., a piezo stiction motor) the controller's absolute + step count can be far from its' absolute readback position. The motor + record initialization logic that determines how the target positions + are initialized at boot-up was not taking into consideration whether + or not the motor record is configured to do retries, and therefore, + whether or not absolute or incremental moves were issued by the motor + record. With this release, if the motor record is configured to do + retries, then the controller's absolute position is ignored (because + the controller's absolute position was "corrupted" by retries) and the + autosave/restore position is used to set the controllers position. + + Switching between retries on and off (relative vs. absolute moves) + between reboots will cause unpredictable results and is not covered + by this bug fix. + + Files modified: motor_init_record_com() in MotorSrc/motordevCom.cc + init_controller() in MotorSrc/devMotorAsyn.c + +7) The MAXv User's Manual specifies that "The IRQ interrupt level range is + 0x010-0x111 (IRQ2-7)...". The appropriate error check has been added to + the MAXvSetup() call. + + File modified: OmsSrc/drvMAXv.cc + + Modification Log for R6-9 ========================= diff --git a/README.md b/README.md new file mode 100644 index 0000000..793e787 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# motor +APS BCDA synApps module: motor + +[![Build Status](https://travis-ci.org/epics-modules/motor.png)](https://travis-ci.org/epics-modules/motor) + +**Note**: Current discussion on future of the *motor* module repository: https://github.com/epics-modules/motor/issues/55 + +For more information, see: +* [main page](https://epics-modules.github.io/motor) +* [motor wiki](https://github.com/epics-modules/motor/wiki) +* http://www.aps.anl.gov/bcda/synApps +* [HTML documentation](https://github.com/epics-modules/motor/blob/master/docs/README.md) + +[Report an issue with Motor](https://github.com/epics-modules/motor/issues/new?title=%20ISSUE%20NAME%20HERE&body=**Describe%20the%20issue**%0A%0A**Steps%20to%20reproduce**%0A1.%20Step%20one%0A2.%20Step%20two%0A3.%20Step%20three%0A%0A**Expected%20behaivour**%0A%0A**Actual%20behaviour**%0A%0A**Build%20Environment**%0AArchitecture:%0AEpics%20Base%20Version:%0ADependent%20Module%20Versions:&labels=bug) +[Request a feature](https://github.com/epics-modules/motor/issues/new?title=%20FEATURE%20SHORT%20DESCRIPTION&body=**Feature%20Long%20Description**%0A%0A**Why%20should%20this%20be%20added?**%0A&labels=enhancement) + +converted from APS SVN repository: Fri Oct 16 12:31:41 CDT 2015 diff --git a/configure/RELEASE b/configure/RELEASE index 6c1a60a..56f99a3 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -17,7 +17,7 @@ SUPPORT= # Recommended ASYN release: R4-23 ASYN=$(SUPPORT)/asyn/R4-23 -# Need the sequencer and the bust record for the MM4005 and XPS trajectory scanning +# Need the sequencer and the busy record for the MM4005 and XPS trajectory scanning # Recommended SNCSEQ release: R2.1.16 SNCSEQ=$(SUPPORT)/seq/seq-2-1-16 # Recommended BUSY release: R1-6 @@ -37,6 +37,9 @@ EPICS_BASE= # Recommended IPAC release: R2-12 IPAC=$(SUPPORT)/ipac/R2-12 +# Script module needed to build ScriptMotorController +#!LUA=$(SUPPORT)/lua + # The following is only needed for the motor examples in iocBoot. #!MOTOR=$(TOP) diff --git a/documentation/Doxyfile b/docs/Doxyfile similarity index 99% rename from documentation/Doxyfile rename to docs/Doxyfile index e3f527a..e0f8a64 100755 --- a/documentation/Doxyfile +++ b/docs/Doxyfile @@ -586,6 +586,10 @@ INPUT = ../../asyn/asyn/miscellaneous/asynPortDriver.cpp \ ../motorApp/NewportSrc/XPSController.h \ ../motorApp/NewportSrc/XPSController.cpp \ ../motorApp/NewportSrc/XPSAxis.h \ + ../motorApp/NewportSrc/AG_CONEX.cpp \ + ../motorApp/NewportSrc/AG_CONEX.h \ + ../motorApp/NewportSrc/AG_UC.cpp \ + ../motorApp/NewportSrc/AG_UC.h \ ../motorApp/NewportSrc/XPSAxis.cpp \ ../motorApp/MotorSimSrc/motorSimDriver.h \ ../motorApp/MotorSimSrc/motorSimDriver.cpp diff --git a/documentation/EnsemblePSOFly.txt b/docs/EnsemblePSOFly.txt similarity index 100% rename from documentation/EnsemblePSOFly.txt rename to docs/EnsemblePSOFly.txt diff --git a/documentation/Makefile b/docs/Makefile similarity index 100% rename from documentation/Makefile rename to docs/Makefile diff --git a/docs/Problems.html b/docs/Problems.html new file mode 100644 index 0000000..f4393c0 --- /dev/null +++ b/docs/Problems.html @@ -0,0 +1,1060 @@ + + + + + + Motor Module Known Problems + + + +

Motor Module: Known problems

+ +

Known problems with Release 6-10 and later

+ +See issues on github: https://github.com/epics-modules/motor/issues + +

Known problems with Release 6-9

+ + +

Known problems with Release 6-8

+ +
    +
  1. +

    + Soft-travel Limits +

    +

    +

      +
    • + Although there are a number of improvements with R6-8's support of soft-travel + limits (LVIO), there are also two problems that will remain "Known Problems". + These limitation are as follows: +
    • +
        +
      • + Tweaking (TWF/TWR) very small increments with UEIP = Yes while in the invalid + range of the soft-travel limits may put the motor record in a state where the + user cannot tweak in either direction. The solution is to either jog the motor + towards the valid range or increase the tweak increment value (TWV field). +
      • +
      • + Tapping the Jog button can cause the motor to move past the soft-travel limit + when backlash is nonzero. +
      • +
      +
    +

    +
  2. +
  3. +

    + Newport ESP100/300/301 +

    +

    + The R6.8 ESP support changes made to "Use MRES rather than controller resolution + to do EGUtoRAWbacktoEGU conversion." do not work. (Model 1 drivers do not always + have access to motor record data.) The most obvious problem with R6.8 ESP + support is the inability to "set" the controller's position. +

    +

    + This + patch file rolls back the R6.8 ESP changes and adds one bug fix to + the EPS100/300/301 driver; when a controller error occurs, the driver prints the + error code to the console and sets the RA_PROBLEM bit of the MSTA field. The + motor record patch unconditionally sends a "stop motor" command whenever a + driver sets the RA_PROBLEM bit. Finally, the patch file updates ESP info in the + README file. +

    +

    + R6-8-1 includes both the MRES related rollback and the STOP on RA_PROBLEM bug fix. +

    +
  4. +
+ +

Known problems with Release 6-7

+ +
    +
  1. +

    + Aerotech Ensemble +

    +

    +

      +
    • + Due to network broadcasting upgrades to Aerotech Ensemble Motion Composer, + starting with motor module R6-7-1, the EPICS Ensemble driver only supports + 4.01.002 Ensemble version firmware 4.01.002 and above. +
    • +
    • + The home search from EPICS command was been restored with R6-7-1. In order for + an EPICS home search command to work, the Aerotech Ensemble example program, HomeAsync.abx, + must be compiled and stored in the Ensemble. In addition, the Parameters>System>TaskExecutionSetup + parameter must be set to enable Auxiliary Task execution. +
    • +
    +

    +
  2. + +

    +

  3. +

    + Schneider Electric (formally IMS) MDrive +

    +

    + Joe Sullivan fixed several bugs in the Schneider Electric MDrive driver + associated with input buffer overflows that arose with newer MDrive firmware (e.g., + 3.003). These bug fixes were 1st released with motor module R6-7-1. +

    +
  4. +

    + +
+ +

Known problems with Release 6-5

+ +
    +
  1. +

    + Aerotech Ensemble +

    +

    +

      +
    • + With previous releases the Aerotech Ensemble asyn motor driver would crash the + IOC at boot-up if the Ensemble was not powered up and able to communicate. Fixed + with R6-5-1. +
    • +
    • + The EOT limit switch status was not available except via an Ensemble fault + condition. With release R6-5-1 the status of the EOT limit switches are always + available. +
    • +
    +

    +
  2. + +

    +

  3. +

    + OMS MAXv WatchDog Timeout Counter +

    +

    + Beginning with R6-5-1 and OMS MAXv firmware ver:1.33, the EPICS MAXv driver reads + the MAXv's Watchdog Timeout Counter at bootup, and with every motor status + update. If the Counter is nonzero, an error message is sent to both the errlog + task and the console. Since a watchdog timer trip indicates that the MAXv has + rebooted and no longer has valid motor positions, the driver disables the + controller. That specific controller is no longer available to EPICS until after + the VME crate has been power cycled. Other MAXv boards in the system are + unaffected by this scenario. +

    +

    + To better communicate this problem to the user, several medm displays have been + changed. Small displays (motorx_tiny.adl, motorx.adl) will show a yellow border + around their position readback values. Larger displays (motorx_more.adl, + motorx_all.adl) will display the message "Controller Error" in yellow. The + following error message at the console and/or in the errlog is definitive; +

    +

    +

    + ***MAXv card #(card#) Disabled*** Watchdog Timeout CTR =(count) +
    +

    +
  4. +

    + +
  5. +

    + spec upgrade required +

    +

    + The RES field was removed from the motor record with R6-5. Since earlier + versions of Certified Scientific Software's spec used the RES field, an upgrade + to spec version 5.8.06-6 or above is required for spec to work with motor record + R6-5 and above. The problem of using earlier versions of spec with motor record + R6-5 exhibits itself by spec setting the "responsive" parameter to zero and not + allowing any motor motion. +

    +
  6. + +
  7. +

    + VxWorks 6.x compiler error +

    +

    + The GNU preprocessor assertions in motor.h are deprecated with the VxWorks 6.x + compiler. Test for CPU macros that are compatible with VxWorks 6.x have been + added. This change prevents an "Error: unknown bit order!" compiler error with + VxWorks 6.x. This problem is fixed with R6-5-2 and above. Alternatively, you can + replace <motor>/motorApp/MotorSrc/motor.h with the following copy: motor.h +

    +
  8. + +
  9. +

    + Aerotech Ensemble Home Search +

    +

    + The EPICS Ensemble driver uses Aerotech's ASCII communication protocol. That + protocol blocks all communication on the ASCII comm. port during a home search. + Consequently, once a home search is started from EPICS, it is unable to stop it. + As a result, beginning with R6-5-2, the home search command has been commented + out of the EPICS driver until an Ensemble firmware update resolves this problem. +

    +
  10. + +
+ +

Known problems with Release 6-4

+ +
    +
  1. + R6-4 had 64-bit compile problems with the PI E816 and Aerotech Ensemble device + drivers. Fixed with R6-4-1 and above. +
  2. +

    +

  3. + Dirk Zimoch (PSI) discovered and fixed a bug in the orginial OMS MAXv driver (R5-4) + that caused the home switch status in the response string to be overwritten. + Fixed with R6-4-2 and above. +

    +

  4. +

    +

  5. + A problem was introduced in R6-4 of the old motor record device drive + architecture. If during the move of one or more motors the motor task did not + issue an OS delay during status updates, it could potentially not respond to any + further motor commands. Fixed with R6-4-2 and above. +
  6. +

    +

  7. + There is a bug in these motor record versions (R6-4, R6-4-1, R6-4-2) + that affects motors that have encoders and are configured to do closed-loop + control via retries (i.e. UEIP=Yes and RTRY != 0). Retries are not done + correctly and occasionally motors exceed their maximum retries and are left at + their backlash position; i.e., command position - backlash distance. See the + Release Notice for further error conditions. Fixed with R6-4-3 and above. +
  8. +

    +

  9. + The asynMotor device support in general, and the simulated motor, in particular, + had save/restore related problems. Fixed with R6-4-4 and above. +
  10. +

    +

  11. + Previous releases of the Aerotech Ensemble device driver had incorrect Jog + speeds, lacked support for a negative PosScaleFactor parameter and did not + detect maximum travel limit switch faults correctly. Fixed with R6-4-4 and above. +
  12. +

    +

+ +

Known problems with Release 6-3

+ +
    +
  1. + The OMS VME58 "stale data" problem is caused by the driver communicating via the + ASCII commands while the DPRAM was updating. The OMS VME58 driver was modified + with R6-3 to eliminate this contention and the "stale data delay" was set to + zero. Since then a problem with OMS VME58 2.24-8S version firmware and all 2.35 + firmware versions has arisen. When the user sets the motor record's position, + the previous target and readback positions are read from the controller on the + next update. +

    + With releases after R6-3 (e.g., R6-3-1 and R6-4) the driver searches all VME58 + board ID's for either 2.24-8S or any 2.35 version. If any board is found, the "stale + data delay" is set to a non-zero value. +

  2. +

    +

  3. + A problem was reported by Emma Shepherd (Diamond) with R6-3 if the "Use RDBL + Link" field (URIP) was set to "Yes". The NTM logic was sending stop commands + and issuing the "tdir=.." message to the console if the RDBL link was used. This + error was the result of changing the NTM logic as described in item #11 under R6-3 + modifications. +

    + With releases after R6-3 (e.g., R6-3-1 and R6-4), the NTM logic is restored to + using feedback rather than reference positions. In addition, with release R6-4 + and after, an "NTM deadband factor" field (NTMF) is added to allow the user to + set the NTM deadband; NTM deadband = NTMF * (|BDST| + RDBD) NTMF must be >= 2. + If properly configured, the NTM deadband prevents NTM logic from issuing a STOP + command at the end of a DC motor move that overshoots its' target position. +

  4. +

    +

  5. + The asyn motor device driver architecture does not support the motor record + GET_INFO command. Hence, operations that require a status update (i.e., setting + the position) were not working. This is fixed in R6-4. +
  6. +

    +

  7. + In the process of fixing the OMS VME58 "stale data" problem described above, + needless delays were added to the code that updated the VME58's DPRAM. These + needless delays can be calculated as follows; +

    + delay = (n-1) * (1/sysClkRate) +

    + where, n = # of VME58 boards in the IOC.
    + sysClkRate = 60 Hz, unless changed by a sysClkRateSet() from st.cmd. +

    + These delays are eliminated with R6-4-2 and above. +

  8. +

    +

+ +

Known problems with Release 6-2

+ + +
    +
  1. + Link errors occurred when building "XPSGatheringMain" for the solaris-sparc-gnu + target. Newport users should upgrade to R6-2-1. +
  2. +

    +

  3. + Errors occurred in various motorApp's when building for the solaris-sparc (SUNWspro) + target. SUNWspro users should upgrade to R6-2-1. +
  4. +

    +

  5. + Mark River's found and fixed a bug in the motor record. RDBD was being used in + motor record initialization before the RDBD validation check. This resulted in + motor positions not being initialized from save/restore at boot-up if RDBD was + not included in a save/restore save set. This is fixed in R6-2-2. +
  6. +

    +

  7. + A bug was introduced into the shell command motorUtilInit affecting these + versions of the motor distribution; R6-2, R6-2-1 and R6-2-2. This bug resulted + in the erroneous error message; "motorUtilInit: Prefix %c: has more than 53 + characters. Exiting". Replace <motor>/motorApp/MotorSrc/motorUtil.cc with + the following copy:  motorUtil.cc +
  8. +

    +

  9. + The "alldone" PV in motorUtil.db defaulted to the "moving" state between "iocInit + " and "motorUtilInit", giving the false indication that motors were moving + during boot-up. The "alldone" PV now defaults to the "done" state. Replace <motor>/motorApp/Db/motorUtil.db + with the following copy:  motorUtil.db +
  10. +

    +

+ +

Known problems with Release 6-1

+ +
    +
  1. + The Newport PM500 driver was not issuing the correct command when it queried for + the number of axes at boot up. This resulted in a "PM500 system error" message + on the 1st axis; fixed in R6-2. +
  2. +
  3. + A bug was introduced with R6-0; the OMS device support was overwriting PID + parameter fields during its' normalization calculation; fixed in R6-2. +
  4. +
  5. + There was a bug in the logic that determines the precedence between using the + controller's or save/restore's motor position at boot-up. Negative controller + positions were not handled correctly; fixed in R6-2 +
  6. +
  7. + The home request (HOMF/HOMR) were not cleared when a soft-limit violation + occurred; fixed in R6-2. +
  8. +
  9. + Due to releasing R6-1 during Newport development, R6-1 can result in linker + errors on the symbol "xpsgathering". Newport users should upgrade to R6-2. +
  10. +
+ +

Known problems with Release 6-0

+ +
    +
  1. + The R6-0-bugfix CVS repository branch has become corrupted. Hence, no further + changes will be made (i.e., bug fixes) to the R6-0 branch. +
  2. +
  3. + A bug was introduced with this release. The OMS device support overwrites PID + parameter fields during its' normalization calculation. This is fixed in R6-2. +
  4. +
+ +

Known problems with Release 5-9

+ +
    +
  1. + An undocumented change was made in R5-4 to two OMS setup functions. Namely, the + unused 2nd argument ("axes per card") was eliminated from omsSetup() and + oms58Setup(). +
  2. + +
  3. + Since R4-5 the motor record has required that RDBD be >= MRES. The test for + this condition was done using floating point values. This caused an occasional + error that resulted in the record not always issuing a motor move command when + RDBD = MRES and the user issued an incremental move request equal to MRES. This + is fixed with R5-9-1 and R6-0. +
  4. + +
  5. + A warning message was added with R5-6 when a user attempted to move an OMS motor + with an invalid velocity (slew <= base). Applications that manipulate the + velocity values are unaware of this restriction and create a torrent of + these messages. With release R5-9-1 and R6-0 the OMS device driver will + only output this warning message once. +
  6. + +
  7. + Added a work around for OMS PC68/78 firmware error. PC68/78 controllers make an + erroneous response after they are queried with the "?KP" command at boot-up. + This resulted in 1st axis having same position (RP command) as last the axis. + This is fixed with R5-9-1 and R6-0. +
  8. + +
  9. + GPIB under ASYN allows only one input EOS character; no output EOS is allowed. + Adjustments were made to the Newport ESP300 driver to accomodate this + restriction with R5-9-1 and R6-0. +
  10. + +
  11. + The CVS repository has become out of synch with the R5-9-1 tar file (motorR5-9-1.tar.gz). + Hence, no further changes will be made (i.e., bug fixes) to the R5-9 branch. +
  12. +
+ +

Known problems with Release 5-8

+ +

Known problems with Release 5-7

+ +

Known problems with Release 5-6

+ +

Known problems with Release 5-5

+ +

Known problems with Release 5-4

+ +
    +
  1. + An undocumented change was made to two OMS setup functions. Namely, the unused + 2nd argument ("axes per card") was eliminated from omsSetup() and oms58Setup() + in R5-4. +
  2. +
+ +

Known problems with Release 5-3

+ +
    +
  1. + "sorry, not implemented: `tree_list' not supported by dump_type" error when + compiling drvOms.cc and drvOms58.cc under Tornado 2.2. The Tornado 2.2 compiler + (i.e., 2.96) creates errors in devLib.h. The root cause of this "bug" is a + problem with the gcc-2.96 compiler bundled with Tornado 2.2. Unfortunately, to + date, Wind River is only helping with workarounds; not fixing the compiler. Hence, + the following patches are required. +
  2. + +
+ +

Known problems with Release 5-2

+ +
    +
  1. + "sorry, not implemented: `tree_list' not supported by dump_type" error when + compiling drvOms.cc and drvOms58.cc under Tornado 2.2. The Tornado 2.2 compiler + (i.e., 2.96) creates errors in devLib.h. The root cause of this "bug" is a + problem with the gcc-2.96 compiler bundled with Tornado 2.2. Unfortunately, to + date, Wind River is only helping with workarounds; not fixing the compiler. Hence, + the following patches are required. +
  2. + +
+ +

Known problems with Release 4-9

+ +
    +
  1. + PID parameters (i.e., PCOF, ICOF and DCOF fields) were not initialized at boot-up. + With R4.9.1, if the GAIN_SUPPORT bit in the MSTA is true, each nonzero, + PID parameter will be initialized. For backwards compatibility, zero valued PID + parameters will not be initialized. +
  2. + +
  3. + Previous releases of the IMS MDrive device driver did not work. Thanks to Kevin + M. Peterson (UNI-CAT) for identifying and fixing the errors in previous releases. +
  4. + + +
  5. + Two bugs were found and fixed with the Newport MM3000 device support. First, + the enable/disable torque control field (CNEN) was not working. Second, an + error was introduced into the Newport MM3000 device driver with R4-8; the driver + was confusing valid responses with the "system error" response from the + controller +
  6. + + +
  7. + A retry on initial communication with the Physik Instrumente (PI) C-844 motor + controller was added. The controller was intermittently not responding after an + IOC power-cycle. +
  8. + + +
  9. + Modifications were made to the motor record in order to allow a user to + configure it for periodic status updates using the SCAN field. +
  10. + + +
  11. + The motor record would get into an invalid state when it attempted to perform a + backlash correction move in the direction of an activated limit switch. +
  12. + + +
  13. + Bug fix for home request re-activating after a limit switch error is cleared. + This release clears the homing and jog request after a LS or travel limit error. + Updated the motorx_all.adl MEDM screen (V2.5) to show the state of the jog + request. +
  14. + + +
  15. + A bug was reported by David Maden (PSI) that occurred when a motor was jogged + into a limit switch with the DIR field set to "Neg". Under these conditions, the + motor record was not processing the limit error condition correctly. This + resulted in the motor record not setting either of the limit error indicator + fields (HLS/LLS) and becoming stuck in the "Moving" state. +
  16. + + +
  17. + Kevin Peterson (UNI-CAT) and I diagnosed a bug that is in all R3.13 versions of + the motor record distribution. The bug is in the interface between motor record + GPIB capable drivers (i.e., Newport MM4000/5/6, MM3000, PM500, ESP300/100) and + the EPICS base GPIB driver; drvGpib.
    + Dynamic memory is allocated and shared with drvGpib by the motor task. The + problem arises here, at the end of ibLinkTask in drvGpib.c;
    + + plink->deviceStatus[pnode->device] = (*(pnode->workStart))(pnode);
    + + pnode->workStart is a pointer to gpibIOCallback() in gpibIO.c. When + gpibIOCallback() is done processing it "gives" a semaphore that is "taken" by + either gpibIOSend() and gpibIORecv(). Both gpibIOSend() and gpibIORecv() + immediately free the shared memory.
    + + This works almost all the time; but occasionally the memory is taken by some + other task and trashed before the line above is executed resulting in a bus + error on "pnode->device".
    + + As a quick fix, the task priorities of the all GPIB capable controllers has been + lowered below ibLinkTasks priority. This allows ibLinkTask to finish processing + and be waiting for the next GPIB request before the shared memory is de-allocated. +
    + + All users of the R3.13.x version of the motor record distribution that use GPIB + to communicate to Newport controllers (i.e., Newport MM4000/5/6, MM3000, PM500, + ESP300/100), should upgrade to the R4-9-6 release. +
  18. + +
+ +

Known problems with Release 4-8

+ +
    +
  1. + Previous releases of the IMS MDrive device driver did not work. Thanks to Kevin + M. Peterson (UNI-CAT) for identifying and fixing the errors in previous releases. +
  2. + +
  3. + Users of the status update field (STUP) should use a later release. +
  4. + +
  5. + Two bugs were found and fixed with the Newport MM3000 device support. First, + the enable/disable torque control field (CNEN) was not working. Second, an + error was introduced into the Newport MM3000 device driver with R4-8; the driver + was confusing valid responses with the "system error" response from the + controller +
  6. + +
+ +

Known problems with Release 4-7

+ +
    +
  1. + With release R4-5, DBE_LOG was omitted from the event select mask of all + db_post_events() calls.  This prevented archival clients from being + notified of process variable changes. +
  2. + +
  3. + Communication with the Newport MM3000 motor controller was getting out of + synchronization whenever the MM3000 responded with an error message. This + problem was resolved by having recv_mess() in drvMM3000.c detect an error + message response, print the error message and then, recursively, call itself. + This restored communication transmit/receive synchronization. +
  4. + +
  5. + With release R4-7, there was a slight (undocumented) modification made to the + way that backlash correction functioned. If a move is in the preferred direction + and the backlash speed and acceleration are the same as the slew speed and + acceleration, then the backlash move is skipped and the motor moves directly to + the target position. Unfortunately, there was a bug in the logic that appeared + only when MRES< 0. When MRES < 0, and the backlash speed and acceleration were + the same as the slew speed and acceleration, the motor record did the opposite + of the requirements; i.e., it did backlash correction when the move was in the + preferred direction and did not do backlash correction when the move was not in + the preferred direction. +
  6. + +
  7. + The Newport ESP300 would randomly crash at boot-up because an internal parameter + ("drive_resolution") was not always, under all configurations, initialized. With + this release, the "drive_resolution" is set based on the response to the ESP300 + "SU?" command. In addition, the user is required to set MRES to the resolution + of the controller as explained in the new document /motorApp/NewportSrc/README. +
  8. + +
  9. + A bug was introduced in R4-6 while fixing another bug; see item#2 under + Modification Log from R4-5 to R4-6 in the distribution README file. This error + exhibited itself only under the following conditions; BDST != 0, DLY != 0 and a + new target position is issued before the backlash correction move. Under these + conditions the motor record became unresponsive; i.e., it locked up. +
  10. + +
  11. + Although there is no explicit statement in the motor record documentation, most + user's would expect the "Readback settle time" field (DLY) to update the + readback after the delay timeout. It did not do this. With this release, the + readback is updated one time after the timeout. +
  12. + +
  13. + There were problems with the tweak function (TWF/TWR) when the TWV was set to + less than MRES. Under this condition, the following scenario would result. First, + tweak forward (TWF). Since DIFF < MRES, the motor is not moved. Next, tweak + reverse (TWR). Next TWF again. The motor record does not respond; i.e., DVAL + and RVAL are not updated; VAL is not posted. A single tweak, back and forth, + confirms that the motor record is not responding. +
  14. + +
  15. + The motor record would lock-up when a user tried to move off an activated limit + switch with the OMS VME58 servo motor controller board (i.e., model -8S). See "Known + Problems" item #4 in the motor record's distribution README file. +
  16. + +
+ +

Known problems with Release 4-6

+ +
    +
  1. + An uninitialized pointer error check was omitted from ESP300_init_record() in + the devESP300.c file.  This resulted in a bus error at boot-up if there was + a failure to connect to the controller.  Choose one of the following + methods to applying the bug fix: +
  2. + +
  3. + With release 4-5, DBE_LOG was omitted from the event select mask of all + db_post_events() calls.  This prevented archival clients from being + notified of process variable changes. +
  4. + +
  5. + Communication with the Newport MM3000 motor controller was getting out of + synchronization whenever the MM3000 responded with an error message. This + problem was resolved by having recv_mess() in drvMM3000.c detect an error + message response, print the error message and then, recursively, call itself. + This restored communication transmit/receive synchronization. +
  6. + +
  7. + The Newport ESP300 would randomly crash at boot-up because an internal parameter + ("drive_resolution") was not always, under all configurations, initialized. With + this release, the "drive_resolution" is set based on the response to the ESP300 + "SU?" command. In addition, the user is required to set MRES to the resolution + of the controller as explained in the new document /motorApp/NewportSrc/README. +
  8. + +
  9. + A bug was introduced in R4-5-1 while fixing another bug; see item#2 under + Modification Log from R4-5 to R4-5-1 in the distribution README file. This error + exhibited itself only under the following conditions; BDST != 0, DLY != 0 and a + new target position is issued before the backlash correction move. Under these + conditions the motor record became unresponsive; i.e., it locked up. +
  10. + +
  11. + Although there is no explicit statement in the motor record documentation, most + user's would expect the "Readback settle time" field (DLY) to update the + readback after the delay timeout. It did not do this. With this release, the + readback is updated one time after the timeout. +
  12. + +
+ +

Known problems with Release 4-5

+ +
    +
  1. + Soft Channel Device Support - see Release + Notice. +
  2. + +
  3. + Backlash Correction Bug Fixes - see Release + Notice. +
  4. + +
  5. + With release 4-5, DBE_LOG was omitted from the event select mask of all + db_post_events() calls.  This prevented archival clients from being + notified of process variable changes. +
  6. + + +
  7. + Communication with the Newport MM3000 motor controller was getting out of + synchronization whenever the MM3000 responded with an error message. This + problem was resolved by having recv_mess() in drvMM3000.c detect an error + message response, print the error message and then, recursively, call itself. + This restored communication transmit/receive synchronization. +
  8. + +
  9. + The Newport ESP300 would randomly crash at boot-up because an internal parameter + ("drive_resolution") was not always, under all configurations, initialized. With + this release, the "drive_resolution" is set based on the response to the ESP300 + "SU?" command. In addition, the user is required to set MRES to the resolution + of the controller as explained in the new document /motorApp/NewportSrc/README. +
  10. + +
  11. + A bug was introduced in R4-5-1 while fixing another bug; see item#2 under + Modification Log from R4-5 to R4-5-1 in the distribution README file. This error + exhibited itself only under the following conditions; BDST != 0, DLY != 0 and a + new target position is issued before the backlash correction move. Under these + conditions the motor record became unresponsive; i.e., it locked up. +
  12. + +
  13. + Although there is no explicit statement in the motor record documentation, most + user's would expect the "Readback settle time" field (DLY) to update the + readback after the delay timeout. It did not do this. With this release, the + readback is updated one time after the timeout. +
  14. + + +
  15. + An error occurred when the SET/USE field was in the SET mode and the FOFF field + was in the FROZEN mode. Under these conditions, if the user entered a new RVAL, + the record ignored every other new RVAL; with every other new DVAL that the user + entered, RVAL was not updated. VAL always worked. +
  16. + +
+ +

Known problems with Release 4-4

+ +
    +
  1. The "Driver Power Monitoring" feature (available only for OMS VME58 + controllers)  was erroneously and randomly being enabled.  Choose + one of the following methods to applying the bug fix:
  2. + + +
  3.  Code around "safeDoubleToFloat conversion bug" in EPICS R3.13.5.  + A bug was introduced into R3.13.5 with the "dbConvert and dbFastLinkConv" + fix (see EPICS base Release Notes for R3.13.5) that resulted in the inability + to set PV fields defined as DBF_FLOAT's to zero.  One of the scenarios + where this has caused a problem is when a user tries to disable software + travel limits by setting DHLM = DLLM = 0.  Choose the following methods + to applying the bug fix:
  4. + + +
  5. The makeConfigAppInclude.pl perl script distibuted with R4-4 and + R4-4-1 does not support spaces between the macro and the "=" sign in the + config/RELEASE file.
  6. + + +
  7. The following scenario would put the motor record into an invalid state. + A new target position (i.e., VAL/DVAL/RVAL) is written to the motor +record under the following conditions,
    +
      +
    • motion is in progress (i.e., DMOV is false).
    • +
    +
      +
    • the new target position is different from the actual position by +less than the retry deadband (|DIFF| < RDBD).
    • +
    +
      +
    • backlash correction is enabled (i.e., BDST is non-zero) and the +new move is NOT in the "preferred direction" (preferred direction is the +direction in which the motor moves during the backlash-takeout part of a +motor move).
    • +
    +Install motor record version 4-4-2 or above to fix this problem.
    +
  8. +
+ +

Known problems with Release 4-3

+ +
    +
  1. +The "Driver Power Monitoring" feature (available only for OMS VME58 controllers)  +was erroneously and randomly being enabled.  Choose one of the following +methods to applying the bug fix:
  2. + + + +
  3. +Under certain conditions target positions entered through RVAL were ignored.  +If the difference between the current and the next target position (i.e., +RDIF, DIFF) was less than the retry deadband (RDBD), and the next target +position was in the "preferred direction", then the new RVAL was ignored.  +Motor record version R4-3-2 includes the fix for this bug.
  4. + +
+ +

Known problems with Release 3-5

+ +
    +
  1. Under certain conditions target positions entered through RVAL were +ignored.  If the difference between the current and the next target +position (i.e., RDIF, DIFF) was less than the retry deadband (RDBD), and +the next target position was in the "preferred direction", then the new RVAL +was ignored.
  2. +
+ + +
+ + + diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..12d11f9 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,8 @@ +# HTML documentation + +* [index.html](https://epics-modules.github.io/motor) (formerly motor.html) +* [motorDeviceDriver.html](https://epics-modules.github.io/motor/motorDeviceDriver.html) +* [motorRecord.html](https://epics-modules.github.io/motor/motorRecord.html) +* [motor_files.html](https://epics-modules.github.io/motor/motor_files.html) +* [motor_release.html](https://epics-modules.github.io/motor/motor_release.html) +* [trajectoryScan.html](https://epics-modules.github.io/motor/trajectoryScan.html) diff --git a/docs/epics_logo.gif b/docs/epics_logo.gif new file mode 100644 index 0000000..26ed21a Binary files /dev/null and b/docs/epics_logo.gif differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..2c436c6 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,618 @@ + + + + + + + + EPICS: Motor Record + + +EPICS +

EPICS: Motor Record and Device/Driver support.

+ +
+
Module Owners: Kevin Peterson
+
+ +

+
+This is the home page for both the motor record and various motor controllers +supported by motor record device/drivers. +

+

+GitHub repository: https://github.com/epics-modules/motor +

+

+Please email any comments to Kevin Peterson who +is responsible for coordinating development and releases. Bug reports can be created on +github. +

+ +

Where to Find it

You can download the software using +the links in the table below:
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Module VersionEPICS Release - RangeFilenameDocumentationRelease NoticeKnown ProblemsRelease Date
LatestR3.15.5-3.14.12.5master.zipmotorRecord.htmlmotor_release.htmlProblemsn/a
R6-11R3.15.5-3.14.12.5motorR6-11.tar.gzmotorRecord.htmlmotor_release.htmlProblems12/12/2018
R6-10R3.15.5-3.14.12.5motorR6-10-1.tar.gzmotorRecord.htmlmotor_release.htmlProblems11/30/2017
R6-9R3.15.1-3.14.12.3motorR6-9.tar.gzmotorRecord.htmlmotor_release.htmlProblems01/07/2015
R6-8R3.14.12.3motorR6-8-1.tar.gzmotorRecord.htmlmotor_release.htmlProblems06/16/2014
R6-7R3.14.12.2motorR6-7-1.tar.gzmotorRecord.htmlmotor_release.htmlProblems03/06/2012
R6-5R3.14.10-11motorR6-5-2.tar.gzmotorRecord.htmlmotor_release.htmlProblems10/14/2010
R6-4R3.14.8.2-10motorR6-4-4.tar.gzmotorRecord.htmlmotor_release.htmlProblems06/22/2009
R6-3R3.14.8.2-10motorR6-3-1.tar.gzmotorRecord.htmlmotor_release.htmlProblems12/10/2008
R6-2R3.14.8.2-9motorR6-2-2.tar.gzmotorRecord.htmlmotor_release.htmlProblems04/04/2007
R6-1R3.14.8.2motorR6-1.tar.gzmotorRecord.htmlmotor_release.htmlProblems12/18/2006
R6-0R3.14.8.2motorR6-0.tar.gzmotorRecord.htmlmotor_release.htmlProblems09/22/2006
R5-9R3.14.8.2motorR5-9-1.tar.gzmotorRecord.htmlmotor_release.htmlProblems08/21/2006
R5-8R3.14.7-8.2motorR5-8.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R5-7R3.14.7motorR5-7.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R5-6R3.14.7motorR5-6.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R5-5R3.14.6 - 7motorR5-5.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R5-4R3.14.6motorR5-4.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R5-3R3.14.5motorR5-3.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R5-2R3.14.4motor5-2.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R4-9R3.13.5 - 10motorR4-9-6.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R4-8R3.13.5 - 9motorR4-8-1.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R4-7R3.13.2 - 9motor4-7-4.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R4-6R3.13.2 - 9motor4-6-4.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R4-5R3.13.2 - 9motorR4-5-4.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R4-4R3.13.4 - 5motor4-4-2.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R4-3R3.13.4 - 5motor4-3-2.tar.gzmotorRecord.htmlmotor_release.htmlProblems
R4-1R3.13.2motor4-1.tar.gzmotorRecord.htmlmotor_release.html
R3-5R3.13.1.1 - 2motor_V3.5.tar.gzmotorRecord.htmlmotor_V3.5.htmlProblems
+ +

Required Modules

  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Motor Version Required modulesRelease needed
R6-10ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-25
+ R2-13
R6-9ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-25
+ R2-13
R6-8ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-21
+ R2-12
R6-7ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-18
+ R2-11
R6-5ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-13-1
+ R2-10
R6-4ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-10
+ R2-9
R6-3ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-9
+ R2-9
R6-2ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-7
+ R2-8
R6-1ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-6
+ R2-8
R6-0ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-6
+ R2-8
R5-9-1ASYN  
+ IPAC  (for serial + or GPIB communication only)
R4-6
+ R2-8
R5-8ASYN   (for + serial or GPIB communication only)
+ IPAC  (for serial + communication only)
R4-4
+ R2-8
R5-7ASYN   (for + serial or GPIB communication only)
+ IPAC  (for serial + communication only)
R4-3
+ R2-8
R5-6ASYN   (for + serial or GPIB communication only)
+ IPAC  (for serial + communication only)
R4-2
+ R2-8
R5-5ASYN   (for + serial or GPIB communication only)
+ IPAC  (for serial + communication only)
R4-1
+ R2-8
R5-4ASYN   (for + serial or GPIB communication only)
+ IPAC  (for serial + communication only)
R3-3
+ R2-7a
R5-3MPF   (for + serial communication only; no GPIB support)
+ IPAC  (for serial + communication only)
R2-4-2
+ R2-7a
R5-2MPF   (for + serial communication only; no GPIB support)
+
R2-4
+
R4-9MPF  + (for serial or GPIB communication only)
+ mpfGpib + (for GPIB communication only; runtime requirement only)
+ mpfSerial + (for serial communication only)
R1-10
+ R1-5
+ R1-5
R4-8MPF  + (for serial or GPIB communication only)
+ mpfGpib + (for GPIB communication only; runtime requirement only)
+ mpfSerial + (for serial communication only)
R1-10
+ R1-4
+ R1-4
R4-7MPF +   (for serial or GPIB communication only)
+ + mpfGpib + (for GPIB communication only; runtime requirement only)
+ + mpfSerial + (for serial communication only)
R1-10
+ + R1-4
+ + R1-4
R4-6Same as R4-5
R4-5
+
MPF +   (for serial or GPIB communication only)
+ mpfGpib + (for GPIB communication only; runtime requirement only)
+ mpfSerial + (for serial communication only)
+
R1-8
+ R1-4
+ R1-3
+
R4-4MPF +   (for serial or GPIB communication only)
+ mpfGpib + (for GPIB communication only; runtime requirement only)
+ mpfSerial + (for serial communication only)
R1-6
+ R1-3
+ R1-2
R4-3MPF +   (for serial or GPIB communication only)
+ mpfGpib + (for GPIB communication only; runtime requirement only)
+ mpfSerial + (for serial communication only)
R1-6
+ R1-3
+ R1-2
R4-1MPF +   (for serial or GPIB communication only)
+ mpfGpib + (for GPIB communication only; runtime requirement only)
+ mpfSerial + (for serial communication only) + +
+ OR +
+ HIDEOS (for + serial or GPIB communication only)
R1-5
+ R1-3
+ R1-1 +

+ Latest? +

+
+ +

Installation and Building

After obtaining a copy of the distribution, +it must be installed and built for use at your site. These steps only need to +be performed once per site (unless versions of the module running under +different releases of EPICS and/or the other required modules are needed). +
    +
  1. + Create an installation directory for the module, usually this will end with +
  2. + +
    .../support/motor/
    +
  3. + Place the distribution file in this directory. Then issue the commands (Unix + style) +
  4. + +
    gunzip motor<rel>.tar.gz
    tar xvf motor<rel>.tar
    + where <rel> is the release. For example. + +
    motor4-1.tar.gz
    +
  5. + This creates a <top> application. +
  6. + +
    .../support/motor/motor<rel>
    +
  7. + Edit the config/RELEASE file and set the paths to your installation of + EPICS base (i.e., define SUPPORT and EPICS_BASE). +
  8. +
  9. + Edit  .../support/motor/motor<rel>/motorApp/Makefile.  Define + which device/driver modules to build. +
  10. +
  11. + Run gnumake in the top level directory and check for any compilation + errors. +
  12. + +
+ +

Documentation

The following documentation is available: + + +
+
+Page Last Modified: 05/01/2018
+Kevin Peterson
+
+
+
+ + diff --git a/documentation/motorDeviceDriver.html b/docs/motorDeviceDriver.html similarity index 64% rename from documentation/motorDeviceDriver.html rename to docs/motorDeviceDriver.html index 0205b9a..2a4ada6 100644 --- a/documentation/motorDeviceDriver.html +++ b/docs/motorDeviceDriver.html @@ -206,176 +206,6 @@

The asynMotorAxis base class defines the following methods:

-

- This driver inherits from ADDriver. - It implements many of the parameters in - asynNDArrayDriver.h and in - ADArrayDriver.h. It also implements a number of parameters that are specific - to the mar345 detector. The mar345 - class documentation describes this class in detail.

-

- Implementation of standard driver parameters

-

- The following table describes how the mar345 driver implements some of the standard - driver parameters. -

- - - - - - - - - - - - - - - - -
- Implementation of Parameters in asynNDArrayDriver.h and ADDriver.h, and EPICS Record - Definitions in ADBase.template and NDFile.template
- Parameter index variable - EPICS record name - Description
- ADAcquire - $(P)$(R)Acquire - Setting this to 1 starts an acquisition sequence. If ADNumImages is greater than - 1 then it acquires multiple frames. For each frame it does the following: -
    -
  1. Erases the detector if mar345EraseMode is "Before expose".
  2. -
  3. Opens the shutter if either the mar345 shutter or EPICS shutter controls are enabled.
  4. -
  5. Waits for the desired exposure time.
  6. -
  7. Closes the shutter if either the mar345 shutter or EPICS shutter controls are - enabled.
  8. -
  9. Scans the detector and saves the file.
  10. -
  11. Erases the detector if mar345EraseMode is "After scan".
  12. -
- If ADAcquire is set to 0 during exposure (step 3 above) then it proceeds immediately - to step 4, finishes collecting the current frame and stops the acquisition sequence - if ADNumImages is greater than 1. If mar345Abort is set to 0 then the acquisition - is terminated as soon as possible without saving the data. Note however that commands - to the mar345 server to erase, change mode, or scan cannot be aborted, so the driver - must wait for these commands to complete.
-

- It is useful to use NDPluginROI to define an ROI containing the entire mar345 detector. - The MaxValue_RBV PV in this ROI can be monitored to make sure that the 16-bit limit - of 65,535 is not being approached in any pixel. -

-

- mar345 specific parameters

-

- The mar345 driver implements the following parameters in addition to those in asynNDArrayDriver.h - and ADDriver.h. Note that to reduce the width of this table the parameter index - variable names have been split into 2 lines, but these are just a single name, for - example mar345ScanSize. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Parameter Definitions in mar345.cpp and EPICS Record Definitions in mar345.template -
- Parameter index variable - asyn interface - Access - Description - drvInfo string - EPICS record name - EPICS record type
- Readout parameters
- mar345
- ScanSize
- asynInt32 - r/w - The detector diameter to read out. Choices are 180mm, 240mm, 300mm, and 345mm. - - MAR_SIZE - $(P)$(R)ScanSize
- $(P)$(R)ScanSize_RBV
- mbbo -
- mbbi
- mar345
- ScanResolution
- asynInt32 - r/w - The pixel size to use when reading the detector out. Choices are 0.10 and 0.15mm. - - MAR_RESOLUTION - $(P)$(R)ScanResolution
- $(P)$(R)ScanResolution_RBV
- mbbo -
- mbbi
-

- Configuration

-

- The mar345 driver is created with the mar345Config command, either from C/C++ or - from the EPICS IOC shell.

-
int mar345Config(const char *portName, const char *serverPort,
-                 int maxBuffers, size_t maxMemory,
-                 int priority, int stackSize)
-  
-

- For details on the meaning of the parameters to this function refer to the detailed - documentation on the mar345Config function in the - mar345.cpp documentation and in the documentation for the constructor for - the mar345 class. -

-

- There an example IOC boot directory and startup script (iocBoot/iocMAR345/st.cmd) - provided with areaDetector. -

-

- MEDM screens

-

- The following show the MEDM screens that are used to control the mar345 detector. - Note that the general purpose screen ADBase.adl can be used, but it exposes many - controls that are not applicable to the mar345, and lacks some fields that are important - for the mar345.

-

- mar345.adl is the main screen used to control the mar345 driver. -

-
-

- mar345.adl

- mar345.png
+

NOTE: This documentation file is incomplete. It needs to be completed.

diff --git a/documentation/motorRecord.html b/docs/motorRecord.html similarity index 98% rename from documentation/motorRecord.html rename to docs/motorRecord.html index 3cbb568..6b2a716 100644 --- a/documentation/motorRecord.html +++ b/docs/motorRecord.html @@ -35,11 +35,11 @@

Contents

-

Overview

This documentation describes version R6-9 of the EPICS motor +

Overview

This documentation describes version R6-11 of the EPICS motor record, and related EPICS software required to build and use it.  Version -R6-9 of the motor record is compatible with EPICS base R3.14.12.2 and above. +R6-11 of the motor record is compatible with EPICS base R3.14.12.2 and above.

-The motor record is intended to support motors of all kinds, but currently +The motor record is intended to support positioning motors of all kinds, but currently supports only the following variety of motor controllers (in addition to Soft Channel support):

@@ -61,7 +61,7 @@

Overview

This documentation describes version R6-9 of the EPICS motor Mclennan models PM304 and PM600.
  • - Physik Instrumente (PI) GmbH & Co. models; C-630/844/848/862/863, E-662/710/816, micos SMC hydra and all GCS2 (General Command Set) compatible controllers. + Physik Instrumente (PI) GmbH & Co. models; C-630/662/663/844/848/862/863, E-516/517/710/816, micos SMC hydra and all GCS2 (General Command Set) compatible controllers.
  • MicroMo model MVP 2001 B02. @@ -76,7 +76,7 @@

    Overview

    This documentation describes version R6-9 of the EPICS motor Parker Hannifin, Compumotor Division, 6K Series controllers.
  • - New Focus, models; 8750 and 8752. + New Focus, models; 8750, 8752, & 874x.
  • ACS Motion Control, SPiiPlus model. @@ -117,6 +117,9 @@

    Overview

    This documentation describes version R6-9 of the EPICS motor
  • Phytron I1AM01 Stepper Motor Controller.
  • +
  • + AMCI ANG1 Stepper Motor Controller/Driver, ANF1E/ANF1/ANF2E/ANF2 Stepper Motor Controllers. +
  • The record maintains two coordinate systems for motor position ("user" and "dial " coordinates); displays drive and readback values; enforces limits to motor @@ -301,8 +304,7 @@

    Field Descriptions

    In addition to fields common to all record types (se R Raw commanded direction SHORT -
    - + (1:"Pos", 0:"Neg")
    CNEN @@ -531,6 +533,14 @@

    Field Descriptions

    In addition to fields common to all record types (se
    + + IGSET + R/W + Ignore SET Field + SHORT + (0:Normal operation, 1: SET is ignored)
    + + INIT R/W @@ -857,6 +867,14 @@

    Field Descriptions

    In addition to fields common to all record types (se
    + + SPDB + R/W + Set Point Deadband (EGU) + DOUBLE +
    + + RDBL R @@ -1334,6 +1352,14 @@

    Field Descriptions

    In addition to fields common to all record types (se SHORT Set Set/Use switch to "Use". + + IGSET + R/W + Ignore SET Field + SHORT + (0:Normal operation, 1: SET is ignored)
    + + SET is a toggle switch used in calibrating the motor's user and dial positions:  @@ -1354,6 +1380,16 @@

    Field Descriptions

    In addition to fields common to all record types (se LLM). When the offset is frozen (FOFF=1), writes to any drive field affect both user and dial values, and also load the hardware position register.

    + +

    + When IGSET = 0, the motor record will obey the SET field and behave as described above. +

    + +

    + When IGSET = 1, the motor record will behave as though SET = 0. Ignoring the SET + field can useful for applications with soft motors (motors with soft-channel device + support). +

    @@ -1802,6 +1838,16 @@

    Field Descriptions

    In addition to fields common to all record types (se performed (see RTRY).  + SPDB + R/W + Set Point Deadband (EGU) + DOUBLE + Before the motor is commanded a move, a check is done if the move is to small. + It is to small when the distance is less the the step size defined in MRES. + When a bigger deadband is wanted than MRES, set the value into SPDB. + + + RTRY R/W Max retry count @@ -3124,8 +3170,8 @@

    Alarm fields

    R Raw commanded direction
    - SHORT
    - + SHORT
    + (1:"Pos", 0:"Neg")
    PP @@ -3889,8 +3935,7 @@

    Design Decisions

    This section of the document is an attempt to record
    Suggestions and comments to:

    -Ron Sluiter : (sluiter@aps.anl.gov)
    Kevin Peterson : (kmpeters@anl.gov)
    -Last modified: January 7, 2015 +Last modified: May 1, 2018 diff --git a/documentation/motor_files.html b/docs/motor_files.html similarity index 100% rename from documentation/motor_files.html rename to docs/motor_files.html diff --git a/documentation/motor_notes.txt b/docs/motor_notes.txt similarity index 99% rename from documentation/motor_notes.txt rename to docs/motor_notes.txt index b7fe93a..7b4f692 100644 --- a/documentation/motor_notes.txt +++ b/docs/motor_notes.txt @@ -83,7 +83,7 @@ OFF User Offset (EGU). User and dial coordinates can differ by a sign the FOFF field is "Variable". OFF = VAL - (DVAL * DIR) ENDIF - special(): IF new DIR + special(): IF new DIR, AND, FOFF is "Variable" OFF = VAL - (DVAL * DIR) ENDIF load_pos(): IF FOFF field is "Variable". diff --git a/documentation/motor_release.html b/docs/motor_release.html similarity index 92% rename from documentation/motor_release.html rename to docs/motor_release.html index d23bcf1..bf856b3 100644 --- a/documentation/motor_release.html +++ b/docs/motor_release.html @@ -2,15 +2,195 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + - EPICS Motor Record Release R6-8 Notice - + EPICS Motor Record Release R6-10 Notice +
    +

    + Motor Record Version 6-11 Release Notice

    +
    + +
    +

    + See release notes on github: https://github.com/epics-modules/motor/releases/tag/R6-11 +

    +
    + +
    +

    + Motor Record Version 6-10-1 Release Notice

    +
    + +
    +

    + See release notes on github: https://github.com/epics-modules/motor/releases/tag/R6-10-1 +

    +
    + +
    +

    + Motor Record Version 6-10 Release Notice

    +
    + +
    +

    + Modifications to Existing Features

    +
    + +
    +

    + OMS support +

    +

    + Ron Sluiter added a check for an invalid MAXv interrupt level (IRQ=1) + (1196bbe4df5968ae4ac05c142a9f4be93827d06e) +

    +

    + Ron Sluiter added a check for a new MAXv failure mode where the board reboots after the 1st command with response + (e604c9588a087228dc6c0333818e00113df841ea) +

    +

    + Ron Sluiter added an optional test for VME58 failure mode where the board reboots after the 1st motion related command + (4f54eb502bb1e4157db9a0587cfdbabd66de0c95) +

    +
    + +
    +

    + Aerotech A3200 support +

    +

    + Ron Sluiter Removed the "Task number" argument from A3200AsynConfig and switched to using Task #2 for the ASCII Interface + (a52ec2f62ff34b30597bccc7de9d70b4d2ed7f86) +

    +
    + +
    +

    + Newport support +

    +

    + Mark Rivers modified the ESP300 driver so that it correctly determines the resolution when open-loop steppers are used + (5245991323fb8c73cd6383e064da7b02c2629fea) +

    +

    + Mark Rivers changed the XPS PositionCompare API + (44351c99d92837cbb283b21877a87ecc821875e0) and made numerous improvements to the PositionCompare functionality. +

    +
    + +
    +

    + Motor Record improvments +

    +

    + jmdewart & Ken Lauer changed the acceleration calculation so that VBAS is ignored when VELO==VBAS + (4b89359e1cc1b411f974c0733bdf0b70df303aa8) +

    +

    + Ron Sluiter changed the motor record logic so that the motor is stopped if URIP=Yes and RDBL read returns an error + (220d18fcff89507a236152bd17aa48e5f13ca471) +

    +

    + Tim Mooney added a field, IGSET, to allow the SET field to be ignored. + More info on why this was desirable can be found in pull request #53. + (5cad105357739d603218502eb38be20ee736b4ee) +

    +

    + Tim Mooney modified the motor record's SYNC functionality so that it works when URIP=True + (ac900b90615ef650f13a9f21a5f1c145c0402408) +

    +
    + +
    +

    + New Features

    +
    + +
    +

    + AMCI ANG1 support +

    +

    + Kurt Goetze added support for the AMCI ANG1 controller/driver + (8966aeabf292874de8c78754e95e14cde1f1c776) and made numerous improvements to the PositionCompare functionality. +

    +
    + +
    +

    + Newport CONEX-PP support +

    +

    + Mark Rivers added support for the CONEX-PP series to the AG_CONEX driver + (2b853366f48230356c869a46691acbd8c7391810) and made numerous improvements to the PositionCompare functionality. +

    +
    + +
    +

    + iocsh scripts +

    +

    + Keenan Lang add iocsh setup scripts for many motor controllers + (17d10a8158ba5ca23bfc97133901d8d6e859f1ac + & + a87835c14a20a8e11745e16591d031fb674f0e14) +

    +
    + +
    +

    + PI E-517 support +

    +

    + Bruno Luvizotto added files for supporting PIE517 piezo controller + (f31ed90b255a554a1930ac721d595ade0c8095a2) +

    +
    + +
    +

    + New Focus 874x support +

    +

    + Wayne Lewis added support for the NewFocus 874x series of controllers + (634e49d5076d87fefbd875cd0700e7feb6d062e3) +

    +
    + +
    +

    + asynMotor support +

    +

    + Matthew Pearson added parameters to asynMotorController to deal with automatic amplifier control via setClosedLoop. + (36dfab4a78725866fab5bd212c4c128a86e9f044) +

    +
    + + + + + + + + + + + + + + + + + +

    Motor Record Version 6-9 Release Notice

    diff --git a/docs/presentations/MotorRec2015.pptx b/docs/presentations/MotorRec2015.pptx new file mode 100755 index 0000000..1d113f0 Binary files /dev/null and b/docs/presentations/MotorRec2015.pptx differ diff --git a/documentation/trajectoryScan.html b/docs/trajectoryScan.html similarity index 99% rename from documentation/trajectoryScan.html rename to docs/trajectoryScan.html index c5d5394..a4c0e00 100644 --- a/documentation/trajectoryScan.html +++ b/docs/trajectoryScan.html @@ -937,7 +937,7 @@

    Installation

    The source files for trajectory scanning are in the synApps -motor module +motor module , in the motorApp/ tree.

    @@ -1267,7 +1267,7 @@ 

    .

    -

    +

    trajectoryPlot.adl is used to plot the requested trajectory in @@ -1276,14 +1276,14 @@

    (MnError).

    -

    +

    trajectoryScanDebug.adl is used to display detailed information, useful for debugging.

    -

    +

    MEDM displays for the MAXv and Ensemble are very similar, but also include @@ -1554,10 +1554,10 @@

    These are the resulting plots:

    -

    +

    -

    +

     

    diff --git a/documentation/IDL_trajectory_actual.png b/docs/trajectoryScan_files/IDL_trajectory_actual.png similarity index 100% rename from documentation/IDL_trajectory_actual.png rename to docs/trajectoryScan_files/IDL_trajectory_actual.png diff --git a/documentation/IDL_trajectory_errors.png b/docs/trajectoryScan_files/IDL_trajectory_errors.png similarity index 100% rename from documentation/IDL_trajectory_errors.png rename to docs/trajectoryScan_files/IDL_trajectory_errors.png diff --git a/documentation/trajectoryPlot1.png b/docs/trajectoryScan_files/trajectoryPlot1.png similarity index 100% rename from documentation/trajectoryPlot1.png rename to docs/trajectoryScan_files/trajectoryPlot1.png diff --git a/documentation/trajectoryPlot2.png b/docs/trajectoryScan_files/trajectoryPlot2.png similarity index 100% rename from documentation/trajectoryPlot2.png rename to docs/trajectoryScan_files/trajectoryPlot2.png diff --git a/documentation/trajectoryScan.png b/docs/trajectoryScan_files/trajectoryScan.png similarity index 100% rename from documentation/trajectoryScan.png rename to docs/trajectoryScan_files/trajectoryScan.png diff --git a/documentation/trajectoryScanDebug.png b/docs/trajectoryScan_files/trajectoryScanDebug.png similarity index 100% rename from documentation/trajectoryScanDebug.png rename to docs/trajectoryScan_files/trajectoryScanDebug.png diff --git a/documentation/MotorRec.ppt b/documentation/MotorRec.ppt deleted file mode 100644 index 681412c..0000000 Binary files a/documentation/MotorRec.ppt and /dev/null differ diff --git a/iocBoot/iocNewFocus874x/Makefile b/iocBoot/iocNewFocus874x/Makefile new file mode 100644 index 0000000..6512ead --- /dev/null +++ b/iocBoot/iocNewFocus874x/Makefile @@ -0,0 +1,6 @@ +TOP = ../.. +include $(TOP)/configure/CONFIG +ARCH = linux-x86_64 +TARGETS += envPaths +include $(TOP)/configure/RULES.ioc + diff --git a/iocBoot/iocNewFocus874x/newfocus8742.asyn.motor.substitutions b/iocBoot/iocNewFocus874x/newfocus8742.asyn.motor.substitutions new file mode 100644 index 0000000..cbc5b8a --- /dev/null +++ b/iocBoot/iocNewFocus874x/newfocus8742.asyn.motor.substitutions @@ -0,0 +1,8 @@ +file "$(MOTOR)/db/basic_asyn_motor.db" +{ +pattern +{P, N, M, DTYP, PORT, ADDR, C, S, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} +{IOC:, 1, "X", "asynMotor", M0, 1, 0, 0, "X", counts, Pos, 100, 25, 1, 0, 0, 50, 1, 0, 0, 0, ""} +{IOC:, 2, "Y", "asynMotor", M0, 2, 0, 0, "Y", counts, Pos, 100, 25, 1, 0, 0, 50, 1, 0, 0, 0, ""} +} + diff --git a/iocBoot/iocNewFocus874x/newfocus8742.asyn.st.cmd.linux-x86 b/iocBoot/iocNewFocus874x/newfocus8742.asyn.st.cmd.linux-x86 new file mode 100644 index 0000000..5aebfe7 --- /dev/null +++ b/iocBoot/iocNewFocus874x/newfocus8742.asyn.st.cmd.linux-x86 @@ -0,0 +1,67 @@ +#!../../bin/linux-x86_64/picoctl + +## You may have to change picoctl to something else +## everywhere it appears in this file + +< envPaths + +epicsEnvSet("EPICS_CA_AUTO_ADDR_LIST", "NO") +epicsEnvSet("EPICS_CA_ADDR_LIST", "10.28.0.255") + +epicsEnvSet("Sys", "Sys") +epicsEnvSet("Port", "P0") +epicsEnvSet("ControllerPort", "M0") +epicsEnvSet("MC", "MC:10") +epicsEnvSet("CT", "CT") +epicsEnvSet("IOC_PREFIX", "$(CT){IOC:MC10}") +epicsEnvSet("MC_PREFIX", "$(CT){$(MC)}") + +cd ${TOP} + +## Register all support components +dbLoadDatabase "dbd/picoctl.dbd" +picoctl_registerRecordDeviceDriver pdbbase + +# Setup IP port for 8742 +drvAsynIPPortConfigure("$(Port)", "10.28.2.111:23") +asynOctetSetInputEos("$(Port)",0,"\r\n") +asynOctetSetOutputEos("$(Port)",0,"\r") + +#db asyn debug traces +asynSetTraceMask("$(Port)",-1,0x1) +asynSetTraceIOMask("$(Port)",-1,0x1) + + +# New Focus Picomotor Network Controller (model 87xx) configuration parameters: +# (1) IP asyn port name (string) +# (2) Controller asyn port name (string) +# (3) Number of axes +# (4) Moving poll period (ms) +# (5) Idle poll period (ms) +nf874xCreateController("$(ControllerPort)", "$(Port)", 4, 200, 1000) + +## Load record instances +dbLoadTemplate("iocBoot/iocNewFocus874x/newfocus8742.asyn.motor.substitutions") + +dbLoadRecords("${ASYN}/db/asynRecord.db", "P=$(MC_PREFIX),R=Asyn,PORT=$(Port),ADDR=,OMAX=80,IMAX=80") + +## autosave/restore machinery +save_restoreSet_Debug(0) +save_restoreSet_IncompleteSetsOk(1) +save_restoreSet_DatedBackupFiles(1) + +set_savefile_path("${TOP}/as","/save") +set_requestfile_path("${TOP}/as","/req") + +set_pass0_restoreFile("info_positions.sav") +set_pass0_restoreFile("info_settings.sav") +set_pass1_restoreFile("info_settings.sav") + +iocInit() + +## more autosave/restore machinery +cd ${TOP}/as/req +makeAutosaveFiles() +create_monitor_set("info_positions.req", 5 , "") +create_monitor_set("info_settings.req", 15 , "") + diff --git a/iocBoot/iocNoAsyn/st.cmd.Vx b/iocBoot/iocNoAsyn/st.cmd.Vx index da5a32d..ca05ba6 100644 --- a/iocBoot/iocNoAsyn/st.cmd.Vx +++ b/iocBoot/iocNoAsyn/st.cmd.Vx @@ -42,7 +42,7 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=IOC:") # (2)VME Address Space - A(16,24,32). # (3)Base Address (see README file). # (4)interrupt vector (0=disable or 64 - 255). -# (5)interrupt level (1 - 6). +# (5)interrupt level (2 - 6). # (6)motor task polling rate (min=1Hz,max=60Hz). #!MAXvSetup(1, 16, 0xF000, 200, 5, 10) #!MAXvSetup(1, 24, 0xFF0000, 200, 5, 10) @@ -63,7 +63,7 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=IOC:") #!str = malloc(200); #!strcpy str, "AA; LMH,H,H,H,H,H,H,H;" -#!strcat str, "AX LH PSO; AY LH PSO; AZ LL PSO; AT LL PSO; AU LL PSO; AV LL PSO; AR LL PSO; AS LL PSO;" +#!strcat str, "AX LTH PSO; AY LTH PSO; AZ LTL PSO; AT LTL PSO; AU LTL PSO; AV LTL PSO; AR LTL PSO; AS LTL PSO;" #!MAXvConfig(0, str, 0, 0) #!free(str) diff --git a/iocBoot/iocWithAsyn/motor.cmd.ANF2 b/iocBoot/iocWithAsyn/motor.cmd.ANF2 new file mode 100644 index 0000000..f501ae2 --- /dev/null +++ b/iocBoot/iocWithAsyn/motor.cmd.ANF2 @@ -0,0 +1,107 @@ +# ANF2 motors command file example (run in iocsh) +# +### Note: Modbus support (the EPICS modbus module) is required to be included in the +### EPICS application where the ANF2 support will be loaded. This file is an +### example of how to load the ANF2 support, in an ioc that is built with the +### EPICS modbus module. + +epicsEnvSet("PORT1", "ANF2_C1") +epicsEnvSet("PORT2", "ANF2_C2") + +# drvAsynIPPortConfigure("portName", "hostInfo", priority, noAutoConnect, noProcessEos); +drvAsynIPPortConfigure("$(PORT1)_IP","192.168.0.50:502",0,0,1) +drvAsynIPPortConfigure("$(PORT2)_IP","192.168.0.51:502",0,0,1) + +# modbusInterposeConfig("portName", linkType, timeoutMsec, writeDelayMsec) +modbusInterposeConfig("$(PORT1)_IP",0,2000,0) +modbusInterposeConfig("$(PORT2)_IP",0,2000,0) + +# NOTE: modbusLength = 10 * number of axes +# drvModbusAsynConfigure("portName", "tcpPortName", slaveAddress, modbusFunction, +# modbusStartAddress, modbusLength, dataType, pollMsec, "plcType") +drvModbusAsynConfigure("$(PORT1)_In", "$(PORT1)_IP", 0, 4, 0, 120, 0, 100, "ANF2_stepper") +drvModbusAsynConfigure("$(PORT2)_In", "$(PORT2)_IP", 0, 4, 0, 60, 0, 100, "ANF2_stepper") + +# NOTE: modbusLength = 10 * number of axes +# drvModbusAsynConfigure("portName", "tcpPortName", slaveAddress, modbusFunction, +# modbusStartAddress, modbusLength, dataType, pollMsec, "plcType") +drvModbusAsynConfigure("$(PORT1)_Out", "$(PORT1)_IP", 0, 16, 1024, 120, 6, 1, "ANF2_stepper") +drvModbusAsynConfigure("$(PORT2)_Out", "$(PORT2)_IP", 0, 16, 1024, 60, 6, 1, "ANF2_stepper") + +# Asyn traces for debugging +#!asynSetTraceIOMask "$(PORT1)_In",0,4 +#!asynSetTraceMask "$(PORT1)_In",0,9 +#!asynSetTraceIOMask "$(PORT1)_Out",0,4 +#!asynSetTraceMask "$(PORT1)_Out",0,9 +#!asynSetTraceInfoMask "$(PORT1)_Out",0,15 + +# Asyn records for debugging +#!dbLoadRecords("$(ASYN)/db/asynRecord.db","P=IOC:,R=asyn:c1ip,PORT=$(PORT1)_IP,ADDR=0,OMAX=256,IMAX=256") +#!dbLoadRecords("$(ASYN)/db/asynRecord.db","P=IOC:,R=asyn:c1in,PORT=$(PORT1)_In,ADDR=0,OMAX=256,IMAX=256") +#!dbLoadRecords("$(ASYN)/db/asynRecord.db","P=IOC:,R=asyn:c1out,PORT=$(PORT1)_Out,ADDR=0,OMAX=256,IMAX=256") +#!dbLoadRecords("$(ASYN)/db/asynRecord.db","P=IOC:,R=asyn:c1,PORT=$(PORT1),ADDR=0,OMAX=256,IMAX=256") + +# Load the motor records +dbLoadTemplate("templates/motor.substitutions.ANF2") + +# AMCI ANF2 stepper controller driver support +# +# ANF2CreateController( +# portName, The name of the asyn port that will be created by this driver +# ANF2InPortName, The name of the In drvAsynIPPPort to read from the ANF2 controller +# ANF2OutPortName, The name of the Out drvAsynIPPPort to write to the ANF2 controller +# numAxes) The number of axes in the stack (max=12) +# +# ANF2CreateAxis( +# ANF2Name, The controller's asyn port +# axis, The axis to be configured (zero-based numbering) +# hexConfig, The desired hex configuration (see manual & AMCI Net Configurator for details) +# baseSpeed, The base speed (steps/second; min=1, max=1,000,000) +# homingTimeout) The homing timeout (integer number of seconds; min=0, max=300) +# +# Note: The base speed can't be changed using the VBAS field of the motor record, but the driver +# does correct the acceleration sent by the motor record to give the desired acceleration time. + +# Controller 1 (One ANF2E, Five ANF2's) +ANF2CreateController("$(PORT1)", "$(PORT1)_In", "$(PORT1)_Out", 12) +# Axes for Controller 1 +ANF2CreateAxis("$(PORT1)", 0, "0x86280000", 100, 0) +ANF2CreateAxis("$(PORT1)", 1, "0x86000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 2, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 3, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 4, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 5, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 6, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 7, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 8, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 9, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 10, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT1)", 11, "0x84000000", 100, 0) + +# Controller 2 (One ANF1E, Five ANF1's) +ANF2CreateController("$(PORT2)", "$(PORT2)_In", "$(PORT2)_Out", 6) +# Axes for Controller 2 +ANF2CreateAxis("$(PORT2)", 0, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT2)", 1, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT2)", 2, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT2)", 3, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT2)", 4, "0x84000000", 100, 0) +ANF2CreateAxis("$(PORT2)", 5, "0x84000000", 100, 0) + +# NOTE: the poller needs to be started after iocInit + + + +########## +# iocInit +########## + + + +# ANF2StartPoller( +# portName, The controller's asyn port +# movingPollPeriod, The time in ms between polls when any axis is moving +# idlePollPeriod) The time in ms between polls when no axis is moving +# +ANF2StartPoller("$(PORT1)", 200, 1000) +ANF2StartPoller("$(PORT2)", 200, 1000) diff --git a/iocBoot/iocWithAsyn/motor.substitutions.ANF2 b/iocBoot/iocWithAsyn/motor.substitutions.ANF2 new file mode 100644 index 0000000..a29a9eb --- /dev/null +++ b/iocBoot/iocWithAsyn/motor.substitutions.ANF2 @@ -0,0 +1,54 @@ +file "$(MOTOR)/motorApp/Db/asyn_motor.db" +{ +pattern +{P, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT, RTRY} + +{IOC:, "m1", "asynMotor", "ANF2_C1", 0, "ANF2 C1 M1", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m2", "asynMotor", "ANF2_C1", 1, "ANF2 C1 M2", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m3", "asynMotor", "ANF2_C1", 2, "ANF2 C1 M3", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m4", "asynMotor", "ANF2_C1", 3, "ANF2 C1 M4", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m5", "asynMotor", "ANF2_C1", 4, "ANF2 C1 M5", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m6", "asynMotor", "ANF2_C1", 5, "ANF2 C1 M6", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m7", "asynMotor", "ANF2_C1", 6, "ANF2 C1 M7", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m8", "asynMotor", "ANF2_C1", 7, "ANF2 C1 M8", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m9", "asynMotor", "ANF2_C1", 8, "ANF2 C1 M9", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m10", "asynMotor", "ANF2_C1", 9, "ANF2 C1 M10", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m11", "asynMotor", "ANF2_C1", 10, "ANF2 C1 M11", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m12", "asynMotor", "ANF2_C1", 11, "ANF2 C1 M12", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} + +{IOC:, "m13", "asynMotor", "ANF2_C2", 0, "ANF2 C2 M1", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m14", "asynMotor", "ANF2_C2", 1, "ANF2 C2 M2", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m15", "asynMotor", "ANF2_C2", 2, "ANF2 C2 M3", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m16", "asynMotor", "ANF2_C2", 3, "ANF2 C2 M4", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m17", "asynMotor", "ANF2_C2", 4, "ANF2 C2 M5", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, "m18", "asynMotor", "ANF2_C2", 5, "ANF2 C2 M6", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} + +} + +file "$(MOTOR)/motorApp/Db/ANF2Aux.template" +{ +pattern +{P, R, PORT, ADDR} + +{IOC:, m1:, "ANF2_C1", 0} +{IOC:, m2:, "ANF2_C1", 1} +{IOC:, m3:, "ANF2_C1", 2} +{IOC:, m4:, "ANF2_C1", 3} +{IOC:, m5:, "ANF2_C1", 4} +{IOC:, m6:, "ANF2_C1", 5} +{IOC:, m7:, "ANF2_C1", 6} +{IOC:, m8:, "ANF2_C1", 7} +{IOC:, m9:, "ANF2_C1", 8} +{IOC:, m10:, "ANF2_C1", 9} +{IOC:, m11:, "ANF2_C1", 10} +{IOC:, m12:, "ANF2_C1", 11} + +{IOC:, m13:, "ANF2_C2", 0} +{IOC:, m14:, "ANF2_C2", 1} +{IOC:, m15:, "ANF2_C2", 2} +{IOC:, m16:, "ANF2_C2", 3} +{IOC:, m17:, "ANF2_C2", 4} +{IOC:, m18:, "ANF2_C2", 5} + +} + diff --git a/iocBoot/iocWithAsyn/motor.substitutions.ANG1 b/iocBoot/iocWithAsyn/motor.substitutions.ANG1 new file mode 100644 index 0000000..069accf --- /dev/null +++ b/iocBoot/iocWithAsyn/motor.substitutions.ANG1 @@ -0,0 +1,17 @@ +file "$(MOTOR)/motorApp/Db/basic_asyn_motor.db" +{ +pattern +{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT, RTRY} + +{IOC:, 1, "m$(N)", "asynMotor", "ANG1_1_1", 0, "AMCI ANG1 1", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +{IOC:, 2, "m$(N)", "asynMotor", "ANG1_1_2", 0, "AMCI ANG1 2", steps, Pos, 100, 0, .2, 0, 50, .2, 1, 5, 1e9, -1e9, ""} +} + +file "$(MOTOR)/motorApp/Db/ANG1Aux.template" +{ +pattern +{P, R, PORT, ADDR} +{IOC:, m1:, ANG1_1_1, 0} +{IOC:, m2:, ANG1_1_2, 0} +} + diff --git a/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP b/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP new file mode 100644 index 0000000..78df4c2 --- /dev/null +++ b/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP @@ -0,0 +1,9 @@ +file "$(TOP)/db/basic_asyn_motor.db" +{ +pattern +{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} +# Newport NSA12 stage, 6.35 microns/full step, 128 micro-steps/s +{IOC:, 1, "m$(N)", "asynMotor", CONEX1, 0, "X", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} +{IOC:, 2, "m$(N)", "asynMotor", CONEX2, 0, "Y", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} +{IOC:, 3, "m$(N)", "asynMotor", CONEX3, 0, "Z", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} +} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.script b/iocBoot/iocWithAsyn/motor.substitutions.script new file mode 100644 index 0000000..c2f63ea --- /dev/null +++ b/iocBoot/iocWithAsyn/motor.substitutions.script @@ -0,0 +1,15 @@ +file "$(TOP)/db/asyn_motor.db" +{ + pattern + {P, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VMAX, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} + {IOC:, m1, "asynMotor", VMC_MOTOR, 0, "VMCMotor", mm, Pos, 15., 3., .05, .5, 0, 1.0, 2, .025, 5, 0, 0, ""} + {IOC:, m2, "asynMotor", SOFT_MOTOR, 0, "SoftMotor", mm, Pos, 15., 3., .05, .5, 0, 1.0, 2, .025, 5, 0, 0, ""} +} + +file "$(TOP)/db/ScriptMotorReload.db" +{ + pattern + {P, PORT} + {IOC:, SOFT_MOTOR} + {IOC:, VMC_MOTOR} +} diff --git a/iocBoot/iocWithAsyn/scripts/softMotor.lua b/iocBoot/iocWithAsyn/scripts/softMotor.lua new file mode 100644 index 0000000..0f6e8fd --- /dev/null +++ b/iocBoot/iocWithAsyn/scripts/softMotor.lua @@ -0,0 +1,67 @@ +IdlePollPeriod = 1.00 +MovingPollPeriod = 0.25 + +lastPos = 0 +targetPos = 0 + +function move(position, relative, minVel, maxVel, accel) + local MRES = asyn.getDoubleParam( DRIVER, AXIS, "MOTOR_REC_RESOLUTION") + + if (relative) then + local prev = asyn.getDoubleParam( DRIVER, AXIS, "MOTOR_POSITION") + targetPos = prev + (position * MRES) + else + targetPos = (position * MRES) + end + + epics.put(DRIVE_PV, targetPos) + + if (position > 0) then + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_DIRECTION", 1) + else + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_DIRECTION", 0) + end + + asyn.callParamCallbacks(DRIVER, AXIS) +end + + +function poll() + local MRES = asyn.getDoubleParam( DRIVER, AXIS, "MOTOR_REC_RESOLUTION") + + if (MRES == 0.0) then + return true + end + + local curr = epics.get(READBACK_PV) + + asyn.setDoubleParam( DRIVER, AXIS, "MOTOR_POSITION", curr / MRES) + + local done = 0 + local moving = 1 + + if (curr == targetPos) then + done = 1 + moving = 0 + elseif (math.abs(curr - targetPos) <= MRES and lastPos == curr) then + done = 1 + moving = 0 + end + + lastPos = curr + + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_DONE", done) + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_MOVING", moving) + + asyn.callParamCallbacks(DRIVER, AXIS) + + return (done ~= 1) +end + + +function stop(acceleration) + local curr = asyn.getDoubleParam( DRIVER, AXIS, "MOTOR_POSITION") + + epics.put(DRIVE_PV, curr) + targetPos = curr +end diff --git a/iocBoot/iocWithAsyn/scripts/vmc.lua b/iocBoot/iocWithAsyn/scripts/vmc.lua new file mode 100644 index 0000000..46ff05f --- /dev/null +++ b/iocBoot/iocWithAsyn/scripts/vmc.lua @@ -0,0 +1,66 @@ +IdlePollPeriod = 1.0 +MovingPollPeriod = 0.25 +ForcedFastPolls = 2 + +InTerminator = "\r\n" +OutTerminator = "\r\n" + +function sendAccelAndVelocity(minVel, maxVel, accel) + asyn.writeread( string.format( "%d BAS %f", AXIS + 1, minVel) , PORT); + asyn.writeread( string.format( "%d VEL %f", AXIS + 1, maxVel) , PORT); + asyn.writeread( string.format( "%d ACC %f", AXIS + 1, accel ) , PORT); +end + + +function move(position, relative, minVel, maxVel, accel) + sendAccelAndVelocity( minVel, maxVel, accel) + + if (relative) then + asyn.writeread( string.format( "%d MR %d", AXIS + 1, math.floor(position) ) , PORT) + else + asyn.writeread( string.format( "%d MV %d", AXIS + 1, math.floor(position) ) , PORT) + end +end + + +function moveVelocity(minVel, maxVel, accel) + sendAccelAndVelocity( minVel, maxVel, accel) + + asyn.writeread( string.format( "%d JOG %f", AXIS + 1, maxVel) , PORT); +end + + +function poll() + asyn.write( string.format( "%d POS?", AXIS + 1) , PORT) + + asyn.setDoubleParam( DRIVER, AXIS, "MOTOR_POSITION", tonumber( asyn.read(PORT) ) ) + + asyn.write( string.format( "%d ST?", AXIS + 1) , PORT) + + local status = tonumber( asyn.read(PORT) ) + + local direction = (status & 1) + local done = (status & 2) >> 1 + local limit_high = (status & 8) >> 3 + local limit_low = (status & 16) >> 4 + + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_DIRECTION", direction) + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_DONE", done) + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_MOVING", done ~ 1) + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_HIGH_LIMIT", limit_high) + asyn.setIntegerParam( DRIVER, AXIS, "MOTOR_STATUS_LOW_LIMIT", limit_low) + + asyn.callParamCallbacks(DRIVER, AXIS) + + return (done ~= 1) +end + + +function stop(acceleration) + asyn.writeread( string.format( "%d AB", AXIS + 1) , PORT); +end + + +function setPosition(position) + asyn.writeread( string.format( "%d POS %d", AXIS + 1, math.floor(position) ) , PORT); +end diff --git a/iocBoot/iocWithAsyn/st.cmd.ANG1 b/iocBoot/iocWithAsyn/st.cmd.ANG1 new file mode 100644 index 0000000..8e9a5dc --- /dev/null +++ b/iocBoot/iocWithAsyn/st.cmd.ANG1 @@ -0,0 +1,74 @@ +# ANG1 motors Command file Example +# +### Note: Modbus support (the EPICS modbus module) is required to be included in the +### EPICS application where the ANG1 support will be loaded. This file is an +### example of how to load the ANG1 support, in an ioc that is built with the +### EPICS modbus module. + + +# Use the following commands for TCP/IP +#drvAsynIPPortConfigure(const char *portName, +# const char *hostInfo, +# unsigned int priority, +# int noAutoConnect, +# int noProcessEos); +# One per controller. One controller can support up to six drivers. +drvAsynIPPortConfigure("ang1_1","164.54.53.107:502",0,0,1) +#drvAsynIPPortConfigure("ang1_2","164.54.53.23:502",0,0,1) +#drvAsynIPPortConfigure("ang1_3","164.54.xxx.xxx:502",0,0,1) + +#modbusInterposeConfig(const char *portName, +# modbusLinkType linkType, +# int timeoutMsec, +# int writeDelayMsec) +# One per controller. One controller can support up to six drivers. +modbusInterposeConfig("ang1_1",0,2000,0) +#modbusInterposeConfig("ang1_2",0,2000,0) + +# Word access at Modbus address 0 +# Access 1 words as inputs. +# Function code=3 +# default data type unsigned integer. +# drvModbusAsynConfigure("portName", "tcpPortName", slaveAddress, modbusFunction, modbusStartAddress, modbusLength, dataType, pollMsec, "plcType") +# One per axis. Note: "ANG1" is the AMCI model. "ANG1_1" is the controller. "ANG1_1_1" is the axis. +drvModbusAsynConfigure("ANG1_1_1_In_Word", "ang1_1", 0, 4, 0, 10, 0, 100, "ANG1_stepper") +drvModbusAsynConfigure("ANG1_1_2_In_Word", "ang1_1", 0, 4, 10, 10, 0, 100, "ANG1_stepper") +#drvModbusAsynConfigure("ANG1_1_3_In_Word", "ang1_1", 0, 3, 20, 10, 0, 100, "ANG1_stepper") +#drvModbusAsynConfigure("ANG1_1_4_In_Word", "ang1_1", 0, 3, 30, 10, 0, 100, "ANG1_stepper") +#drvModbusAsynConfigure("ANG1_1_5_In_Word", "ang1_1", 0, 3, 40, 10, 0, 100, "ANG1_stepper") +#drvModbusAsynConfigure("ANG1_1_6_In_Word", "ang1_1", 0, 3, 50, 10, 0, 100, "ANG1_stepper") + +# Access 1 words as outputs. +# Either function code=6 (single register) or 16 (multiple registers) can be used, but 16 +# is better because it is "atomic" when writing values longer than 16-bits. +# Default data type unsigned integer. +# drvModbusAsynConfigure("portName", "tcpPortName", slaveAddress, modbusFunction, modbusStartAddress, modbusLength, dataType, pollMsec, "plcType") +# Not sure why the outputs can't be configured for Modbus data type 4? +drvModbusAsynConfigure("ANG1_1_1_Out_Word", "ang1_1", 0, 6, 1024, 10, 0, 1, "ANG1_stepper") +drvModbusAsynConfigure("ANG1_1_2_Out_Word", "ang1_1", 0, 6, 1034, 10, 0, 1, "ANG1_stepper") +#drvModbusAsynConfigure("ANG1_1_3_Out_Word", "ang1_1", 0, 6, 1044, 10, 0, 1, "ANG1_stepper") +#drvModbusAsynConfigure("ANG1_1_4_Out_Word", "ang1_1", 0, 6, 1054, 10, 0, 1, "ANG1_stepper") +#drvModbusAsynConfigure("ANG1_1_5_Out_Word", "ang1_1", 0, 6, 1064, 10, 0, 1, "ANG1_stepper") +#drvModbusAsynConfigure("ANG1_1_6_Out_Word", "ang1_1", 0, 6, 1074, 10, 0, 1, "ANG1_stepper") + +# Second ANG1 controller... +#drvModbusAsynConfigure("ANG1_2_1_Out_Word_0", "ang1_2", 0, 6, 1024, 1, 0, 1, "ANG1_stepper") + +dbLoadTemplate("ANG1_motors.substitutions") + +# AMCI ANG1 stepper controller/driver support +# portName The name of the asyn port that will be created for this driver +# ANG1InPortName The name of the In drvAsynIPPPort that was created previously to connect to the ANG1 controller +# ANG1OutPortName The name of the Out drvAsynIPPPort that was created previously to connect to the ANG1 controller +# numAxes The number of axes that this controller supports +# movingPollPeriod The time in ms between polls when any axis is moving +# idlePollPeriod The time in ms between polls when no axis is moving +# +# One per axis. Note: "ANG1" is the AMCI model. "ANG1_1" is the controller. "ANG1_1_1" is the axis. +# Also, ANG1_1_1 is the port name needed for motor.substitutions. +ANG1CreateController(ANG1_1_1, ANG1_1_1_In_Word, ANG1_1_1_Out_Word, 1, 100, 0) +ANG1CreateController(ANG1_1_2, ANG1_1_2_In_Word, ANG1_1_2_Out_Word, 1, 100, 0) +#ANG1CreateController(ANG1_1, ANG1_1_3_In_Word, ANG1_1_3_Out_Word, 1, 100, 0) +#ANG1CreateController(ANG1_1, ANG1_1_4_In_Word, ANG1_1_4_Out_Word, 1, 100, 0) +#ANG1CreateController(ANG1_1, ANG1_1_5_In_Word, ANG1_1_5_Out_Word, 1, 100, 0) +#ANG1CreateController(ANG1_1, ANG1_1_6_In_Word, ANG1_1_6_Out_Word, 1, 100, 0) diff --git a/iocBoot/iocWithAsyn/st.cmd.CONEX-PP b/iocBoot/iocWithAsyn/st.cmd.CONEX-PP new file mode 100644 index 0000000..4447b28 --- /dev/null +++ b/iocBoot/iocWithAsyn/st.cmd.CONEX-PP @@ -0,0 +1,45 @@ +#errlogInit(5000) +< envPaths +# Tell EPICS all about the record types, device-support modules, drivers, +# etc. +dbLoadDatabase("../../dbd/WithAsyn.dbd") +WithAsyn_registerRecordDeviceDriver(pdbbase) + +### Motors +dbLoadTemplate "motor.substitutions.CONEX-PP" + +# For Windows +drvAsynSerialPortConfigure("serial1", "COM8", 0, 0, 0) +# For Linux +#drvAsynSerialPortConfigure("serial1", "/dev/ttyUSB0", 0, 0, 0) +asynOctetSetInputEos("serial1",0,"\r\n") +asynOctetSetOutputEos("serial1",0,"\r\n") +asynSetOption("serial1",0,"baud","115200") +asynSetOption("serial1",0,"bits","8") +asynSetOption("serial1",0,"stop","1") +asynSetOption("serial1",0,"parity","none") +asynSetOption("serial1",0,"clocal","Y") +asynSetOption("serial1",0,"crtscts","N") + +asynSetTraceIOMask("serial1", 0, 2) +#asynSetTraceMask("serial1", 0, 9) + +# Load asyn record +dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=IOC:,R=serial1,PORT=serial1, ADDR=0,OMAX=256,IMAX=256") + +# AG_CONEXCreateController(asyn port, serial port, controllerID, +# active poll period (ms), idle poll period (ms)) +AG_CONEXCreateController("CONEX1", "serial1", 1, 50, 500) +asynSetTraceIOMask("CONEX1", 0, 2) +#asynSetTraceMask("CONEX1", 0, 255) +AG_CONEXCreateController("CONEX2", "serial1", 2, 50, 500) +asynSetTraceIOMask("CONEX2", 0, 2) +#asynSetTraceMask("CONEX2", 0, 255) +AG_CONEXCreateController("CONEX3", "serial1", 3, 50, 500) +asynSetTraceIOMask("CONEX3", 0, 2) +#asynSetTraceMask("CONEX3", 0, 255) + +iocInit + +dbpf IOC:m1.RTRY 0 +dbpf IOC:m1.NTM 0 diff --git a/iocBoot/iocWithAsyn/st.cmd.script b/iocBoot/iocWithAsyn/st.cmd.script new file mode 100644 index 0000000..a113cde --- /dev/null +++ b/iocBoot/iocWithAsyn/st.cmd.script @@ -0,0 +1,18 @@ +< envPaths + +dbLoadDatabase("$(TOP)/dbd/WithAsyn.dbd") +WithAsyn_registerRecordDeviceDriver(pdbbase) + +epicsEnvSet("LUA_SCRIPT_PATH", "./scripts") + +# Connect to virtual motor controller server +drvAsynIPPortConfigure("VMC","127.0.0.1:31337", 0, 0, 0) + +#ScriptControllerConfig( "PORT_NAME", num_axes, "lua_script", "PARAMS=") +ScriptControllerConfig("VMC_MOTOR", 1, "vmc.lua", "PORT=VMC") + +ScriptControllerConfig("SOFT_MOTOR", 1, "softMotor.lua", "DRIVE_PV='IOC:m1.VAL', READBACK_PV='IOC:m1.RBV'") + +dbLoadTemplate("motor.substitutions.script") + +iocInit diff --git a/iocBoot/iocWithAsyn/st.cmd.xps6 b/iocBoot/iocWithAsyn/st.cmd.xps6 new file mode 100755 index 0000000..cf7b7a5 --- /dev/null +++ b/iocBoot/iocWithAsyn/st.cmd.xps6 @@ -0,0 +1,46 @@ +#errlogInit(5000) +< envPaths +# Tell EPICS all about the record types, device-support modules, drivers, +# etc. in this build from CARS +dbLoadDatabase("../../dbd/WithAsyn.dbd") +WithAsyn_registerRecordDeviceDriver(pdbbase) + +### Motors +dbLoadTemplate "motor.substitutions.xps6" + +dbLoadTemplate "XPSAux.substitutions" + +# asyn port, IP address, IP port, number of axes, +# active poll period (ms), idle poll period (ms), +# enable set position, set position settling time (ms) +XPSCreateController("XPS1", "164.54.164.24", 5001, 4, 10, 500, 0, 500) +asynSetTraceIOMask("XPS1", 0, 2) +#asynSetTraceMask("XPS1", 0, 255) + +# asynPort, IP address, IP port, poll period (ms) +XPSAuxConfig("XPS_AUX1", "164.54.164.24", 5001, 50) +#asynSetTraceIOMask("XPS_AUX1", 0, 2) +#asynSetTraceMask("XPS_AUX1", 0, 255) + +# XPS asyn port, axis, groupName.positionerName, stepSize +XPSCreateAxis("XPS1",0,"Group1.Pos", "10000") +XPSCreateAxis("XPS1",1,"Group2.Pos", "10000") +XPSCreateAxis("XPS1",2,"Group3.Pos", "20000") +XPSCreateAxis("XPS1",3,"Group4.Pos", "2000") + +# XPS asyn port, max points, FTP username, FTP password +# Note: this must be done after configuring axes +XPSCreateProfile("XPS1", 2000, "Administrator", "Administrator") + +iocInit + +# This IOC does not use save/restore, so set values of some PVs +dbpf("IOC:m1.RTRY", "0") +dbpf("IOC:m1.TWV", "0.1") +dbpf("IOC:m2.RTRY", "0") +dbpf("IOC:m2.TWV", "0.1") +dbpf("IOC:m3.RTRY", "0") +dbpf("IOC:m3.TWV", "0.1") +dbpf("IOC:m4.RTRY", "0") +dbpf("IOC:m4.TWV", "0.1") + diff --git a/iocsh/ACS_MCB4B.iocsh b/iocsh/ACS_MCB4B.iocsh new file mode 100644 index 0000000..cc24ccc --- /dev/null +++ b/iocsh/ACS_MCB4B.iocsh @@ -0,0 +1,25 @@ +# ### ACS_MCB4B.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- INSTANCE - Name of asyn port to create +#- +#- NUM_AXES - Optional: Number of axes to create for this controller +#- Default: 1 +#- +#- MOVING_POLL - Optional: Moving poll rate (ms) +#- Default: POLL_RATE +#- +#- IDLE_POLL - Optional: Idle poll rate (ms) +#- Default: POLL_RATE +#- +#- POLL_RATE - Optional: Poll rate (ms) +#- Default: 100 +#- ################################################### + +# ACS MCB-4B serial connection settings +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=19200, BITS=8, STOP=1, PARITY=none") +asynOctetSetInputEos( "$(PORT)", -1, "\r") +asynOctetSetOutputEos("$(PORT)", -1, "\r") + +MCB4BCreateController("$(INSTANCE)", "$(PORT)", $(NUM_AXES=1), $(MOVING_POLL=$(POLL_RATE=100)), $(IDLE_POLL=$(POLL_RATE=100))) diff --git a/iocsh/EXAMPLE_motorSim.substitutions b/iocsh/EXAMPLE_motorSim.substitutions new file mode 100644 index 0000000..4ce6874 --- /dev/null +++ b/iocsh/EXAMPLE_motorSim.substitutions @@ -0,0 +1,7 @@ +file "$(MOTOR)/db/asyn_motor.db" +{ +pattern +{N, M, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, INIT} +{1, "m$(N)", 0, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, ""} +#{2, "m$(N)", 1, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, ""} +} diff --git a/iocsh/McClennan_PM304.iocsh b/iocsh/McClennan_PM304.iocsh new file mode 100644 index 0000000..ee98bd8 --- /dev/null +++ b/iocsh/McClennan_PM304.iocsh @@ -0,0 +1,31 @@ +# ### McClennan_PM304.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- NUM_AXES - Optional: Number of axes on this controller +#- Default: 1 +#- +#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured +#- Default: 1 +#- +#- POLL_RATE - Optional: Controller poll rate in hertz +#- Default: 10 +#- ################################################### + +#- McClennan PM304 driver setup parameters: +#- (1) maximum number of controllers in system +#- (2) motor task polling rate (min=1Hz, max=60Hz) +$(PM304_INIT_COMPLETE="") PM304Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) + +#- Insert serial port configuration settings here + +#- McClennan PM304 driver configuration parameters: +#- (1) controller being configured +#- (2) MPF serial server name (string) +#- (3) Number of axes on this controller +PM304Config($(CONTROLLER=0), "$(PORT)", $(NUM_AXES=1)) + +epicsEnvSet("PM304_INIT_COMPLETE", "#") diff --git a/iocsh/Newfocus_PMNC87xx.iocsh b/iocsh/Newfocus_PMNC87xx.iocsh new file mode 100644 index 0000000..f05693f --- /dev/null +++ b/iocsh/Newfocus_PMNC87xx.iocsh @@ -0,0 +1,37 @@ +# ### Newfocus_PMNC87xx.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- NUM_AXES - Optional: Number of axes on this controller +#- Default: 1 +#- +#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured +#- Default: 1 +#- +#- MAX_DRIVES - Optional: Max number of drives per controller +#- Default: 1 +#- +#- POLL_RATE - Optional: Controller poll rate in hertz +#- Default: 10 +#- ################################################### + +#- NewFocus Picomotor driver setup parameters: +#- (1) maximum number of controllers in system +#- (2) maximum drives per controller +#- (3) motor task polling rate (min=1Hz, max=60Hz) +$(PMNC87XX_INIT_COMPLETE="") PMNC87xxSetup($(MAX_CONTROLLERS=1), $(MAX_DRIVES=1), $(POLL_RATE=10)) + +#- Serial port configuration +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=19200, BITS=8, STOP=1, PARITY=none") +asynOctetSetInputEos( "$(PORT)", -1, "\r") +asynOctetSetOutputEos("$(PORT)", -1, "\r") + +#- NewFocus Picomotor driver configuration parameters: +#- (1) controller being configured +#- (2) asyn port name (string) +PMNC87xxConfig($(CONTROLLER=0), "$(PORT)") + +epicsEnvSet("PMNC87XX_INIT_COMPLETE", "#") diff --git a/iocsh/Newport_ESP300.iocsh b/iocsh/Newport_ESP300.iocsh new file mode 100644 index 0000000..e681164 --- /dev/null +++ b/iocsh/Newport_ESP300.iocsh @@ -0,0 +1,30 @@ +# ### Newport_ESP300.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured +#- Default: 1 +#- +#- POLL_RATE - Optional: Polling increment in 1/60 sec +#- Default: 6 +#- ################################################### + +#- Newport ESP300 driver setup parameters: +#- (1) maximum number of controllers in system +#- (2) motor task polling rate (min=1Hz,max=60Hz) +$(ESP300_INIT_COMPLETE="") ESP300Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) + +# Newport ESP300 serial connection settings +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=9600, BITS=8, STOP=1, PARITY=none") +asynOctetSetInputEos( "$(PORT)", -1, "") +asynOctetSetOutputEos("$(PORT)", -1, "") + +#- Newport ESP300 driver configuration parameters: +#- (1) controller# being configured +#- (2) ASYN port name +ESP300Config($(CONTROLLER=0), "$(PORT)") + +epicsEnvSet("ESP300_INIT_COMPLETE", "#") diff --git a/iocsh/Newport_MM4000.iocsh b/iocsh/Newport_MM4000.iocsh new file mode 100644 index 0000000..5b33aad --- /dev/null +++ b/iocsh/Newport_MM4000.iocsh @@ -0,0 +1,32 @@ +# ### Newport_NM4000.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured +#- Default: 1 +#- +#- POLL_RATE - Optional: Controller poll rate in hertz +#- Default: 10 +#- ################################################### + + +#- Newport MM4000 driver setup parameters: +#- (1) maximum # of controllers, +#- (2) motor task polling rate (min=1Hz, max=60Hz) +$(MM4000_INIT_COMPLETE="") MM4000Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) + +# Newport MM4000 serial connection settings +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=38400, BITS=8, STOP=1, PARITY=none") +asynOctetSetInputEos( "$(PORT)", -1, "\r") +asynOctetSetOutputEos("$(PORT)", -1, "\r") + +# Newport MM4000 driver configuration parameters: +# (1) controller +# (2) asyn port name (e.g. serial0 or gpib1) +# (3) GPIB address (0 for serial) +MM4000Config($(CONTROLLER=0), "$(PORT)", 0) + +epicsEnvSet("MM4000_INIT_COMPLETE", "#") diff --git a/iocsh/Newport_PM500.iocsh b/iocsh/Newport_PM500.iocsh new file mode 100644 index 0000000..bf37a27 --- /dev/null +++ b/iocsh/Newport_PM500.iocsh @@ -0,0 +1,30 @@ +# ### Newport_PM500.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured +#- Default: 1 +#- +#- POLL_RATE - Optional: Controller poll rate in hertz +#- Default: 10 +#- ################################################### + +#- Newport PM500 driver setup parameters: +#- (1) maximum number of controllers in system +#- (2) motor task polling rate (min=1Hz,max=60Hz) +$(PM500_INIT_COMPLETE="") PM500Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) + +#- Newport PM500 serial connection settings +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=9600, BITS=7, STOP=2, PARITY=even, HANDSHAKE=hardware") +asynOctetSetInputEos( "$(PORT)", -1, "\r") +asynOctetSetOutputEos("$(PORT)", -1, "\r") + +#- Newport PM500 configuration parameters: +#- (1) controller +#- (2) asyn port name (e.g. serial0 or gpib1) +PM500Config($(CONTROLLER=0), "$(PORT)") + +epicsEnvSet("PM500_INIT_COMPLETE", "#") diff --git a/iocsh/PI_C630.iocsh b/iocsh/PI_C630.iocsh new file mode 100644 index 0000000..b9aab5b --- /dev/null +++ b/iocsh/PI_C630.iocsh @@ -0,0 +1,49 @@ +# ### PI_C630.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured +#- Default: 1 +#- +#- NUM_AXES - Optional: Max number of axes per controller +#- Default: 1 +#- +#- POLL_RATE - Optional: Controller poll rate in hertz +#- Default: 10 +#- +#- CURR[1-9] - Optional: Current settings for axes 1 through 9 +#- Current equals 100mA * setting, maximum 800mA. +#- Default: 0 (off) +#- ################################################### + + +#-################################################ +#- PI C-630 driver setup parameters: +#- Load PIC630Setup once. +#- (1) max # of controller groups. Controller groups are per serial port. +#- (2) max # axes per controller group. Maximum 9. (addr 1-9) +#- (3) motor task polling rate (min=1Hz, max=60Hz, 10Hz works well) +#- Example: +#- PIC630Setup(1, 2, 10) 1 group. 2 axes (controllers) in the group. 10Hz poll. +$(PI_C630_INIT_COMPLETE="") PIC630Setup($(MAX_CONTROLLERS=1), $(NUM_AXES=1), $(POLL_RATE=10)) + +# PI C630 serial connection settings +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=19200, BITS=8, STOP=1, PARITY=none") +asynOctetSetInputEos( "$(PORT)", -1, "\r") +asynOctetSetOutputEos("$(PORT)", -1, "\r") + +#- PIC630 driver configuration parameters: +#- Load one PIC630Config for each group of PI C-630 drivers. +#- (1) "Controller group" number +#- (2) MPF card +#- (3)-(11) Current setting per axis (1-9). Leave at 0 if unused. +#- Choices: 0=OFF, 1=100mA, 2=200mA, ... 8=800mA. +#- Example: +#- PIC630Config(0, "serial1, 5, 3, 0, 0, 0, 0, 0, 0, 0") +#- Group 0, asyn serial port 1, Axis1=.5A, Axis2=.3A, others OFF +PIC630Config($(CONTROLLER=0), "$(PORT)", $(CURR1=0), $(CURR2=0), $(CURR3=0), $(CURR4=0), $(CURR5=0), $(CURR6=0), $(CURR7=0), $(CURR8=0), $(CURR9=0)) + +epicsEnvSet("PI_C630_INIT_COMPLETE", "#") diff --git a/iocsh/PI_C867.iocsh b/iocsh/PI_C867.iocsh new file mode 100644 index 0000000..39b04a2 --- /dev/null +++ b/iocsh/PI_C867.iocsh @@ -0,0 +1,28 @@ +# ### PI_C867.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Controller port name will be PIC867$(CONTROLLER) +#- Default: 0 +#- +#- NUM_AXES - Optional: Max number of axes per controller +#- Default: 1 +#- +#- MOVING_POLL - Optional: Moving poll rate (in msec) +#- Default: POLL_RATE +#- +#- IDLE_POLL - Optional: Idle poll rate (in msec) +#- Default: POLL_RATE +#- +#- POLL_RATE - Optional: Poll rate in msec +#- Default: 100 +#- ################################################### + + +# PI C867 serial connection settings +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=38400, BITS=8, STOP=1, PARITY=none") +asynOctetSetInputEos( "$(PORT)", -1, "\n\r") +asynOctetSetOutputEos("$(PORT)", -1, "\n") + +PI_GCS2_CreateController("PIC867$(CONTROLLER)", "$(PORT)", $(NUM_AXES=0), 0, 0, $(MOVING_POLL=$(POLL_RATE=100)), $(IDLE_POLL=$(POLL_RATE=100))) diff --git a/iocsh/PI_E710.iocsh b/iocsh/PI_E710.iocsh new file mode 100644 index 0000000..b4bc213 --- /dev/null +++ b/iocsh/PI_E710.iocsh @@ -0,0 +1,31 @@ +# ### PI_E710.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured +#- Default: 1 +#- +#- POLL_RATE - Optional: Controller poll rate in hertz +#- Default: 10 +#- ################################################### + +#- PI E-710 driver setup parameters: +#- (1) maximum # of controllers, +#- (2) motor task polling rate (min=1Hz, max=60Hz) +$(E710_INIT_COMPLETE="") PIE710Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) + +# PI E710 serial connection settings +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=9600, BITS=8, STOP=1, PARITY=none") +asynOctetSetInputEos( "$(PORT)", -1, "\n") +asynOctetSetOutputEos("$(PORT)", -1, "\n") + +#- PI E-710 driver configuration parameters: +#- (1) controller +#- (2) asyn port name (e.g. serial1 or gpib1) +#- (3) GPIB address (0 for serial) +PIE710Config($(CONTROLLER=0), "$(PORT)", 0) + +epicsEnvSet("E710_INIT_COMPLETE", "#") diff --git a/iocsh/PI_E816.iocsh b/iocsh/PI_E816.iocsh new file mode 100644 index 0000000..3007338 --- /dev/null +++ b/iocsh/PI_E816.iocsh @@ -0,0 +1,30 @@ +# ### PI_E816.iocsh ### + +#- ################################################### +#- PORT - Serial port for communications +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured +#- Default: 1 +#- +#- POLL_RATE - Optional: Controller poll rate in hertz +#- Default: 10 +#- ################################################### + +#- PI E-816 driver setup parameters: +#- (1) maximum number of controllers in system +#- (2) motor task polling rate (min=1Hz,max=60Hz) +$(E816_INIT_COMPLETE="") PIE816Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) + +# PI E816 serial connection settings +iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=38400, BITS=8, STOP=1, PARITY=none, HANDSHAKE=hardware") +asynOctetSetInputEos( "$(PORT)", -1, "\n") +asynOctetSetOutputEos("$(PORT)", -1, "\n") + +# PI E-816 driver configuration parameters: +# (1) controller# being configured, +# (2) ASYN port name +PIE816Config($(CONTROLLER=0), "$(PORT)") + +epicsEnvSet("E816_INIT_COMPLETE", "#") diff --git a/iocsh/allstop.iocsh b/iocsh/allstop.iocsh new file mode 100644 index 0000000..e611b50 --- /dev/null +++ b/iocsh/allstop.iocsh @@ -0,0 +1,10 @@ +# ### allstop.iocsh ### + +#- ################################################### +#- PREFIX - IOC Prefix +#- MOTOR - Location of motor module +#- ################################################### + +#- Allstop, alldone +dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=$(PREFIX)") +doAfterIocInit("motorUtilInit('$(PREFIX)')") diff --git a/iocsh/motorSim.iocsh b/iocsh/motorSim.iocsh new file mode 100644 index 0000000..80eb0ad --- /dev/null +++ b/iocsh/motorSim.iocsh @@ -0,0 +1,34 @@ +# ### motorSim.iocsh ### + +#- ################################################### +#- PREFIX - IOC Prefix +#- INSTANCE - Instance name, used to create the low-level driver drvet name +#- Combined with the controller number to create the asyn port name +#- +#- SUB - Optional: Subsitutions file (asyn_motor.db), Macros P, DTYP, PORT, +#- DHLM, DLLM, and INIT will be predefined. +#- Default: $(MOTOR)/iocsh/EXAMPLE_motorSim.substitutions +#- +#- CONTROLLER - Optional: Which controller is being configured +#- Default: 0 +#- +#- NUM_AXES - Optional: Number of axes on this controller +#- Default: 1 +#- +#- LOW_LIM - Optional: Low Limit +#- Default: -32000 +#- +#- HIGH_LIM - Optional: High Limit +#- Default: 32000 +#- +#- HOME_POS - Optional: Home position +#- Default: 0 +#- ################################################### + +# Create simulated motors: ( start card , start axis , low limit, high limit, home posn, # cards, # axes to setup) +motorSimCreate($(CONTROLLER=0), 0, $(LOW_LIM=-32000), $(HIGH_LIM=32000), $(HOME_POS=0), 1, $(NUM_AXES=1)) + +# Setup the Asyn layer (portname, low-level driver drvet name, card, number of axes on card) +drvAsynMotorConfigure("$(INSTANCE)$(CONTROLLER=0)", "$(INSTANCE)", $(CONTROLLER=0), $(NUM_AXES=1)) + +dbLoadTemplate("$(SUB=$(MOTOR)/iocsh/EXAMPLE_motorSim.substitutions)", "P=$(PREFIX), DTYP='asynMotor', PORT=$(INSTANCE)$(CONTROLLER=0), DHLM=$(HIGH_LIM=32000), DLLM=$(LOW_LIM=-32000)") diff --git a/motorApp/AMCISrc/AMCISupport.dbd b/motorApp/AMCISrc/AMCISupport.dbd new file mode 100644 index 0000000..48132bb --- /dev/null +++ b/motorApp/AMCISrc/AMCISupport.dbd @@ -0,0 +1,2 @@ +include "ANG1Support.dbd" +include "ANF2Support.dbd" diff --git a/motorApp/AMCISrc/ANF2Driver.cpp b/motorApp/AMCISrc/ANF2Driver.cpp new file mode 100644 index 0000000..993a0a4 --- /dev/null +++ b/motorApp/AMCISrc/ANF2Driver.cpp @@ -0,0 +1,1088 @@ +/* +FILENAME... ANF2Driver.cpp +USAGE... Motor record driver support for the AMCI ANF2 stepper motor controller over Modbus/TCP. + +Kevin Peterson + +Based on the AMCI ANG1 Model 3 device driver written by Kurt Goetze + +*/ + + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "ANF2Driver.h" +#include + +#define NINT(f) (int)((f)>0 ? (f)+0.5 : (f)-0.5) + +static const char *driverName = "ANF2MotorDriver"; + +/** Constructor, Creates a new ANF2Controller object. + * \param[in] portName The name of the asyn port that will be created for this driver + * \param[in] ANF2InPortName The name of the drvAsynSerialPort that was created previously to connect to the ANF2 controller + * \param[in] ANF2OutPortName The name of the drvAsynSerialPort that was created previously to connect to the ANF2 controller + * \param[in] numAxes The number of axes on the controller stack + */ +ANF2Controller::ANF2Controller(const char *portName, const char *ANF2InPortName, const char *ANF2OutPortName, + int numAxes) + : asynMotorController(portName, numAxes, NUM_ANF2_PARAMS, + asynInt32ArrayMask, // One additional interface beyond those in base class + asynInt32ArrayMask, // One additional callback interface beyond those in base class + ASYN_CANBLOCK | ASYN_MULTIDEVICE, + 1, // autoconnect + 0, 0) // Default priority and stack size +{ + int i, j; + asynStatus status = asynSuccess; + static const char *functionName = "ANF2Controller::ANF2Controller"; + + // Keep track of the number of axes created, so the poller can wait for all the axes to be created before starting + axesCreated_ = 0; + + inputDriver_ = epicsStrDup(ANF2InPortName); // Set this before calls to create Axis objects + + // Create controller-specific parameters + createParam(ANF2ResetErrorsString, asynParamInt32, &ANF2ResetErrors_); + createParam(ANF2GetInfoString, asynParamInt32, &ANF2GetInfo_); + //createParam(ANF2ReconfigString, asynParamInt32, &ANF2Reconfig_); + + numAxes_ = numAxes; + + for (j=0; jconnect(ANF2InPortName, i+j*AXIS_REG_OFFSET, &pasynUserInReg_[j][i], NULL); + } + status = pasynInt32ArraySyncIO->connect(ANF2OutPortName, j*AXIS_REG_OFFSET, &pasynUserOutReg_[j], NULL); + } + if (status) { + asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, + "%s: cannot connect to ANF2 controller\n", + functionName); + } + + /* Create the poller thread for this controller (do 2 forced-fast polls) + * NOTE: at this point the axis objects don't yet exist, but the poller tolerates this */ + //startPoller(movingPollPeriod, idlePollPeriod, 2); +} + + +/** Creates a new ANF2Controller object. + * Configuration command, called directly or from iocsh + * \param[in] portName The name of the asyn port that will be created for this driver + * \param[in] ANF2InPortName The name of the drvAsynIPPPort that was created previously to connect to the ANF2 controller + * \param[in] ANF2OutPortName The name of the drvAsynIPPPort that was created previously to connect to the ANF2 controller + * \param[in] numAxes The number of axes on the controller stack + */ +extern "C" int ANF2CreateController(const char *portName, const char *ANF2InPortName, const char *ANF2OutPortName, int numAxes) +{ + // Enforce max values + if (numAxes > MAX_AXES) { + numAxes = MAX_AXES; + } + + new ANF2Controller(portName, ANF2InPortName, ANF2OutPortName, numAxes); + return(asynSuccess); +} + +/** Starts the poller for a given controller + * \param[in] ANF2Name The name of the asyn port that for the controller + * \param[in] movingPollPeriod The time in ms between polls when any axis is moving + * \param[in] idlePollPeriod The time in ms between polls when no axis is moving + */ +extern "C" asynStatus ANF2StartPoller(const char *ANF2Name, int movingPollPeriod, int idlePollPeriod) +{ + ANF2Controller *pC; + static const char *functionName = "ANF2StartPoller"; + + pC = (ANF2Controller*) findAsynPortDriver(ANF2Name); + if (!pC) { + printf("%s:%s: Error port %s not found\n", + driverName, functionName, ANF2Name); + return asynError; + } + + pC->lock(); + pC->doStartPoller(movingPollPeriod/1000.0, idlePollPeriod/1000.0); + pC->unlock(); + return asynSuccess; +} + +void ANF2Controller::doStartPoller(double movingPollPeriod, double idlePollPeriod) +{ + // + movingPollPeriod_ = movingPollPeriod; + idlePollPeriod_ = idlePollPeriod; + + // + startPoller(movingPollPeriod_, idlePollPeriod_, 2); +} + + +/** Reports on status of the driver + * \param[in] fp The file pointer on which report information will be written + * \param[in] level The level of report detail desired + * + * If details > 0 then information is printed about each axis. + * After printing controller-specific information it calls asynMotorController::report() + */ +void ANF2Controller::report(FILE *fp, int level) +{ + int i, j; + ANF2Axis* pAxis[MAX_AXES]; + + fprintf(fp, "====================================\n"); + fprintf(fp, "ANF2 motor driver:\n"); + fprintf(fp, " asyn port: %s\n", this->portName); + fprintf(fp, " num axes: %i\n", numAxes_); + fprintf(fp, " axes created: %i\n", axesCreated_); + fprintf(fp, " moving poll period: %lf\n", movingPollPeriod_); + fprintf(fp, " idle poll period: %lf\n", idlePollPeriod_); + fprintf(fp, "\n"); + fprintf(fp, "Input registers:\n\n"); + + for (j=0; jgetInfo(); + } + + fprintf(fp, " Reg\t"); + for (j=0; jinputReg_[i]); + + } + fprintf(fp, "\n"); + } + + fprintf(fp, "\n"); + /*for (i=0; i(asynMotorController::getAxis(pANF2Axis methodsasynUser)); + return static_cast(asynMotorController::getAxis(pasynUser)); +} + +/** Returns a pointer to an ANF2Axis object. + * Returns NULL if the axis number encoded in pasynUser is invalid. + * \param[in] No Axis index number. */ +ANF2Axis* ANF2Controller::getAxis(int axisNo) +{ + return static_cast(asynMotorController::getAxis(axisNo)); +} + +/** Called when asyn clients call pasynInt32->write(). + * Extracts the function and axis number from pasynUser. + * Sets the value in the parameter library (?) + * + * If the function is ANF2Jerk_ it sets the jerk value in the controller. + * Calls any registered callbacks for this pasynUser->reason and address. + * + * For all other functions it calls asynMotorController::writeInt32. + * \param[in] pasynUser asynUser structure that encodes the reason and address. + * \param[in] value Value to write. */ +asynStatus ANF2Controller::writeInt32(asynUser *pasynUser, epicsInt32 value) +{ + int function = pasynUser->reason; + asynStatus status = asynSuccess; + ANF2Axis *pAxis = getAxis(pasynUser); + static const char *functionName = "writeInt32"; + + /* Set the parameter and readback in the parameter library. */ + status = setIntegerParam(pAxis->axisNo_, function, value); + + if (function == ANF2ResetErrors_) + { + // Only reset errors when value is 1 + if (value == 1) { + printf("ANF2Controller:writeInt32: Resetting errors for axis = %d\n", pAxis->axisNo_); + pAxis->resetErrors(); + + } + } else if (function == ANF2GetInfo_) + { + // Only get info when value is 1 + if (value == 1) { + printf("ANF2Controller:writeInt32: Getting info for axis = %d\n", pAxis->axisNo_); + pAxis->getInfo(); + + } + /* + } else if (function == ANF2Reconfig_) + { + // reconfig regardless of the value + pAxis->reconfig(value); + */ + } else { + // Call base class method + status = asynMotorController::writeInt32(pasynUser, value); + } + + /* Do callbacks so higher layers see any changes */ + pAxis->callParamCallbacks(); + if (status) + asynPrint(pasynUser, ASYN_TRACE_ERROR, + "%s:%s: error, status=%d function=%d, value=%d\n", + driverName, functionName, status, function, value); + else + asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, + "%s:%s: function=%d, value=%d\n", + driverName, functionName, function, value); + return status; +} + +asynStatus ANF2Controller::writeReg32Array(int axisNo, epicsInt32* output, int nElements, double timeout) +{ + asynStatus status; + ANF2Axis *pAxis = getAxis(axisNo); + static const char *functionName = "ANF2Controller::writeReg32Array"; + + // This message isn't very helpful. Print something better in the future. + asynPrint(pAxis->pasynUser_, ASYN_TRACEIO_DRIVER, + "%s: axisNo=%i, nElements=%d\n", + functionName, axisNo, nElements); + status = pasynInt32ArraySyncIO->write(pasynUserOutReg_[axisNo], output, nElements, timeout); + + return status; +} + +asynStatus ANF2Controller::readReg16(int axisNo, int axisReg, epicsInt32 *input, double timeout) +{ + asynStatus status; + + //printf("axisReg = %d\n", axisReg); + //asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,"readReg16 reg = %d\n", axisReg); + status = pasynInt32SyncIO->read(pasynUserInReg_[axisNo][axisReg], input, timeout); + + return status ; +} + +asynStatus ANF2Controller::readReg32(int axisNo, int axisReg, epicsInt32 *combo, double timeout) +{ + asynStatus status; + epicsInt32 lowerWord32, upperWord32; // only have pasynInt32SyncIO, not pasynInt16SyncIO , + + //printf("calling readReg16\n"); + status = readReg16(axisNo, axisReg, &upperWord32, timeout); //get Upper Word + + axisReg++; + status = readReg16(axisNo, axisReg, &lowerWord32, timeout); //get Lower Word + + *combo = NINT((upperWord32 << 16) | lowerWord32); + + return status ; +} + + +// ANF2Axis methods Here +// These are the ANF2Axis methods + +/** Creates a new ANF2Axis object. + * \param[in] pC Pointer to the ANF2Controller to which this axis belongs. + * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1. + * + * Initializes register numbers, etc. + */ +ANF2Axis::ANF2Axis(ANF2Controller *pC, int axisNo, epicsInt32 config, epicsInt32 baseSpeed, epicsInt32 homingTimeout) + : asynMotorAxis(pC, axisNo), + pC_(pC) +{ + int status; + + axisNo_ = axisNo; + config_ = config; + baseSpeed_ = baseSpeed; + homingTimeout_ = homingTimeout; + + // These registers will always be zero + zeroRegisters(zeroReg_); + + status = pasynInt32SyncIO->connect(pC_->inputDriver_, axisNo_*AXIS_REG_OFFSET, &pasynUserForceRead_, "MODBUS_READ"); + if (status) { + //printf("%s:%s: Error, unable to connect pasynUserForceRead_ to Modbus input driver %s\n", pC_->inputDriver_, pC_->functionName, myModbusInputDriver); + printf("%s: Error, unable to connect pasynUserForceRead_ to Modbus input driver\n", pC_->inputDriver_); + } + + /* TODO: + * reduce the sleeps to see which ones are necessary + * make reconfig useful? + */ + + epicsThreadSleep(0.1); + + // Clear the command/configuration register (a good thing to do but doesn't appear to be necessary) + //status = pC_->writeReg32Array(axisNo_, zeroReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + // Delay + //epicsThreadSleep(0.05); + + // These registers will always have the last config that was sent to the controller + zeroRegisters(confReg_); + + // Send the configuration (array) + // assemble the configuration bits; set the start speed to a non-zero value (100), which is required for the configuration to be accepted + confReg_[CONFIGURATION] = config; + confReg_[BASE_SPEED] = baseSpeed; + confReg_[HOME_TIMEOUT] = homingTimeout << 16; + + // Write all the registers + status = pC_->writeReg32Array(axisNo_, confReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + // Delay + epicsThreadSleep(0.05); + + // Parse the configuration (mostly for asynReport purposes) + // MSW + CaptInput_ = (config & (0x1 << 16)) >> 16; + ExtInput_ = (config & (0x2 << 16)) >> 17; + HomeInput_ = (config & (0x4 << 16)) >> 18; + CWInput_ = (config & (0x18 << 16)) >> 19; + CCWInput_ = (config & (0x60 << 16)) >> 21; + BHPO_ = (config & (0x80 << 16)) >> 23; + QuadEnc_ = (config & (0x100 << 16)) >> 24; + DiagFbk_ = (config & (0x200 << 16)) >> 25; + OutPulse_ = (config & (0x400 << 16)) >> 26; + HomeOp_ = (config & (0x800 << 16)) >> 27; + CardAxis_ = (config & (0x4000 << 16)) >> 30; + OpMode_ = (epicsUInt32)(config & (0x8000 << 16)) >> 31; + // LSW + CaptInputAS_ = config & 0x1; + ExtInputAS_ = (config & 0x2) >> 1; + HomeInputAS_ = (config & 0x4) >> 2; + CWInputAS_ = (config & 0x8) >> 3; + CCWInputAS_ = (config & 0x10) >> 4; + + // Only allow UEIP to be used if the axis is configured to have a quadrature encoder + if ((QuadEnc_ != 0x0) || (DiagFbk_ != 0x0)) { + setIntegerParam(pC_->motorStatusHasEncoder_, 1); + } else { + setIntegerParam(pC_->motorStatusHasEncoder_, 0); + } + + // set position to 0 to clear the "position invalid" status that results from configuring the axis + setPosition(0); + // Tell asynMotor device support the position is zero so that autosave will restore the saved position (doesn't appear to be necessary) + //setDoubleParam(pC_->motorPosition_, 0.0); + + // Delay + //epicsThreadSleep(1.0); + + // Initialize parameters to avoid ASYN_TRACE_FLOW errors + setIntegerParam(pC_->motorStatusDirection_, 1); + // The following are necessary after this commit: + // https://github.com/epics-modules/motor/commit/36dfab4a78725866fab5bd212c4c128a86e9f044 + setIntegerParam(pC_->motorPowerAutoOnOff_, 0); + setDoubleParam(pC_->motorPowerOnDelay_, 0.0); + setDoubleParam(pC_->motorPowerOffDelay_, 0.0); + + // Tell the driver the axis has been created + pC_->axesCreated_ += 1; + + //epicsThreadSleep(1.0); +} + +/* + Configuration Bits: + 0x1 - Caputure Input (0 = Disabled, 1 = Enabled) + 0x2 - External Input (0 = Disabled, 1 = Enabled) + 0x4 - Home Input (0 = Disabled, 1 = Enabled) + 0x8 - + + */ + +extern "C" asynStatus ANF2CreateAxis(const char *ANF2Name, /* specify which controller by port name */ + int axis, /* axis number 0-1 */ + const char *hexConfig, /* desired configuration in hex */ + epicsInt32 baseSpeed, /* base speed */ + epicsInt32 homingTimeout) /* homing timeout */ +{ + ANF2Controller *pC; + epicsInt32 config; + static const char *functionName = "ANF2CreateAxis"; + + pC = (ANF2Controller*) findAsynPortDriver(ANF2Name); + if (!pC) { + printf("%s:%s: Error port %s not found\n", + driverName, functionName, ANF2Name); + return asynError; + } + + errno = 0; + config = strtoul(hexConfig, NULL, 16); + if (errno != 0) { + printf("%s:%s: Error invalid config=%s\n", + driverName, functionName, hexConfig); + return asynError; + } else { + printf("%s:%s: Config=0x%x\n", + driverName, functionName, config); + } + + // baseSpeed is steps/second (1-1,000,000) + if (baseSpeed < 1) { + baseSpeed = 1; + } + if (baseSpeed > 1000000) { + baseSpeed = 1000000; + } + + // homingTimeout is seconds (0-300) + if (homingTimeout < 0) { + homingTimeout = 0; + } + if (homingTimeout > 300) { + homingTimeout = 300; + } + + pC->lock(); + new ANF2Axis(pC, axis, config, baseSpeed, homingTimeout); + pC->unlock(); + return asynSuccess; +} + +void ANF2Axis::zeroRegisters(epicsInt32 *reg) +{ + int i; + + for(i=0; i<5; i++) + { + reg[i] = 0x0; + } +} + +asynStatus ANF2Axis::resetErrors() +{ + asynStatus status; + epicsInt32 errorReg[5]; + static const char *functionName = "ANF2Axis::resetErrors"; + + asynPrint(pasynUser_, ASYN_TRACEIO_DRIVER, "%s: axisNo=%i\n", functionName, axisNo_); + + zeroRegisters(errorReg); + + errorReg[COMMAND] = 0x800 << 16; + + // Send the reset error command + status = pC_->writeReg32Array(axisNo_, errorReg, 5, DEFAULT_CONTROLLER_TIMEOUT); + + return status; +} + +void ANF2Axis::getInfo() +{ + asynStatus status; + int i; + + // For a read (not sure why this is necessary) + status = pasynInt32SyncIO->write(pasynUserForceRead_, 1, DEFAULT_CONTROLLER_TIMEOUT); + + //printf("Registers for axis %i:\n", axisNo_); + + for( i=0; ireadReg16(axisNo_, i, &inputReg_[i], DEFAULT_CONTROLLER_TIMEOUT); + //printf(" status=%d, register=%i, val=0x%x\n", status, i, inputReg_[i]); + } +} + +/* +// reconfig was used during development. It won't be generally useful without effort. +// It isn't obvious that this is a feature that should exist on-the-fly +void ANF2Axis::reconfig(epicsInt32 value) +{ + asynStatus status; + epicsInt32 confReg[5]; + + // TODO: modify this to use the base speed from the parameter, and instead accept a string for a new config + + printf("Reconfiguring axis %i\n", axisNo_); + + // Clear the command/configuration register + status = pC_->writeReg32Array(axisNo_, zeroReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + // Construct the new config + zeroRegisters(confReg); + confReg[CONFIGURATION] = 0x86000000; + confReg[BASE_SPEED] = 0x00000064; + //confReg[HOME_TIMEOUT] = 0x0; + //confReg[CONFIG_REG_3] = 0x0; + //confReg[CONFIG_REG_4] = 0x0; + + epicsThreadSleep(0.05); + + // Send the new config + status = pC_->writeReg32Array(axisNo_, confReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + epicsThreadSleep(0.05); + + // Set the position to clear the invalid position error + setPosition(value); + + epicsThreadSleep(0.05); +} +*/ + +/** Reports on status of the axis + * \param[in] fp The file pointer on which report information will be written + * \param[in] level The level of report detail desired + * + * After printing device-specific information calls asynMotorAxis::report() + */ +void ANF2Axis::report(FILE *fp, int level) +{ + // TODO: make this more useful + + if (level > 0) { + fprintf(fp, "Configuration for axis %i [0x%x]:\n", axisNo_, config_); + fprintf(fp, " Base Speed: %i\n", baseSpeed_); + fprintf(fp, " Homing Timeout: %i\n", homingTimeout_); + fprintf(fp, " Capture Input: %i (Active State: %i)\n", CaptInput_, CaptInputAS_); + fprintf(fp, " External Input: %i (Active State: %i)\n", ExtInput_, ExtInputAS_); + fprintf(fp, " Home Input: %i (Active State: %i)\n", HomeInput_, HomeInputAS_); + fprintf(fp, " CW Input: %i (Active State: %i)\n", CWInput_, CWInputAS_); + fprintf(fp, " CCW Input: %i (Active State: %i)\n", CCWInput_, CCWInputAS_); + fprintf(fp, " Backplane Home Proximity Operation: %i\n", BHPO_); + fprintf(fp, " Quadrature Encoder: %i\n", QuadEnc_); + fprintf(fp, " Diagnostic Feedback: %i\n", DiagFbk_); + fprintf(fp, " Output Pulse Type: %i\n", OutPulse_); + fprintf(fp, " Home Operation: %i\n", HomeOp_); + fprintf(fp, " Card Axis: %i\n", CardAxis_); + fprintf(fp, " Operation Mode for Axis: %i\n", OpMode_); + fprintf(fp, "\n"); + } + + //printf("ANF2Axis::report -> BEFORE asynMotorAxis::report!!\n"); + + // Call the base class method + asynMotorAxis::report(fp, level); + + //printf("ANF2Axis::report -> AFTER asynMotorAxis::report!!\n"); + +} + +// SET VEL & ACCEL +asynStatus ANF2Axis::sendAccelAndVelocity(double acceleration, double velocity) +{ + // static const char *functionName = "ANF2Axis::sendAccelAndVelocity"; + + // ANF2 speed range is 1 to 1,000,000 steps/sec + if (velocity > 1000000.0) { + velocity = 1000000.0; + } + if (velocity < 1.0) { + velocity = 1.0; + } + + // Set the velocity register + motionReg_[SPEED] = NINT(velocity); + + // ANF2 acceleration range 1 to 2000 steps/ms/sec + // Therefore need to limit range received by motor record from 1000 to 2e6 steps/sec/sec + if (acceleration < 1000.0) { + //printf("Acceleration is < 1000: %lf\n", acceleration); + acceleration = 1000.0; + } + if (acceleration > 2000000.0) { + //printf("Acceleration is > 2000: %lf\n", acceleration); + acceleration = 2000000.0; + } + + // Set the accel/decel register + motionReg_[ACCEL_DECEL] = (NINT(acceleration/1000.0) << 16) | (NINT(acceleration/1000.0)); + + return asynSuccess; +} + +/* + * This driver only sets the base speed at initialization when the configuration is sent. + * It is possible that the base speed (VBAS) in the motor record is inconsistent with the + * base speed set at initialization, since there is no way for an asyn motor driver to force + * the base speed to be reset when a user changes it. The resulting acceleration calculated + * by the motor record is likely to be incorrect. The following method calculates the + * acceleration that will give the correct acceleration time (ACCL) for the base speed that + * was specified at initialization. + */ +double ANF2Axis::correctAccel(double minVelocity, double maxVelocity, double acceleration) +{ + double accelTime; + double newAccel; + static const char *functionName = "ANF2Axis::correctAccel"; + + accelTime = (maxVelocity - minVelocity) / acceleration; + newAccel = (maxVelocity - (double)baseSpeed_) / accelTime; + + asynPrint(pasynUser_, ASYN_TRACEIO_DRIVER, + "%s: axisNo=%i, old acceleration=%lf, new acceleration=%lf\n", + functionName, axisNo_, acceleration, newAccel); + + return newAccel; +} + + +// MOVE +asynStatus ANF2Axis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration) +{ + asynStatus status; + epicsInt32 posInt; + static const char *functionName = "ANF2Axis::move"; + + asynPrint(pasynUser_, ASYN_TRACEIO_DRIVER, + "%s: axisNo=%i, relative=%i, minVelocity=%f, maxVelocity=%f, acceleration=%f\n", + functionName, axisNo_, relative, minVelocity, maxVelocity, acceleration); + + // Clear the command/configuration register + status = pC_->writeReg32Array(axisNo_, zeroReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + epicsThreadSleep(0.05); + + // Clear the motition registers + zeroRegisters(motionReg_); + + // Correct the acceleration + acceleration = correctAccel(minVelocity, maxVelocity, acceleration); + + // This sets indices 2 & 3 of motionReg_ + status = sendAccelAndVelocity(acceleration, maxVelocity); + + posInt = NINT(position); + + if (relative) { + //printf(" ** relative move called\n"); + + // Set position and cmd registers + motionReg_[COMMAND] = 0x2 << 16; + motionReg_[POSITION] = posInt; + + } else { + //printf(" ** absolute move called\n"); + + // Set position and cmd registers + motionReg_[COMMAND] = 0x1 << 16; + motionReg_[POSITION] = posInt; + } + + //printf(" ** position = %d\n", posInt); + + // The final registers are zero for absolute and relative moves (this shouldn't be necessary--DELETEME) + motionReg_[CMD_REG_4] = 0x0; + + // Write all the registers atomically + // The number of elements refers to the number of epicsInt32s registers_ + status = pC_->writeReg32Array(axisNo_, motionReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + // Delay the first status read, give the controller some time to return moving status + epicsThreadSleep(0.05); + return status; +} + +// HOME (needs work) +asynStatus ANF2Axis::home(double minVelocity, double maxVelocity, double acceleration, int forwards) +{ + asynStatus status; + static const char *functionName = "ANF2Axis::home"; + + asynPrint(pasynUser_, ASYN_TRACEIO_DRIVER, + "%s: axisNo=%i, forwards=%i, minVelocity=%f, maxVelocity=%f, acceleration=%f\n", + functionName, axisNo_, forwards, minVelocity, maxVelocity, acceleration); + + // Clear the command/configuration register + status = pC_->writeReg32Array(axisNo_, zeroReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + epicsThreadSleep(0.05); + + // Clear the motition registers + zeroRegisters(motionReg_); + + // Correct the acceleration + acceleration = correctAccel(minVelocity, maxVelocity, acceleration); + + // This sets indices 2 & 3 of motionReg_ + status = sendAccelAndVelocity(acceleration, maxVelocity); + + // Note: if the home input is active when the home command is sent, the axis will appear to move in the wrong direction + if (forwards) { + printf(" ** HOMING FORWARDS **\n"); + // The +Find Home (CW) command + motionReg_[COMMAND] = 0x20 << 16; + } else { + printf(" ** HOMING REVERSE **\n"); + // The -Find Home (CCW) command + motionReg_[COMMAND] = 0x40 << 16; + } + + // Write all the registers atomically + status = pC_->writeReg32Array(axisNo_, motionReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + return status; +} + +// JOG +asynStatus ANF2Axis::moveVelocity(double minVelocity, double maxVelocity, double acceleration) +{ + asynStatus status; + //int velo, distance; + static const char *functionName = "ANF2Axis::moveVelocity"; + + asynPrint(pasynUser_, ASYN_TRACEIO_DRIVER, + "%s: axisNo=%d, minVelocity=%f, maxVelocity=%f, acceleration=%f\n", + functionName, axisNo_, minVelocity, maxVelocity, acceleration); + + // + // The jog command requires a different stop than a move command + + // Set a jogging flag + jogging_ = true; + + // Clear the command/configuration register + status = pC_->writeReg32Array(axisNo_, zeroReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + epicsThreadSleep(0.05); + + // Clear the motition registers + zeroRegisters(motionReg_); + + // Note: the jog acceleration doesn't need to be corrected; the JAR field has units of egu/s/s + + if (maxVelocity > 0.0) { + //printf(" ** positive jog called\n"); + + // Set cmd register + motionReg_[COMMAND] = 0x80 << 16; + + // Do nothing to the velocity + + } else { + //printf(" ** negative jog called\n"); + + // Set cmd register + motionReg_[COMMAND] = 0x100 << 16; + + // ANF2 only accepts speeds > 0 + maxVelocity = fabs(maxVelocity); + } + + // This sets indices 2 & 3 of motionReg_ + status = sendAccelAndVelocity(acceleration, maxVelocity); + + // Write all the registers atomically + status = pC_->writeReg32Array(axisNo_, motionReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + // + + /* + velo = NINT(fabs(maxVelocity)); + + // Simulate a jog like the ANG1 driver does. Move 1 million steps + distance = 1000000; + if (maxVelocity > 0.) { + // This is a positive move in ANF2 coordinates + //printf(" ** relative move (JOG pos) called\n"); + status = move(distance, 0, minVelocity, velo, acceleration); + } else { + // This is a negative move in ANF2 coordinates + //printf(" ** relative move (JOG neg) called\n"); + status = move((distance * -1.0), 0, minVelocity, velo, acceleration); + } + */ + + // Delay the first status read, give the controller some time to return moving status + epicsThreadSleep(0.05); + return status; +} + + +// STOP +asynStatus ANF2Axis::stop(double acceleration) +{ + asynStatus status; + epicsInt32 stopReg; + static const char *functionName = "ANF2Axis::stop"; + + asynPrint(pasynUser_, ASYN_TRACEIO_DRIVER, "%s: axisNo=%i\n", functionName, axisNo_); + + //printf("\n STOP \n\n"); + + // The stop commands ignore all 32-bit registers beyond the first + + // Clear the command/configuration register (this causes a jog to stop) + status = pC_->writeReg32Array(axisNo_, zeroReg_, 1, DEFAULT_CONTROLLER_TIMEOUT); + + if (jogging_ == false) + { + //printf("stopping a normal move\n"); + // The immediate stop command cuts the pulses off without any deceleration and causes the position to become invalid + //stopReg = 0x10 << 16; // Immediate stop + // Hold move works very well with normal moves + stopReg = 0x4 << 16; // Hold move + + // This causes a normal move to stop + status = pC_->writeReg32Array(axisNo_, &stopReg, 1, DEFAULT_CONTROLLER_TIMEOUT); + + // Clear the command/configuration register + //status = pC_->writeReg32Array(axisNo_, zeroReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + } else { + // Reset the jogging flag (assume the stop was successful) + //printf("resetting the jog flag\n"); + jogging_ = false; + } + + return status; +} + +// SET +asynStatus ANF2Axis::setPosition(double position) +{ + asynStatus status; + epicsInt32 set_position; + epicsInt32 posReg[5]; + static const char *functionName = "ANF2Axis::setPosition"; + + asynPrint(pasynUser_, ASYN_TRACEIO_DRIVER, "%s: axisNo=%i, position=%lf\n", functionName, axisNo_, position); + + // Clear the command/configuration register + status = pC_->writeReg32Array(axisNo_, zeroReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + epicsThreadSleep(0.1); + + set_position = NINT(position); + + zeroRegisters(posReg); + posReg[COMMAND] = 0x200 << 16; + posReg[POSITION] = set_position; + + // Write all the registers atomically + status = pC_->writeReg32Array(axisNo_, posReg, 5, DEFAULT_CONTROLLER_TIMEOUT); + + // Can this delay be shorter? + epicsThreadSleep(0.2); + + // The ANG1 driver does this; do we need to? + // Clear the command/configuration register + //status = pC_->writeReg32Array(axisNo_, zeroReg_, 5, DEFAULT_CONTROLLER_TIMEOUT); + + return status; +} + +// ENABLE TORQUE +asynStatus ANF2Axis::setClosedLoop(bool closedLoop) +{ + //asynStatus status; + //epicsInt32 clReg[5]; + //static const char *functionName = "ANF2Axis::setClosedLoop"; + + // The ANF2 doesn't have a closed-loop enable/disable command, so do nothing. + // The configuration of an axis: + // * can be changed so that an axis is disabled, but that doesn't disable torque + // * can be changed to disable the use of encoder inputs, but that isn't currently allowed on-the-fly + + /*printf(" ** setClosedLoop called \n"); + if (closedLoop) { + printf("setting enable true\n"); + + setIntegerParam(pC_->motorStatusPowerOn_, 1); + } else { + printf("setting disable false\n"); + setIntegerParam(pC_->motorStatusPowerOn_, 0); + } + return status;*/ + + return asynSuccess; +} + +// POLL +/** Polls the axis. + * This function reads motor position, limit status, home status, and moving status + * It calls setIntegerParam() and setDoubleParam() for each item that it polls, + * and then calls callParamCallbacks() at the end. + * \param[out] moving A flag that is set indicating that the axis is moving (true) or done (false). */ +asynStatus ANF2Axis::poll(bool *moving) +{ + int done; + int lowLimit; + int highLimit; + int enabled; + int cmdError; + int direction; + double position; + double encPosition; + asynStatus status; + epicsInt32 read_val; // don't use a pointer here. The _address_ of read_val should be passed to the read function. + + // Don't do any polling until ALL the axes have been created; this ensures that we don't interpret the configuration values as command values + // This is probably not necessary now that the poller can be started after iocInit + if (pC_->axesCreated_ != pC_->numAxes_) { + *moving = false; + return asynSuccess; + } + + // Force a read operation + //printf(" . . . . . Calling pasynInt32SyncIO->write\n"); + //printf("Calling pasynInt32SyncIO->write(pasynUserForceRead_, 1, TIMEOUT), pasynUserForceRead_->reason=%d\n", pasynUserForceRead_->reason); + status = pasynInt32SyncIO->write(pasynUserForceRead_, 1, DEFAULT_CONTROLLER_TIMEOUT); + //printf(" . . . . . status = %d\n", status); + // if status goto end + + // Read the current motor position + status = pC_->readReg32(axisNo_, POS_RD_UPR, &read_val, DEFAULT_CONTROLLER_TIMEOUT); + //printf("ANF2Axis::poll: Motor position raw: %d\n", read_val); + position = (double) read_val; + setDoubleParam(pC_->motorPosition_, position); + //printf("ANF2Axis::poll: Motor #%i position: %f\n", axisNo_, position); + + // Read encoder position + status = pC_->readReg32(axisNo_, EN_POS_UPR, &read_val, DEFAULT_CONTROLLER_TIMEOUT); + //printf("ANF2Axis::poll: Motor encoder position raw: %d\n", read_val); + encPosition = (double) read_val; + setDoubleParam(pC_->motorEncoderPosition_, encPosition); + //printf("ANF2Axis::poll: Motor #%i encoder position: %f\n", axisNo_, encPosition); + + // Read the moving status of this motor + // + status = pC_->readReg16(axisNo_, STATUS_1, &read_val, DEFAULT_CONTROLLER_TIMEOUT); + //printf("status 1 is 0x%X\n", read_val); + + // Done logic + done = ((read_val & 0x8) >> 3); // status word 1 bit 3 set to 1 when the motor is not in motion. + setIntegerParam(pC_->motorStatusDone_, done); + *moving = done ? false:true; + //printf("done is %d\n", done); + + // Initialize the direction bit to the last value + status = pC_->getIntegerParam(pC_->motorStatusDirection_, &direction); + + // Direction (only set the direction of the controller is moving) + if (!done) { + if (read_val & 0x1) { + direction = 1; + } + if ((read_val & 0x2) >> 1) { + direction = 0; + } + setIntegerParam(pC_->motorStatusDirection_, direction); + } + + // Check for command errors + cmdError = (read_val & 0x1000) ? 1 : 0; + + // Check for enable/disable (not actually the torque status) and set accordingly. + // Enable/disable is determined by the configuration and it isn't obvious why one would disable an axis. + enabled = (read_val & 0x4000); + if (enabled) + setIntegerParam(pC_->motorStatusPowerOn_, 1); + else + setIntegerParam(pC_->motorStatusPowerOn_, 0); + + // Read the limit status + // + status = pC_->readReg16(axisNo_, STATUS_2, &read_val, DEFAULT_CONTROLLER_TIMEOUT); + //printf("status 2 is 0x%X\n", read_val); + + // Set the high limit only when moving in the positive direction + highLimit = (read_val & 0x8) ? (direction & 1) : 0; // a cw limit has been reached + setIntegerParam(pC_->motorStatusHighLimit_, highLimit); + //printf("+limit %d\n", highLimit); + + // Set the low limit only when moving in the negative direction + lowLimit = (read_val & 0x10) ? (!direction & 1) : 0; // a ccw limit has been reached + setIntegerParam(pC_->motorStatusLowLimit_, lowLimit); + //printf("-limit %d\n", lowLimit); + + // Clear command errors so we can attempt to move again + if (cmdError) { + printf("poll: resetting errors\n"); + resetErrors(); + } + + // Should be in init routine? Allows CNEN to be used. + setIntegerParam(pC_->motorStatusGainSupport_, 1); + + // Notify asynMotorController polling routine that we're ready + callParamCallbacks(); + + return status; +} + +/** Code for iocsh registration */ + +/* ANF2CreateController */ +static const iocshArg ANF2CreateControllerArg0 = {"Port name", iocshArgString}; +static const iocshArg ANF2CreateControllerArg1 = {"ANF2 In port name", iocshArgString}; +static const iocshArg ANF2CreateControllerArg2 = {"ANF2 Out port name", iocshArgString}; +static const iocshArg ANF2CreateControllerArg3 = {"Number of axes", iocshArgInt}; +static const iocshArg * const ANF2CreateControllerArgs[] = {&ANF2CreateControllerArg0, + &ANF2CreateControllerArg1, + &ANF2CreateControllerArg2, + &ANF2CreateControllerArg3}; +static const iocshFuncDef ANF2CreateControllerDef = {"ANF2CreateController", 4, ANF2CreateControllerArgs}; +static void ANF2CreateControllerCallFunc(const iocshArgBuf *args) +{ + ANF2CreateController(args[0].sval, args[1].sval, args[2].sval, args[3].ival); +} + +/* ANF2StartPoller */ +static const iocshArg ANF2StartPollerArg0 = {"Port name", iocshArgString}; +static const iocshArg ANF2StartPollerArg1 = {"Moving poll period (ms)", iocshArgInt}; +static const iocshArg ANF2StartPollerArg2 = {"Idle poll period (ms)", iocshArgInt}; +static const iocshArg * const ANF2StartPollerArgs[] = {&ANF2StartPollerArg0, + &ANF2StartPollerArg1, + &ANF2StartPollerArg2}; +static const iocshFuncDef ANF2StartPollerDef = {"ANF2StartPoller", 3, ANF2StartPollerArgs}; +static void ANF2StartPollerCallFunc(const iocshArgBuf *args) +{ + ANF2StartPoller(args[0].sval, args[1].ival, args[2].ival); +} + +/* ANF2CreateAxis */ +static const iocshArg ANF2CreateAxisArg0 = {"Port name", iocshArgString}; +static const iocshArg ANF2CreateAxisArg1 = {"Axis number", iocshArgInt}; +static const iocshArg ANF2CreateAxisArg2 = {"Hex config", iocshArgString}; +static const iocshArg ANF2CreateAxisArg3 = {"Base speed", iocshArgInt}; +static const iocshArg ANF2CreateAxisArg4 = {"Homing timeout", iocshArgInt}; +static const iocshArg * const ANF2CreateAxisArgs[] = {&ANF2CreateAxisArg0, + &ANF2CreateAxisArg1, + &ANF2CreateAxisArg2, + &ANF2CreateAxisArg3, + &ANF2CreateAxisArg4}; +static const iocshFuncDef ANF2CreateAxisDef = {"ANF2CreateAxis", 5, ANF2CreateAxisArgs}; +static void ANF2CreateAxisCallFunc(const iocshArgBuf *args) +{ + ANF2CreateAxis(args[0].sval, args[1].ival, args[2].sval, args[3].ival, args[4].ival); +} + + +static void ANF2Register(void) +{ + iocshRegister(&ANF2CreateControllerDef, ANF2CreateControllerCallFunc); + iocshRegister(&ANF2StartPollerDef, ANF2StartPollerCallFunc); + iocshRegister(&ANF2CreateAxisDef, ANF2CreateAxisCallFunc); +} + +extern "C" { +epicsExportRegistrar(ANF2Register); +} diff --git a/motorApp/AMCISrc/ANF2Driver.h b/motorApp/AMCISrc/ANF2Driver.h new file mode 100644 index 0000000..97e7d84 --- /dev/null +++ b/motorApp/AMCISrc/ANF2Driver.h @@ -0,0 +1,151 @@ +/* +FILENAME... ANF2Driver.h +USAGE... Motor driver support for the AMCI ANF2 controller. + +Kevin Peterson + +Based on the AMCI ANG1 Model 3 device driver written by Kurt Goetze + +*/ + +#include "asynMotorController.h" +#include "asynMotorAxis.h" +//#include +#include + +#define MAX_AXES 12 + +#define MAX_INPUT_REGS 10 +#define MAX_OUTPUT_REGS 10 + +#define AXIS_REG_OFFSET 10 + +/*** Input CMD Registers (16-bit) ***/ +#define STATUS_1 0 +#define STATUS_2 1 +#define POS_RD_UPR 2 +#define POS_RD_LWR 3 +#define EN_POS_UPR 4 +#define EN_POS_LWR 5 +#define EN_CAP_UPR 6 +#define EN_CAP_LWR 7 +// Not used must equal zero #define RESERVED 8 +#define NET_CONN 9 + +/*** Output Command Registers (32-bit) ***/ +#define COMMAND 0 +#define POSITION 1 +#define SPEED 2 +#define ACCEL_DECEL 3 +#define CMD_REG_4 4 + +/*** Output Configuration Registers (32-bit) ***/ +#define CONFIGURATION 0 +#define BASE_SPEED 1 +#define HOME_TIMEOUT 2 +#define CONFIG_REG_3 3 +#define CONFIG_REG_4 4 + +// No. of controller-specific parameters +#define NUM_ANF2_PARAMS 2 + +/** drvInfo strings for extra parameters that the ACR controller supports */ +#define ANF2ResetErrorsString "ANF2_RESET_ERRORS" +#define ANF2GetInfoString "ANF2_GET_INFO" +//#define ANF2ReconfigString "ANF2_RECONFIG" + +class ANF2Axis : public asynMotorAxis +{ +public: + /* These are the methods we override from the base class */ + ANF2Axis(class ANF2Controller *pC, int axisNo, epicsInt32 config, epicsInt32 baseSpeed, epicsInt32 homingTimeout); + void report(FILE *fp, int level); + asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); + asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration); + asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); + asynStatus stop(double acceleration); + asynStatus poll(bool *moving); + asynStatus setPosition(double position); + asynStatus setClosedLoop(bool closedLoop); + +private: + ANF2Controller *pC_; /**< Pointer to the asynMotorController to which this axis belongs. + * Abbreviated because it is used very frequently */ + asynStatus sendAccelAndVelocity(double accel, double velocity); + double correctAccel(double minVelocity, double maxVelocity, double acceleration); + asynStatus resetErrors(); + void getInfo(); + epicsInt32 inputReg_[10]; + //void reconfig(epicsInt32 value); + void zeroRegisters(epicsInt32 *reg); + asynUser *pasynUserForceRead_; + int axisNo_; + epicsInt32 baseSpeed_; + epicsInt32 homingTimeout_; + epicsInt32 config_; + epicsInt32 motionReg_[5]; + epicsInt32 confReg_[5]; + epicsInt32 zeroReg_[5]; + bool jogging_; + // Configuration bits + short CaptInput_; + short ExtInput_; + short HomeInput_; + short CWInput_; + short CCWInput_; + short BHPO_; + short QuadEnc_; + short DiagFbk_; + short OutPulse_; + short HomeOp_; + short CardAxis_; + short OpMode_; + // LSW + short CaptInputAS_; + short ExtInputAS_; + short HomeInputAS_; + short CWInputAS_; + short CCWInputAS_; + +friend class ANF2Controller; +}; + +class ANF2Controller : public asynMotorController { +public: + ANF2Controller(const char *portName, const char *ANF2InPortName, const char *ANF2OutPortName, int numAxes); + void doStartPoller(double movingPollPeriod, double idlePollPeriod); + + void report(FILE *fp, int level); + ANF2Axis* getAxis(asynUser *pasynUser); + ANF2Axis* getAxis(int axisNo); + asynUser *pasynUserInReg_[MAX_AXES][MAX_INPUT_REGS]; + asynUser *pasynUserOutReg_[MAX_AXES]; + + /* These are the methods that we override from asynMotorDriver */ + asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); + //asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value); + //void report(FILE *fp, int level); + + /* These are the methods that are new to this class */ + +protected: + int ANF2ResetErrors_; /** Reset Errors parameter index */ + int ANF2GetInfo_; /**< Get Info parameter index */ + //int ANF2Reconfig_; /**< Reconfig parameter index */ + +private: + asynStatus writeReg16(int, int, int, double); + asynStatus writeReg32(int, int, int, double); + asynStatus writeReg32Array(int, epicsInt32*, int, double); + asynStatus readReg16(int, int, epicsInt32*, double); + asynStatus readReg32(int, int, epicsInt32*, double); + char *inputDriver_; + int numAxes_; + int numModules_; + int axesPerModule_; + double movingPollPeriod_; + double idlePollPeriod_; + int axesCreated_; + +friend class ANF2Axis; +}; diff --git a/motorApp/AMCISrc/ANF2Support.dbd b/motorApp/AMCISrc/ANF2Support.dbd new file mode 100644 index 0000000..7367820 --- /dev/null +++ b/motorApp/AMCISrc/ANF2Support.dbd @@ -0,0 +1,2 @@ +#registrar(ANF2MotorRegister) +registrar(ANF2Register) diff --git a/motorApp/AMCISrc/ANG1Driver.cpp b/motorApp/AMCISrc/ANG1Driver.cpp new file mode 100644 index 0000000..9b16ed9 --- /dev/null +++ b/motorApp/AMCISrc/ANG1Driver.cpp @@ -0,0 +1,640 @@ +/* +FILENAME... ANG1Driver.cpp +USAGE... Motor record driver support for the AMCI ANG1 stepper motor controller over Modbus/TCP. + +Kurt Goetze + +Based on the ACS MCB-4B Model 3 device driver written by Mark Rivers + +*/ + + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "ANG1Driver.h" +#include + +#define NINT(f) (int)((f)>0 ? (f)+0.5 : (f)-0.5) + +static const char *driverName = "ANG1MotorDriver"; + +/*** Input Registers ***/ +#define STATUS_1 0 +#define STATUS_2 1 +#define POS_RD_UPR 2 +#define POS_RD_LWR 3 +#define EN_POS_UPR 4 +#define EN_POS_LWR 5 +#define EN_CAP_UPR 6 +#define EN_CAP_LWR 7 +#define MOT_CUR 8 // programmed motor current (x10) +#define JERK_RD 9 + +/*** Output Registers ***/ +#define CMD_MSW 0 // module 0 starts at register address 1024. This is set in drvModbusAsynConfigure. +#define CMD_LSW 1 +#define POS_WR_UPR 2 +#define POS_WR_LWR 3 +#define SPD_UPR 4 +#define SPD_LWR 5 +#define ACCEL 6 +#define DECEL 7 +// Not used must equal zero #define RESERVED 8 +#define JERK 9 + +/** Constructor, Creates a new ANG1Controller object. + * \param[in] portName The name of the asyn port that will be created for this driver + * \param[in] ANG1InPortName The name of the drvAsynSerialPort that was created previously to connect to the ANG1 controller + * \param[in] ANG1OutPortName The name of the drvAsynSerialPort that was created previously to connect to the ANG1 controller + * \param[in] numAxes The number of axes that this controller supports + * \param[in] movingPollPeriod The time between polls when any axis is moving + * \param[in] idlePollPeriod The time between polls when no axis is moving + */ +ANG1Controller::ANG1Controller(const char *portName, const char *ANG1InPortName, const char *ANG1OutPortName, int numAxes, + double movingPollPeriod, double idlePollPeriod) + : asynMotorController(portName, numAxes, NUM_ANG1_PARAMS, + 0, // No additional interfaces beyond those in base class + 0, // No additional callback interfaces beyond those in base class + ASYN_CANBLOCK | ASYN_MULTIDEVICE, + 1, // autoconnect + 0, 0) // Default priority and stack size +{ + int axis, i; + asynStatus status; + ANG1Axis *pAxis; + static const char *functionName = "ANG1Controller::ANG1Controller"; + + inputDriver_ = epicsStrDup(ANG1InPortName); // Set this before calls to create Axis objects + + // Create controller-specific parameters + createParam(ANG1JerkString, asynParamInt32, &ANG1Jerk_); + + /* Connect to ANG1 controller */ + for (i=0; iconnect(ANG1InPortName, i, &pasynUserInReg_[i], NULL); + } + for (i=0; iconnect(ANG1OutPortName, i, &pasynUserOutReg_[i], NULL); + } + if (status) { + asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, + "%s: cannot connect to ANG1 controller\n", + functionName); + } + for (axis=0; axis 0 then information is printed about each axis. + * After printing controller-specific information it calls asynMotorController::report() + */ +void ANG1Controller::report(FILE *fp, int level) +{ + fprintf(fp, "ANG1 motor driver %s, numAxes=%d, moving poll period=%f, idle poll period=%f\n", + this->portName, numAxes_, movingPollPeriod_, idlePollPeriod_); + + // Call the base class method + asynMotorController::report(fp, level); +} + +/** Returns a pointer to an ANG1Axis object. + * Returns NULL if the axis number encoded in pasynUser is invalid. + * \param[in] pasynUser asynUser structure that encodes the axis index number. */ +ANG1Axis* ANG1Controller::getAxis(asynUser *pasynUser) +{ +// ? return static_cast(asynMotorController::getAxis(pANG1Axis methodsasynUser)); + return static_cast(asynMotorController::getAxis(pasynUser)); +} + +/** Returns a pointer to an ANG1Axis object. + * Returns NULL if the axis number encoded in pasynUser is invalid. + * \param[in] No Axis index number. */ +ANG1Axis* ANG1Controller::getAxis(int axisNo) +{ + return static_cast(asynMotorController::getAxis(axisNo)); +} + +/** Called when asyn clients call pasynInt32->write(). + * Extracts the function and axis number from pasynUser. + * Sets the value in the parameter library (?) + * If the function is ANG1Jerk_ it sets the jerk value in the controller. + * Calls any registered callbacks for this pasynUser->reason and address. + * For all other functions it calls asynMotorController::writeInt32. + * \param[in] pasynUser asynUser structure that encodes the reason and address. + * \param[in] value Value to write. */ +asynStatus ANG1Controller::writeInt32(asynUser *pasynUser, epicsInt32 value) +{ + int function = pasynUser->reason; + asynStatus status = asynSuccess; + ANG1Axis *pAxis = getAxis(pasynUser); + static const char *functionName = "writeInt32"; + + /* Set the parameter and readback in the parameter library. */ + status = setIntegerParam(pAxis->axisNo_, function, value); + + if (function == ANG1Jerk_) + { + // Jerk in units steps/sec/sec/sec (0 - 5000) + printf("Jerk = %d\n", value); + status = writeReg16(JERK, value, DEFAULT_CONTROLLER_TIMEOUT); + +// sprintf(outString_, "%s JOG JRK %f", pAxis->axisName_, value); +// status = writeController(); + + } else { + /* Call base class method */ + status = asynMotorController::writeInt32(pasynUser, value); + } + + /* Do callbacks so higher layers see any changes */ + pAxis->callParamCallbacks(); + if (status) + asynPrint(pasynUser, ASYN_TRACE_ERROR, + "%s:%s: error, status=%d function=%d, value=%d\n", + driverName, functionName, status, function, value); + else + asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, + "%s:%s: function=%d, value=%d\n", + driverName, functionName, function, value); + return status; +} + +asynStatus ANG1Controller::writeReg16(int reg, int output, double timeout) +{ + asynStatus status; + + //printf("writeReg16: writing %d to register %d\n", output, reg); + asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,"writeReg16: writing %d to register %d\n", output, reg); + status = pasynInt32SyncIO->write(pasynUserOutReg_[reg], output, timeout); + epicsThreadSleep(0.01); + + return status ; +} + +asynStatus ANG1Controller::writeReg32(int reg, int output, double timeout) +{ +//.. break 32-bit integer into 2 pieces +//.. write the pieces into ANG1 registers + + asynStatus status; + float fnum; + int lower,upper; + + fnum = (output / 1000.0); + upper = (int)fnum; + fnum = fnum - upper; + fnum = NINT(fnum * 1000); + lower = (int)fnum; + +//could write the words this way +// status = pasynInt32SyncIO->write(pasynUserOutReg_[reg], upper, timeout); +// status = pasynInt32SyncIO->write(pasynUserOutReg_[reg+1], lower, timeout); + +//or this way +// writeReg16(piece1 ie MSW ... + status = writeReg16(reg, upper, DEFAULT_CONTROLLER_TIMEOUT); + +// writeReg16(piece2 ie LSW ... + reg++; + status = writeReg16(reg, lower, DEFAULT_CONTROLLER_TIMEOUT); + + return status ; +} + +asynStatus ANG1Controller::readReg16(int reg, epicsInt32 *input, double timeout) +{ + asynStatus status; + + //printf("reg = %d\n", reg); + asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,"readReg16 reg = %d\n", reg); + status = pasynInt32SyncIO->read(pasynUserInReg_[reg], input, timeout); + + return status ; +} + +asynStatus ANG1Controller::readReg32(int reg, epicsInt32 *combo, double timeout) +{ +//.. read 2 16-bit words from ANG1 registers +//.. assemble 2 16-bit pieces into 1 32-bit integer + + asynStatus status; +// float fnum; + epicsInt32 lowerWord32, upperWord32; // only have pasynInt32SyncIO, not pasynInt16SyncIO , + epicsInt16 lowerWord16, upperWord16; // so we need to get 32-bits and cast to 16-bit integer + + //printf("calling readReg16\n"); + status = readReg16(reg, &upperWord32, timeout); //get Upper Word + upperWord16 = (epicsInt16)upperWord32; + //printf("upperWord16: %d\n", upperWord16); + asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,"readReg32 upperWord16: %d\n", upperWord16); + + // if status != 1 : + reg++; + status = readReg16(reg, &lowerWord32, timeout); //get Lower Word + lowerWord16 = (epicsInt16)lowerWord32; + //printf("lowerWord16: %d\n", lowerWord16); + asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,"readReg32 lowerWord16: %d\n", lowerWord16); + + *combo = NINT((upperWord16 * 1000) + lowerWord16); + + return status ; +} + + +// ANG1Axis methods Here +// These are the ANG1Axis methods + +/** Creates a new ANG1Axis object. + * \param[in] pC Pointer to the ANG1Controller to which this axis belongs. + * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1. + * + * Initializes register numbers, etc. + */ +ANG1Axis::ANG1Axis(ANG1Controller *pC, int axisNo) + : asynMotorAxis(pC, axisNo), + pC_(pC) +{ + int status; + + //status = pasynInt32SyncIO->connect(myModbusInputDriver, 0, &pasynUserForceRead_, "MODBUS_READ"); + status = pasynInt32SyncIO->connect(pC_->inputDriver_, 0, &pasynUserForceRead_, "MODBUS_READ"); + if (status) { + //printf("%s:%s: Error, unable to connect pasynUserForceRead_ to Modbus input driver %s\n", pC_->inputDriver_, pC_->functionName, myModbusInputDriver); + printf("%s: Error, unable to connect pasynUserForceRead_ to Modbus input driver\n", pC_->inputDriver_); + } + printf("ANG1Axis::ANG1Axis : pasynUserForceRead_->reason=%d\n", pasynUserForceRead_->reason); + + // set position to 0 + setPosition(0); +} + +/** Reports on status of the axis + * \param[in] fp The file pointer on which report information will be written + * \param[in] level The level of report detail desired + * + * After printing device-specific information calls asynMotorAxis::report() + */ +void ANG1Axis::report(FILE *fp, int level) +{ + if (level > 0) { + fprintf(fp, " axis %d\n", + axisNo_); + } + + // Call the base class method + asynMotorAxis::report(fp, level); +} + +// SET VEL & ACCEL +asynStatus ANG1Axis::sendAccelAndVelocity(double acceleration, double velocity) +{ + asynStatus status; + // static const char *functionName = "ANG1::sendAccelAndVelocity"; + + // Send the velocity in egus + //sprintf(pC_->outString_, "%1dVA%f", axisNo_ + 1, (velocity*stepSize_)); + //status = pC_->writeController(); + status = pC_->writeReg32(SPD_UPR, NINT(velocity), DEFAULT_CONTROLLER_TIMEOUT); + + // Send the acceleration in egus/sec/sec + //printf(" velocity: %f\n", velocity); + //printf(" acceleration: %f\n", acceleration); + // ANG1 acceleration range 1 to 5000 steps/ms/sec + // Therefore need to limit range received by motor record from 1000 to 5e6 steps/sec/sec + if (acceleration < 1000) { + // print message noting that accel has been capped low + acceleration = 1000; + } + if (acceleration > 5000000) { + // print message noting that accel has been capped high + acceleration = 5000000; + } + // ANG1 acceleration units are steps/millisecond/second, so we divide by 1000 here + status = pC_->writeReg16(ACCEL, NINT(acceleration/1000.0), DEFAULT_CONTROLLER_TIMEOUT); + status = pC_->writeReg16(DECEL, NINT(acceleration/1000.0), DEFAULT_CONTROLLER_TIMEOUT); + return status; +} + +// MOVE +asynStatus ANG1Axis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration) +{ + asynStatus status; + int velo, distance, move_bit; + + printf(" ** ANG1Axis::move called, relative = %d\n", relative); + + status = sendAccelAndVelocity(acceleration, maxVelocity); + + //velo = maxVelocity * SOME_SCALE_FACTOR + velo = NINT(maxVelocity); + if (relative) { + printf(" ** relative move called\n"); + //status = pC_->writeReg32(SPD_UPR, velo, DEFAULT_CONTROLLER_TIMEOUT); + //distance = position * SOM_OTHER_SCALE_FACTOR; + distance = NINT(position); + status = pC_->writeReg32(POS_WR_UPR, distance, DEFAULT_CONTROLLER_TIMEOUT); + move_bit = 0x0; + status = pC_->writeReg16(CMD_MSW, move_bit, DEFAULT_CONTROLLER_TIMEOUT); + move_bit = 0x2; + status = pC_->writeReg16(CMD_MSW, move_bit, DEFAULT_CONTROLLER_TIMEOUT); + } else { + // absolute + printf(" ** absolute move called\n"); + //status = pC_->writeReg32(SPD_UPR, velo, DEFAULT_CONTROLLER_TIMEOUT); + //distance = position * SOM_OTHER_SCALE_FACTOR; + distance = NINT(position); + printf(" ** distance = %d\n", distance); + status = pC_->writeReg32(POS_WR_UPR, distance, DEFAULT_CONTROLLER_TIMEOUT); + move_bit = 0x0; + status = pC_->writeReg16(CMD_MSW, move_bit, DEFAULT_CONTROLLER_TIMEOUT); + move_bit = 0x1; + status = pC_->writeReg16(CMD_MSW, move_bit, DEFAULT_CONTROLLER_TIMEOUT); + } + // Delay the first status read, give the controller some time to return moving status + epicsThreadSleep(0.05); + return status; +} + +// HOME (needs work) +asynStatus ANG1Axis::home(double minVelocity, double maxVelocity, double acceleration, int forwards) +{ + asynStatus status; + int home_bit; + // static const char *functionName = "ANG1Axis::home"; + + //status = sendAccelAndVelocity(acceleration, maxVelocity); + + if (forwards) { + printf(" ** HOMING FORWARDS **\n"); + home_bit = 0x20; + status = pC_->writeReg16(CMD_MSW, home_bit, DEFAULT_CONTROLLER_TIMEOUT); + } else { + home_bit = 0x40; + status = pC_->writeReg16(CMD_MSW, home_bit, DEFAULT_CONTROLLER_TIMEOUT); + } + return status; +} + +// JOG +asynStatus ANG1Axis::moveVelocity(double minVelocity, double maxVelocity, double acceleration) +{ + asynStatus status; + int velo, distance, move_bit; + static const char *functionName = "ANG1Axis::moveVelocity"; + + asynPrint(pasynUser_, ASYN_TRACE_FLOW, + "%s: minVelocity=%f, maxVelocity=%f, acceleration=%f\n", + functionName, minVelocity, maxVelocity, acceleration); + + velo = NINT(fabs(maxVelocity)); + + status = sendAccelAndVelocity(acceleration, velo); + + /* ANG1 does not have jog command. Move 1 million steps */ + if (maxVelocity > 0.) { + /* This is a positive move in ANG1 coordinates */ + //printf(" ** relative move (JOG pos) called\n"); + distance = 1000000; + status = pC_->writeReg32(POS_WR_UPR, distance, DEFAULT_CONTROLLER_TIMEOUT); + move_bit = 0x0; + status = pC_->writeReg16(CMD_MSW, move_bit, DEFAULT_CONTROLLER_TIMEOUT); + move_bit = 0x2; + status = pC_->writeReg16(CMD_MSW, move_bit, DEFAULT_CONTROLLER_TIMEOUT); + } else { + /* This is a negative move in ANG1 coordinates */ + //printf(" ** relative move (JOG neg) called\n"); + distance = -1000000; + status = pC_->writeReg32(POS_WR_UPR, distance, DEFAULT_CONTROLLER_TIMEOUT); + move_bit = 0x0; + status = pC_->writeReg16(CMD_MSW, move_bit, DEFAULT_CONTROLLER_TIMEOUT); + move_bit = 0x2; + status = pC_->writeReg16(CMD_MSW, move_bit, DEFAULT_CONTROLLER_TIMEOUT); + } + // Delay the first status read, give the controller some time to return moving status + epicsThreadSleep(0.05); + return status; +} + + +// STOP +asynStatus ANG1Axis::stop(double acceleration) +{ + asynStatus status; + int stop_bit; + //static const char *functionName = "ANG1Axis::stop"; + + printf("\n STOP \n\n"); + + stop_bit = 0x0; + status = pC_->writeReg16(CMD_MSW, stop_bit, DEFAULT_CONTROLLER_TIMEOUT); + +// stop_bit = 0x10; Immediate stop + stop_bit = 0x4; // Hold move + status = pC_->writeReg16(CMD_MSW, stop_bit, DEFAULT_CONTROLLER_TIMEOUT); + + return status; +} + +// SET +asynStatus ANG1Axis::setPosition(double position) +{ + asynStatus status; + int set_position, set_bit; + //static const char *functionName = "ANG1Axis::setPosition"; + + //status = writeReg32(SPD_UPR, velo, DEFAULT_CONTROLLER_TIMEOUT); + //distance = position * SOM_OTHER_SCALE_FACTOR; + set_position = NINT(position); + + status = pC_->writeReg32(POS_WR_UPR, set_position, DEFAULT_CONTROLLER_TIMEOUT); + + set_bit = 0x200; + status = pC_->writeReg16(CMD_MSW, set_bit, DEFAULT_CONTROLLER_TIMEOUT); + + set_bit = 0x0; + status = pC_->writeReg16(CMD_MSW, set_bit, DEFAULT_CONTROLLER_TIMEOUT); + + return status; +} + +// ENABLE TORQUE +asynStatus ANG1Axis::setClosedLoop(bool closedLoop) +{ + asynStatus status; + int enable = 0x8000; + int disable = 0x0000; + int cmd; + + printf(" ** setClosedLoop called \n"); + if (closedLoop) { + printf("setting enable %X\n", enable); + // Let's reset errors first + cmd = 0x0; + status = pC_->writeReg16(CMD_MSW, cmd, DEFAULT_CONTROLLER_TIMEOUT); + + cmd = 0x400; + status = pC_->writeReg16(CMD_MSW, cmd, DEFAULT_CONTROLLER_TIMEOUT); + + cmd = 0x0; + status = pC_->writeReg16(CMD_MSW, cmd, DEFAULT_CONTROLLER_TIMEOUT); + status = pC_->writeReg16(CMD_LSW, enable, DEFAULT_CONTROLLER_TIMEOUT); + setIntegerParam(pC_->motorStatusPowerOn_, 1); + + } else { + printf("setting disable %X\n", disable); + status = pC_->writeReg16(CMD_LSW, disable, DEFAULT_CONTROLLER_TIMEOUT); + setIntegerParam(pC_->motorStatusPowerOn_, 0); + } + + return status; +} + +// POLL +/** Polls the axis. + * This function reads motor position, limit status, home status, and moving status + * It calls setIntegerParam() and setDoubleParam() for each item that it polls, + * and then calls callParamCallbacks() at the end. + * \param[out] moving A flag that is set indicating that the axis is moving (true) or done (false). */ +asynStatus ANG1Axis::poll(bool *moving) +{ + int done; + int limit; + int enabled; + double position; + asynStatus status; + epicsInt32 read_val; // don't use a pointer here. The _address_ of read_val should be passed to the read function. + + // Force a read operation + //printf(" . . . . . Calling pasynInt32SyncIO->write\n"); + //printf("Calling pasynInt32SyncIO->write(pasynUserForceRead_, 1, TIMEOUT), pasynUserForceRead_->reason=%d\n", pasynUserForceRead_->reason); + status = pasynInt32SyncIO->write(pasynUserForceRead_, 1, DEFAULT_CONTROLLER_TIMEOUT); + //printf(" . . . . . status = %d\n", status); + // if status goto end + + // Read the current motor position + // + //readReg32(int reg, epicsInt32 *combo, double timeout) + status = pC_->readReg32(POS_RD_UPR, &read_val, DEFAULT_CONTROLLER_TIMEOUT); + printf("ANG1Axis::poll: Motor position raw: %d\n", read_val); + position = (double) read_val; + setDoubleParam(pC_->motorPosition_, position); + printf("ANG1Axis::poll: Motor position: %f\n", position); + + // Read the moving status of this motor + // + status = pC_->readReg16(STATUS_1, &read_val, DEFAULT_CONTROLLER_TIMEOUT); + //printf("status 1 is 0x%X\n", read_val); + + // Done logic + done = ((read_val & 0x8) >> 3); // status word 1 bit 3 set to 1 when the motor is not in motion. + setIntegerParam(pC_->motorStatusDone_, done); + *moving = done ? false:true; + printf("done is %d\n", done); + + // Read the limit status + // + status = pC_->readReg16(STATUS_2, &read_val, DEFAULT_CONTROLLER_TIMEOUT); + printf("status 2 is 0x%X\n", read_val); + + limit = (read_val & 0x1); // a cw limit has been reached + setIntegerParam(pC_->motorStatusHighLimit_, limit); + //printf("+limit %d\n", limit); + if (limit) { // reset error and set position so we can move off of the limit + // Reset error + setClosedLoop(1); + // Reset position + //printf(" Reset Position\n"); + setPosition(position); + } + + limit = (read_val & 0x2); // a ccw limit has been reached + setIntegerParam(pC_->motorStatusLowLimit_, limit); + //printf("-limit %d\n", limit); + if (limit) { // reset error and set position so we can move off of the limit + // Reset error + setClosedLoop(1); + // Reset position + setPosition(position); + } + + // test for home + + // Should be in init routine? Allows CNEN to be used. + setIntegerParam(pC_->motorStatusGainSupport_, 1); + + // Check for the torque status and set accordingly. + enabled = (read_val & 0x8000); + if (enabled) + setIntegerParam(pC_->motorStatusPowerOn_, 1); + else + setIntegerParam(pC_->motorStatusPowerOn_, 0); + + // Notify asynMotorController polling routine that we're ready + callParamCallbacks(); + + return status; +} + +/** Code for iocsh registration */ +static const iocshArg ANG1CreateControllerArg0 = {"Port name", iocshArgString}; +static const iocshArg ANG1CreateControllerArg1 = {"ANG1 In port name", iocshArgString}; +static const iocshArg ANG1CreateControllerArg2 = {"ANG1 Out port name", iocshArgString}; +static const iocshArg ANG1CreateControllerArg3 = {"Number of axes", iocshArgInt}; +static const iocshArg ANG1CreateControllerArg4 = {"Moving poll period (ms)", iocshArgInt}; +static const iocshArg ANG1CreateControllerArg5 = {"Idle poll period (ms)", iocshArgInt}; +static const iocshArg * const ANG1CreateControllerArgs[] = {&ANG1CreateControllerArg0, + &ANG1CreateControllerArg1, + &ANG1CreateControllerArg2, + &ANG1CreateControllerArg3, + &ANG1CreateControllerArg4, + &ANG1CreateControllerArg5,}; +static const iocshFuncDef ANG1CreateControllerDef = {"ANG1CreateController", 6, ANG1CreateControllerArgs}; +static void ANG1CreateContollerCallFunc(const iocshArgBuf *args) +{ + ANG1CreateController(args[0].sval, args[1].sval, args[2].sval, args[3].ival, args[4].ival, args[5].ival); +} + +static void ANG1Register(void) +{ + iocshRegister(&ANG1CreateControllerDef, ANG1CreateContollerCallFunc); +} + +extern "C" { +epicsExportRegistrar(ANG1Register); +} diff --git a/motorApp/AMCISrc/ANG1Driver.h b/motorApp/AMCISrc/ANG1Driver.h new file mode 100644 index 0000000..09160f3 --- /dev/null +++ b/motorApp/AMCISrc/ANG1Driver.h @@ -0,0 +1,88 @@ +/* +FILENAME... ANG1Driver.h +USAGE... Motor driver support for the AMCI ANG1 controller. + +Based on MCB-4B driver written by +Mark Rivers +March 1, 2012 + +K. Goetze 2014-03-24 + +*/ + +#include "asynMotorController.h" +#include "asynMotorAxis.h" + +#define MAX_ANG1_AXES 1 + +#define MAX_INPUT_REGS 10 +#define MAX_OUTPUT_REGS 10 + +// No. of controller-specific parameters +#define NUM_ANG1_PARAMS 1 + +/** drvInfo strings for extra parameters that the ACR controller supports */ +#define ANG1JerkString "ANG1_JERK" +//#define ACRReadBinaryIOString "ACR_READ_BINARY_IO" +//#define ACRBinaryInString "ACR_BINARY_IN" +//#define ACRBinaryOutString "ACR_BINARY_OUT" +//#define ACRBinaryOutRBVString "ACR_BINARY_OUT_RBV" + +class ANG1Axis : public asynMotorAxis +{ +public: + /* These are the methods we override from the base class */ + ANG1Axis(class ANG1Controller *pC, int axis); + void report(FILE *fp, int level); + asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); + asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration); + asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); + asynStatus stop(double acceleration); + asynStatus poll(bool *moving); + asynStatus setPosition(double position); + asynStatus setClosedLoop(bool closedLoop); + +private: + ANG1Controller *pC_; /**< Pointer to the asynMotorController to which this axis belongs. + * Abbreviated because it is used very frequently */ + asynStatus sendAccelAndVelocity(double accel, double velocity); + asynUser *pasynUserForceRead_; + +friend class ANG1Controller; +}; + +class ANG1Controller : public asynMotorController { +public: + ANG1Controller(const char *portName, const char *ANG1InPortName, const char *ANG1OutPortName, int numAxes, double movingPollPeriod, double idlePollPeriod); + + void report(FILE *fp, int level); + ANG1Axis* getAxis(asynUser *pasynUser); + ANG1Axis* getAxis(int axisNo); + asynUser *pasynUserInReg_[MAX_INPUT_REGS]; + asynUser *pasynUserOutReg_[MAX_OUTPUT_REGS]; +// asynUser *pasynUserForceRead_; + + + /* These are the methods that we override from asynMotorDriver */ + asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); + //asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value); + //void report(FILE *fp, int level); + //ACRAxis* getAxis(asynUser *pasynUser); + //ACRAxis* getAxis(int axisNo); + + + /* These are the methods that are new to this class */ + +protected: + int ANG1Jerk_; /**< Jerk time parameter index */ + + +private: + asynStatus writeReg16(int, int, double); + asynStatus writeReg32(int, int, double); + asynStatus readReg16(int, epicsInt32*, double); + asynStatus readReg32(int, epicsInt32*, double); + char *inputDriver_; + +friend class ANG1Axis; +}; diff --git a/motorApp/AMCISrc/ANG1Support.dbd b/motorApp/AMCISrc/ANG1Support.dbd new file mode 100644 index 0000000..ab5549c --- /dev/null +++ b/motorApp/AMCISrc/ANG1Support.dbd @@ -0,0 +1,2 @@ +#registrar(ANG1MotorRegister) +registrar(ANG1Register) diff --git a/motorApp/AMCISrc/Makefile b/motorApp/AMCISrc/Makefile new file mode 100644 index 0000000..ac94d32 --- /dev/null +++ b/motorApp/AMCISrc/Makefile @@ -0,0 +1,30 @@ +TOP=../.. + +include $(TOP)/configure/CONFIG +#---------------------------------------- +# ADD MACRO DEFINITIONS AFTER THIS LINE +#============================= + +#================================================== +# Build an IOC support library + +LIBRARY_IOC += AMCI + +# motorRecord.h will be created from motorRecord.dbd +# install devMotorSoft.dbd into /dbd +DBD += AMCISupport.dbd +DBD += ANG1Support.dbd +DBD += ANF2Support.dbd + +# The following are compiled and added to the Support library +AMCI_SRCS += ANG1Driver.cpp +AMCI_SRCS += ANF2Driver.cpp + +AMCI_LIBS += motor +AMCI_LIBS += asyn +AMCI_LIBS += $(EPICS_BASE_IOC_LIBS) + +include $(TOP)/configure/RULES +#---------------------------------------- +# ADD RULES AFTER THIS LINE + diff --git a/motorApp/AMCISrc/README b/motorApp/AMCISrc/README new file mode 100644 index 0000000..57dc499 --- /dev/null +++ b/motorApp/AMCISrc/README @@ -0,0 +1,49 @@ +AMCI ANG1 +========= + +Asyn model 3 driver support for the AMCI ANG1 stepper motor +controller/driver. + +Modbus/TCP communication, using Mark Rivers' modbus module + +Currently some basic parameters, such as IP address, motor current, +etc., will need to be set up on the controller using AMCI's PC/Win software. +Limits and Home also need to be configured with this software: * + + Limit -> ANG1 Input 1 + - Limit -> ANG1 Input 2 + Home -> ANG1 Input 3 + +ANG1 configuration software is available from AMCI's website: + +www.amci.com/product-software.asp + +Eventually I would like to implement the "Configuration Mode" options +down in the driver, making the AMCI PC software necessary only for +initial comms (IP) setup. + +The ANG1 controller/driver is available with or without an ethernet +port. A group of controller/drivers can contain up to 6 modules, one of +which needs to have the ethernet option. A single-channel +implementation would need the module with ethernet. This software is +intended to support configurations of multiple groups of 1 to 6 modules. +Again, each group will need 1 ethernet enabled module (ANG1-E). + + + +asyn model 3 driver files: +-------------------------- +ANG1Driver.cpp +ANG1Driver.h +ANG1Support.dbd + + +* Note: 1.) At some point I would like to add the capability to set these + parameters at boot-time, using the ANG1 "configuration mode". + + 2.) VBAS can only be set in configuration mode (which is not + currently supported) or by using the PC configuration software. + To use VBAS, set the desired value for the axis using the AMCI + PC configuration interface, then set the VBAS field in the + motor record accordingly. That way this value will be used by + the record to correctly calculate acceleration. + diff --git a/motorApp/AMCISrc/README_ANF2.md b/motorApp/AMCISrc/README_ANF2.md new file mode 100644 index 0000000..f72ca19 --- /dev/null +++ b/motorApp/AMCISrc/README_ANF2.md @@ -0,0 +1,70 @@ +# AMCI ANF2 + +Asyn model 3 driver support for the AMCI ANF2 stepper motor controller + +Modbus/TCP communication, using Mark Rivers' modbus module + +## Supported Controller Models + +The following ANF controller versions are supported: +``` +ANF1E: 1-axis stepper controller, modbus tcp/ip +ANF1: 1-axis stepper controller, no network interface +ANF2E: 2-axis stepper controller, modbus tcp/ip +ANF2: 2-axis stepper controller, no network interface +``` +A stack of controller can contain up to 6 modules, one of +which needs to have the ethernet option. A single-channel +implementation would need the module with ethernet. + +## Vendor Software + +ANF2 configuration software is available from AMCI's website: + +www.amci.com/product-software.asp + +Note: The AMCI Net Configurator only works (allows a motor to be moved) if +the controller is configured for EtherNet/IP, however, the EPICS support +requires the device to be configured for Modbus-TCP. + +## Controller Quirks + +* The controller doesn't allow absolute moves when a limit is active; +The only way to move a motor off of a limit is by **jogging**. + +* The base speed is set when an axis is configured. This driver corrects +the acceleration sent by the motor record (VBAS isn't guaranteed to match +the base speed) and sends the acceleration necessary to achieve the desired +acceleration time. + +* The controller doesn't remember its configuration after it is power-cycled. + +* Sending the configuration to the controller invalidates the position +requiring either a home search or the redefinition of the current position. + +* The configuration can't be read after a configuration is accepted by the +controller, after which it automatically switches into command mode. + +* The command to stop an abosolute move generates an error if a jog is in +progress. The command to stop a jog doesn't stop an absolute move. + +## Controller Configuration + +The AMCI Net Configurator can be used to: + +* Change the ip address from the default (192.168.0.50) + +* Change the protocol to Modbus-TCP + +* Determine hex config strings for each axis + +### Example axis configuration + +``` +0x86000000 - Step & Direction pulses, Diagnostic Feedback, No home switch, No limits +0x86280000 - Step & Direction pulses, Diagnostic Feedback, No home switch, Active-low CW/CCW limits +0x84000000 - Step & Direction pulses, No Feedback, No home switch, No Limits +0x84280000 - Step & Direction pulses, No Feedback, No home switch, Active-low CW/CCW limits +0x842C0004 - Step & Direction pulses, No Feedback, Active-high home switch, Active-low CW/CCW limits +0x85280000 - Step & Direction pulses, Quadrature Feedback, No home switch, Active-low CW/CCW limits +``` diff --git a/motorApp/AcsSrc/AcsRegister.cc b/motorApp/AcsSrc/AcsRegister.cc index 5e594ea..384d5fb 100644 --- a/motorApp/AcsSrc/AcsRegister.cc +++ b/motorApp/AcsSrc/AcsRegister.cc @@ -2,9 +2,6 @@ FILENAME... AcsRegister.cc USAGE... Register ACS motor device driver shell commands. -Version: $Revision: 1.4 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:06:58 $ */ /***************************************************************** diff --git a/motorApp/AcsSrc/AcsRegister.h b/motorApp/AcsSrc/AcsRegister.h index c4ceab1..00e0480 100644 --- a/motorApp/AcsSrc/AcsRegister.h +++ b/motorApp/AcsSrc/AcsRegister.h @@ -2,9 +2,6 @@ FILENAME... AcsRegister.h USAGE... This file contains function prototypes for ACS IOC shell commands. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:06:58 $ */ /* diff --git a/motorApp/AcsSrc/devMCB4B.cc b/motorApp/AcsSrc/devMCB4B.cc index d4a394e..73e43d1 100644 --- a/motorApp/AcsSrc/devMCB4B.cc +++ b/motorApp/AcsSrc/devMCB4B.cc @@ -52,7 +52,7 @@ static inline void Debug(int level, const char *format, ...) { /* ----------------Create the dsets for devMCB4B----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long MCB4B_init(void *); +STATIC long MCB4B_init(int); STATIC long MCB4B_init_record(void *); STATIC long MCB4B_start_trans(struct motorRecord *); STATIC RTN_STATUS MCB4B_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -105,13 +105,12 @@ static struct board_stat **MCB4B_cards; /* initialize device support for MCB4B stepper motor */ -STATIC long MCB4B_init(void *arg) +STATIC long MCB4B_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; Debug(5, "MCB4B_init: entry\n"); - if (after == 0) + if (!after) { drvtabptr = &MCB4B_access; (drvtabptr->init)(); diff --git a/motorApp/AcsSrc/drvMCB4B.cc b/motorApp/AcsSrc/drvMCB4B.cc index ea18292..d888947 100644 --- a/motorApp/AcsSrc/drvMCB4B.cc +++ b/motorApp/AcsSrc/drvMCB4B.cc @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include "motor.h" #include "AcsRegister.h" #include "drvMCB4B.h" @@ -262,7 +264,7 @@ STATIC int set_status(int card, int signal) /* Test for post-move string. */ if ((status.Bits.RA_DONE || ls_active == true) && nodeptr != 0 && nodeptr->postmsgptr != 0) { - send_mess(card, nodeptr->postmsgptr, (char) NULL); + send_mess(card, nodeptr->postmsgptr, (char*) NULL); /* The MCB4B always sends back a response, read it and discard */ recv_mess(card, buff, WAIT); nodeptr->postmsgptr = NULL; diff --git a/motorApp/AcsTech80Src/ACSTech80Register.cc b/motorApp/AcsTech80Src/ACSTech80Register.cc index c40e553..e83788f 100644 --- a/motorApp/AcsTech80Src/ACSTech80Register.cc +++ b/motorApp/AcsTech80Src/ACSTech80Register.cc @@ -2,9 +2,6 @@ FILENAME... ACSTech80Register.cc USAGE... Register ACS Tech80 motor device driver shell commands. -Version: $Revision: 1.2 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2008-05-21 21:18:52 $ */ /***************************************************************** diff --git a/motorApp/AcsTech80Src/devSPiiPlus.cc b/motorApp/AcsTech80Src/devSPiiPlus.cc index cf90438..569acba 100644 --- a/motorApp/AcsTech80Src/devSPiiPlus.cc +++ b/motorApp/AcsTech80Src/devSPiiPlus.cc @@ -2,9 +2,6 @@ FILENAME... devSPiiPlus.cc USAGE... Motor record device level support for ACS Tech80 SPiiPlus -Version: $Revision: 1.3 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2008-05-21 21:18:52 $ */ /* @@ -40,6 +37,7 @@ Last Modified: $Date: 2008-05-21 21:18:52 $ #include #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -52,7 +50,7 @@ extern struct driver_table SPiiPlus_access; /* ----------------Create the dsets for devSPiiPlus----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long SPiiPlus_init(void *); +STATIC long SPiiPlus_init(int); STATIC long SPiiPlus_init_record(void *); STATIC long SPiiPlus_start_trans(struct motorRecord *); STATIC RTN_STATUS SPiiPlus_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -106,12 +104,11 @@ static struct board_stat **SPiiPlus_cards; /* initialize device support for SPiiPlus stepper motor */ -STATIC long SPiiPlus_init(void *arg) +STATIC long SPiiPlus_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &SPiiPlus_access; (drvtabptr->init)(); diff --git a/motorApp/AcsTech80Src/drvSPiiPlus.cc b/motorApp/AcsTech80Src/drvSPiiPlus.cc index d4d1f86..f944cc9 100644 --- a/motorApp/AcsTech80Src/drvSPiiPlus.cc +++ b/motorApp/AcsTech80Src/drvSPiiPlus.cc @@ -3,10 +3,6 @@ FILENAME... drvSPiiPlus.cc USAGE... Motor record driver level support for ACS Tech80 SPiiPlus -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AcsTech80Src/drvSPiiPlus.cc $ */ @@ -51,6 +47,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "ACSTech80Register.h" #include "drvSPiiPlus.h" @@ -406,7 +404,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strncpy(send_buff, nodeptr->postmsgptr, 80); - send_mess(card, send_buff, (char) NULL); + send_mess(card, send_buff, (char*) NULL); nodeptr->postmsgptr = NULL; } diff --git a/motorApp/AcsTech80Src/drvSPiiPlus.h b/motorApp/AcsTech80Src/drvSPiiPlus.h index 80dae1c..b91ec86 100644 --- a/motorApp/AcsTech80Src/drvSPiiPlus.h +++ b/motorApp/AcsTech80Src/drvSPiiPlus.h @@ -3,9 +3,6 @@ FILENAME... drvSPiiPlus.h USAGE... This file contains ACS Tech80 driver "include" information that is specific to the SPiiPlus serial controller -Version: $Revision: 1.2 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2008-05-21 21:18:53 $ */ diff --git a/motorApp/AerotechSrc/AerotechRegister.cc b/motorApp/AerotechSrc/AerotechRegister.cc index 9a71904..60cc6be 100644 --- a/motorApp/AerotechSrc/AerotechRegister.cc +++ b/motorApp/AerotechSrc/AerotechRegister.cc @@ -2,10 +2,6 @@ FILENAME... AerotechRegister.cc USAGE... Register Aerotech motor device driver shell commands. -Version: $Revision: 17434 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-05-21 11:43:51 -0500 (Wed, 21 May 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/AerotechRegister.cc $ */ /***************************************************************** @@ -49,40 +45,24 @@ static const iocshArg ensembleAsynConfigArg2 = {"asyn address (GPIB)", iocshArgI static const iocshArg ensembleAsynConfigArg3 = {"Number of Axes", iocshArgInt}; static const iocshArg ensembleAsynConfigArg4 = {"Moving poll rate", iocshArgInt}; static const iocshArg ensembleAsynConfigArg5 = {"Idle poll rate", iocshArgInt}; +static const iocshArg a3200AsynConfigArg6 = {"Task number", iocshArgInt}; +static const iocshArg a3200AsynConfigArg7 = {"Linear move commands", iocshArgInt}; -// A3200 Asyn Setup arguments -static const iocshArg a3200AsynSetupArg0 = {"Max. controller count", iocshArgInt}; -// A3200 Asyn Config arguments -static const iocshArg a3200AsynConfigArg0 = {"Card being configured", iocshArgInt}; -static const iocshArg a3200AsynConfigArg1 = {"asyn port name", iocshArgString}; -static const iocshArg a3200AsynConfigArg2 = {"asyn address", iocshArgInt}; -static const iocshArg a3200AsynConfigArg3 = {"Number of Axes", iocshArgInt}; -static const iocshArg a3200AsynConfigArg4 = {"Task number", iocshArgInt}; -static const iocshArg a3200AsynConfigArg5 = {"Moving poll rate", iocshArgInt}; -static const iocshArg a3200AsynConfigArg6 = {"Idle poll rate", iocshArgInt}; - -static const iocshArg * const EnsembleAsynSetupArgs[2] = {&ensembleAsynSetupArg0}; -static const iocshArg * const EnsembleAsynConfigArgs[6] = {&ensembleAsynConfigArg0, +static const iocshArg * const EnsembleAsynSetupArgs[1] = {&ensembleAsynSetupArg0}; +static const iocshArg * const EnsembleAsynConfigArgs[8] = {&ensembleAsynConfigArg0, &ensembleAsynConfigArg1, &ensembleAsynConfigArg2, &ensembleAsynConfigArg3, &ensembleAsynConfigArg4, - &ensembleAsynConfigArg5}; + &ensembleAsynConfigArg5, + &a3200AsynConfigArg6, + &a3200AsynConfigArg7}; static const iocshFuncDef setupEnsembleAsyn = {"EnsembleAsynSetup", 1, EnsembleAsynSetupArgs}; static const iocshFuncDef configEnsembleAsyn = {"EnsembleAsynConfig", 6, EnsembleAsynConfigArgs}; -static const iocshArg * const A3200AsynSetupArgs[2] = {&a3200AsynSetupArg0}; -static const iocshArg * const A3200AsynConfigArgs[7] = {&a3200AsynConfigArg0, - &a3200AsynConfigArg1, - &a3200AsynConfigArg2, - &a3200AsynConfigArg3, - &a3200AsynConfigArg4, - &a3200AsynConfigArg5, - &a3200AsynConfigArg6}; - -static const iocshFuncDef setupA3200Asyn = {"A3200AsynSetup", 1, A3200AsynSetupArgs}; -static const iocshFuncDef configA3200Asyn = {"A3200AsynConfig", 7, A3200AsynConfigArgs}; +static const iocshFuncDef setupA3200Asyn = {"A3200AsynSetup", 1, EnsembleAsynSetupArgs}; +static const iocshFuncDef configA3200Asyn = {"A3200AsynConfig", 8, EnsembleAsynConfigArgs}; static void setupSoloistCallFunc(const iocshArgBuf *args) { @@ -99,8 +79,7 @@ static void setupEnsembleAsynCallFunc(const iocshArgBuf *args) } static void configEnsembleAsynCallFunc(const iocshArgBuf *args) { - EnsembleAsynConfig(args[0].ival, args[1].sval, args[2].ival, - args[3].ival, args[4].ival, args[5].ival); + EnsembleAsynConfig(args[0].ival, args[1].sval, args[2].ival, args[3].ival, args[4].ival, args[5].ival); } static void setupA3200AsynCallFunc(const iocshArgBuf *args) @@ -109,8 +88,7 @@ static void setupA3200AsynCallFunc(const iocshArgBuf *args) } static void configA3200AsynCallFunc(const iocshArgBuf *args) { - A3200AsynConfig(args[0].ival, args[1].sval, args[2].ival, - args[3].ival, args[4].ival, args[5].ival, args[6].ival); + A3200AsynConfig(args[0].ival, args[1].sval, args[2].ival, args[3].ival, args[4].ival, args[5].ival, args[6].ival, args[7].ival); } static void AerotechRegister(void) diff --git a/motorApp/AerotechSrc/AerotechRegister.h b/motorApp/AerotechSrc/AerotechRegister.h index e7a0cd3..4f34d36 100644 --- a/motorApp/AerotechSrc/AerotechRegister.h +++ b/motorApp/AerotechSrc/AerotechRegister.h @@ -2,10 +2,6 @@ FILENAME... AerotechRegister.h USAGE... This file contains function prototypes for ACS IOC shell commands. -Version: $Revision: 17434 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-05-21 11:43:51 -0500 (Wed, 21 May 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/AerotechRegister.h $ */ /* diff --git a/motorApp/AerotechSrc/EnsembleCommonStructures.h b/motorApp/AerotechSrc/EnsembleCommonStructures.h new file mode 100755 index 0000000..a94e716 --- /dev/null +++ b/motorApp/AerotechSrc/EnsembleCommonStructures.h @@ -0,0 +1,927 @@ +/// \file EnsembleCommonStructures.h +/// \brief Contains some common structures and enumerations. +/// +/// Copyright (c) Aerotech, Inc. 2010-2017. +/// + +#ifndef __Ensemble_COMMON_STRUCTURES_H__ +#define __Ensemble_COMMON_STRUCTURES_H__ + +/// \brief Represents the servo update rates +typedef enum +{ + /// \brief 1 kHz rate (1 msec update time) + SERVORATEPARAMETER_OnekHz = 0, + /// \brief 2 kHz rate (0.5 msec update time) + SERVORATEPARAMETER_TwokHz = 1, + /// \brief 4 kHz rate (0.25 msec update time) + SERVORATEPARAMETER_FourkHz = 2, + /// \brief 5 kHz rate (0.2 msec update time) + SERVORATEPARAMETER_FivekHz = 3, + /// \brief 10 kHz rate (0.1 msec update time) + SERVORATEPARAMETER_TenkHz = 4, + /// \brief 20 kHz rate (0.05 msec update time) + SERVORATEPARAMETER_TwentykHz = 5, +} SERVORATEPARAMETER; + +/// \brief This value represents information about the state of this task. +typedef enum +{ + /// \brief This task was disabled by the TaskExecutionSetup parameter. + TASKSTATE_Inactive = 0, + /// \brief No program is associated or running. + TASKSTATE_Idle = 1, + /// \brief A program is associated but not running. + TASKSTATE_ProgramReady = 2, + /// \brief A program is associated and running. + TASKSTATE_ProgramRunning = 3, + /// \brief A program is associated, was run, and was paused. + TASKSTATE_ProgramPaused = 4, + /// \brief A program is associated, was run, and completed. + TASKSTATE_ProgramComplete = 5, + /// \brief A task error occurred on this task. + TASKSTATE_Error = 6, + /// \brief A task-based plugin is running in this task. + TASKSTATE_RunningPlugin = 10, +} TASKSTATE; + +/// \brief Represents plane status +typedef enum +{ + /// \brief The plane is generating motion on one or more axes. + PLANESTATUS_MotionActive = (1u << 0), + /// \brief The plane is generating a contoured motion on one or more axes. + PLANESTATUS_VelocityProfilingActive = (1u << 1), + /// \brief The plane is accelerating to the commanded velocity. + PLANESTATUS_AccelerationPhaseActive = (1u << 2), + /// \brief The plane is decelerating to the commanded velocity. + PLANESTATUS_DecelerationPhaseActive = (1u << 3), + /// \brief The plane is decelerating to zero velocity when commanded to abort. + PLANESTATUS_MotionAborting = (1u << 4), + /// \brief The plane is waiting for the START command to begin motion. + PLANESTATUS_HoldModeActive = (1u << 5), +} PLANESTATUS; +typedef enum +{ + /// \brief The plane is generating motion on one or more axes. + PLANESTATUSBITS_MotionActiveBit = 0, + /// \brief The plane is generating a contoured motion on one or more axes. + PLANESTATUSBITS_VelocityProfilingActiveBit = 1, + /// \brief The plane is accelerating to the commanded velocity. + PLANESTATUSBITS_AccelerationPhaseActiveBit = 2, + /// \brief The plane is decelerating to the commanded velocity. + PLANESTATUSBITS_DecelerationPhaseActiveBit = 3, + /// \brief The plane is decelerating to zero velocity when commanded to abort. + PLANESTATUSBITS_MotionAbortingBit = 4, + /// \brief The plane is waiting for the START command to begin motion. + PLANESTATUSBITS_HoldModeActiveBit = 5, +} PLANESTATUSBITS; + +/// \brief Represents the debug flags on the controller +typedef enum +{ + /// \brief + DEBUGFLAGS_PrintStringCallbackPending = (1u << 0), + /// \brief + DEBUGFLAGS_CollectionTriggered = (1u << 1), + /// \brief + DEBUGFLAGS_CollectionDone = (1u << 2), + /// \brief + DEBUGFLAGS_InputBoxCallbackPending = (1u << 3), +} DEBUGFLAGS; +typedef enum +{ + /// \brief + DEBUGFLAGSBITS_PrintStringCallbackPendingBit = 0, + /// \brief + DEBUGFLAGSBITS_CollectionTriggeredBit = 1, + /// \brief + DEBUGFLAGSBITS_CollectionDoneBit = 2, + /// \brief + DEBUGFLAGSBITS_InputBoxCallbackPendingBit = 3, +} DEBUGFLAGSBITS; + +/// \brief Represents an axis status +typedef enum +{ + /// \brief The axis is enabled. + AXISSTATUS_Enabled = (1u << 0), + /// \brief The axis is homed. + AXISSTATUS_Homed = (1u << 1), + /// \brief The axis is considered to be in position as configured by the InPositionDistance and InPositionTime parameters. + AXISSTATUS_InPosition = (1u << 2), + /// \brief The axis is performing drive generated motion. + AXISSTATUS_MoveActive = (1u << 3), + /// \brief The axis is accelerating. + AXISSTATUS_AccelerationPhase = (1u << 4), + /// \brief The axis is decelerating. + AXISSTATUS_DecelerationPhase = (1u << 5), + /// \brief Position capture is armed on the axis and waiting for a trigger signal. + AXISSTATUS_PositionCaptureActive = (1u << 6), + /// \brief For piezo drives, the controller clamps the motor output to the value of the PiezoVoltageClampLow or the PiezoVoltageClampHigh parameter. For all other drives, the controller clamps the motor output to the value of the MaxCurrentClamp parameter. + AXISSTATUS_CurrentClamp = (1u << 7), + /// \brief This represents the state of the dedicated brake output. + AXISSTATUS_BrakeOutput = (1u << 8), + /// \brief Indicates the direction of the active (or last) motion. + AXISSTATUS_MotionIsCw = (1u << 9), + /// \brief Gearing or camming is currently active on the axis. + AXISSTATUS_MasterSlaveControl = (1u << 10), + /// \brief The correction table for this axis is currently being applied. + AXISSTATUS_CalibrationActive = (1u << 11), + /// \brief A calibration file contains a calibration table that corrects this axis. The state of this bit is not affected by the CALENABLE or CALDISABLE commands. + AXISSTATUS_CalibrationEnabled = (1u << 12), + /// \brief The axis is currently performing motion under control of the JOYSTICK command. + AXISSTATUS_JoystickControl = (1u << 13), + /// \brief The axis is currently performing motion as part of the home cycle. + AXISSTATUS_Homing = (1u << 14), + /// \brief The axis position lost synchronization with the master and is ignoring profiled position. + AXISSTATUS_MasterMotionSuppressed = (1u << 15), + /// \brief This gantry is actively part of a gantry pair. + AXISSTATUS_GantryModeActive = (1u << 16), + /// \brief This axis is a gantry master in a gantry pair. + AXISSTATUS_GantryMasterActive = (1u << 17), + /// \brief This axis is operating under control of the AUTOFOCUS loop. + AXISSTATUS_AutofocusActive = (1u << 18), + /// \brief The filter defined by the Command Shaping Parameters is complete. + AXISSTATUS_CommandShapingFilterDone = (1u << 19), + /// \brief The axis is considered to be in position as configured by the InPosition2Distance and InPosition2Time parameters. + AXISSTATUS_InPosition2 = (1u << 20), + /// \brief The axis is operating under servo control. + AXISSTATUS_ServoControl = (1u << 21), + /// \brief This represents the state of the CW end of travel limit input. It is not affected by the active polarity, which is configured by the EndOfTravelLimitSetup parameter. + AXISSTATUS_CwEndOfTravelLimitInput = (1u << 22), + /// \brief This represents the state of the CCW end of travel limit input. It is not affected by the active polarity, which is configured by the EndOfTravelLimitSetup parameter. + AXISSTATUS_CcwEndOfTravelLimitInput = (1u << 23), + /// \brief This represents the state of the home limit input. It is not affected by the active polarity, which is configured by the EndOfTravelLimitSetup parameter. + AXISSTATUS_HomeLimitInput = (1u << 24), + /// \brief This represents the state of the marker input. + AXISSTATUS_MarkerInput = (1u << 25), + /// \brief This represents the state of the Hall-effect sensor A input. + AXISSTATUS_HallAInput = (1u << 26), + /// \brief This represents the state of the Hall-effect sensor B input. + AXISSTATUS_HallBInput = (1u << 27), + /// \brief This represents the state of the Hall-effect sensor C input. + AXISSTATUS_HallCInput = (1u << 28), + /// \brief An error condition is present on the Sine encoder input of the position feedback device. + AXISSTATUS_SineEncoderError = (1u << 29), + /// \brief An error condition is present on the Cosine encoder input of the position feedback device. + AXISSTATUS_CosineEncoderError = (1u << 30), + /// \brief This represents the state of the emergency stop sense input. + AXISSTATUS_EmergencyStopInput = (1u << 31), +} AXISSTATUS; +typedef enum +{ + /// \brief The axis is enabled. + AXISSTATUSBITS_EnabledBit = 0, + /// \brief The axis is homed. + AXISSTATUSBITS_HomedBit = 1, + /// \brief The axis is considered to be in position as configured by the InPositionDistance and InPositionTime parameters. + AXISSTATUSBITS_InPositionBit = 2, + /// \brief The axis is performing drive generated motion. + AXISSTATUSBITS_MoveActiveBit = 3, + /// \brief The axis is accelerating. + AXISSTATUSBITS_AccelerationPhaseBit = 4, + /// \brief The axis is decelerating. + AXISSTATUSBITS_DecelerationPhaseBit = 5, + /// \brief Position capture is armed on the axis and waiting for a trigger signal. + AXISSTATUSBITS_PositionCaptureActiveBit = 6, + /// \brief For piezo drives, the controller clamps the motor output to the value of the PiezoVoltageClampLow or the PiezoVoltageClampHigh parameter. For all other drives, the controller clamps the motor output to the value of the MaxCurrentClamp parameter. + AXISSTATUSBITS_CurrentClampBit = 7, + /// \brief This represents the state of the dedicated brake output. + AXISSTATUSBITS_BrakeOutputBit = 8, + /// \brief Indicates the direction of the active (or last) motion. + AXISSTATUSBITS_MotionIsCwBit = 9, + /// \brief Gearing or camming is currently active on the axis. + AXISSTATUSBITS_MasterSlaveControlBit = 10, + /// \brief The correction table for this axis is currently being applied. + AXISSTATUSBITS_CalibrationActiveBit = 11, + /// \brief A calibration file contains a calibration table that corrects this axis. The state of this bit is not affected by the CALENABLE or CALDISABLE commands. + AXISSTATUSBITS_CalibrationEnabledBit = 12, + /// \brief The axis is currently performing motion under control of the JOYSTICK command. + AXISSTATUSBITS_JoystickControlBit = 13, + /// \brief The axis is currently performing motion as part of the home cycle. + AXISSTATUSBITS_HomingBit = 14, + /// \brief The axis position lost synchronization with the master and is ignoring profiled position. + AXISSTATUSBITS_MasterMotionSuppressedBit = 15, + /// \brief This gantry is actively part of a gantry pair. + AXISSTATUSBITS_GantryModeActiveBit = 16, + /// \brief This axis is a gantry master in a gantry pair. + AXISSTATUSBITS_GantryMasterActiveBit = 17, + /// \brief This axis is operating under control of the AUTOFOCUS loop. + AXISSTATUSBITS_AutofocusActiveBit = 18, + /// \brief The filter defined by the Command Shaping Parameters is complete. + AXISSTATUSBITS_CommandShapingFilterDoneBit = 19, + /// \brief The axis is considered to be in position as configured by the InPosition2Distance and InPosition2Time parameters. + AXISSTATUSBITS_InPosition2Bit = 20, + /// \brief The axis is operating under servo control. + AXISSTATUSBITS_ServoControlBit = 21, + /// \brief This represents the state of the CW end of travel limit input. It is not affected by the active polarity, which is configured by the EndOfTravelLimitSetup parameter. + AXISSTATUSBITS_CwEndOfTravelLimitInputBit = 22, + /// \brief This represents the state of the CCW end of travel limit input. It is not affected by the active polarity, which is configured by the EndOfTravelLimitSetup parameter. + AXISSTATUSBITS_CcwEndOfTravelLimitInputBit = 23, + /// \brief This represents the state of the home limit input. It is not affected by the active polarity, which is configured by the EndOfTravelLimitSetup parameter. + AXISSTATUSBITS_HomeLimitInputBit = 24, + /// \brief This represents the state of the marker input. + AXISSTATUSBITS_MarkerInputBit = 25, + /// \brief This represents the state of the Hall-effect sensor A input. + AXISSTATUSBITS_HallAInputBit = 26, + /// \brief This represents the state of the Hall-effect sensor B input. + AXISSTATUSBITS_HallBInputBit = 27, + /// \brief This represents the state of the Hall-effect sensor C input. + AXISSTATUSBITS_HallCInputBit = 28, + /// \brief An error condition is present on the Sine encoder input of the position feedback device. + AXISSTATUSBITS_SineEncoderErrorBit = 29, + /// \brief An error condition is present on the Cosine encoder input of the position feedback device. + AXISSTATUSBITS_CosineEncoderErrorBit = 30, + /// \brief This represents the state of the emergency stop sense input. + AXISSTATUSBITS_EmergencyStopInputBit = 31, +} AXISSTATUSBITS; + +/// \brief Represents the motor type +typedef enum +{ + /// \brief AC Brushless (Hall-Effect Switches) + MOTORTYPE_ACBrushlessHallEffect = 0, + /// \brief AC Brushless (Auto-MSET) + MOTORTYPE_ACBrushlessAutoMSET = 1, + /// \brief DC Brush + MOTORTYPE_DCBrush = 2, + /// \brief Stepper Motor + MOTORTYPE_StepperMotor = 3, + /// \brief 2-Phase AC Brushless + MOTORTYPE_TwoPhaseACBrushless = 6, + /// \brief AC Brushless (Commutation Search) + MOTORTYPE_ACBrushlessCommutationSearch = 7, + /// \brief Piezo Actuator + MOTORTYPE_PiezoActuator = 8, +} MOTORTYPE; + +/// \brief Represents the home type +typedef enum +{ + /// \brief Home Past Limit to Marker + HOMETYPE_PastLimittoMarker = 0, + /// \brief Home to Limit and Reverse to Marker + HOMETYPE_ToLimitandReversetoMarker = 1, + /// \brief Home to Marker Only + HOMETYPE_ToMarkerOnly = 2, + /// \brief Home to Limit Only + HOMETYPE_ToLimitOnly = 3, + /// \brief Home at Current Position + HOMETYPE_AtCurrentPosition = 4, + /// \brief Home at Current Position Absolute + HOMETYPE_AtCurrentPositionAbsolute = 6, +} HOMETYPE; + +/// \brief Represents the position feedback type +typedef enum +{ + /// \brief None (Open-Loop) + POSITIONFEEDBACKTYPE_None = 0, + /// \brief Local Encoder Counter + POSITIONFEEDBACKTYPE_LocalEncoderCounter = 1, + /// \brief Encoder Multiplier + POSITIONFEEDBACKTYPE_EncoderMultiplier = 2, + /// \brief Analog Input + POSITIONFEEDBACKTYPE_AnalogInput = 3, + /// \brief EnDat Absolute Encoder + POSITIONFEEDBACKTYPE_EnDatAbsoluteEncoder = 4, + /// \brief Hall-Effect Switches + POSITIONFEEDBACKTYPE_HallEffectSwitches = 5, + /// \brief Resolver + POSITIONFEEDBACKTYPE_Resolver = 6, + /// \brief Resolute Absolute Encoder + POSITIONFEEDBACKTYPE_ResoluteAbsoluteEncoder = 9, + /// \brief Capacitance Sensor + POSITIONFEEDBACKTYPE_CapacitanceSensor = 11, +} POSITIONFEEDBACKTYPE; + +/// \brief Represents the velocity feedback type +typedef enum +{ + /// \brief None (Use Position Feedback) + VELOCITYFEEDBACKTYPE_None = 0, + /// \brief Local Encoder Counter + VELOCITYFEEDBACKTYPE_LocalEncoderCounter = 1, + /// \brief Encoder Multiplier + VELOCITYFEEDBACKTYPE_EncoderMultiplier = 2, + /// \brief Analog Input + VELOCITYFEEDBACKTYPE_AnalogInput = 3, + /// \brief Resolver + VELOCITYFEEDBACKTYPE_Resolver = 6, +} VELOCITYFEEDBACKTYPE; + +/// \brief Specifies the status flags of data collection +typedef enum +{ + /// \brief Data collection was triggered + DATACOLLECTIONFLAGS_Triggered = (1u << 2), + /// \brief Data collection is done + DATACOLLECTIONFLAGS_Done = (1u << 3), + /// \brief Data collection buffer overflowed + DATACOLLECTIONFLAGS_Overflow = (1u << 5), + /// \brief Data collection was started by a SCOPETRIG + DATACOLLECTIONFLAGS_IsScopeTrigInitiated = (1u << 6), +} DATACOLLECTIONFLAGS; +typedef enum +{ + /// \brief Data collection was triggered + DATACOLLECTIONFLAGSBITS_TriggeredBit = 2, + /// \brief Data collection is done + DATACOLLECTIONFLAGSBITS_DoneBit = 3, + /// \brief Data collection buffer overflowed + DATACOLLECTIONFLAGSBITS_OverflowBit = 5, + /// \brief Data collection was started by a SCOPETRIG + DATACOLLECTIONFLAGSBITS_IsScopeTrigInitiatedBit = 6, +} DATACOLLECTIONFLAGSBITS; + +/// \brief Represents the piezo default servo state. +typedef enum +{ + /// \brief Servo Off + PIEZODEFAULTSERVOSTATE_Off = 0, + /// \brief Servo On + PIEZODEFAULTSERVOSTATE_On = 1, +} PIEZODEFAULTSERVOSTATE; + +/// \brief Specifies which status item to collect +typedef enum +{ + /// \brief Position command + STATUSITEM_PositionCommand = 0, + /// \brief Position feedback + STATUSITEM_PositionFeedback = 1, + /// \brief Position feedback auxiliary + STATUSITEM_PositionFeedbackAuxiliary = 2, + /// \brief Axis status + STATUSITEM_AxisStatus = 3, + /// \brief Axis fault + STATUSITEM_AxisFault = 4, + /// \brief Analog input #0 + STATUSITEM_AnalogInput0 = 5, + /// \brief Analog input #1 + STATUSITEM_AnalogInput1 = 6, + /// \brief Analog output #0 + STATUSITEM_AnalogOutput0 = 7, + /// \brief Analog output #1 + STATUSITEM_AnalogOutput1 = 8, + /// \brief Digital input #0 + STATUSITEM_DigitalInput0 = 9, + /// \brief Digital input #1 + STATUSITEM_DigitalInput1 = 10, + /// \brief Digital input #2 + STATUSITEM_DigitalInput2 = 11, + /// \brief Digital output #0 + STATUSITEM_DigitalOutput0 = 12, + /// \brief Digital output #1 + STATUSITEM_DigitalOutput1 = 13, + /// \brief Digital output #2 + STATUSITEM_DigitalOutput2 = 14, + /// \brief Current command + STATUSITEM_CurrentCommand = 15, + /// \brief Current feedback + STATUSITEM_CurrentFeedback = 16, + /// \brief Amplifier temperature + STATUSITEM_AmplifierTemperature = 17, + /// \brief Auxiliary flags + STATUSITEM_DebugFlags = 18, + /// \brief Program position command + STATUSITEM_ProgramPositionCommand = 19, + /// \brief Program count of library task + STATUSITEM_ProgramCountTaskLibrary = 20, + /// \brief Program count of task #1 + STATUSITEM_ProgramCountTask1 = 21, + /// \brief Program count of task #2 + STATUSITEM_ProgramCountTask2 = 22, + /// \brief Program count of task #3 + STATUSITEM_ProgramCountTask3 = 23, + /// \brief Program count of task #4 + STATUSITEM_ProgramCountTask4 = 24, + /// \brief Time of the packet retrieval in milliseconds + STATUSITEM_PacketTime = 25, + /// \brief Program position feedback + STATUSITEM_ProgramPositionFeedback = 26, + /// \brief Absolute feedback + STATUSITEM_AbsoluteFeedback = 27, + /// \brief Status of plane #0 + STATUSITEM_PlaneStatus0 = 28, + /// \brief Status of plane #1 + STATUSITEM_PlaneStatus1 = 29, + /// \brief Status of plane #2, Epaq only + STATUSITEM_PlaneStatus2 = 30, + /// \brief Status of plane #3, Epaq only + STATUSITEM_PlaneStatus3 = 31, + /// \brief State of task #1 + STATUSITEM_TaskState1 = 33, + /// \brief State of task #2 + STATUSITEM_TaskState2 = 34, + /// \brief State of task #3 + STATUSITEM_TaskState3 = 35, + /// \brief State of task #4 + STATUSITEM_TaskState4 = 36, + /// \brief Analog input #2 + STATUSITEM_AnalogInput2 = 38, + /// \brief Analog input #3 + STATUSITEM_AnalogInput3 = 39, + /// \brief Analog output #2 + STATUSITEM_AnalogOutput2 = 40, + /// \brief Analog output #3 + STATUSITEM_AnalogOutput3 = 41, + /// \brief Velocity Command + STATUSITEM_VelocityCommand = 42, + /// \brief Velocity Feedback + STATUSITEM_VelocityFeedback = 43, + /// \brief Acceleration Command + STATUSITEM_AccelerationCommand = 44, + /// \brief Velocity Error + STATUSITEM_VelocityError = 45, + /// \brief Position Error + STATUSITEM_PositionError = 46, + /// \brief Current Error + STATUSITEM_CurrentError = 47, + /// \brief Acceleration Feedback + STATUSITEM_AccelerationFeedback = 48, + /// \brief Acceleration Error + STATUSITEM_AccelerationError = 49, + /// \brief Analog output #4 + STATUSITEM_AnalogOutput4 = 50, + /// \brief Piezo Voltage Feedback + STATUSITEM_PiezoVoltageFeedback = 51, + /// \brief Piezo Voltage Command + STATUSITEM_PiezoVoltageCommand = 52, +} STATUSITEM; + +/// \brief The type of loop transmission disturbance to use +typedef enum +{ + /// \brief Turn off loop transmission + LOOPTRANSMISSIONMODE_Off = 0, + /// \brief Uses a sinusoid disturbance + LOOPTRANSMISSIONMODE_Sinusoid = 1, + /// \brief Uses a sinusoid disturbance and excites both axes of a gantry + LOOPTRANSMISSIONMODE_SinusoidGantry = 2, + /// \brief Uses a white noise disturbance + LOOPTRANSMISSIONMODE_WhiteNoise = 3, + /// \brief Use a white noise disturbance and excites both axes of a gantry + LOOPTRANSMISSIONMODE_WhiteNoiseGantry = 4, +} LOOPTRANSMISSIONMODE; + +/// \brief The loop transmission type to use +typedef enum +{ + /// \brief Open Loop + LOOPTRANSMISSIONTYPE_OpenLoop = 0, + /// \brief Closed Loop + LOOPTRANSMISSIONTYPE_ClosedLoop = 1, + /// \brief Current Loop + LOOPTRANSMISSIONTYPE_CurrentLoop = 2, + /// \brief AF Open Loop + LOOPTRANSMISSIONTYPE_AFOpenLoop = 3, + /// \brief AF Closed Loop + LOOPTRANSMISSIONTYPE_AFClosedLoop = 4, +} LOOPTRANSMISSIONTYPE; + +/// \brief Represents the OnOff mode in AeroBasic +typedef enum +{ + /// \brief Off or 0 is issued + ONOFF_Off = 0, + /// \brief On or 1 is issued + ONOFF_On = 1, +} ONOFF; + +/// \brief Represents the PSO mode in AeroBasic +typedef enum +{ + /// \brief Reset PSO + PSOMODE_Reset = 0, + /// \brief Turn off PSO + PSOMODE_Off = 1, + /// \brief Arm PSO + PSOMODE_Arm = 2, + /// \brief Fire PSO + PSOMODE_Fire = 3, + /// \brief Turn on PSO + PSOMODE_On = 4, + /// \brief Fire Continuous + PSOMODE_FireContinuous = 5, +} PSOMODE; + +/// \brief The ethernet status information +typedef enum +{ + /// \brief Whether there is data to be transmitted + ETHERNETSTATUS_DataInTransmitter = (1u << 0), + /// \brief Whether there is data to be processed + ETHERNETSTATUS_DataInReceiver = (1u << 1), +} ETHERNETSTATUS; +typedef enum +{ + /// \brief Whether there is data to be transmitted + ETHERNETSTATUSBITS_DataInTransmitterBit = 0, + /// \brief Whether there is data to be processed + ETHERNETSTATUSBITS_DataInReceiverBit = 1, +} ETHERNETSTATUSBITS; + +/// \brief Represents the semaphores in AeroBasic +typedef enum +{ + /// \brief Modbus registers semaphore + SEMAPHORES_ModbusRegisters = 0, + /// \brief Global integers semaphore + SEMAPHORES_GlobalIntegers = 1, + /// \brief Global doubles semaphore + SEMAPHORES_GlobalDoubles = 2, +} SEMAPHORES; + +/// \brief The wait option for waiting for a move to be completed +typedef enum +{ + /// \brief Wait in position + WAITOPTION_InPosition = 0, + /// \brief Wait for move done + WAITOPTION_MoveDone = 1, +} WAITOPTION; + +/// \brief Represents the wait mode in AeroBasic +typedef enum +{ + /// \brief Do not wait for motion to be done + WAITTYPE_NoWait = 0, + /// \brief Wait for motion to be done + WAITTYPE_MoveDone = 1, + /// \brief Wait for axis to be in position + WAITTYPE_InPos = 2, +} WAITTYPE; + +/// \brief The Mode types that can be retrieved by using the GETMODE immediate command. +typedef enum +{ + /// \brief Returns the Motion Mode type (absolute/incremental). + MODETYPE_MotionMode = 0, + /// \brief Returns the Wait Mode type (in position / move done / no wait). + MODETYPE_WaitMode = 1, + /// \brief Returns the Ramp Mode type (linear / SCurve). + MODETYPE_RampMode = 2, + /// \brief Returns the Velocity Mode type (profiled / not profiled). + MODETYPE_VelocityMode = 3, + /// \brief Returns the S-curve value. + MODETYPE_ScurveValue = 4, + /// \brief Returns the Timescale value. + MODETYPE_TimeScaleValue = 5, + /// \brief Returns the default velocity value. + MODETYPE_DefaultVelocityValue = 6, + /// \brief Returns the acceleration rate value. + MODETYPE_AccelRateValue = 7, + /// \brief Returns the acceleration time value. + MODETYPE_AccelTimeValue = 8, + /// \brief Returns the acceleration distance value. + MODETYPE_AccelDistValue = 9, + /// \brief Returns the deceleration rate value. + MODETYPE_DecelRateValue = 10, + /// \brief Returns the deceleration time value. + MODETYPE_DecelTimeValue = 11, + /// \brief Returns the deceleration distance value. + MODETYPE_DecelDistValue = 12, + /// \brief Returns the current plane number for the task. + MODETYPE_Plane = 14, +} MODETYPE; + +/// \brief The type of error that occured during compilation +typedef enum +{ + /// \brief The syntax does not follow AeroBasic + COMPILERERRORTYPE_Syntax = 0, + /// \brief Specific testing detected an error (ex: unknown register set) + COMPILERERRORTYPE_Process = 1, + /// \brief The operating system blocked an operation (ex: file access restriction) + COMPILERERRORTYPE_System = 2, + /// \brief An unrecoverable error occured (ex: out of memory) + COMPILERERRORTYPE_Unrecoverable = 3, + /// \brief The message given is a warning + COMPILERERRORTYPE_Warning = 4, +} COMPILERERRORTYPE; + +/// \brief +typedef enum +{ + /// \brief + DAYOFWEEK_Sunday = 0, + /// \brief + DAYOFWEEK_Monday = 1, + /// \brief + DAYOFWEEK_Tuesday = 2, + /// \brief + DAYOFWEEK_Wednesday = 3, + /// \brief + DAYOFWEEK_Thursday = 4, + /// \brief + DAYOFWEEK_Friday = 5, + /// \brief + DAYOFWEEK_Saturday = 6, +} DAYOFWEEK; + +/// \brief If this is different from , corrective measures should be taken. +typedef enum +{ + /// \brief There are no mismatches between the axes + AXISMISMATCH_None = 0, + /// \brief The version of firmware is different between the axes, update the firmware + AXISMISMATCH_FirmwareVersion = 1, + /// \brief The axes numbers are different from expected, please setup the axes that are expected + AXISMISMATCH_AxisMask = 2, +} AXISMISMATCH; + +/// \brief This is an enumeration of the Register types used when calling the Register immediate command functions found in . +typedef enum +{ + /// \brief Global Integers + REGISTERTYPE_GlobalIntegers = 0, + /// \brief Global Doubles + REGISTERTYPE_GlobalDoubles = 1, + /// \brief Conversion Registers + REGISTERTYPE_ConversionRegisters = 2, + /// \brief Modbus Master Input Registers + REGISTERTYPE_ModbusMasterInputWords = 3, + /// \brief Modbus Master Output Registers + REGISTERTYPE_ModbusMasterOutputWords = 4, + /// \brief Modbus Master Input Bit Registers + REGISTERTYPE_ModbusMasterInputBits = 5, + /// \brief Modbus Master Output Bit Registers + REGISTERTYPE_ModbusMasterOutputBits = 6, + /// \brief Modbus Master Status Registers + REGISTERTYPE_ModbusMasterStatusWords = 7, + /// \brief Modbus Master Status Bit Registers + REGISTERTYPE_ModbusMasterStatusBits = 8, + /// \brief Modbus Master Virtual Input Registers + REGISTERTYPE_ModbusMasterVirtualInputs = 9, + /// \brief Modbus Master Virtual Output Registers + REGISTERTYPE_ModbusMasterVirtualOutputs = 10, + /// \brief Modbus Slave Input Registers + REGISTERTYPE_ModbusSlaveInputWords = 11, + /// \brief Modbus Slave Output Registers + REGISTERTYPE_ModbusSlaveOutputWords = 12, + /// \brief Modbus Slave Input Bit Registers + REGISTERTYPE_ModbusSlaveInputBits = 13, + /// \brief Modbus Slave Output Bit Registers + REGISTERTYPE_ModbusSlaveOutputBits = 14, +} REGISTERTYPE; + +/// \brief The type of the component +typedef enum +{ + /// \brief Compact pulse width modulation + COMPONENTTYPE_CP = 32773, + /// \brief Micro pulse width modulation + COMPONENTTYPE_MP = 32774, + /// \brief Ensemble control board + COMPONENTTYPE_Control = 32775, + /// \brief Compact Linear + COMPONENTTYPE_CL = 32776, + /// \brief High performance pulse width modulation enhanced + COMPONENTTYPE_HPE = 32777, + /// \brief High performance linear enhanced + COMPONENTTYPE_HLE = 32778, + /// \brief Micro pulse linear + COMPONENTTYPE_ML = 32779, + /// \brief Obsolete + COMPONENTTYPE_PMT = 32780, + /// \brief Ensemble Lab controller + COMPONENTTYPE_Lab = 32781, + /// \brief Ensemble QLab controller + COMPONENTTYPE_QLab = 32782, + /// \brief High Performance Single Axis Piezo Drive + COMPONENTTYPE_QDe = 32784, + /// \brief Single Axis Piezo Drive + COMPONENTTYPE_QL = 32785, + /// \brief High Performance Single Axis Piezo Drive + COMPONENTTYPE_QLe = 32786, +} COMPONENTTYPE; + +/// \brief The communication type used to communicate with a controller +typedef enum +{ + /// \brief Communications are over ethernet + COMMUNICATIONTYPE_Ethernet = 2, + /// \brief Communications are over USB + COMMUNICATIONTYPE_Usb = 3, +} COMMUNICATIONTYPE; + +/// \brief Specifies the build result kind +typedef enum +{ + /// \brief The build result describes a warning that occurred during the compilation + BUILDRESULTKIND_Warning = 0, + /// \brief The build result describes an error that occurred during the compilation + BUILDRESULTKIND_Error = 1, +} BUILDRESULTKIND; + +/// \brief Contains information about configuration of FlashConfig in a stage. +typedef enum +{ + /// \brief Whether the FlashConfig memory is present and FlashConfig feature is supported. + FLASHCONFIGSTATUS_Supported = (1u << 0), + /// \brief FlashConfig data is valid. + FLASHCONFIGSTATUS_DataValid = (1u << 1), + /// \brief Connected Stage serial number does not match expected Stage serial number. + FLASHCONFIGSTATUS_SerialMismatch = (1u << 2), +} FLASHCONFIGSTATUS; +typedef enum +{ + /// \brief Whether the FlashConfig memory is present and FlashConfig feature is supported. + FLASHCONFIGSTATUSBITS_SupportedBit = 0, + /// \brief FlashConfig data is valid. + FLASHCONFIGSTATUSBITS_DataValidBit = 1, + /// \brief Connected Stage serial number does not match expected Stage serial number. + FLASHCONFIGSTATUSBITS_SerialMismatchBit = 2, +} FLASHCONFIGSTATUSBITS; + +/// \brief Represents the faults of an axis +typedef enum +{ + /// \brief The absolute value of the difference between the position command and the position feedback exceeded the threshold specified by the PositionErrorThreshold parameter. + AXISFAULT_PositionErrorFault = (1u << 0), + /// \brief The average motor current exceeded the threshold specified by the AverageCurrentThreshold and AverageCurrentTime parameters. + AXISFAULT_OverCurrentFault = (1u << 1), + /// \brief The axis encountered the clockwise (positive) end-of-travel limit switch. + AXISFAULT_CwEndOfTravelLimitFault = (1u << 2), + /// \brief The axis encountered the counter-clockwise (negative) end-of-travel limit switch. + AXISFAULT_CcwEndOfTravelLimitFault = (1u << 3), + /// \brief The axis was commanded to move beyond the position specified by the SoftwareLimitHigh parameter. + AXISFAULT_CwSoftwareLimitFault = (1u << 4), + /// \brief The axis was commanded to move beyond the position specified by the SoftwareLimitLow parameter. + AXISFAULT_CcwSoftwareLimitFault = (1u << 5), + /// \brief The amplifier for this axis exceeded its maximum current rating or experienced an internal error. + AXISFAULT_AmplifierFault = (1u << 6), + /// \brief The drive detected a problem with the feedback device specified by the PositionFeedbackType and PositionFeedbackChannel parameters. + AXISFAULT_PositionFeedbackFault = (1u << 7), + /// \brief The drive detected a problem with the feedback device specified by the VelocityFeedbackType and VelocityFeedbackChannel parameters. + AXISFAULT_VelocityFeedbackFault = (1u << 8), + /// \brief The drive detected an invalid state (all high or all low) for the Hall-effect sensor inputs on this axis. + AXISFAULT_HallSensorFault = (1u << 9), + /// \brief The commanded velocity is more than the velocity command threshold. Before the axis is homed, this threshold is specified by the VelocityCommandThresholdBeforeHome parameter. After the axis is homed, this threshold is specified by the VelocityCommandThreshold parameter. + AXISFAULT_MaxVelocityCommandFault = (1u << 10), + /// \brief The emergency stop sense input, specified by the ESTOPFaultInput parameter, was triggered. + AXISFAULT_EmergencyStopFault = (1u << 11), + /// \brief The absolute value of the difference between the velocity command and the velocity feedback exceeded the threshold specified by the VelocityErrorThreshold parameter. + AXISFAULT_VelocityErrorFault = (1u << 12), + /// \brief The external fault input, specified by the ExternalFaultAnalogInput or ExternalFaultDigitalInput parameters, was triggered. + AXISFAULT_ExternalFault = (1u << 15), + /// \brief The motor thermistor input was triggered, which indicates that the motor exceeded its maximum recommended operating temperature. + AXISFAULT_MotorTemperatureFault = (1u << 17), + /// \brief The amplifier exceeded its maximum recommended operating temperature. + AXISFAULT_AmplifierTemperatureFault = (1u << 18), + /// \brief The encoder fault input on the motor feedback connector was triggered. + AXISFAULT_EncoderFault = (1u << 19), + /// \brief One or more of the drives on the network lost communications with the controller. + AXISFAULT_CommunicationLostFault = (1u << 20), + /// \brief The difference between the position feedback and the scaled (adjusted by GainKv) velocity feedback exceeds the threshold specified by the PositionErrorThreshold parameter. + AXISFAULT_FeedbackScalingFault = (1u << 23), + /// \brief The distance that the axis moved while searching for the marker exceeded the threshold specified by the MarkerSearchThreshold parameter. + AXISFAULT_MarkerSearchFault = (1u << 24), + /// \brief The commanded voltage output exceeded the value of the PiezoVoltageClampLow or PiezoVoltageClampHigh parameter. + AXISFAULT_VoltageClampFault = (1u << 27), + /// \brief The power supply output has exceeded the allowable power or temperature threshold. + AXISFAULT_PowerSupplyFault = (1u << 28), + /// \brief The drive failed has encountered an internal error and had to disable. For assistance, contact Aerotech Customer Service. + AXISFAULT_InternalFault = (1u << 30), +} AXISFAULT; +typedef enum +{ + /// \brief The absolute value of the difference between the position command and the position feedback exceeded the threshold specified by the PositionErrorThreshold parameter. + AXISFAULTBITS_PositionErrorFaultBit = 0, + /// \brief The average motor current exceeded the threshold specified by the AverageCurrentThreshold and AverageCurrentTime parameters. + AXISFAULTBITS_OverCurrentFaultBit = 1, + /// \brief The axis encountered the clockwise (positive) end-of-travel limit switch. + AXISFAULTBITS_CwEndOfTravelLimitFaultBit = 2, + /// \brief The axis encountered the counter-clockwise (negative) end-of-travel limit switch. + AXISFAULTBITS_CcwEndOfTravelLimitFaultBit = 3, + /// \brief The axis was commanded to move beyond the position specified by the SoftwareLimitHigh parameter. + AXISFAULTBITS_CwSoftwareLimitFaultBit = 4, + /// \brief The axis was commanded to move beyond the position specified by the SoftwareLimitLow parameter. + AXISFAULTBITS_CcwSoftwareLimitFaultBit = 5, + /// \brief The amplifier for this axis exceeded its maximum current rating or experienced an internal error. + AXISFAULTBITS_AmplifierFaultBit = 6, + /// \brief The drive detected a problem with the feedback device specified by the PositionFeedbackType and PositionFeedbackChannel parameters. + AXISFAULTBITS_PositionFeedbackFaultBit = 7, + /// \brief The drive detected a problem with the feedback device specified by the VelocityFeedbackType and VelocityFeedbackChannel parameters. + AXISFAULTBITS_VelocityFeedbackFaultBit = 8, + /// \brief The drive detected an invalid state (all high or all low) for the Hall-effect sensor inputs on this axis. + AXISFAULTBITS_HallSensorFaultBit = 9, + /// \brief The commanded velocity is more than the velocity command threshold. Before the axis is homed, this threshold is specified by the VelocityCommandThresholdBeforeHome parameter. After the axis is homed, this threshold is specified by the VelocityCommandThreshold parameter. + AXISFAULTBITS_MaxVelocityCommandFaultBit = 10, + /// \brief The emergency stop sense input, specified by the ESTOPFaultInput parameter, was triggered. + AXISFAULTBITS_EmergencyStopFaultBit = 11, + /// \brief The absolute value of the difference between the velocity command and the velocity feedback exceeded the threshold specified by the VelocityErrorThreshold parameter. + AXISFAULTBITS_VelocityErrorFaultBit = 12, + /// \brief The external fault input, specified by the ExternalFaultAnalogInput or ExternalFaultDigitalInput parameters, was triggered. + AXISFAULTBITS_ExternalFaultBit = 15, + /// \brief The motor thermistor input was triggered, which indicates that the motor exceeded its maximum recommended operating temperature. + AXISFAULTBITS_MotorTemperatureFaultBit = 17, + /// \brief The amplifier exceeded its maximum recommended operating temperature. + AXISFAULTBITS_AmplifierTemperatureFaultBit = 18, + /// \brief The encoder fault input on the motor feedback connector was triggered. + AXISFAULTBITS_EncoderFaultBit = 19, + /// \brief One or more of the drives on the network lost communications with the controller. + AXISFAULTBITS_CommunicationLostFaultBit = 20, + /// \brief The difference between the position feedback and the scaled (adjusted by GainKv) velocity feedback exceeds the threshold specified by the PositionErrorThreshold parameter. + AXISFAULTBITS_FeedbackScalingFaultBit = 23, + /// \brief The distance that the axis moved while searching for the marker exceeded the threshold specified by the MarkerSearchThreshold parameter. + AXISFAULTBITS_MarkerSearchFaultBit = 24, + /// \brief The commanded voltage output exceeded the value of the PiezoVoltageClampLow or PiezoVoltageClampHigh parameter. + AXISFAULTBITS_VoltageClampFaultBit = 27, + /// \brief The power supply output has exceeded the allowable power or temperature threshold. + AXISFAULTBITS_PowerSupplyFaultBit = 28, + /// \brief The drive failed has encountered an internal error and had to disable. For assistance, contact Aerotech Customer Service. + AXISFAULTBITS_InternalFaultBit = 30, +} AXISFAULTBITS; + +/// \brief Represents the ramp type in AeroBasic +typedef enum +{ + /// \brief Linear-based ramp type + RAMPTYPE_Linear = 0, + /// \brief S-curve-based ramp type + RAMPTYPE_Scurve = 1, + /// \brief Sine-based ramp type + RAMPTYPE_Sine = 2, +} RAMPTYPE; + +/// \brief Represents the ramp mode in AeroBasic +typedef enum +{ + /// \brief Distance-based acceleration and deceleration + RAMPMODE_Dist = 0, + /// \brief Rate-based acceleration and deceleration + RAMPMODE_Rate = 1, + /// \brief Time-based acceleration and deceleration + RAMPMODE_Time = 2, +} RAMPMODE; + +/// \brief Represents the type of output an axis generates. +typedef enum +{ + /// \brief No output is generated. + COMMANDOUTPUTTYPE_None = 0, + /// \brief Current output is generated. + COMMANDOUTPUTTYPE_Current = 1, + /// \brief Voltage output is generated. + COMMANDOUTPUTTYPE_Voltage = 2, +} COMMANDOUTPUTTYPE; + +/// \brief Specifies the type of calibration table associated with a calibration file action. +typedef enum +{ + /// \brief 1D calibration table. + BINARYCALIBRATIONACTIONTABLETYPE_Calibration1D = 0, + /// \brief 2D calibration table. + BINARYCALIBRATIONACTIONTABLETYPE_Calibration2D = 1, +} BINARYCALIBRATIONACTIONTABLETYPE; + +/// \brief Specifies the status of a binary calibration file action. +typedef enum +{ + /// \brief The calibration table was added. + BINARYCALIBRATIONACTIONSTATUS_TableAdded = 0, + /// \brief The calibration table was removed. + BINARYCALIBRATIONACTIONSTATUS_TableRemoved = 1, + /// \brief The calibration table was not added. + BINARYCALIBRATIONACTIONSTATUS_TableNotAdded = 2, +} BINARYCALIBRATIONACTIONSTATUS; + +/// \brief Represents the position feedback channel type +typedef enum +{ + /// \brief Default + POSITIONFEEDBACKCHANNEL_Default = -1, + /// \brief Channel 0 + POSITIONFEEDBACKCHANNEL_Channel0 = 0, + /// \brief Channel 1 + POSITIONFEEDBACKCHANNEL_Channel1 = 1, + /// \brief Channel 2 + POSITIONFEEDBACKCHANNEL_Channel2 = 2, + /// \brief Channel 3 + POSITIONFEEDBACKCHANNEL_Channel3 = 3, + /// \brief Channel 4 + POSITIONFEEDBACKCHANNEL_Channel4 = 4, +} POSITIONFEEDBACKCHANNEL; + +/// \brief Represents the velocity feedback channel type +typedef enum +{ + /// \brief Default + VELOCITYFEEDBACKCHANNEL_Default = -1, + /// \brief Channel 0 + VELOCITYFEEDBACKCHANNEL_Channel0 = 0, + /// \brief Channel 1 + VELOCITYFEEDBACKCHANNEL_Channel1 = 1, + /// \brief Channel 2 + VELOCITYFEEDBACKCHANNEL_Channel2 = 2, + /// \brief Channel 3 + VELOCITYFEEDBACKCHANNEL_Channel3 = 3, + /// \brief Channel 4 + VELOCITYFEEDBACKCHANNEL_Channel4 = 4, +} VELOCITYFEEDBACKCHANNEL; + +#endif // __Ensemble_COMMON_STRUCTURES_H__ + diff --git a/motorApp/AerotechSrc/EnsembleParameterId.h b/motorApp/AerotechSrc/EnsembleParameterId.h new file mode 100755 index 0000000..f2f0aed --- /dev/null +++ b/motorApp/AerotechSrc/EnsembleParameterId.h @@ -0,0 +1,877 @@ +/// \file EnsembleParameterId.h +/// \brief Contains parameter identifiers +/// +/// This file is version dependent and needs to match the rest of the software +/// +/// Copyright (c) Aerotech, Inc. 2010-2017. +/// + +#ifndef __Ensemble_PARAMETER_ID_H__ +#define __Ensemble_PARAMETER_ID_H__ + + +/// \brief Represents a parameter identifier +typedef enum { + /// \brief The AxisType parameter + PARAMETERID_AxisType = ( (0 << 24) | 0 ), + /// \brief The ReverseMotionDirection parameter + PARAMETERID_ReverseMotionDirection = ( (0 << 24) | 1 ), + /// \brief The CountsPerUnit parameter + PARAMETERID_CountsPerUnit = ( (0 << 24) | 2 ), + /// \brief The ServoRate parameter + PARAMETERID_ServoRate = ( (0 << 24) | 3 ), + /// \brief The ServoSetup parameter + PARAMETERID_ServoSetup = ( (0 << 24) | 4 ), + /// \brief The GainKpos parameter + PARAMETERID_GainKpos = ( (0 << 24) | 5 ), + /// \brief The GainKi parameter + PARAMETERID_GainKi = ( (0 << 24) | 6 ), + /// \brief The GainKp parameter + PARAMETERID_GainKp = ( (0 << 24) | 7 ), + /// \brief The GainVff parameter + PARAMETERID_GainVff = ( (0 << 24) | 8 ), + /// \brief The GainAff parameter + PARAMETERID_GainAff = ( (0 << 24) | 9 ), + /// \brief The GainKv parameter + PARAMETERID_GainKv = ( (0 << 24) | 10 ), + /// \brief The GainKpi parameter + PARAMETERID_GainKpi = ( (0 << 24) | 11 ), + /// \brief The ServoFilter0CoeffN0 parameter + PARAMETERID_ServoFilter0CoeffN0 = ( (0 << 24) | 12 ), + /// \brief The ServoFilter0CoeffN1 parameter + PARAMETERID_ServoFilter0CoeffN1 = ( (0 << 24) | 13 ), + /// \brief The ServoFilter0CoeffN2 parameter + PARAMETERID_ServoFilter0CoeffN2 = ( (0 << 24) | 14 ), + /// \brief The ServoFilter0CoeffD1 parameter + PARAMETERID_ServoFilter0CoeffD1 = ( (0 << 24) | 15 ), + /// \brief The ServoFilter0CoeffD2 parameter + PARAMETERID_ServoFilter0CoeffD2 = ( (0 << 24) | 16 ), + /// \brief The ServoFilter1CoeffN0 parameter + PARAMETERID_ServoFilter1CoeffN0 = ( (0 << 24) | 17 ), + /// \brief The ServoFilter1CoeffN1 parameter + PARAMETERID_ServoFilter1CoeffN1 = ( (0 << 24) | 18 ), + /// \brief The ServoFilter1CoeffN2 parameter + PARAMETERID_ServoFilter1CoeffN2 = ( (0 << 24) | 19 ), + /// \brief The ServoFilter1CoeffD1 parameter + PARAMETERID_ServoFilter1CoeffD1 = ( (0 << 24) | 20 ), + /// \brief The ServoFilter1CoeffD2 parameter + PARAMETERID_ServoFilter1CoeffD2 = ( (0 << 24) | 21 ), + /// \brief The AmplifierDeadtime parameter + PARAMETERID_AmplifierDeadtime = ( (0 << 24) | 22 ), + /// \brief The RolloverCounts parameter + PARAMETERID_RolloverCounts = ( (0 << 24) | 23 ), + /// \brief The CurrentGainKi parameter + PARAMETERID_CurrentGainKi = ( (0 << 24) | 24 ), + /// \brief The CurrentGainKp parameter + PARAMETERID_CurrentGainKp = ( (0 << 24) | 25 ), + /// \brief The FaultMask parameter + PARAMETERID_FaultMask = ( (0 << 24) | 26 ), + /// \brief The FaultMaskDisable parameter + PARAMETERID_FaultMaskDisable = ( (0 << 24) | 27 ), + /// \brief The FaultMaskDecel parameter + PARAMETERID_FaultMaskDecel = ( (0 << 24) | 28 ), + /// \brief The EnableBrakeControl parameter + PARAMETERID_EnableBrakeControl = ( (0 << 24) | 29 ), + /// \brief The FaultMaskOutput parameter + PARAMETERID_FaultMaskOutput = ( (0 << 24) | 30 ), + /// \brief The ESTOPFaultInput parameter + PARAMETERID_ESTOPFaultInput = ( (0 << 24) | 31 ), + /// \brief The PositionErrorThreshold parameter + PARAMETERID_PositionErrorThreshold = ( (0 << 24) | 32 ), + /// \brief The AverageCurrentThreshold parameter + PARAMETERID_AverageCurrentThreshold = ( (0 << 24) | 33 ), + /// \brief The AverageCurrentTime parameter + PARAMETERID_AverageCurrentTime = ( (0 << 24) | 34 ), + /// \brief The VelocityCommandThreshold parameter + PARAMETERID_VelocityCommandThreshold = ( (0 << 24) | 35 ), + /// \brief The VelocityErrorThreshold parameter + PARAMETERID_VelocityErrorThreshold = ( (0 << 24) | 36 ), + /// \brief The SoftwareLimitLow parameter + PARAMETERID_SoftwareLimitLow = ( (0 << 24) | 37 ), + /// \brief The SoftwareLimitHigh parameter + PARAMETERID_SoftwareLimitHigh = ( (0 << 24) | 38 ), + /// \brief The MaxCurrentClamp parameter + PARAMETERID_MaxCurrentClamp = ( (0 << 24) | 39 ), + /// \brief The InPositionDistance parameter + PARAMETERID_InPositionDistance = ( (0 << 24) | 40 ), + /// \brief The MotorType parameter + PARAMETERID_MotorType = ( (0 << 24) | 41 ), + /// \brief The CyclesPerRev parameter + PARAMETERID_CyclesPerRev = ( (0 << 24) | 42 ), + /// \brief The CountsPerRev parameter + PARAMETERID_CountsPerRev = ( (0 << 24) | 43 ), + /// \brief The CommutationOffset parameter + PARAMETERID_CommutationOffset = ( (0 << 24) | 44 ), + /// \brief The AutoMsetTime parameter + PARAMETERID_AutoMsetTime = ( (0 << 24) | 45 ), + /// \brief The AutoMsetCurrent parameter + PARAMETERID_AutoMsetCurrent = ( (0 << 24) | 46 ), + /// \brief The PositionFeedbackType parameter + PARAMETERID_PositionFeedbackType = ( (0 << 24) | 47 ), + /// \brief The PositionFeedbackChannel parameter + PARAMETERID_PositionFeedbackChannel = ( (0 << 24) | 48 ), + /// \brief The VelocityFeedbackType parameter + PARAMETERID_VelocityFeedbackType = ( (0 << 24) | 49 ), + /// \brief The VelocityFeedbackChannel parameter + PARAMETERID_VelocityFeedbackChannel = ( (0 << 24) | 50 ), + /// \brief The EncoderMultiplicationFactor parameter + PARAMETERID_EncoderMultiplicationFactor = ( (0 << 24) | 51 ), + /// \brief The EncoderSineGain parameter + PARAMETERID_EncoderSineGain = ( (0 << 24) | 52 ), + /// \brief The EncoderSineOffset parameter + PARAMETERID_EncoderSineOffset = ( (0 << 24) | 53 ), + /// \brief The EncoderCosineGain parameter + PARAMETERID_EncoderCosineGain = ( (0 << 24) | 54 ), + /// \brief The EncoderCosineOffset parameter + PARAMETERID_EncoderCosineOffset = ( (0 << 24) | 55 ), + /// \brief The EncoderPhase parameter + PARAMETERID_EncoderPhase = ( (0 << 24) | 56 ), + /// \brief The GantryMasterAxis parameter + PARAMETERID_GantryMasterAxis = ( (0 << 24) | 57 ), + /// \brief The LimitDecelDistance parameter + PARAMETERID_LimitDecelDistance = ( (0 << 24) | 59 ), + /// \brief The LimitDebounceTime parameter + PARAMETERID_LimitDebounceTime = ( (0 << 24) | 60 ), + /// \brief The EndOfTravelLimitSetup parameter + PARAMETERID_EndOfTravelLimitSetup = ( (0 << 24) | 61 ), + /// \brief The BacklashDistance parameter + PARAMETERID_BacklashDistance = ( (0 << 24) | 62 ), + /// \brief The FaultOutputSetup parameter + PARAMETERID_FaultOutputSetup = ( (0 << 24) | 63 ), + /// \brief The FaultOutputState parameter + PARAMETERID_FaultOutputState = ( (0 << 24) | 64 ), + /// \brief The IOSetup parameter + PARAMETERID_IOSetup = ( (0 << 24) | 65 ), + /// \brief The BrakeOutput parameter + PARAMETERID_BrakeOutput = ( (0 << 24) | 66 ), + /// \brief The EncoderDivider parameter + PARAMETERID_EncoderDivider = ( (0 << 24) | 67 ), + /// \brief The ExternalFaultDigitalInput parameter + PARAMETERID_ExternalFaultDigitalInput = ( (0 << 24) | 68 ), + /// \brief The BrakeDisableDelay parameter + PARAMETERID_BrakeDisableDelay = ( (0 << 24) | 69 ), + /// \brief The MaxJogDistance parameter + PARAMETERID_MaxJogDistance = ( (0 << 24) | 70 ), + /// \brief The DefaultSpeed parameter + PARAMETERID_DefaultSpeed = ( (0 << 24) | 71 ), + /// \brief The DefaultRampRate parameter + PARAMETERID_DefaultRampRate = ( (0 << 24) | 72 ), + /// \brief The AbortDecelRate parameter + PARAMETERID_AbortDecelRate = ( (0 << 24) | 73 ), + /// \brief The HomeType parameter + PARAMETERID_HomeType = ( (0 << 24) | 74 ), + /// \brief The HomeSetup parameter + PARAMETERID_HomeSetup = ( (0 << 24) | 75 ), + /// \brief The HomeSpeed parameter + PARAMETERID_HomeSpeed = ( (0 << 24) | 76 ), + /// \brief The HomeOffset parameter + PARAMETERID_HomeOffset = ( (0 << 24) | 77 ), + /// \brief The HomeRampRate parameter + PARAMETERID_HomeRampRate = ( (0 << 24) | 78 ), + /// \brief The DefaultWaitMode parameter + PARAMETERID_DefaultWaitMode = ( (0 << 24) | 79 ), + /// \brief The DefaultSCurve parameter + PARAMETERID_DefaultSCurve = ( (0 << 24) | 80 ), + /// \brief The DataCollectionPoints parameter + PARAMETERID_DataCollectionPoints = ( (0 << 24) | 81 ), + /// \brief The StepperResolution parameter + PARAMETERID_StepperResolution = ( (0 << 24) | 83 ), + /// \brief The StepperRunningCurrent parameter + PARAMETERID_StepperRunningCurrent = ( (0 << 24) | 84 ), + /// \brief The StepperHoldingCurrent parameter + PARAMETERID_StepperHoldingCurrent = ( (0 << 24) | 85 ), + /// \brief The StepperVerificationSpeed parameter + PARAMETERID_StepperVerificationSpeed = ( (0 << 24) | 86 ), + /// \brief The LimitDebounceDistance parameter + PARAMETERID_LimitDebounceDistance = ( (0 << 24) | 87 ), + /// \brief The ServoFilter2CoeffN0 parameter + PARAMETERID_ServoFilter2CoeffN0 = ( (0 << 24) | 88 ), + /// \brief The ServoFilter2CoeffN1 parameter + PARAMETERID_ServoFilter2CoeffN1 = ( (0 << 24) | 89 ), + /// \brief The ServoFilter2CoeffN2 parameter + PARAMETERID_ServoFilter2CoeffN2 = ( (0 << 24) | 90 ), + /// \brief The ServoFilter2CoeffD1 parameter + PARAMETERID_ServoFilter2CoeffD1 = ( (0 << 24) | 91 ), + /// \brief The ServoFilter2CoeffD2 parameter + PARAMETERID_ServoFilter2CoeffD2 = ( (0 << 24) | 92 ), + /// \brief The ServoFilter3CoeffN0 parameter + PARAMETERID_ServoFilter3CoeffN0 = ( (0 << 24) | 93 ), + /// \brief The ServoFilter3CoeffN1 parameter + PARAMETERID_ServoFilter3CoeffN1 = ( (0 << 24) | 94 ), + /// \brief The ServoFilter3CoeffN2 parameter + PARAMETERID_ServoFilter3CoeffN2 = ( (0 << 24) | 95 ), + /// \brief The ServoFilter3CoeffD1 parameter + PARAMETERID_ServoFilter3CoeffD1 = ( (0 << 24) | 96 ), + /// \brief The ServoFilter3CoeffD2 parameter + PARAMETERID_ServoFilter3CoeffD2 = ( (0 << 24) | 97 ), + /// \brief The GearCamSource parameter + PARAMETERID_GearCamSource = ( (0 << 24) | 98 ), + /// \brief The GearCamIndex parameter + PARAMETERID_GearCamIndex = ( (0 << 24) | 99 ), + /// \brief The GearCamScaleFactor parameter + PARAMETERID_GearCamScaleFactor = ( (0 << 24) | 100 ), + /// \brief The GearCamAnalogDeadband parameter + PARAMETERID_GearCamAnalogDeadband = ( (0 << 24) | 105 ), + /// \brief The PrintBufferSize parameter + PARAMETERID_PrintBufferSize = ( (0 << 24) | 106 ), + /// \brief The SerialPort0XonCharacter parameter + PARAMETERID_SerialPort0XonCharacter = ( (0 << 24) | 109 ), + /// \brief The SerialPort0XoffCharacter parameter + PARAMETERID_SerialPort0XoffCharacter = ( (0 << 24) | 110 ), + /// \brief The SerialPort0BaudRate parameter + PARAMETERID_SerialPort0BaudRate = ( (0 << 24) | 111 ), + /// \brief The SerialPort0Setup parameter + PARAMETERID_SerialPort0Setup = ( (0 << 24) | 112 ), + /// \brief The TaskExecutionSetup parameter + PARAMETERID_TaskExecutionSetup = ( (0 << 24) | 113 ), + /// \brief The CodeSize parameter + PARAMETERID_CodeSize = ( (0 << 24) | 114 ), + /// \brief The DataSize parameter + PARAMETERID_DataSize = ( (0 << 24) | 115 ), + /// \brief The StackSize parameter + PARAMETERID_StackSize = ( (0 << 24) | 116 ), + /// \brief The AutoRunProgram parameter + PARAMETERID_AutoRunProgram = ( (0 << 24) | 118 ), + /// \brief The MaxJogSpeed parameter + PARAMETERID_MaxJogSpeed = ( (0 << 24) | 123 ), + /// \brief The GlobalIntegers parameter + PARAMETERID_GlobalIntegers = ( (0 << 24) | 124 ), + /// \brief The GlobalDoubles parameter + PARAMETERID_GlobalDoubles = ( (0 << 24) | 125 ), + /// \brief The DecimalPlaces parameter + PARAMETERID_DecimalPlaces = ( (0 << 24) | 126 ), + /// \brief The TaskErrorAbortAxes parameter + PARAMETERID_TaskErrorAbortAxes = ( (0 << 24) | 127 ), + /// \brief The CalibrationFile1D parameter + PARAMETERID_CalibrationFile1D = ( (0 << 24) | 128 ), + /// \brief The UnitsName parameter + PARAMETERID_UnitsName = ( (0 << 24) | 129 ), + /// \brief The Socket2RemoteIPAddress parameter + PARAMETERID_Socket2RemoteIPAddress = ( (0 << 24) | 130 ), + /// \brief The Socket2Port parameter + PARAMETERID_Socket2Port = ( (0 << 24) | 131 ), + /// \brief The Socket2Setup parameter + PARAMETERID_Socket2Setup = ( (0 << 24) | 132 ), + /// \brief The Socket2TransmissionSize parameter + PARAMETERID_Socket2TransmissionSize = ( (0 << 24) | 133 ), + /// \brief The Socket3RemoteIPAddress parameter + PARAMETERID_Socket3RemoteIPAddress = ( (0 << 24) | 134 ), + /// \brief The Socket3Port parameter + PARAMETERID_Socket3Port = ( (0 << 24) | 135 ), + /// \brief The Socket3Setup parameter + PARAMETERID_Socket3Setup = ( (0 << 24) | 136 ), + /// \brief The Socket3TransmissionSize parameter + PARAMETERID_Socket3TransmissionSize = ( (0 << 24) | 137 ), + /// \brief The Socket2Timeout parameter + PARAMETERID_Socket2Timeout = ( (0 << 24) | 138 ), + /// \brief The Socket3Timeout parameter + PARAMETERID_Socket3Timeout = ( (0 << 24) | 139 ), + /// \brief The AxisName parameter + PARAMETERID_AxisName = ( (0 << 24) | 140 ), + /// \brief The UserInteger0 parameter + PARAMETERID_UserInteger0 = ( (0 << 24) | 141 ), + /// \brief The UserInteger1 parameter + PARAMETERID_UserInteger1 = ( (0 << 24) | 142 ), + /// \brief The UserDouble0 parameter + PARAMETERID_UserDouble0 = ( (0 << 24) | 143 ), + /// \brief The UserDouble1 parameter + PARAMETERID_UserDouble1 = ( (0 << 24) | 144 ), + /// \brief The UserString0 parameter + PARAMETERID_UserString0 = ( (0 << 24) | 145 ), + /// \brief The UserString1 parameter + PARAMETERID_UserString1 = ( (0 << 24) | 146 ), + /// \brief The EnDatEncoderSetup parameter + PARAMETERID_EnDatEncoderSetup = ( (0 << 24) | 147 ), + /// \brief The EnDatEncoderResolution parameter + PARAMETERID_EnDatEncoderResolution = ( (0 << 24) | 148 ), + /// \brief The EnDatEncoderTurns parameter + PARAMETERID_EnDatEncoderTurns = ( (0 << 24) | 149 ), + /// \brief The CommandSetup parameter + PARAMETERID_CommandSetup = ( (0 << 24) | 150 ), + /// \brief The SerialPort1XonCharacter parameter + PARAMETERID_SerialPort1XonCharacter = ( (0 << 24) | 152 ), + /// \brief The SerialPort1XoffCharacter parameter + PARAMETERID_SerialPort1XoffCharacter = ( (0 << 24) | 153 ), + /// \brief The SerialPort1BaudRate parameter + PARAMETERID_SerialPort1BaudRate = ( (0 << 24) | 154 ), + /// \brief The SerialPort1Setup parameter + PARAMETERID_SerialPort1Setup = ( (0 << 24) | 155 ), + /// \brief The RequiredAxes parameter + PARAMETERID_RequiredAxes = ( (0 << 24) | 156 ), + /// \brief The JoystickInput1MinVoltage parameter + PARAMETERID_JoystickInput1MinVoltage = ( (0 << 24) | 157 ), + /// \brief The JoystickInput1MaxVoltage parameter + PARAMETERID_JoystickInput1MaxVoltage = ( (0 << 24) | 158 ), + /// \brief The JoystickInput1Deadband parameter + PARAMETERID_JoystickInput1Deadband = ( (0 << 24) | 159 ), + /// \brief The JoystickInput0MinVoltage parameter + PARAMETERID_JoystickInput0MinVoltage = ( (0 << 24) | 160 ), + /// \brief The JoystickInput0MaxVoltage parameter + PARAMETERID_JoystickInput0MaxVoltage = ( (0 << 24) | 161 ), + /// \brief The JoystickInput0Deadband parameter + PARAMETERID_JoystickInput0Deadband = ( (0 << 24) | 162 ), + /// \brief The JoystickLowSpeed parameter + PARAMETERID_JoystickLowSpeed = ( (0 << 24) | 163 ), + /// \brief The JoystickHighSpeed parameter + PARAMETERID_JoystickHighSpeed = ( (0 << 24) | 164 ), + /// \brief The JoystickSetup parameter + PARAMETERID_JoystickSetup = ( (0 << 24) | 165 ), + /// \brief The HomePositionSet parameter + PARAMETERID_HomePositionSet = ( (0 << 24) | 166 ), + /// \brief The TaskTerminationAxes parameter + PARAMETERID_TaskTerminationAxes = ( (0 << 24) | 167 ), + /// \brief The TaskStopAbortAxes parameter + PARAMETERID_TaskStopAbortAxes = ( (0 << 24) | 168 ), + /// \brief The CalibrationFile2D parameter + PARAMETERID_CalibrationFile2D = ( (0 << 24) | 169 ), + /// \brief The FaultMaskDisableDelay parameter + PARAMETERID_FaultMaskDisableDelay = ( (0 << 24) | 170 ), + /// \brief The DefaultCoordinatedSpeed parameter + PARAMETERID_DefaultCoordinatedSpeed = ( (0 << 24) | 171 ), + /// \brief The DefaultCoordinatedRampRate parameter + PARAMETERID_DefaultCoordinatedRampRate = ( (0 << 24) | 172 ), + /// \brief The DefaultDependentCoordinatedRampRate parameter + PARAMETERID_DefaultDependentCoordinatedRampRate = ( (0 << 24) | 173 ), + /// \brief The GpibTerminatingCharacter parameter + PARAMETERID_GpibTerminatingCharacter = ( (0 << 24) | 174 ), + /// \brief The GpibPrimaryAddress parameter + PARAMETERID_GpibPrimaryAddress = ( (0 << 24) | 175 ), + /// \brief The GpibParallelResponse parameter + PARAMETERID_GpibParallelResponse = ( (0 << 24) | 176 ), + /// \brief The CommandTerminatingCharacter parameter + PARAMETERID_CommandTerminatingCharacter = ( (0 << 24) | 177 ), + /// \brief The CommandSuccessCharacter parameter + PARAMETERID_CommandSuccessCharacter = ( (0 << 24) | 178 ), + /// \brief The CommandInvalidCharacter parameter + PARAMETERID_CommandInvalidCharacter = ( (0 << 24) | 179 ), + /// \brief The CommandFaultCharacter parameter + PARAMETERID_CommandFaultCharacter = ( (0 << 24) | 180 ), + /// \brief The FaultAbortAxes parameter + PARAMETERID_FaultAbortAxes = ( (0 << 24) | 182 ), + /// \brief The HarmonicCancellation0Type parameter + PARAMETERID_HarmonicCancellation0Type = ( (0 << 24) | 185 ), + /// \brief The HarmonicCancellation0Period parameter + PARAMETERID_HarmonicCancellation0Period = ( (0 << 24) | 186 ), + /// \brief The HarmonicCancellation0Gain parameter + PARAMETERID_HarmonicCancellation0Gain = ( (0 << 24) | 188 ), + /// \brief The HarmonicCancellation0Phase parameter + PARAMETERID_HarmonicCancellation0Phase = ( (0 << 24) | 189 ), + /// \brief The HarmonicCancellation1Type parameter + PARAMETERID_HarmonicCancellation1Type = ( (0 << 24) | 190 ), + /// \brief The HarmonicCancellation1Period parameter + PARAMETERID_HarmonicCancellation1Period = ( (0 << 24) | 191 ), + /// \brief The HarmonicCancellation1Gain parameter + PARAMETERID_HarmonicCancellation1Gain = ( (0 << 24) | 193 ), + /// \brief The HarmonicCancellation1Phase parameter + PARAMETERID_HarmonicCancellation1Phase = ( (0 << 24) | 194 ), + /// \brief The HarmonicCancellation2Type parameter + PARAMETERID_HarmonicCancellation2Type = ( (0 << 24) | 195 ), + /// \brief The HarmonicCancellation2Period parameter + PARAMETERID_HarmonicCancellation2Period = ( (0 << 24) | 196 ), + /// \brief The HarmonicCancellation2Gain parameter + PARAMETERID_HarmonicCancellation2Gain = ( (0 << 24) | 198 ), + /// \brief The HarmonicCancellation2Phase parameter + PARAMETERID_HarmonicCancellation2Phase = ( (0 << 24) | 199 ), + /// \brief The CommandTimeout parameter + PARAMETERID_CommandTimeout = ( (0 << 24) | 202 ), + /// \brief The CommandTimeoutCharacter parameter + PARAMETERID_CommandTimeoutCharacter = ( (0 << 24) | 203 ), + /// \brief The ResolverReferenceGain parameter + PARAMETERID_ResolverReferenceGain = ( (0 << 24) | 204 ), + /// \brief The ResolverSetup parameter + PARAMETERID_ResolverSetup = ( (0 << 24) | 205 ), + /// \brief The ResolverReferencePhase parameter + PARAMETERID_ResolverReferencePhase = ( (0 << 24) | 206 ), + /// \brief The SoftwareLimitSetup parameter + PARAMETERID_SoftwareLimitSetup = ( (0 << 24) | 210 ), + /// \brief The SSINet1Setup parameter + PARAMETERID_SSINet1Setup = ( (0 << 24) | 211 ), + /// \brief The SSINet2Setup parameter + PARAMETERID_SSINet2Setup = ( (0 << 24) | 212 ), + /// \brief The EmulatedQuadratureDivider parameter + PARAMETERID_EmulatedQuadratureDivider = ( (0 << 24) | 213 ), + /// \brief The HarmonicCancellation3Type parameter + PARAMETERID_HarmonicCancellation3Type = ( (0 << 24) | 214 ), + /// \brief The HarmonicCancellation3Period parameter + PARAMETERID_HarmonicCancellation3Period = ( (0 << 24) | 215 ), + /// \brief The HarmonicCancellation3Gain parameter + PARAMETERID_HarmonicCancellation3Gain = ( (0 << 24) | 217 ), + /// \brief The HarmonicCancellation3Phase parameter + PARAMETERID_HarmonicCancellation3Phase = ( (0 << 24) | 218 ), + /// \brief The HarmonicCancellation4Type parameter + PARAMETERID_HarmonicCancellation4Type = ( (0 << 24) | 219 ), + /// \brief The HarmonicCancellation4Period parameter + PARAMETERID_HarmonicCancellation4Period = ( (0 << 24) | 220 ), + /// \brief The HarmonicCancellation4Gain parameter + PARAMETERID_HarmonicCancellation4Gain = ( (0 << 24) | 222 ), + /// \brief The HarmonicCancellation4Phase parameter + PARAMETERID_HarmonicCancellation4Phase = ( (0 << 24) | 223 ), + /// \brief The EnhancedThroughputChannel parameter + PARAMETERID_EnhancedThroughputChannel = ( (0 << 24) | 224 ), + /// \brief The EnhancedThroughputGain parameter + PARAMETERID_EnhancedThroughputGain = ( (0 << 24) | 225 ), + /// \brief The HarmonicCancellationSetup parameter + PARAMETERID_HarmonicCancellationSetup = ( (0 << 24) | 226 ), + /// \brief The EnhancedThroughputCurrentClamp parameter + PARAMETERID_EnhancedThroughputCurrentClamp = ( (0 << 24) | 227 ), + /// \brief The Analog0Filter0CoeffN0 parameter + PARAMETERID_Analog0Filter0CoeffN0 = ( (0 << 24) | 228 ), + /// \brief The Analog0Filter0CoeffN1 parameter + PARAMETERID_Analog0Filter0CoeffN1 = ( (0 << 24) | 229 ), + /// \brief The Analog0Filter0CoeffN2 parameter + PARAMETERID_Analog0Filter0CoeffN2 = ( (0 << 24) | 230 ), + /// \brief The Analog0Filter0CoeffD1 parameter + PARAMETERID_Analog0Filter0CoeffD1 = ( (0 << 24) | 231 ), + /// \brief The Analog0Filter0CoeffD2 parameter + PARAMETERID_Analog0Filter0CoeffD2 = ( (0 << 24) | 232 ), + /// \brief The Analog0Filter1CoeffN0 parameter + PARAMETERID_Analog0Filter1CoeffN0 = ( (0 << 24) | 233 ), + /// \brief The Analog0Filter1CoeffN1 parameter + PARAMETERID_Analog0Filter1CoeffN1 = ( (0 << 24) | 234 ), + /// \brief The Analog0Filter1CoeffN2 parameter + PARAMETERID_Analog0Filter1CoeffN2 = ( (0 << 24) | 235 ), + /// \brief The Analog0Filter1CoeffD1 parameter + PARAMETERID_Analog0Filter1CoeffD1 = ( (0 << 24) | 236 ), + /// \brief The Analog0Filter1CoeffD2 parameter + PARAMETERID_Analog0Filter1CoeffD2 = ( (0 << 24) | 237 ), + /// \brief The Analog1Filter0CoeffN0 parameter + PARAMETERID_Analog1Filter0CoeffN0 = ( (0 << 24) | 238 ), + /// \brief The Analog1Filter0CoeffN1 parameter + PARAMETERID_Analog1Filter0CoeffN1 = ( (0 << 24) | 239 ), + /// \brief The Analog1Filter0CoeffN2 parameter + PARAMETERID_Analog1Filter0CoeffN2 = ( (0 << 24) | 240 ), + /// \brief The Analog1Filter0CoeffD1 parameter + PARAMETERID_Analog1Filter0CoeffD1 = ( (0 << 24) | 241 ), + /// \brief The Analog1Filter0CoeffD2 parameter + PARAMETERID_Analog1Filter0CoeffD2 = ( (0 << 24) | 242 ), + /// \brief The Analog1Filter1CoeffN0 parameter + PARAMETERID_Analog1Filter1CoeffN0 = ( (0 << 24) | 243 ), + /// \brief The Analog1Filter1CoeffN1 parameter + PARAMETERID_Analog1Filter1CoeffN1 = ( (0 << 24) | 244 ), + /// \brief The Analog1Filter1CoeffN2 parameter + PARAMETERID_Analog1Filter1CoeffN2 = ( (0 << 24) | 245 ), + /// \brief The Analog1Filter1CoeffD1 parameter + PARAMETERID_Analog1Filter1CoeffD1 = ( (0 << 24) | 246 ), + /// \brief The Analog1Filter1CoeffD2 parameter + PARAMETERID_Analog1Filter1CoeffD2 = ( (0 << 24) | 247 ), + /// \brief The GlobalStrings parameter + PARAMETERID_GlobalStrings = ( (0 << 24) | 248 ), + /// \brief The DefaultCoordinatedRampMode parameter + PARAMETERID_DefaultCoordinatedRampMode = ( (0 << 24) | 249 ), + /// \brief The DefaultCoordinatedRampTime parameter + PARAMETERID_DefaultCoordinatedRampTime = ( (0 << 24) | 250 ), + /// \brief The DefaultCoordinatedRampDistance parameter + PARAMETERID_DefaultCoordinatedRampDistance = ( (0 << 24) | 251 ), + /// \brief The DefaultRampMode parameter + PARAMETERID_DefaultRampMode = ( (0 << 24) | 252 ), + /// \brief The DefaultRampTime parameter + PARAMETERID_DefaultRampTime = ( (0 << 24) | 253 ), + /// \brief The DefaultRampDistance parameter + PARAMETERID_DefaultRampDistance = ( (0 << 24) | 254 ), + /// \brief The ServoFilterSetup parameter + PARAMETERID_ServoFilterSetup = ( (0 << 24) | 255 ), + /// \brief The FeedbackSetup parameter + PARAMETERID_FeedbackSetup = ( (0 << 24) | 256 ), + /// \brief The EncoderMultiplierSetup parameter + PARAMETERID_EncoderMultiplierSetup = ( (0 << 24) | 257 ), + /// \brief The FaultSetup parameter + PARAMETERID_FaultSetup = ( (0 << 24) | 258 ), + /// \brief The ThresholdScheduleSetup parameter + PARAMETERID_ThresholdScheduleSetup = ( (0 << 24) | 259 ), + /// \brief The ThresholdRegion2High parameter + PARAMETERID_ThresholdRegion2High = ( (0 << 24) | 260 ), + /// \brief The ThresholdRegion2Low parameter + PARAMETERID_ThresholdRegion2Low = ( (0 << 24) | 261 ), + /// \brief The ThresholdRegion3GainKpos parameter + PARAMETERID_ThresholdRegion3GainKpos = ( (0 << 24) | 262 ), + /// \brief The ThresholdRegion3GainKp parameter + PARAMETERID_ThresholdRegion3GainKp = ( (0 << 24) | 263 ), + /// \brief The ThresholdRegion3GainKi parameter + PARAMETERID_ThresholdRegion3GainKi = ( (0 << 24) | 264 ), + /// \brief The ThresholdRegion3GainKpi parameter + PARAMETERID_ThresholdRegion3GainKpi = ( (0 << 24) | 265 ), + /// \brief The ThresholdRegion4High parameter + PARAMETERID_ThresholdRegion4High = ( (0 << 24) | 266 ), + /// \brief The ThresholdRegion4Low parameter + PARAMETERID_ThresholdRegion4Low = ( (0 << 24) | 267 ), + /// \brief The ThresholdRegion5GainKpos parameter + PARAMETERID_ThresholdRegion5GainKpos = ( (0 << 24) | 268 ), + /// \brief The ThresholdRegion5GainKp parameter + PARAMETERID_ThresholdRegion5GainKp = ( (0 << 24) | 269 ), + /// \brief The ThresholdRegion5GainKi parameter + PARAMETERID_ThresholdRegion5GainKi = ( (0 << 24) | 270 ), + /// \brief The ThresholdRegion5GainKpi parameter + PARAMETERID_ThresholdRegion5GainKpi = ( (0 << 24) | 271 ), + /// \brief The DynamicScheduleSetup parameter + PARAMETERID_DynamicScheduleSetup = ( (0 << 24) | 272 ), + /// \brief The DynamicGainKposScale parameter + PARAMETERID_DynamicGainKposScale = ( (0 << 24) | 273 ), + /// \brief The DynamicGainKpScale parameter + PARAMETERID_DynamicGainKpScale = ( (0 << 24) | 274 ), + /// \brief The DynamicGainKiScale parameter + PARAMETERID_DynamicGainKiScale = ( (0 << 24) | 275 ), + /// \brief The ServoFilter4CoeffN0 parameter + PARAMETERID_ServoFilter4CoeffN0 = ( (0 << 24) | 276 ), + /// \brief The ServoFilter4CoeffN1 parameter + PARAMETERID_ServoFilter4CoeffN1 = ( (0 << 24) | 277 ), + /// \brief The ServoFilter4CoeffN2 parameter + PARAMETERID_ServoFilter4CoeffN2 = ( (0 << 24) | 278 ), + /// \brief The ServoFilter4CoeffD1 parameter + PARAMETERID_ServoFilter4CoeffD1 = ( (0 << 24) | 279 ), + /// \brief The ServoFilter4CoeffD2 parameter + PARAMETERID_ServoFilter4CoeffD2 = ( (0 << 24) | 280 ), + /// \brief The ServoFilter5CoeffN0 parameter + PARAMETERID_ServoFilter5CoeffN0 = ( (0 << 24) | 281 ), + /// \brief The ServoFilter5CoeffN1 parameter + PARAMETERID_ServoFilter5CoeffN1 = ( (0 << 24) | 282 ), + /// \brief The ServoFilter5CoeffN2 parameter + PARAMETERID_ServoFilter5CoeffN2 = ( (0 << 24) | 283 ), + /// \brief The ServoFilter5CoeffD1 parameter + PARAMETERID_ServoFilter5CoeffD1 = ( (0 << 24) | 284 ), + /// \brief The ServoFilter5CoeffD2 parameter + PARAMETERID_ServoFilter5CoeffD2 = ( (0 << 24) | 285 ), + /// \brief The ServoFilter6CoeffN0 parameter + PARAMETERID_ServoFilter6CoeffN0 = ( (0 << 24) | 286 ), + /// \brief The ServoFilter6CoeffN1 parameter + PARAMETERID_ServoFilter6CoeffN1 = ( (0 << 24) | 287 ), + /// \brief The ServoFilter6CoeffN2 parameter + PARAMETERID_ServoFilter6CoeffN2 = ( (0 << 24) | 288 ), + /// \brief The ServoFilter6CoeffD1 parameter + PARAMETERID_ServoFilter6CoeffD1 = ( (0 << 24) | 289 ), + /// \brief The ServoFilter6CoeffD2 parameter + PARAMETERID_ServoFilter6CoeffD2 = ( (0 << 24) | 290 ), + /// \brief The ServoFilter7CoeffN0 parameter + PARAMETERID_ServoFilter7CoeffN0 = ( (0 << 24) | 291 ), + /// \brief The ServoFilter7CoeffN1 parameter + PARAMETERID_ServoFilter7CoeffN1 = ( (0 << 24) | 292 ), + /// \brief The ServoFilter7CoeffN2 parameter + PARAMETERID_ServoFilter7CoeffN2 = ( (0 << 24) | 293 ), + /// \brief The ServoFilter7CoeffD1 parameter + PARAMETERID_ServoFilter7CoeffD1 = ( (0 << 24) | 294 ), + /// \brief The ServoFilter7CoeffD2 parameter + PARAMETERID_ServoFilter7CoeffD2 = ( (0 << 24) | 295 ), + /// \brief The LinearAmpMaxPower parameter + PARAMETERID_LinearAmpMaxPower = ( (0 << 24) | 296 ), + /// \brief The LinearAmpDeratingFactor parameter + PARAMETERID_LinearAmpDeratingFactor = ( (0 << 24) | 297 ), + /// \brief The LinearAmpBusVoltage parameter + PARAMETERID_LinearAmpBusVoltage = ( (0 << 24) | 298 ), + /// \brief The MotorResistance parameter + PARAMETERID_MotorResistance = ( (0 << 24) | 299 ), + /// \brief The MotorBackEMFConstant parameter + PARAMETERID_MotorBackEMFConstant = ( (0 << 24) | 300 ), + /// \brief The GantrySetup parameter + PARAMETERID_GantrySetup = ( (0 << 24) | 302 ), + /// \brief The RolloverMode parameter + PARAMETERID_RolloverMode = ( (0 << 24) | 303 ), + /// \brief The EmulatedQuadratureChannel parameter + PARAMETERID_EmulatedQuadratureChannel = ( (0 << 24) | 305 ), + /// \brief The ResolverCoarseChannel parameter + PARAMETERID_ResolverCoarseChannel = ( (0 << 24) | 306 ), + /// \brief The ResolverFeedbackRatio parameter + PARAMETERID_ResolverFeedbackRatio = ( (0 << 24) | 307 ), + /// \brief The ResolverFeedbackOffset parameter + PARAMETERID_ResolverFeedbackOffset = ( (0 << 24) | 308 ), + /// \brief The BrakeEnableDelay parameter + PARAMETERID_BrakeEnableDelay = ( (0 << 24) | 309 ), + /// \brief The InPositionTime parameter + PARAMETERID_InPositionTime = ( (0 << 24) | 319 ), + /// \brief The StaticFrictionCompensation parameter + PARAMETERID_StaticFrictionCompensation = ( (0 << 24) | 324 ), + /// \brief The ExternalFaultAnalogInput parameter + PARAMETERID_ExternalFaultAnalogInput = ( (0 << 24) | 424 ), + /// \brief The ExternalFaultThreshold parameter + PARAMETERID_ExternalFaultThreshold = ( (0 << 24) | 425 ), + /// \brief The DisplayAxes parameter + PARAMETERID_DisplayAxes = ( (0 << 24) | 426 ), + /// \brief The DefaultDependentCoordinatedSpeed parameter + PARAMETERID_DefaultDependentCoordinatedSpeed = ( (0 << 24) | 427 ), + /// \brief The AnalogFilterSetup parameter + PARAMETERID_AnalogFilterSetup = ( (0 << 24) | 482 ), + /// \brief The DefaultRampType parameter + PARAMETERID_DefaultRampType = ( (0 << 24) | 485 ), + /// \brief The ModbusMasterSlaveIPAddress parameter + PARAMETERID_ModbusMasterSlaveIPAddress = ( (0 << 24) | 489 ), + /// \brief The ModbusMasterSlavePort parameter + PARAMETERID_ModbusMasterSlavePort = ( (0 << 24) | 490 ), + /// \brief The ModbusMasterSlaveID parameter + PARAMETERID_ModbusMasterSlaveID = ( (0 << 24) | 491 ), + /// \brief The ModbusMasterInputWords parameter + PARAMETERID_ModbusMasterInputWords = ( (0 << 24) | 492 ), + /// \brief The ModbusMasterOutputWords parameter + PARAMETERID_ModbusMasterOutputWords = ( (0 << 24) | 493 ), + /// \brief The ModbusMasterInputBits parameter + PARAMETERID_ModbusMasterInputBits = ( (0 << 24) | 494 ), + /// \brief The ModbusMasterOutputBits parameter + PARAMETERID_ModbusMasterOutputBits = ( (0 << 24) | 495 ), + /// \brief The ModbusMasterSetup parameter + PARAMETERID_ModbusMasterSetup = ( (0 << 24) | 496 ), + /// \brief The ModbusMasterVirtualInputs parameter + PARAMETERID_ModbusMasterVirtualInputs = ( (0 << 24) | 499 ), + /// \brief The ModbusMasterVirtualOutputs parameter + PARAMETERID_ModbusMasterVirtualOutputs = ( (0 << 24) | 500 ), + /// \brief The ModbusMasterOutputWordsSections parameter + PARAMETERID_ModbusMasterOutputWordsSections = ( (0 << 24) | 501 ), + /// \brief The ModbusMasterOutputBitsSections parameter + PARAMETERID_ModbusMasterOutputBitsSections = ( (0 << 24) | 502 ), + /// \brief The ModbusMasterRWReadOffset parameter + PARAMETERID_ModbusMasterRWReadOffset = ( (0 << 24) | 503 ), + /// \brief The ModbusMasterInputWordsOffset parameter + PARAMETERID_ModbusMasterInputWordsOffset = ( (0 << 24) | 504 ), + /// \brief The ModbusMasterOutputWordsOffset parameter + PARAMETERID_ModbusMasterOutputWordsOffset = ( (0 << 24) | 505 ), + /// \brief The ModbusMasterInputBitsOffset parameter + PARAMETERID_ModbusMasterInputBitsOffset = ( (0 << 24) | 506 ), + /// \brief The ModbusMasterOutputBitsOffset parameter + PARAMETERID_ModbusMasterOutputBitsOffset = ( (0 << 24) | 507 ), + /// \brief The ModbusMasterStatusWordsOffset parameter + PARAMETERID_ModbusMasterStatusWordsOffset = ( (0 << 24) | 508 ), + /// \brief The ModbusMasterStatusBitsOffset parameter + PARAMETERID_ModbusMasterStatusBitsOffset = ( (0 << 24) | 509 ), + /// \brief The ModbusMasterVirtualInputsOffset parameter + PARAMETERID_ModbusMasterVirtualInputsOffset = ( (0 << 24) | 510 ), + /// \brief The ModbusMasterVirtualOutputsOffset parameter + PARAMETERID_ModbusMasterVirtualOutputsOffset = ( (0 << 24) | 511 ), + /// \brief The ModbusMasterRWWriteOffset parameter + PARAMETERID_ModbusMasterRWWriteOffset = ( (0 << 24) | 512 ), + /// \brief The ModbusMasterFunctions parameter + PARAMETERID_ModbusMasterFunctions = ( (0 << 24) | 513 ), + /// \brief The ModbusMasterSlaveType parameter + PARAMETERID_ModbusMasterSlaveType = ( (0 << 24) | 514 ), + /// \brief The ModbusSlaveUnitID parameter + PARAMETERID_ModbusSlaveUnitID = ( (0 << 24) | 516 ), + /// \brief The ModbusSlaveInputWords parameter + PARAMETERID_ModbusSlaveInputWords = ( (0 << 24) | 517 ), + /// \brief The ModbusSlaveOutputWords parameter + PARAMETERID_ModbusSlaveOutputWords = ( (0 << 24) | 518 ), + /// \brief The ModbusSlaveInputBits parameter + PARAMETERID_ModbusSlaveInputBits = ( (0 << 24) | 519 ), + /// \brief The ModbusSlaveOutputBits parameter + PARAMETERID_ModbusSlaveOutputBits = ( (0 << 24) | 520 ), + /// \brief The ModbusSlaveInputWordsOffset parameter + PARAMETERID_ModbusSlaveInputWordsOffset = ( (0 << 24) | 521 ), + /// \brief The ModbusSlaveOutputWordsOffset parameter + PARAMETERID_ModbusSlaveOutputWordsOffset = ( (0 << 24) | 522 ), + /// \brief The ModbusSlaveInputBitsOffset parameter + PARAMETERID_ModbusSlaveInputBitsOffset = ( (0 << 24) | 523 ), + /// \brief The ModbusSlaveOutputBitsOffset parameter + PARAMETERID_ModbusSlaveOutputBitsOffset = ( (0 << 24) | 524 ), + /// \brief The ModbusSlaveRWReadOffset parameter + PARAMETERID_ModbusSlaveRWReadOffset = ( (0 << 24) | 525 ), + /// \brief The ModbusSlaveRWWriteOffset parameter + PARAMETERID_ModbusSlaveRWWriteOffset = ( (0 << 24) | 526 ), + /// \brief The CurrentOffsetA parameter + PARAMETERID_CurrentOffsetA = ( (0 << 24) | 662 ), + /// \brief The CurrentOffsetB parameter + PARAMETERID_CurrentOffsetB = ( (0 << 24) | 663 ), + /// \brief The FaultAckMoveOutOfLimit parameter + PARAMETERID_FaultAckMoveOutOfLimit = ( (0 << 24) | 665 ), + /// \brief The CommandShaperSetup parameter + PARAMETERID_CommandShaperSetup = ( (0 << 24) | 666 ), + /// \brief The CommandShaperTime00 parameter + PARAMETERID_CommandShaperTime00 = ( (0 << 24) | 667 ), + /// \brief The CommandShaperTime01 parameter + PARAMETERID_CommandShaperTime01 = ( (0 << 24) | 668 ), + /// \brief The CommandShaperTime02 parameter + PARAMETERID_CommandShaperTime02 = ( (0 << 24) | 669 ), + /// \brief The CommandShaperTime03 parameter + PARAMETERID_CommandShaperTime03 = ( (0 << 24) | 670 ), + /// \brief The CommandShaperTime04 parameter + PARAMETERID_CommandShaperTime04 = ( (0 << 24) | 671 ), + /// \brief The CommandShaperTime05 parameter + PARAMETERID_CommandShaperTime05 = ( (0 << 24) | 672 ), + /// \brief The CommandShaperTime06 parameter + PARAMETERID_CommandShaperTime06 = ( (0 << 24) | 673 ), + /// \brief The CommandShaperTime07 parameter + PARAMETERID_CommandShaperTime07 = ( (0 << 24) | 674 ), + /// \brief The CommandShaperTime08 parameter + PARAMETERID_CommandShaperTime08 = ( (0 << 24) | 675 ), + /// \brief The CommandShaperTime09 parameter + PARAMETERID_CommandShaperTime09 = ( (0 << 24) | 676 ), + /// \brief The CommandShaperTime10 parameter + PARAMETERID_CommandShaperTime10 = ( (0 << 24) | 677 ), + /// \brief The CommandShaperTime11 parameter + PARAMETERID_CommandShaperTime11 = ( (0 << 24) | 678 ), + /// \brief The CommandShaperTime12 parameter + PARAMETERID_CommandShaperTime12 = ( (0 << 24) | 679 ), + /// \brief The CommandShaperTime13 parameter + PARAMETERID_CommandShaperTime13 = ( (0 << 24) | 680 ), + /// \brief The CommandShaperTime14 parameter + PARAMETERID_CommandShaperTime14 = ( (0 << 24) | 681 ), + /// \brief The CommandShaperTime15 parameter + PARAMETERID_CommandShaperTime15 = ( (0 << 24) | 682 ), + /// \brief The CommandShaperCoeff00 parameter + PARAMETERID_CommandShaperCoeff00 = ( (0 << 24) | 683 ), + /// \brief The CommandShaperCoeff01 parameter + PARAMETERID_CommandShaperCoeff01 = ( (0 << 24) | 684 ), + /// \brief The CommandShaperCoeff02 parameter + PARAMETERID_CommandShaperCoeff02 = ( (0 << 24) | 685 ), + /// \brief The CommandShaperCoeff03 parameter + PARAMETERID_CommandShaperCoeff03 = ( (0 << 24) | 686 ), + /// \brief The CommandShaperCoeff04 parameter + PARAMETERID_CommandShaperCoeff04 = ( (0 << 24) | 687 ), + /// \brief The CommandShaperCoeff05 parameter + PARAMETERID_CommandShaperCoeff05 = ( (0 << 24) | 688 ), + /// \brief The CommandShaperCoeff06 parameter + PARAMETERID_CommandShaperCoeff06 = ( (0 << 24) | 689 ), + /// \brief The CommandShaperCoeff07 parameter + PARAMETERID_CommandShaperCoeff07 = ( (0 << 24) | 690 ), + /// \brief The CommandShaperCoeff08 parameter + PARAMETERID_CommandShaperCoeff08 = ( (0 << 24) | 691 ), + /// \brief The CommandShaperCoeff09 parameter + PARAMETERID_CommandShaperCoeff09 = ( (0 << 24) | 692 ), + /// \brief The CommandShaperCoeff10 parameter + PARAMETERID_CommandShaperCoeff10 = ( (0 << 24) | 693 ), + /// \brief The CommandShaperCoeff11 parameter + PARAMETERID_CommandShaperCoeff11 = ( (0 << 24) | 694 ), + /// \brief The CommandShaperCoeff12 parameter + PARAMETERID_CommandShaperCoeff12 = ( (0 << 24) | 695 ), + /// \brief The CommandShaperCoeff13 parameter + PARAMETERID_CommandShaperCoeff13 = ( (0 << 24) | 696 ), + /// \brief The CommandShaperCoeff14 parameter + PARAMETERID_CommandShaperCoeff14 = ( (0 << 24) | 697 ), + /// \brief The CommandShaperCoeff15 parameter + PARAMETERID_CommandShaperCoeff15 = ( (0 << 24) | 698 ), + /// \brief The CommandShaper0Type parameter + PARAMETERID_CommandShaper0Type = ( (0 << 24) | 703 ), + /// \brief The CommandShaper0Frequency parameter + PARAMETERID_CommandShaper0Frequency = ( (0 << 24) | 704 ), + /// \brief The CommandShaper0Damping parameter + PARAMETERID_CommandShaper0Damping = ( (0 << 24) | 705 ), + /// \brief The CommandShaper1Type parameter + PARAMETERID_CommandShaper1Type = ( (0 << 24) | 706 ), + /// \brief The CommandShaper1Frequency parameter + PARAMETERID_CommandShaper1Frequency = ( (0 << 24) | 707 ), + /// \brief The CommandShaper1Damping parameter + PARAMETERID_CommandShaper1Damping = ( (0 << 24) | 708 ), + /// \brief The ResoluteEncoderSetup parameter + PARAMETERID_ResoluteEncoderSetup = ( (0 << 24) | 715 ), + /// \brief The ResoluteEncoderResolution parameter + PARAMETERID_ResoluteEncoderResolution = ( (0 << 24) | 716 ), + /// \brief The ResoluteEncoderUserResolution parameter + PARAMETERID_ResoluteEncoderUserResolution = ( (0 << 24) | 717 ), + /// \brief The AutofocusInput parameter + PARAMETERID_AutofocusInput = ( (0 << 24) | 721 ), + /// \brief The AutofocusTarget parameter + PARAMETERID_AutofocusTarget = ( (0 << 24) | 722 ), + /// \brief The AutofocusDeadband parameter + PARAMETERID_AutofocusDeadband = ( (0 << 24) | 723 ), + /// \brief The AutofocusGainKi parameter + PARAMETERID_AutofocusGainKi = ( (0 << 24) | 724 ), + /// \brief The AutofocusGainKp parameter + PARAMETERID_AutofocusGainKp = ( (0 << 24) | 725 ), + /// \brief The AutofocusLimitLow parameter + PARAMETERID_AutofocusLimitLow = ( (0 << 24) | 726 ), + /// \brief The AutofocusLimitHigh parameter + PARAMETERID_AutofocusLimitHigh = ( (0 << 24) | 727 ), + /// \brief The AutofocusSpeedClamp parameter + PARAMETERID_AutofocusSpeedClamp = ( (0 << 24) | 728 ), + /// \brief The AutofocusHoldInput parameter + PARAMETERID_AutofocusHoldInput = ( (0 << 24) | 729 ), + /// \brief The AutofocusSetup parameter + PARAMETERID_AutofocusSetup = ( (0 << 24) | 730 ), + /// \brief The ExternalSyncFrequency parameter + PARAMETERID_ExternalSyncFrequency = ( (0 << 24) | 731 ), + /// \brief The GainPff parameter + PARAMETERID_GainPff = ( (0 << 24) | 762 ), + /// \brief The AutofocusInitialRampTime parameter + PARAMETERID_AutofocusInitialRampTime = ( (0 << 24) | 763 ), + /// \brief The SoftwareExternalFaultInput parameter + PARAMETERID_SoftwareExternalFaultInput = ( (0 << 24) | 765 ), + /// \brief The AutofocusGainKi2 parameter + PARAMETERID_AutofocusGainKi2 = ( (0 << 24) | 769 ), + /// \brief The EnDatEncoderIncrementalResolution parameter + PARAMETERID_EnDatEncoderIncrementalResolution = ( (0 << 24) | 770 ), + /// \brief The MarkerSearchThreshold parameter + PARAMETERID_MarkerSearchThreshold = ( (0 << 24) | 771 ), + /// \brief The GainKd1 parameter + PARAMETERID_GainKd1 = ( (0 << 24) | 779 ), + /// \brief The GainKp1 parameter + PARAMETERID_GainKp1 = ( (0 << 24) | 780 ), + /// \brief The VelocityCommandThresholdBeforeHome parameter + PARAMETERID_VelocityCommandThresholdBeforeHome = ( (0 << 24) | 781 ), + /// \brief The InPosition2Distance parameter + PARAMETERID_InPosition2Distance = ( (0 << 24) | 789 ), + /// \brief The InPosition2Time parameter + PARAMETERID_InPosition2Time = ( (0 << 24) | 790 ), + /// \brief The StepperRunningCurrentDelay parameter + PARAMETERID_StepperRunningCurrentDelay = ( (0 << 24) | 791 ), + /// \brief The ExternalVelocityAverageTime parameter + PARAMETERID_ExternalVelocityAverageTime = ( (0 << 24) | 792 ), + /// \brief The Class1InputIntegers parameter + PARAMETERID_Class1InputIntegers = ( (0 << 24) | 794 ), + /// \brief The Class1InputIntegersOffset parameter + PARAMETERID_Class1InputIntegersOffset = ( (0 << 24) | 795 ), + /// \brief The Class1OutputIntegers parameter + PARAMETERID_Class1OutputIntegers = ( (0 << 24) | 796 ), + /// \brief The Class1OutputIntegersOffset parameter + PARAMETERID_Class1OutputIntegersOffset = ( (0 << 24) | 797 ), + /// \brief The Class1InputDoubles parameter + PARAMETERID_Class1InputDoubles = ( (0 << 24) | 798 ), + /// \brief The Class1InputDoublesOffset parameter + PARAMETERID_Class1InputDoublesOffset = ( (0 << 24) | 799 ), + /// \brief The Class1OutputDoubles parameter + PARAMETERID_Class1OutputDoubles = ( (0 << 24) | 800 ), + /// \brief The Class1OutputDoublesOffset parameter + PARAMETERID_Class1OutputDoublesOffset = ( (0 << 24) | 801 ), + /// \brief The AbsoluteFeedbackOffset parameter + PARAMETERID_AbsoluteFeedbackOffset = ( (0 << 24) | 802 ), + /// \brief The PiezoSetup parameter + PARAMETERID_PiezoSetup = ( (0 << 24) | 803 ), + /// \brief The CapSensorFilterLength parameter + PARAMETERID_CapSensorFilterLength = ( (0 << 24) | 804 ), + /// \brief The EnhancedTrackingScale parameter + PARAMETERID_EnhancedTrackingScale = ( (0 << 24) | 805 ), + /// \brief The EnhancedTrackingBandwidth parameter + PARAMETERID_EnhancedTrackingBandwidth = ( (0 << 24) | 806 ), + /// \brief The Analog0InputOffset parameter + PARAMETERID_Analog0InputOffset = ( (0 << 24) | 807 ), + /// \brief The Analog1InputOffset parameter + PARAMETERID_Analog1InputOffset = ( (0 << 24) | 808 ), + /// \brief The Analog2InputOffset parameter + PARAMETERID_Analog2InputOffset = ( (0 << 24) | 809 ), + /// \brief The Analog3InputOffset parameter + PARAMETERID_Analog3InputOffset = ( (0 << 24) | 810 ), + /// \brief The EnhancedTrackingSetup parameter + PARAMETERID_EnhancedTrackingSetup = ( (0 << 24) | 811 ), + /// \brief The WebServerSetup parameter + PARAMETERID_WebServerSetup = ( (0 << 24) | 812 ), + /// \brief The WebServerPort parameter + PARAMETERID_WebServerPort = ( (0 << 24) | 813 ), + /// \brief The EncoderMarkerAlignment parameter + PARAMETERID_EncoderMarkerAlignment = ( (0 << 24) | 814 ), + /// \brief The EncoderRadiusThresholdLow parameter + PARAMETERID_EncoderRadiusThresholdLow = ( (0 << 24) | 815 ), + /// \brief The EncoderRadiusThresholdHigh parameter + PARAMETERID_EncoderRadiusThresholdHigh = ( (0 << 24) | 816 ), + /// \brief The GainKsi1 parameter + PARAMETERID_GainKsi1 = ( (0 << 24) | 817 ), + /// \brief The GainKsi2 parameter + PARAMETERID_GainKsi2 = ( (0 << 24) | 818 ), + /// \brief The PiezoVoltsPerUnit parameter + PARAMETERID_PiezoVoltsPerUnit = ( (0 << 24) | 819 ), + /// \brief The PiezoVoltageClampLow parameter + PARAMETERID_PiezoVoltageClampLow = ( (0 << 24) | 820 ), + /// \brief The PiezoVoltageClampHigh parameter + PARAMETERID_PiezoVoltageClampHigh = ( (0 << 24) | 821 ), + /// \brief The PiezoSlewRateClamp parameter + PARAMETERID_PiezoSlewRateClamp = ( (0 << 24) | 822 ), + /// \brief The PiezoDefaultServoState parameter + PARAMETERID_PiezoDefaultServoState = ( (0 << 24) | 823 ), + /// \brief The FeedforwardAdvance parameter + PARAMETERID_FeedforwardAdvance = ( (0 << 24) | 824 ), + /// \brief The CapSensorSetup parameter + PARAMETERID_CapSensorSetup = ( (0 << 24) | 826 ), + /// \brief The CapSensorThresholdLow parameter + PARAMETERID_CapSensorThresholdLow = ( (0 << 24) | 828 ), + /// \brief The CapSensorThresholdHigh parameter + PARAMETERID_CapSensorThresholdHigh = ( (0 << 24) | 829 ), + /// \brief The RequiredStageSerialNumber parameter + PARAMETERID_RequiredStageSerialNumber = ( (0 << 24) | 832 ), + /// \brief The StepperDampingGain parameter + PARAMETERID_StepperDampingGain = ( (0 << 24) | 848 ), + /// \brief The StepperDampingCutoffFrequency parameter + PARAMETERID_StepperDampingCutoffFrequency = ( (0 << 24) | 849 ), +} PARAMETERID; + +#endif // __Ensemble_PARAMETER_ID_H__ diff --git a/motorApp/AerotechSrc/Makefile b/motorApp/AerotechSrc/Makefile index e9ed009..646bf8a 100644 --- a/motorApp/AerotechSrc/Makefile +++ b/motorApp/AerotechSrc/Makefile @@ -6,6 +6,9 @@ include $(TOP)/configure/CONFIG #!USR_CXXFLAGS += -DDEBUG DBD += devAerotech.dbd +ifdef SNCSEQ +DBD += devAerotechSeq.dbd +endif LIBRARY_IOC = Aerotech @@ -18,11 +21,15 @@ SRCS += drvA3200Asyn.cc # EnsemblePSOFly.db support SRCS += concatString.c +ifdef SNCSEQ # Ensemble trajectory support SRCS += EnsembleTrajectoryScan.st +endif Aerotech_LIBS += motor asyn +ifdef SNCSEQ Aerotech_LIBS += seq pv +endif Aerotech_LIBS += $(EPICS_BASE_IOC_LIBS) include $(TOP)/configure/RULES diff --git a/motorApp/AerotechSrc/ParameterId.h b/motorApp/AerotechSrc/ParameterId.h index a2da635..e527f8a 100644 --- a/motorApp/AerotechSrc/ParameterId.h +++ b/motorApp/AerotechSrc/ParameterId.h @@ -1,768 +1,768 @@ -/// \file ParameterId.h -/// \brief File contains parameter identifiers -/// -/// This file is version dependant and needs to match the rest of the software - -#ifndef __PARAMETER_ID_H__ -#define __PARAMETER_ID_H__ - - -/// \brief Represents a parameter identifier -typedef enum { - /// \brief The AxisType parameter - PARAMETERID_AxisType = ( (0 << 24) | 0 ), - /// \brief The ReverseMotionDirection parameter - PARAMETERID_ReverseMotionDirection = ( (0 << 24) | 1 ), - /// \brief The CountsPerUnit parameter - PARAMETERID_CountsPerUnit = ( (0 << 24) | 2 ), - /// \brief The ServoRate parameter - PARAMETERID_ServoRate = ( (0 << 24) | 3 ), - /// \brief The ServoSetup parameter - PARAMETERID_ServoSetup = ( (0 << 24) | 4 ), - /// \brief The GainKpos parameter - PARAMETERID_GainKpos = ( (0 << 24) | 5 ), - /// \brief The GainKi parameter - PARAMETERID_GainKi = ( (0 << 24) | 6 ), - /// \brief The GainKp parameter - PARAMETERID_GainKp = ( (0 << 24) | 7 ), - /// \brief The GainVff parameter - PARAMETERID_GainVff = ( (0 << 24) | 8 ), - /// \brief The GainAff parameter - PARAMETERID_GainAff = ( (0 << 24) | 9 ), - /// \brief The GainKv parameter - PARAMETERID_GainKv = ( (0 << 24) | 10 ), - /// \brief The GainKpi parameter - PARAMETERID_GainKpi = ( (0 << 24) | 11 ), - /// \brief The ServoFilter0CoeffN0 parameter - PARAMETERID_ServoFilter0CoeffN0 = ( (0 << 24) | 12 ), - /// \brief The ServoFilter0CoeffN1 parameter - PARAMETERID_ServoFilter0CoeffN1 = ( (0 << 24) | 13 ), - /// \brief The ServoFilter0CoeffN2 parameter - PARAMETERID_ServoFilter0CoeffN2 = ( (0 << 24) | 14 ), - /// \brief The ServoFilter0CoeffD1 parameter - PARAMETERID_ServoFilter0CoeffD1 = ( (0 << 24) | 15 ), - /// \brief The ServoFilter0CoeffD2 parameter - PARAMETERID_ServoFilter0CoeffD2 = ( (0 << 24) | 16 ), - /// \brief The ServoFilter1CoeffN0 parameter - PARAMETERID_ServoFilter1CoeffN0 = ( (0 << 24) | 17 ), - /// \brief The ServoFilter1CoeffN1 parameter - PARAMETERID_ServoFilter1CoeffN1 = ( (0 << 24) | 18 ), - /// \brief The ServoFilter1CoeffN2 parameter - PARAMETERID_ServoFilter1CoeffN2 = ( (0 << 24) | 19 ), - /// \brief The ServoFilter1CoeffD1 parameter - PARAMETERID_ServoFilter1CoeffD1 = ( (0 << 24) | 20 ), - /// \brief The ServoFilter1CoeffD2 parameter - PARAMETERID_ServoFilter1CoeffD2 = ( (0 << 24) | 21 ), - /// \brief The AmplifierDeadtime parameter - PARAMETERID_AmplifierDeadtime = ( (0 << 24) | 22 ), - /// \brief The RolloverCounts parameter - PARAMETERID_RolloverCounts = ( (0 << 24) | 23 ), - /// \brief The CurrentGainKi parameter - PARAMETERID_CurrentGainKi = ( (0 << 24) | 24 ), - /// \brief The CurrentGainKp parameter - PARAMETERID_CurrentGainKp = ( (0 << 24) | 25 ), - /// \brief The FaultMask parameter - PARAMETERID_FaultMask = ( (0 << 24) | 26 ), - /// \brief The FaultMaskDisable parameter - PARAMETERID_FaultMaskDisable = ( (0 << 24) | 27 ), - /// \brief The FaultMaskDecel parameter - PARAMETERID_FaultMaskDecel = ( (0 << 24) | 28 ), - /// \brief The EnableBrakeControl parameter - PARAMETERID_EnableBrakeControl = ( (0 << 24) | 29 ), - /// \brief The FaultMaskOutput parameter - PARAMETERID_FaultMaskOutput = ( (0 << 24) | 30 ), - /// \brief The ESTOPFaultInput parameter - PARAMETERID_ESTOPFaultInput = ( (0 << 24) | 31 ), - /// \brief The PositionErrorThreshold parameter - PARAMETERID_PositionErrorThreshold = ( (0 << 24) | 32 ), - /// \brief The AverageCurrentThreshold parameter - PARAMETERID_AverageCurrentThreshold = ( (0 << 24) | 33 ), - /// \brief The AverageCurrentTime parameter - PARAMETERID_AverageCurrentTime = ( (0 << 24) | 34 ), - /// \brief The VelocityCommandThreshold parameter - PARAMETERID_VelocityCommandThreshold = ( (0 << 24) | 35 ), - /// \brief The VelocityErrorThreshold parameter - PARAMETERID_VelocityErrorThreshold = ( (0 << 24) | 36 ), - /// \brief The SoftwareLimitLow parameter - PARAMETERID_SoftwareLimitLow = ( (0 << 24) | 37 ), - /// \brief The SoftwareLimitHigh parameter - PARAMETERID_SoftwareLimitHigh = ( (0 << 24) | 38 ), - /// \brief The MaxCurrentClamp parameter - PARAMETERID_MaxCurrentClamp = ( (0 << 24) | 39 ), - /// \brief The InPositionDistance parameter - PARAMETERID_InPositionDistance = ( (0 << 24) | 40 ), - /// \brief The MotorType parameter - PARAMETERID_MotorType = ( (0 << 24) | 41 ), - /// \brief The CyclesPerRev parameter - PARAMETERID_CyclesPerRev = ( (0 << 24) | 42 ), - /// \brief The CountsPerRev parameter - PARAMETERID_CountsPerRev = ( (0 << 24) | 43 ), - /// \brief The CommutationOffset parameter - PARAMETERID_CommutationOffset = ( (0 << 24) | 44 ), - /// \brief The AutoMsetTime parameter - PARAMETERID_AutoMsetTime = ( (0 << 24) | 45 ), - /// \brief The AutoMsetCurrent parameter - PARAMETERID_AutoMsetCurrent = ( (0 << 24) | 46 ), - /// \brief The PositionFeedbackType parameter - PARAMETERID_PositionFeedbackType = ( (0 << 24) | 47 ), - /// \brief The PositionFeedbackChannel parameter - PARAMETERID_PositionFeedbackChannel = ( (0 << 24) | 48 ), - /// \brief The VelocityFeedbackType parameter - PARAMETERID_VelocityFeedbackType = ( (0 << 24) | 49 ), - /// \brief The VelocityFeedbackChannel parameter - PARAMETERID_VelocityFeedbackChannel = ( (0 << 24) | 50 ), - /// \brief The EncoderMultiplicationFactor parameter - PARAMETERID_EncoderMultiplicationFactor = ( (0 << 24) | 51 ), - /// \brief The EncoderSineGain parameter - PARAMETERID_EncoderSineGain = ( (0 << 24) | 52 ), - /// \brief The EncoderSineOffset parameter - PARAMETERID_EncoderSineOffset = ( (0 << 24) | 53 ), - /// \brief The EncoderCosineGain parameter - PARAMETERID_EncoderCosineGain = ( (0 << 24) | 54 ), - /// \brief The EncoderCosineOffset parameter - PARAMETERID_EncoderCosineOffset = ( (0 << 24) | 55 ), - /// \brief The EncoderPhase parameter - PARAMETERID_EncoderPhase = ( (0 << 24) | 56 ), - /// \brief The GantryMasterAxis parameter - PARAMETERID_GantryMasterAxis = ( (0 << 24) | 57 ), - /// \brief The LimitDecelDistance parameter - PARAMETERID_LimitDecelDistance = ( (0 << 24) | 59 ), - /// \brief The LimitDebounceTime parameter - PARAMETERID_LimitDebounceTime = ( (0 << 24) | 60 ), - /// \brief The EndOfTravelLimitSetup parameter - PARAMETERID_EndOfTravelLimitSetup = ( (0 << 24) | 61 ), - /// \brief The BacklashDistance parameter - PARAMETERID_BacklashDistance = ( (0 << 24) | 62 ), - /// \brief The FaultOutputSetup parameter - PARAMETERID_FaultOutputSetup = ( (0 << 24) | 63 ), - /// \brief The FaultOutputState parameter - PARAMETERID_FaultOutputState = ( (0 << 24) | 64 ), - /// \brief The IOSetup parameter - PARAMETERID_IOSetup = ( (0 << 24) | 65 ), - /// \brief The BrakeOutput parameter - PARAMETERID_BrakeOutput = ( (0 << 24) | 66 ), - /// \brief The EncoderDivider parameter - PARAMETERID_EncoderDivider = ( (0 << 24) | 67 ), - /// \brief The ExternalFaultDigitalInput parameter - PARAMETERID_ExternalFaultDigitalInput = ( (0 << 24) | 68 ), - /// \brief The BrakeDisableDelay parameter - PARAMETERID_BrakeDisableDelay = ( (0 << 24) | 69 ), - /// \brief The MaxJogDistance parameter - PARAMETERID_MaxJogDistance = ( (0 << 24) | 70 ), - /// \brief The DefaultSpeed parameter - PARAMETERID_DefaultSpeed = ( (0 << 24) | 71 ), - /// \brief The DefaultRampRate parameter - PARAMETERID_DefaultRampRate = ( (0 << 24) | 72 ), - /// \brief The AbortDecelRate parameter - PARAMETERID_AbortDecelRate = ( (0 << 24) | 73 ), - /// \brief The HomeType parameter - PARAMETERID_HomeType = ( (0 << 24) | 74 ), - /// \brief The HomeSetup parameter - PARAMETERID_HomeSetup = ( (0 << 24) | 75 ), - /// \brief The HomeSpeed parameter - PARAMETERID_HomeSpeed = ( (0 << 24) | 76 ), - /// \brief The HomeOffset parameter - PARAMETERID_HomeOffset = ( (0 << 24) | 77 ), - /// \brief The HomeRampRate parameter - PARAMETERID_HomeRampRate = ( (0 << 24) | 78 ), - /// \brief The DefaultWaitMode parameter - PARAMETERID_DefaultWaitMode = ( (0 << 24) | 79 ), - /// \brief The DefaultSCurve parameter - PARAMETERID_DefaultSCurve = ( (0 << 24) | 80 ), - /// \brief The DataCollectionPoints parameter - PARAMETERID_DataCollectionPoints = ( (0 << 24) | 81 ), - /// \brief The StepperResolution parameter - PARAMETERID_StepperResolution = ( (0 << 24) | 83 ), - /// \brief The StepperRunningCurrent parameter - PARAMETERID_StepperRunningCurrent = ( (0 << 24) | 84 ), - /// \brief The StepperHoldingCurrent parameter - PARAMETERID_StepperHoldingCurrent = ( (0 << 24) | 85 ), - /// \brief The StepperVerificationSpeed parameter - PARAMETERID_StepperVerificationSpeed = ( (0 << 24) | 86 ), - /// \brief The LimitDebounceDistance parameter - PARAMETERID_LimitDebounceDistance = ( (0 << 24) | 87 ), - /// \brief The ServoFilter2CoeffN0 parameter - PARAMETERID_ServoFilter2CoeffN0 = ( (0 << 24) | 88 ), - /// \brief The ServoFilter2CoeffN1 parameter - PARAMETERID_ServoFilter2CoeffN1 = ( (0 << 24) | 89 ), - /// \brief The ServoFilter2CoeffN2 parameter - PARAMETERID_ServoFilter2CoeffN2 = ( (0 << 24) | 90 ), - /// \brief The ServoFilter2CoeffD1 parameter - PARAMETERID_ServoFilter2CoeffD1 = ( (0 << 24) | 91 ), - /// \brief The ServoFilter2CoeffD2 parameter - PARAMETERID_ServoFilter2CoeffD2 = ( (0 << 24) | 92 ), - /// \brief The ServoFilter3CoeffN0 parameter - PARAMETERID_ServoFilter3CoeffN0 = ( (0 << 24) | 93 ), - /// \brief The ServoFilter3CoeffN1 parameter - PARAMETERID_ServoFilter3CoeffN1 = ( (0 << 24) | 94 ), - /// \brief The ServoFilter3CoeffN2 parameter - PARAMETERID_ServoFilter3CoeffN2 = ( (0 << 24) | 95 ), - /// \brief The ServoFilter3CoeffD1 parameter - PARAMETERID_ServoFilter3CoeffD1 = ( (0 << 24) | 96 ), - /// \brief The ServoFilter3CoeffD2 parameter - PARAMETERID_ServoFilter3CoeffD2 = ( (0 << 24) | 97 ), - /// \brief The GearCamSource parameter - PARAMETERID_GearCamSource = ( (0 << 24) | 98 ), - /// \brief The GearCamIndex parameter - PARAMETERID_GearCamIndex = ( (0 << 24) | 99 ), - /// \brief The GearCamScaleFactor parameter - PARAMETERID_GearCamScaleFactor = ( (0 << 24) | 100 ), - /// \brief The GearCamAnalogDeadband parameter - PARAMETERID_GearCamAnalogDeadband = ( (0 << 24) | 105 ), - /// \brief The PrintBufferSize parameter - PARAMETERID_PrintBufferSize = ( (0 << 24) | 106 ), - /// \brief The SerialPort0XonCharacter parameter - PARAMETERID_SerialPort0XonCharacter = ( (0 << 24) | 109 ), - /// \brief The SerialPort0XoffCharacter parameter - PARAMETERID_SerialPort0XoffCharacter = ( (0 << 24) | 110 ), - /// \brief The SerialPort0BaudRate parameter - PARAMETERID_SerialPort0BaudRate = ( (0 << 24) | 111 ), - /// \brief The SerialPort0Setup parameter - PARAMETERID_SerialPort0Setup = ( (0 << 24) | 112 ), - /// \brief The TaskExecutionSetup parameter - PARAMETERID_TaskExecutionSetup = ( (0 << 24) | 113 ), - /// \brief The CodeSize parameter - PARAMETERID_CodeSize = ( (0 << 24) | 114 ), - /// \brief The DataSize parameter - PARAMETERID_DataSize = ( (0 << 24) | 115 ), - /// \brief The StackSize parameter - PARAMETERID_StackSize = ( (0 << 24) | 116 ), - /// \brief The AutoRunProgram parameter - PARAMETERID_AutoRunProgram = ( (0 << 24) | 118 ), - /// \brief The MaxJogSpeed parameter - PARAMETERID_MaxJogSpeed = ( (0 << 24) | 123 ), - /// \brief The GlobalIntegers parameter - PARAMETERID_GlobalIntegers = ( (0 << 24) | 124 ), - /// \brief The GlobalDoubles parameter - PARAMETERID_GlobalDoubles = ( (0 << 24) | 125 ), - /// \brief The DecimalPlaces parameter - PARAMETERID_DecimalPlaces = ( (0 << 24) | 126 ), - /// \brief The TaskErrorAbortAxes parameter - PARAMETERID_TaskErrorAbortAxes = ( (0 << 24) | 127 ), - /// \brief The CalibrationFile1D parameter - PARAMETERID_CalibrationFile1D = ( (0 << 24) | 128 ), - /// \brief The UnitsName parameter - PARAMETERID_UnitsName = ( (0 << 24) | 129 ), - /// \brief The Socket2RemoteIPAddress parameter - PARAMETERID_Socket2RemoteIPAddress = ( (0 << 24) | 130 ), - /// \brief The Socket2Port parameter - PARAMETERID_Socket2Port = ( (0 << 24) | 131 ), - /// \brief The Socket2Setup parameter - PARAMETERID_Socket2Setup = ( (0 << 24) | 132 ), - /// \brief The Socket2TransmissionSize parameter - PARAMETERID_Socket2TransmissionSize = ( (0 << 24) | 133 ), - /// \brief The Socket3RemoteIPAddress parameter - PARAMETERID_Socket3RemoteIPAddress = ( (0 << 24) | 134 ), - /// \brief The Socket3Port parameter - PARAMETERID_Socket3Port = ( (0 << 24) | 135 ), - /// \brief The Socket3Setup parameter - PARAMETERID_Socket3Setup = ( (0 << 24) | 136 ), - /// \brief The Socket3TransmissionSize parameter - PARAMETERID_Socket3TransmissionSize = ( (0 << 24) | 137 ), - /// \brief The Socket2Timeout parameter - PARAMETERID_Socket2Timeout = ( (0 << 24) | 138 ), - /// \brief The Socket3Timeout parameter - PARAMETERID_Socket3Timeout = ( (0 << 24) | 139 ), - /// \brief The AxisName parameter - PARAMETERID_AxisName = ( (0 << 24) | 140 ), - /// \brief The UserInteger0 parameter - PARAMETERID_UserInteger0 = ( (0 << 24) | 141 ), - /// \brief The UserInteger1 parameter - PARAMETERID_UserInteger1 = ( (0 << 24) | 142 ), - /// \brief The UserDouble0 parameter - PARAMETERID_UserDouble0 = ( (0 << 24) | 143 ), - /// \brief The UserDouble1 parameter - PARAMETERID_UserDouble1 = ( (0 << 24) | 144 ), - /// \brief The UserString0 parameter - PARAMETERID_UserString0 = ( (0 << 24) | 145 ), - /// \brief The UserString1 parameter - PARAMETERID_UserString1 = ( (0 << 24) | 146 ), - /// \brief The EnDatEncoderSetup parameter - PARAMETERID_EnDatEncoderSetup = ( (0 << 24) | 147 ), - /// \brief The EnDatEncoderResolution parameter - PARAMETERID_EnDatEncoderResolution = ( (0 << 24) | 148 ), - /// \brief The EnDatEncoderTurns parameter - PARAMETERID_EnDatEncoderTurns = ( (0 << 24) | 149 ), - /// \brief The CommandSetup parameter - PARAMETERID_CommandSetup = ( (0 << 24) | 150 ), - /// \brief The SerialPort1XonCharacter parameter - PARAMETERID_SerialPort1XonCharacter = ( (0 << 24) | 152 ), - /// \brief The SerialPort1XoffCharacter parameter - PARAMETERID_SerialPort1XoffCharacter = ( (0 << 24) | 153 ), - /// \brief The SerialPort1BaudRate parameter - PARAMETERID_SerialPort1BaudRate = ( (0 << 24) | 154 ), - /// \brief The SerialPort1Setup parameter - PARAMETERID_SerialPort1Setup = ( (0 << 24) | 155 ), - /// \brief The RequiredAxes parameter - PARAMETERID_RequiredAxes = ( (0 << 24) | 156 ), - /// \brief The JoystickInput1MinVoltage parameter - PARAMETERID_JoystickInput1MinVoltage = ( (0 << 24) | 157 ), - /// \brief The JoystickInput1MaxVoltage parameter - PARAMETERID_JoystickInput1MaxVoltage = ( (0 << 24) | 158 ), - /// \brief The JoystickInput1Deadband parameter - PARAMETERID_JoystickInput1Deadband = ( (0 << 24) | 159 ), - /// \brief The JoystickInput0MinVoltage parameter - PARAMETERID_JoystickInput0MinVoltage = ( (0 << 24) | 160 ), - /// \brief The JoystickInput0MaxVoltage parameter - PARAMETERID_JoystickInput0MaxVoltage = ( (0 << 24) | 161 ), - /// \brief The JoystickInput0Deadband parameter - PARAMETERID_JoystickInput0Deadband = ( (0 << 24) | 162 ), - /// \brief The JoystickLowSpeed parameter - PARAMETERID_JoystickLowSpeed = ( (0 << 24) | 163 ), - /// \brief The JoystickHighSpeed parameter - PARAMETERID_JoystickHighSpeed = ( (0 << 24) | 164 ), - /// \brief The JoystickSetup parameter - PARAMETERID_JoystickSetup = ( (0 << 24) | 165 ), - /// \brief The HomePositionSet parameter - PARAMETERID_HomePositionSet = ( (0 << 24) | 166 ), - /// \brief The TaskTerminationAxes parameter - PARAMETERID_TaskTerminationAxes = ( (0 << 24) | 167 ), - /// \brief The TaskStopAbortAxes parameter - PARAMETERID_TaskStopAbortAxes = ( (0 << 24) | 168 ), - /// \brief The CalibrationFile2D parameter - PARAMETERID_CalibrationFile2D = ( (0 << 24) | 169 ), - /// \brief The FaultMaskDisableDelay parameter - PARAMETERID_FaultMaskDisableDelay = ( (0 << 24) | 170 ), - /// \brief The DefaultCoordinatedSpeed parameter - PARAMETERID_DefaultCoordinatedSpeed = ( (0 << 24) | 171 ), - /// \brief The DefaultCoordinatedRampRate parameter - PARAMETERID_DefaultCoordinatedRampRate = ( (0 << 24) | 172 ), - /// \brief The DefaultDependentCoordinatedRampRate parameter - PARAMETERID_DefaultDependentCoordinatedRampRate = ( (0 << 24) | 173 ), - /// \brief The GpibTerminatingCharacter parameter - PARAMETERID_GpibTerminatingCharacter = ( (0 << 24) | 174 ), - /// \brief The GpibPrimaryAddress parameter - PARAMETERID_GpibPrimaryAddress = ( (0 << 24) | 175 ), - /// \brief The GpibParallelResponse parameter - PARAMETERID_GpibParallelResponse = ( (0 << 24) | 176 ), - /// \brief The CommandTerminatingCharacter parameter - PARAMETERID_CommandTerminatingCharacter = ( (0 << 24) | 177 ), - /// \brief The CommandSuccessCharacter parameter - PARAMETERID_CommandSuccessCharacter = ( (0 << 24) | 178 ), - /// \brief The CommandInvalidCharacter parameter - PARAMETERID_CommandInvalidCharacter = ( (0 << 24) | 179 ), - /// \brief The CommandFaultCharacter parameter - PARAMETERID_CommandFaultCharacter = ( (0 << 24) | 180 ), - /// \brief The FaultAbortAxes parameter - PARAMETERID_FaultAbortAxes = ( (0 << 24) | 182 ), - /// \brief The HarmonicCancellation0Type parameter - PARAMETERID_HarmonicCancellation0Type = ( (0 << 24) | 185 ), - /// \brief The HarmonicCancellation0Period parameter - PARAMETERID_HarmonicCancellation0Period = ( (0 << 24) | 186 ), - /// \brief The HarmonicCancellation0Gain parameter - PARAMETERID_HarmonicCancellation0Gain = ( (0 << 24) | 188 ), - /// \brief The HarmonicCancellation0Phase parameter - PARAMETERID_HarmonicCancellation0Phase = ( (0 << 24) | 189 ), - /// \brief The HarmonicCancellation1Type parameter - PARAMETERID_HarmonicCancellation1Type = ( (0 << 24) | 190 ), - /// \brief The HarmonicCancellation1Period parameter - PARAMETERID_HarmonicCancellation1Period = ( (0 << 24) | 191 ), - /// \brief The HarmonicCancellation1Gain parameter - PARAMETERID_HarmonicCancellation1Gain = ( (0 << 24) | 193 ), - /// \brief The HarmonicCancellation1Phase parameter - PARAMETERID_HarmonicCancellation1Phase = ( (0 << 24) | 194 ), - /// \brief The HarmonicCancellation2Type parameter - PARAMETERID_HarmonicCancellation2Type = ( (0 << 24) | 195 ), - /// \brief The HarmonicCancellation2Period parameter - PARAMETERID_HarmonicCancellation2Period = ( (0 << 24) | 196 ), - /// \brief The HarmonicCancellation2Gain parameter - PARAMETERID_HarmonicCancellation2Gain = ( (0 << 24) | 198 ), - /// \brief The HarmonicCancellation2Phase parameter - PARAMETERID_HarmonicCancellation2Phase = ( (0 << 24) | 199 ), - /// \brief The CommandTimeout parameter - PARAMETERID_CommandTimeout = ( (0 << 24) | 202 ), - /// \brief The CommandTimeoutCharacter parameter - PARAMETERID_CommandTimeoutCharacter = ( (0 << 24) | 203 ), - /// \brief The ResolverReferenceGain parameter - PARAMETERID_ResolverReferenceGain = ( (0 << 24) | 204 ), - /// \brief The ResolverSetup parameter - PARAMETERID_ResolverSetup = ( (0 << 24) | 205 ), - /// \brief The ResolverReferencePhase parameter - PARAMETERID_ResolverReferencePhase = ( (0 << 24) | 206 ), - /// \brief The SoftwareLimitSetup parameter - PARAMETERID_SoftwareLimitSetup = ( (0 << 24) | 210 ), - /// \brief The SSINet1Setup parameter - PARAMETERID_SSINet1Setup = ( (0 << 24) | 211 ), - /// \brief The SSINet2Setup parameter - PARAMETERID_SSINet2Setup = ( (0 << 24) | 212 ), - /// \brief The EmulatedQuadratureDivider parameter - PARAMETERID_EmulatedQuadratureDivider = ( (0 << 24) | 213 ), - /// \brief The HarmonicCancellation3Type parameter - PARAMETERID_HarmonicCancellation3Type = ( (0 << 24) | 214 ), - /// \brief The HarmonicCancellation3Period parameter - PARAMETERID_HarmonicCancellation3Period = ( (0 << 24) | 215 ), - /// \brief The HarmonicCancellation3Gain parameter - PARAMETERID_HarmonicCancellation3Gain = ( (0 << 24) | 217 ), - /// \brief The HarmonicCancellation3Phase parameter - PARAMETERID_HarmonicCancellation3Phase = ( (0 << 24) | 218 ), - /// \brief The HarmonicCancellation4Type parameter - PARAMETERID_HarmonicCancellation4Type = ( (0 << 24) | 219 ), - /// \brief The HarmonicCancellation4Period parameter - PARAMETERID_HarmonicCancellation4Period = ( (0 << 24) | 220 ), - /// \brief The HarmonicCancellation4Gain parameter - PARAMETERID_HarmonicCancellation4Gain = ( (0 << 24) | 222 ), - /// \brief The HarmonicCancellation4Phase parameter - PARAMETERID_HarmonicCancellation4Phase = ( (0 << 24) | 223 ), - /// \brief The EnhancedThroughputChannel parameter - PARAMETERID_EnhancedThroughputChannel = ( (0 << 24) | 224 ), - /// \brief The EnhancedThroughputGain parameter - PARAMETERID_EnhancedThroughputGain = ( (0 << 24) | 225 ), - /// \brief The HarmonicCancellationSetup parameter - PARAMETERID_HarmonicCancellationSetup = ( (0 << 24) | 226 ), - /// \brief The EnhancedThroughputCurrentClamp parameter - PARAMETERID_EnhancedThroughputCurrentClamp = ( (0 << 24) | 227 ), - /// \brief The Analog0Filter0CoeffN0 parameter - PARAMETERID_Analog0Filter0CoeffN0 = ( (0 << 24) | 228 ), - /// \brief The Analog0Filter0CoeffN1 parameter - PARAMETERID_Analog0Filter0CoeffN1 = ( (0 << 24) | 229 ), - /// \brief The Analog0Filter0CoeffN2 parameter - PARAMETERID_Analog0Filter0CoeffN2 = ( (0 << 24) | 230 ), - /// \brief The Analog0Filter0CoeffD1 parameter - PARAMETERID_Analog0Filter0CoeffD1 = ( (0 << 24) | 231 ), - /// \brief The Analog0Filter0CoeffD2 parameter - PARAMETERID_Analog0Filter0CoeffD2 = ( (0 << 24) | 232 ), - /// \brief The Analog0Filter1CoeffN0 parameter - PARAMETERID_Analog0Filter1CoeffN0 = ( (0 << 24) | 233 ), - /// \brief The Analog0Filter1CoeffN1 parameter - PARAMETERID_Analog0Filter1CoeffN1 = ( (0 << 24) | 234 ), - /// \brief The Analog0Filter1CoeffN2 parameter - PARAMETERID_Analog0Filter1CoeffN2 = ( (0 << 24) | 235 ), - /// \brief The Analog0Filter1CoeffD1 parameter - PARAMETERID_Analog0Filter1CoeffD1 = ( (0 << 24) | 236 ), - /// \brief The Analog0Filter1CoeffD2 parameter - PARAMETERID_Analog0Filter1CoeffD2 = ( (0 << 24) | 237 ), - /// \brief The Analog1Filter0CoeffN0 parameter - PARAMETERID_Analog1Filter0CoeffN0 = ( (0 << 24) | 238 ), - /// \brief The Analog1Filter0CoeffN1 parameter - PARAMETERID_Analog1Filter0CoeffN1 = ( (0 << 24) | 239 ), - /// \brief The Analog1Filter0CoeffN2 parameter - PARAMETERID_Analog1Filter0CoeffN2 = ( (0 << 24) | 240 ), - /// \brief The Analog1Filter0CoeffD1 parameter - PARAMETERID_Analog1Filter0CoeffD1 = ( (0 << 24) | 241 ), - /// \brief The Analog1Filter0CoeffD2 parameter - PARAMETERID_Analog1Filter0CoeffD2 = ( (0 << 24) | 242 ), - /// \brief The Analog1Filter1CoeffN0 parameter - PARAMETERID_Analog1Filter1CoeffN0 = ( (0 << 24) | 243 ), - /// \brief The Analog1Filter1CoeffN1 parameter - PARAMETERID_Analog1Filter1CoeffN1 = ( (0 << 24) | 244 ), - /// \brief The Analog1Filter1CoeffN2 parameter - PARAMETERID_Analog1Filter1CoeffN2 = ( (0 << 24) | 245 ), - /// \brief The Analog1Filter1CoeffD1 parameter - PARAMETERID_Analog1Filter1CoeffD1 = ( (0 << 24) | 246 ), - /// \brief The Analog1Filter1CoeffD2 parameter - PARAMETERID_Analog1Filter1CoeffD2 = ( (0 << 24) | 247 ), - /// \brief The GlobalStrings parameter - PARAMETERID_GlobalStrings = ( (0 << 24) | 248 ), - /// \brief The DefaultCoordinatedRampMode parameter - PARAMETERID_DefaultCoordinatedRampMode = ( (0 << 24) | 249 ), - /// \brief The DefaultCoordinatedRampTime parameter - PARAMETERID_DefaultCoordinatedRampTime = ( (0 << 24) | 250 ), - /// \brief The DefaultCoordinatedRampDistance parameter - PARAMETERID_DefaultCoordinatedRampDistance = ( (0 << 24) | 251 ), - /// \brief The DefaultRampMode parameter - PARAMETERID_DefaultRampMode = ( (0 << 24) | 252 ), - /// \brief The DefaultRampTime parameter - PARAMETERID_DefaultRampTime = ( (0 << 24) | 253 ), - /// \brief The DefaultRampDistance parameter - PARAMETERID_DefaultRampDistance = ( (0 << 24) | 254 ), - /// \brief The ServoFilterSetup parameter - PARAMETERID_ServoFilterSetup = ( (0 << 24) | 255 ), - /// \brief The FeedbackSetup parameter - PARAMETERID_FeedbackSetup = ( (0 << 24) | 256 ), - /// \brief The EncoderMultiplierSetup parameter - PARAMETERID_EncoderMultiplierSetup = ( (0 << 24) | 257 ), - /// \brief The FaultSetup parameter - PARAMETERID_FaultSetup = ( (0 << 24) | 258 ), - /// \brief The ThresholdScheduleSetup parameter - PARAMETERID_ThresholdScheduleSetup = ( (0 << 24) | 259 ), - /// \brief The ThresholdRegion2High parameter - PARAMETERID_ThresholdRegion2High = ( (0 << 24) | 260 ), - /// \brief The ThresholdRegion2Low parameter - PARAMETERID_ThresholdRegion2Low = ( (0 << 24) | 261 ), - /// \brief The ThresholdRegion3GainKpos parameter - PARAMETERID_ThresholdRegion3GainKpos = ( (0 << 24) | 262 ), - /// \brief The ThresholdRegion3GainKp parameter - PARAMETERID_ThresholdRegion3GainKp = ( (0 << 24) | 263 ), - /// \brief The ThresholdRegion3GainKi parameter - PARAMETERID_ThresholdRegion3GainKi = ( (0 << 24) | 264 ), - /// \brief The ThresholdRegion3GainKpi parameter - PARAMETERID_ThresholdRegion3GainKpi = ( (0 << 24) | 265 ), - /// \brief The ThresholdRegion4High parameter - PARAMETERID_ThresholdRegion4High = ( (0 << 24) | 266 ), - /// \brief The ThresholdRegion4Low parameter - PARAMETERID_ThresholdRegion4Low = ( (0 << 24) | 267 ), - /// \brief The ThresholdRegion5GainKpos parameter - PARAMETERID_ThresholdRegion5GainKpos = ( (0 << 24) | 268 ), - /// \brief The ThresholdRegion5GainKp parameter - PARAMETERID_ThresholdRegion5GainKp = ( (0 << 24) | 269 ), - /// \brief The ThresholdRegion5GainKi parameter - PARAMETERID_ThresholdRegion5GainKi = ( (0 << 24) | 270 ), - /// \brief The ThresholdRegion5GainKpi parameter - PARAMETERID_ThresholdRegion5GainKpi = ( (0 << 24) | 271 ), - /// \brief The DynamicScheduleSetup parameter - PARAMETERID_DynamicScheduleSetup = ( (0 << 24) | 272 ), - /// \brief The DynamicGainKposScale parameter - PARAMETERID_DynamicGainKposScale = ( (0 << 24) | 273 ), - /// \brief The DynamicGainKpScale parameter - PARAMETERID_DynamicGainKpScale = ( (0 << 24) | 274 ), - /// \brief The DynamicGainKiScale parameter - PARAMETERID_DynamicGainKiScale = ( (0 << 24) | 275 ), - /// \brief The ServoFilter4CoeffN0 parameter - PARAMETERID_ServoFilter4CoeffN0 = ( (0 << 24) | 276 ), - /// \brief The ServoFilter4CoeffN1 parameter - PARAMETERID_ServoFilter4CoeffN1 = ( (0 << 24) | 277 ), - /// \brief The ServoFilter4CoeffN2 parameter - PARAMETERID_ServoFilter4CoeffN2 = ( (0 << 24) | 278 ), - /// \brief The ServoFilter4CoeffD1 parameter - PARAMETERID_ServoFilter4CoeffD1 = ( (0 << 24) | 279 ), - /// \brief The ServoFilter4CoeffD2 parameter - PARAMETERID_ServoFilter4CoeffD2 = ( (0 << 24) | 280 ), - /// \brief The ServoFilter5CoeffN0 parameter - PARAMETERID_ServoFilter5CoeffN0 = ( (0 << 24) | 281 ), - /// \brief The ServoFilter5CoeffN1 parameter - PARAMETERID_ServoFilter5CoeffN1 = ( (0 << 24) | 282 ), - /// \brief The ServoFilter5CoeffN2 parameter - PARAMETERID_ServoFilter5CoeffN2 = ( (0 << 24) | 283 ), - /// \brief The ServoFilter5CoeffD1 parameter - PARAMETERID_ServoFilter5CoeffD1 = ( (0 << 24) | 284 ), - /// \brief The ServoFilter5CoeffD2 parameter - PARAMETERID_ServoFilter5CoeffD2 = ( (0 << 24) | 285 ), - /// \brief The ServoFilter6CoeffN0 parameter - PARAMETERID_ServoFilter6CoeffN0 = ( (0 << 24) | 286 ), - /// \brief The ServoFilter6CoeffN1 parameter - PARAMETERID_ServoFilter6CoeffN1 = ( (0 << 24) | 287 ), - /// \brief The ServoFilter6CoeffN2 parameter - PARAMETERID_ServoFilter6CoeffN2 = ( (0 << 24) | 288 ), - /// \brief The ServoFilter6CoeffD1 parameter - PARAMETERID_ServoFilter6CoeffD1 = ( (0 << 24) | 289 ), - /// \brief The ServoFilter6CoeffD2 parameter - PARAMETERID_ServoFilter6CoeffD2 = ( (0 << 24) | 290 ), - /// \brief The ServoFilter7CoeffN0 parameter - PARAMETERID_ServoFilter7CoeffN0 = ( (0 << 24) | 291 ), - /// \brief The ServoFilter7CoeffN1 parameter - PARAMETERID_ServoFilter7CoeffN1 = ( (0 << 24) | 292 ), - /// \brief The ServoFilter7CoeffN2 parameter - PARAMETERID_ServoFilter7CoeffN2 = ( (0 << 24) | 293 ), - /// \brief The ServoFilter7CoeffD1 parameter - PARAMETERID_ServoFilter7CoeffD1 = ( (0 << 24) | 294 ), - /// \brief The ServoFilter7CoeffD2 parameter - PARAMETERID_ServoFilter7CoeffD2 = ( (0 << 24) | 295 ), - /// \brief The LinearAmpMaxPower parameter - PARAMETERID_LinearAmpMaxPower = ( (0 << 24) | 296 ), - /// \brief The LinearAmpDeratingFactor parameter - PARAMETERID_LinearAmpDeratingFactor = ( (0 << 24) | 297 ), - /// \brief The LinearAmpBusVoltage parameter - PARAMETERID_LinearAmpBusVoltage = ( (0 << 24) | 298 ), - /// \brief The MotorResistance parameter - PARAMETERID_MotorResistance = ( (0 << 24) | 299 ), - /// \brief The MotorBackEMFConstant parameter - PARAMETERID_MotorBackEMFConstant = ( (0 << 24) | 300 ), - /// \brief The GantrySetup parameter - PARAMETERID_GantrySetup = ( (0 << 24) | 302 ), - /// \brief The RolloverMode parameter - PARAMETERID_RolloverMode = ( (0 << 24) | 303 ), - /// \brief The ResolverCoarseChannel parameter - PARAMETERID_ResolverCoarseChannel = ( (0 << 24) | 306 ), - /// \brief The ResolverFeedbackRatio parameter - PARAMETERID_ResolverFeedbackRatio = ( (0 << 24) | 307 ), - /// \brief The ResolverFeedbackOffset parameter - PARAMETERID_ResolverFeedbackOffset = ( (0 << 24) | 308 ), - /// \brief The InPositionTime parameter - PARAMETERID_InPositionTime = ( (0 << 24) | 319 ), - /// \brief The ExternalFaultAnalogInput parameter - PARAMETERID_ExternalFaultAnalogInput = ( (0 << 24) | 424 ), - /// \brief The ExternalFaultThreshold parameter - PARAMETERID_ExternalFaultThreshold = ( (0 << 24) | 425 ), - /// \brief The DisplayAxes parameter - PARAMETERID_DisplayAxes = ( (0 << 24) | 426 ), - /// \brief The DefaultDependentCoordinatedSpeed parameter - PARAMETERID_DefaultDependentCoordinatedSpeed = ( (0 << 24) | 427 ), - /// \brief The AnalogFilterSetup parameter - PARAMETERID_AnalogFilterSetup = ( (0 << 24) | 482 ), - /// \brief The ModbusMasterSlaveIPAddress parameter - PARAMETERID_ModbusMasterSlaveIPAddress = ( (0 << 24) | 489 ), - /// \brief The ModbusMasterSlavePort parameter - PARAMETERID_ModbusMasterSlavePort = ( (0 << 24) | 490 ), - /// \brief The ModbusMasterSlaveID parameter - PARAMETERID_ModbusMasterSlaveID = ( (0 << 24) | 491 ), - /// \brief The ModbusMasterInputWords parameter - PARAMETERID_ModbusMasterInputWords = ( (0 << 24) | 492 ), - /// \brief The ModbusMasterOutputWords parameter - PARAMETERID_ModbusMasterOutputWords = ( (0 << 24) | 493 ), - /// \brief The ModbusMasterInputBits parameter - PARAMETERID_ModbusMasterInputBits = ( (0 << 24) | 494 ), - /// \brief The ModbusMasterOutputBits parameter - PARAMETERID_ModbusMasterOutputBits = ( (0 << 24) | 495 ), - /// \brief The ModbusMasterSetup parameter - PARAMETERID_ModbusMasterSetup = ( (0 << 24) | 496 ), - /// \brief The ModbusMasterVirtualInputs parameter - PARAMETERID_ModbusMasterVirtualInputs = ( (0 << 24) | 499 ), - /// \brief The ModbusMasterVirtualOutputs parameter - PARAMETERID_ModbusMasterVirtualOutputs = ( (0 << 24) | 500 ), - /// \brief The ModbusMasterOutputWordsSections parameter - PARAMETERID_ModbusMasterOutputWordsSections = ( (0 << 24) | 501 ), - /// \brief The ModbusMasterOutputBitsSections parameter - PARAMETERID_ModbusMasterOutputBitsSections = ( (0 << 24) | 502 ), - /// \brief The ModbusMasterRWReadOffset parameter - PARAMETERID_ModbusMasterRWReadOffset = ( (0 << 24) | 503 ), - /// \brief The ModbusMasterInputWordsOffset parameter - PARAMETERID_ModbusMasterInputWordsOffset = ( (0 << 24) | 504 ), - /// \brief The ModbusMasterOutputWordsOffset parameter - PARAMETERID_ModbusMasterOutputWordsOffset = ( (0 << 24) | 505 ), - /// \brief The ModbusMasterInputBitsOffset parameter - PARAMETERID_ModbusMasterInputBitsOffset = ( (0 << 24) | 506 ), - /// \brief The ModbusMasterOutputBitsOffset parameter - PARAMETERID_ModbusMasterOutputBitsOffset = ( (0 << 24) | 507 ), - /// \brief The ModbusMasterStatusWordsOffset parameter - PARAMETERID_ModbusMasterStatusWordsOffset = ( (0 << 24) | 508 ), - /// \brief The ModbusMasterStatusBitsOffset parameter - PARAMETERID_ModbusMasterStatusBitsOffset = ( (0 << 24) | 509 ), - /// \brief The ModbusMasterVirtualInputsOffset parameter - PARAMETERID_ModbusMasterVirtualInputsOffset = ( (0 << 24) | 510 ), - /// \brief The ModbusMasterVirtualOutputsOffset parameter - PARAMETERID_ModbusMasterVirtualOutputsOffset = ( (0 << 24) | 511 ), - /// \brief The ModbusMasterRWWriteOffset parameter - PARAMETERID_ModbusMasterRWWriteOffset = ( (0 << 24) | 512 ), - /// \brief The ModbusMasterFunctions parameter - PARAMETERID_ModbusMasterFunctions = ( (0 << 24) | 513 ), - /// \brief The ModbusMasterSlaveType parameter - PARAMETERID_ModbusMasterSlaveType = ( (0 << 24) | 514 ), - /// \brief The ModbusSlaveUnitID parameter - PARAMETERID_ModbusSlaveUnitID = ( (0 << 24) | 516 ), - /// \brief The ModbusSlaveInputWords parameter - PARAMETERID_ModbusSlaveInputWords = ( (0 << 24) | 517 ), - /// \brief The ModbusSlaveOutputWords parameter - PARAMETERID_ModbusSlaveOutputWords = ( (0 << 24) | 518 ), - /// \brief The ModbusSlaveInputBits parameter - PARAMETERID_ModbusSlaveInputBits = ( (0 << 24) | 519 ), - /// \brief The ModbusSlaveOutputBits parameter - PARAMETERID_ModbusSlaveOutputBits = ( (0 << 24) | 520 ), - /// \brief The ModbusSlaveInputWordsOffset parameter - PARAMETERID_ModbusSlaveInputWordsOffset = ( (0 << 24) | 521 ), - /// \brief The ModbusSlaveOutputWordsOffset parameter - PARAMETERID_ModbusSlaveOutputWordsOffset = ( (0 << 24) | 522 ), - /// \brief The ModbusSlaveInputBitsOffset parameter - PARAMETERID_ModbusSlaveInputBitsOffset = ( (0 << 24) | 523 ), - /// \brief The ModbusSlaveOutputBitsOffset parameter - PARAMETERID_ModbusSlaveOutputBitsOffset = ( (0 << 24) | 524 ), - /// \brief The ModbusSlaveRWReadOffset parameter - PARAMETERID_ModbusSlaveRWReadOffset = ( (0 << 24) | 525 ), - /// \brief The ModbusSlaveRWWriteOffset parameter - PARAMETERID_ModbusSlaveRWWriteOffset = ( (0 << 24) | 526 ), - /// \brief The CurrentOffsetA parameter - PARAMETERID_CurrentOffsetA = ( (0 << 24) | 662 ), - /// \brief The CurrentOffsetB parameter - PARAMETERID_CurrentOffsetB = ( (0 << 24) | 663 ), - /// \brief The CommandShaperSetup parameter - PARAMETERID_CommandShaperSetup = ( (0 << 24) | 666 ), - /// \brief The CommandShaperTime00 parameter - PARAMETERID_CommandShaperTime00 = ( (0 << 24) | 667 ), - /// \brief The CommandShaperTime01 parameter - PARAMETERID_CommandShaperTime01 = ( (0 << 24) | 668 ), - /// \brief The CommandShaperTime02 parameter - PARAMETERID_CommandShaperTime02 = ( (0 << 24) | 669 ), - /// \brief The CommandShaperTime03 parameter - PARAMETERID_CommandShaperTime03 = ( (0 << 24) | 670 ), - /// \brief The CommandShaperTime04 parameter - PARAMETERID_CommandShaperTime04 = ( (0 << 24) | 671 ), - /// \brief The CommandShaperTime05 parameter - PARAMETERID_CommandShaperTime05 = ( (0 << 24) | 672 ), - /// \brief The CommandShaperTime06 parameter - PARAMETERID_CommandShaperTime06 = ( (0 << 24) | 673 ), - /// \brief The CommandShaperTime07 parameter - PARAMETERID_CommandShaperTime07 = ( (0 << 24) | 674 ), - /// \brief The CommandShaperTime08 parameter - PARAMETERID_CommandShaperTime08 = ( (0 << 24) | 675 ), - /// \brief The CommandShaperTime09 parameter - PARAMETERID_CommandShaperTime09 = ( (0 << 24) | 676 ), - /// \brief The CommandShaperTime10 parameter - PARAMETERID_CommandShaperTime10 = ( (0 << 24) | 677 ), - /// \brief The CommandShaperTime11 parameter - PARAMETERID_CommandShaperTime11 = ( (0 << 24) | 678 ), - /// \brief The CommandShaperTime12 parameter - PARAMETERID_CommandShaperTime12 = ( (0 << 24) | 679 ), - /// \brief The CommandShaperTime13 parameter - PARAMETERID_CommandShaperTime13 = ( (0 << 24) | 680 ), - /// \brief The CommandShaperTime14 parameter - PARAMETERID_CommandShaperTime14 = ( (0 << 24) | 681 ), - /// \brief The CommandShaperTime15 parameter - PARAMETERID_CommandShaperTime15 = ( (0 << 24) | 682 ), - /// \brief The CommandShaperCoeff00 parameter - PARAMETERID_CommandShaperCoeff00 = ( (0 << 24) | 683 ), - /// \brief The CommandShaperCoeff01 parameter - PARAMETERID_CommandShaperCoeff01 = ( (0 << 24) | 684 ), - /// \brief The CommandShaperCoeff02 parameter - PARAMETERID_CommandShaperCoeff02 = ( (0 << 24) | 685 ), - /// \brief The CommandShaperCoeff03 parameter - PARAMETERID_CommandShaperCoeff03 = ( (0 << 24) | 686 ), - /// \brief The CommandShaperCoeff04 parameter - PARAMETERID_CommandShaperCoeff04 = ( (0 << 24) | 687 ), - /// \brief The CommandShaperCoeff05 parameter - PARAMETERID_CommandShaperCoeff05 = ( (0 << 24) | 688 ), - /// \brief The CommandShaperCoeff06 parameter - PARAMETERID_CommandShaperCoeff06 = ( (0 << 24) | 689 ), - /// \brief The CommandShaperCoeff07 parameter - PARAMETERID_CommandShaperCoeff07 = ( (0 << 24) | 690 ), - /// \brief The CommandShaperCoeff08 parameter - PARAMETERID_CommandShaperCoeff08 = ( (0 << 24) | 691 ), - /// \brief The CommandShaperCoeff09 parameter - PARAMETERID_CommandShaperCoeff09 = ( (0 << 24) | 692 ), - /// \brief The CommandShaperCoeff10 parameter - PARAMETERID_CommandShaperCoeff10 = ( (0 << 24) | 693 ), - /// \brief The CommandShaperCoeff11 parameter - PARAMETERID_CommandShaperCoeff11 = ( (0 << 24) | 694 ), - /// \brief The CommandShaperCoeff12 parameter - PARAMETERID_CommandShaperCoeff12 = ( (0 << 24) | 695 ), - /// \brief The CommandShaperCoeff13 parameter - PARAMETERID_CommandShaperCoeff13 = ( (0 << 24) | 696 ), - /// \brief The CommandShaperCoeff14 parameter - PARAMETERID_CommandShaperCoeff14 = ( (0 << 24) | 697 ), - /// \brief The CommandShaperCoeff15 parameter - PARAMETERID_CommandShaperCoeff15 = ( (0 << 24) | 698 ), - /// \brief The CommandShaper0Type parameter - PARAMETERID_CommandShaper0Type = ( (0 << 24) | 703 ), - /// \brief The CommandShaper0Frequency parameter - PARAMETERID_CommandShaper0Frequency = ( (0 << 24) | 704 ), - /// \brief The CommandShaper0Damping parameter - PARAMETERID_CommandShaper0Damping = ( (0 << 24) | 705 ), - /// \brief The CommandShaper1Type parameter - PARAMETERID_CommandShaper1Type = ( (0 << 24) | 706 ), - /// \brief The CommandShaper1Frequency parameter - PARAMETERID_CommandShaper1Frequency = ( (0 << 24) | 707 ), - /// \brief The CommandShaper1Damping parameter - PARAMETERID_CommandShaper1Damping = ( (0 << 24) | 708 ), - /// \brief The ResoluteEncoderSetup parameter - PARAMETERID_ResoluteEncoderSetup = ( (0 << 24) | 715 ), - /// \brief The ResoluteEncoderResolution parameter - PARAMETERID_ResoluteEncoderResolution = ( (0 << 24) | 716 ), - /// \brief The ResoluteEncoderUserResolution parameter - PARAMETERID_ResoluteEncoderUserResolution = ( (0 << 24) | 717 ), - /// \brief The AutofocusInput parameter - PARAMETERID_AutofocusInput = ( (0 << 24) | 721 ), - /// \brief The AutofocusTarget parameter - PARAMETERID_AutofocusTarget = ( (0 << 24) | 722 ), - /// \brief The AutofocusDeadband parameter - PARAMETERID_AutofocusDeadband = ( (0 << 24) | 723 ), - /// \brief The AutofocusGainKi parameter - PARAMETERID_AutofocusGainKi = ( (0 << 24) | 724 ), - /// \brief The AutofocusGainKp parameter - PARAMETERID_AutofocusGainKp = ( (0 << 24) | 725 ), - /// \brief The AutofocusLimitLow parameter - PARAMETERID_AutofocusLimitLow = ( (0 << 24) | 726 ), - /// \brief The AutofocusLimitHigh parameter - PARAMETERID_AutofocusLimitHigh = ( (0 << 24) | 727 ), - /// \brief The AutofocusSpeedClamp parameter - PARAMETERID_AutofocusSpeedClamp = ( (0 << 24) | 728 ), - /// \brief The AutofocusHoldInput parameter - PARAMETERID_AutofocusHoldInput = ( (0 << 24) | 729 ), - /// \brief The AutofocusSetup parameter - PARAMETERID_AutofocusSetup = ( (0 << 24) | 730 ), - /// \brief The ExternalSyncFrequency parameter - PARAMETERID_ExternalSyncFrequency = ( (0 << 24) | 731 ), - /// \brief The GainPff parameter - PARAMETERID_GainPff = ( (0 << 24) | 762 ), - /// \brief The AutofocusInitialRampTime parameter - PARAMETERID_AutofocusInitialRampTime = ( (0 << 24) | 763 ), -} PARAMETERID; - -#endif // __PARAMETER_ID_H__ +/// \file ParameterId.h +/// \brief File contains parameter identifiers +/// +/// This file is version dependant and needs to match the rest of the software + +#ifndef __PARAMETER_ID_H__ +#define __PARAMETER_ID_H__ + + +/// \brief Represents a parameter identifier +typedef enum { + /// \brief The AxisType parameter + PARAMETERID_AxisType = ( (0 << 24) | 0 ), + /// \brief The ReverseMotionDirection parameter + PARAMETERID_ReverseMotionDirection = ( (0 << 24) | 1 ), + /// \brief The CountsPerUnit parameter + PARAMETERID_CountsPerUnit = ( (0 << 24) | 2 ), + /// \brief The ServoRate parameter + PARAMETERID_ServoRate = ( (0 << 24) | 3 ), + /// \brief The ServoSetup parameter + PARAMETERID_ServoSetup = ( (0 << 24) | 4 ), + /// \brief The GainKpos parameter + PARAMETERID_GainKpos = ( (0 << 24) | 5 ), + /// \brief The GainKi parameter + PARAMETERID_GainKi = ( (0 << 24) | 6 ), + /// \brief The GainKp parameter + PARAMETERID_GainKp = ( (0 << 24) | 7 ), + /// \brief The GainVff parameter + PARAMETERID_GainVff = ( (0 << 24) | 8 ), + /// \brief The GainAff parameter + PARAMETERID_GainAff = ( (0 << 24) | 9 ), + /// \brief The GainKv parameter + PARAMETERID_GainKv = ( (0 << 24) | 10 ), + /// \brief The GainKpi parameter + PARAMETERID_GainKpi = ( (0 << 24) | 11 ), + /// \brief The ServoFilter0CoeffN0 parameter + PARAMETERID_ServoFilter0CoeffN0 = ( (0 << 24) | 12 ), + /// \brief The ServoFilter0CoeffN1 parameter + PARAMETERID_ServoFilter0CoeffN1 = ( (0 << 24) | 13 ), + /// \brief The ServoFilter0CoeffN2 parameter + PARAMETERID_ServoFilter0CoeffN2 = ( (0 << 24) | 14 ), + /// \brief The ServoFilter0CoeffD1 parameter + PARAMETERID_ServoFilter0CoeffD1 = ( (0 << 24) | 15 ), + /// \brief The ServoFilter0CoeffD2 parameter + PARAMETERID_ServoFilter0CoeffD2 = ( (0 << 24) | 16 ), + /// \brief The ServoFilter1CoeffN0 parameter + PARAMETERID_ServoFilter1CoeffN0 = ( (0 << 24) | 17 ), + /// \brief The ServoFilter1CoeffN1 parameter + PARAMETERID_ServoFilter1CoeffN1 = ( (0 << 24) | 18 ), + /// \brief The ServoFilter1CoeffN2 parameter + PARAMETERID_ServoFilter1CoeffN2 = ( (0 << 24) | 19 ), + /// \brief The ServoFilter1CoeffD1 parameter + PARAMETERID_ServoFilter1CoeffD1 = ( (0 << 24) | 20 ), + /// \brief The ServoFilter1CoeffD2 parameter + PARAMETERID_ServoFilter1CoeffD2 = ( (0 << 24) | 21 ), + /// \brief The AmplifierDeadtime parameter + PARAMETERID_AmplifierDeadtime = ( (0 << 24) | 22 ), + /// \brief The RolloverCounts parameter + PARAMETERID_RolloverCounts = ( (0 << 24) | 23 ), + /// \brief The CurrentGainKi parameter + PARAMETERID_CurrentGainKi = ( (0 << 24) | 24 ), + /// \brief The CurrentGainKp parameter + PARAMETERID_CurrentGainKp = ( (0 << 24) | 25 ), + /// \brief The FaultMask parameter + PARAMETERID_FaultMask = ( (0 << 24) | 26 ), + /// \brief The FaultMaskDisable parameter + PARAMETERID_FaultMaskDisable = ( (0 << 24) | 27 ), + /// \brief The FaultMaskDecel parameter + PARAMETERID_FaultMaskDecel = ( (0 << 24) | 28 ), + /// \brief The EnableBrakeControl parameter + PARAMETERID_EnableBrakeControl = ( (0 << 24) | 29 ), + /// \brief The FaultMaskOutput parameter + PARAMETERID_FaultMaskOutput = ( (0 << 24) | 30 ), + /// \brief The ESTOPFaultInput parameter + PARAMETERID_ESTOPFaultInput = ( (0 << 24) | 31 ), + /// \brief The PositionErrorThreshold parameter + PARAMETERID_PositionErrorThreshold = ( (0 << 24) | 32 ), + /// \brief The AverageCurrentThreshold parameter + PARAMETERID_AverageCurrentThreshold = ( (0 << 24) | 33 ), + /// \brief The AverageCurrentTime parameter + PARAMETERID_AverageCurrentTime = ( (0 << 24) | 34 ), + /// \brief The VelocityCommandThreshold parameter + PARAMETERID_VelocityCommandThreshold = ( (0 << 24) | 35 ), + /// \brief The VelocityErrorThreshold parameter + PARAMETERID_VelocityErrorThreshold = ( (0 << 24) | 36 ), + /// \brief The SoftwareLimitLow parameter + PARAMETERID_SoftwareLimitLow = ( (0 << 24) | 37 ), + /// \brief The SoftwareLimitHigh parameter + PARAMETERID_SoftwareLimitHigh = ( (0 << 24) | 38 ), + /// \brief The MaxCurrentClamp parameter + PARAMETERID_MaxCurrentClamp = ( (0 << 24) | 39 ), + /// \brief The InPositionDistance parameter + PARAMETERID_InPositionDistance = ( (0 << 24) | 40 ), + /// \brief The MotorType parameter + PARAMETERID_MotorType = ( (0 << 24) | 41 ), + /// \brief The CyclesPerRev parameter + PARAMETERID_CyclesPerRev = ( (0 << 24) | 42 ), + /// \brief The CountsPerRev parameter + PARAMETERID_CountsPerRev = ( (0 << 24) | 43 ), + /// \brief The CommutationOffset parameter + PARAMETERID_CommutationOffset = ( (0 << 24) | 44 ), + /// \brief The AutoMsetTime parameter + PARAMETERID_AutoMsetTime = ( (0 << 24) | 45 ), + /// \brief The AutoMsetCurrent parameter + PARAMETERID_AutoMsetCurrent = ( (0 << 24) | 46 ), + /// \brief The PositionFeedbackType parameter + PARAMETERID_PositionFeedbackType = ( (0 << 24) | 47 ), + /// \brief The PositionFeedbackChannel parameter + PARAMETERID_PositionFeedbackChannel = ( (0 << 24) | 48 ), + /// \brief The VelocityFeedbackType parameter + PARAMETERID_VelocityFeedbackType = ( (0 << 24) | 49 ), + /// \brief The VelocityFeedbackChannel parameter + PARAMETERID_VelocityFeedbackChannel = ( (0 << 24) | 50 ), + /// \brief The EncoderMultiplicationFactor parameter + PARAMETERID_EncoderMultiplicationFactor = ( (0 << 24) | 51 ), + /// \brief The EncoderSineGain parameter + PARAMETERID_EncoderSineGain = ( (0 << 24) | 52 ), + /// \brief The EncoderSineOffset parameter + PARAMETERID_EncoderSineOffset = ( (0 << 24) | 53 ), + /// \brief The EncoderCosineGain parameter + PARAMETERID_EncoderCosineGain = ( (0 << 24) | 54 ), + /// \brief The EncoderCosineOffset parameter + PARAMETERID_EncoderCosineOffset = ( (0 << 24) | 55 ), + /// \brief The EncoderPhase parameter + PARAMETERID_EncoderPhase = ( (0 << 24) | 56 ), + /// \brief The GantryMasterAxis parameter + PARAMETERID_GantryMasterAxis = ( (0 << 24) | 57 ), + /// \brief The LimitDecelDistance parameter + PARAMETERID_LimitDecelDistance = ( (0 << 24) | 59 ), + /// \brief The LimitDebounceTime parameter + PARAMETERID_LimitDebounceTime = ( (0 << 24) | 60 ), + /// \brief The EndOfTravelLimitSetup parameter + PARAMETERID_EndOfTravelLimitSetup = ( (0 << 24) | 61 ), + /// \brief The BacklashDistance parameter + PARAMETERID_BacklashDistance = ( (0 << 24) | 62 ), + /// \brief The FaultOutputSetup parameter + PARAMETERID_FaultOutputSetup = ( (0 << 24) | 63 ), + /// \brief The FaultOutputState parameter + PARAMETERID_FaultOutputState = ( (0 << 24) | 64 ), + /// \brief The IOSetup parameter + PARAMETERID_IOSetup = ( (0 << 24) | 65 ), + /// \brief The BrakeOutput parameter + PARAMETERID_BrakeOutput = ( (0 << 24) | 66 ), + /// \brief The EncoderDivider parameter + PARAMETERID_EncoderDivider = ( (0 << 24) | 67 ), + /// \brief The ExternalFaultDigitalInput parameter + PARAMETERID_ExternalFaultDigitalInput = ( (0 << 24) | 68 ), + /// \brief The BrakeDisableDelay parameter + PARAMETERID_BrakeDisableDelay = ( (0 << 24) | 69 ), + /// \brief The MaxJogDistance parameter + PARAMETERID_MaxJogDistance = ( (0 << 24) | 70 ), + /// \brief The DefaultSpeed parameter + PARAMETERID_DefaultSpeed = ( (0 << 24) | 71 ), + /// \brief The DefaultRampRate parameter + PARAMETERID_DefaultRampRate = ( (0 << 24) | 72 ), + /// \brief The AbortDecelRate parameter + PARAMETERID_AbortDecelRate = ( (0 << 24) | 73 ), + /// \brief The HomeType parameter + PARAMETERID_HomeType = ( (0 << 24) | 74 ), + /// \brief The HomeSetup parameter + PARAMETERID_HomeSetup = ( (0 << 24) | 75 ), + /// \brief The HomeSpeed parameter + PARAMETERID_HomeSpeed = ( (0 << 24) | 76 ), + /// \brief The HomeOffset parameter + PARAMETERID_HomeOffset = ( (0 << 24) | 77 ), + /// \brief The HomeRampRate parameter + PARAMETERID_HomeRampRate = ( (0 << 24) | 78 ), + /// \brief The DefaultWaitMode parameter + PARAMETERID_DefaultWaitMode = ( (0 << 24) | 79 ), + /// \brief The DefaultSCurve parameter + PARAMETERID_DefaultSCurve = ( (0 << 24) | 80 ), + /// \brief The DataCollectionPoints parameter + PARAMETERID_DataCollectionPoints = ( (0 << 24) | 81 ), + /// \brief The StepperResolution parameter + PARAMETERID_StepperResolution = ( (0 << 24) | 83 ), + /// \brief The StepperRunningCurrent parameter + PARAMETERID_StepperRunningCurrent = ( (0 << 24) | 84 ), + /// \brief The StepperHoldingCurrent parameter + PARAMETERID_StepperHoldingCurrent = ( (0 << 24) | 85 ), + /// \brief The StepperVerificationSpeed parameter + PARAMETERID_StepperVerificationSpeed = ( (0 << 24) | 86 ), + /// \brief The LimitDebounceDistance parameter + PARAMETERID_LimitDebounceDistance = ( (0 << 24) | 87 ), + /// \brief The ServoFilter2CoeffN0 parameter + PARAMETERID_ServoFilter2CoeffN0 = ( (0 << 24) | 88 ), + /// \brief The ServoFilter2CoeffN1 parameter + PARAMETERID_ServoFilter2CoeffN1 = ( (0 << 24) | 89 ), + /// \brief The ServoFilter2CoeffN2 parameter + PARAMETERID_ServoFilter2CoeffN2 = ( (0 << 24) | 90 ), + /// \brief The ServoFilter2CoeffD1 parameter + PARAMETERID_ServoFilter2CoeffD1 = ( (0 << 24) | 91 ), + /// \brief The ServoFilter2CoeffD2 parameter + PARAMETERID_ServoFilter2CoeffD2 = ( (0 << 24) | 92 ), + /// \brief The ServoFilter3CoeffN0 parameter + PARAMETERID_ServoFilter3CoeffN0 = ( (0 << 24) | 93 ), + /// \brief The ServoFilter3CoeffN1 parameter + PARAMETERID_ServoFilter3CoeffN1 = ( (0 << 24) | 94 ), + /// \brief The ServoFilter3CoeffN2 parameter + PARAMETERID_ServoFilter3CoeffN2 = ( (0 << 24) | 95 ), + /// \brief The ServoFilter3CoeffD1 parameter + PARAMETERID_ServoFilter3CoeffD1 = ( (0 << 24) | 96 ), + /// \brief The ServoFilter3CoeffD2 parameter + PARAMETERID_ServoFilter3CoeffD2 = ( (0 << 24) | 97 ), + /// \brief The GearCamSource parameter + PARAMETERID_GearCamSource = ( (0 << 24) | 98 ), + /// \brief The GearCamIndex parameter + PARAMETERID_GearCamIndex = ( (0 << 24) | 99 ), + /// \brief The GearCamScaleFactor parameter + PARAMETERID_GearCamScaleFactor = ( (0 << 24) | 100 ), + /// \brief The GearCamAnalogDeadband parameter + PARAMETERID_GearCamAnalogDeadband = ( (0 << 24) | 105 ), + /// \brief The PrintBufferSize parameter + PARAMETERID_PrintBufferSize = ( (0 << 24) | 106 ), + /// \brief The SerialPort0XonCharacter parameter + PARAMETERID_SerialPort0XonCharacter = ( (0 << 24) | 109 ), + /// \brief The SerialPort0XoffCharacter parameter + PARAMETERID_SerialPort0XoffCharacter = ( (0 << 24) | 110 ), + /// \brief The SerialPort0BaudRate parameter + PARAMETERID_SerialPort0BaudRate = ( (0 << 24) | 111 ), + /// \brief The SerialPort0Setup parameter + PARAMETERID_SerialPort0Setup = ( (0 << 24) | 112 ), + /// \brief The TaskExecutionSetup parameter + PARAMETERID_TaskExecutionSetup = ( (0 << 24) | 113 ), + /// \brief The CodeSize parameter + PARAMETERID_CodeSize = ( (0 << 24) | 114 ), + /// \brief The DataSize parameter + PARAMETERID_DataSize = ( (0 << 24) | 115 ), + /// \brief The StackSize parameter + PARAMETERID_StackSize = ( (0 << 24) | 116 ), + /// \brief The AutoRunProgram parameter + PARAMETERID_AutoRunProgram = ( (0 << 24) | 118 ), + /// \brief The MaxJogSpeed parameter + PARAMETERID_MaxJogSpeed = ( (0 << 24) | 123 ), + /// \brief The GlobalIntegers parameter + PARAMETERID_GlobalIntegers = ( (0 << 24) | 124 ), + /// \brief The GlobalDoubles parameter + PARAMETERID_GlobalDoubles = ( (0 << 24) | 125 ), + /// \brief The DecimalPlaces parameter + PARAMETERID_DecimalPlaces = ( (0 << 24) | 126 ), + /// \brief The TaskErrorAbortAxes parameter + PARAMETERID_TaskErrorAbortAxes = ( (0 << 24) | 127 ), + /// \brief The CalibrationFile1D parameter + PARAMETERID_CalibrationFile1D = ( (0 << 24) | 128 ), + /// \brief The UnitsName parameter + PARAMETERID_UnitsName = ( (0 << 24) | 129 ), + /// \brief The Socket2RemoteIPAddress parameter + PARAMETERID_Socket2RemoteIPAddress = ( (0 << 24) | 130 ), + /// \brief The Socket2Port parameter + PARAMETERID_Socket2Port = ( (0 << 24) | 131 ), + /// \brief The Socket2Setup parameter + PARAMETERID_Socket2Setup = ( (0 << 24) | 132 ), + /// \brief The Socket2TransmissionSize parameter + PARAMETERID_Socket2TransmissionSize = ( (0 << 24) | 133 ), + /// \brief The Socket3RemoteIPAddress parameter + PARAMETERID_Socket3RemoteIPAddress = ( (0 << 24) | 134 ), + /// \brief The Socket3Port parameter + PARAMETERID_Socket3Port = ( (0 << 24) | 135 ), + /// \brief The Socket3Setup parameter + PARAMETERID_Socket3Setup = ( (0 << 24) | 136 ), + /// \brief The Socket3TransmissionSize parameter + PARAMETERID_Socket3TransmissionSize = ( (0 << 24) | 137 ), + /// \brief The Socket2Timeout parameter + PARAMETERID_Socket2Timeout = ( (0 << 24) | 138 ), + /// \brief The Socket3Timeout parameter + PARAMETERID_Socket3Timeout = ( (0 << 24) | 139 ), + /// \brief The AxisName parameter + PARAMETERID_AxisName = ( (0 << 24) | 140 ), + /// \brief The UserInteger0 parameter + PARAMETERID_UserInteger0 = ( (0 << 24) | 141 ), + /// \brief The UserInteger1 parameter + PARAMETERID_UserInteger1 = ( (0 << 24) | 142 ), + /// \brief The UserDouble0 parameter + PARAMETERID_UserDouble0 = ( (0 << 24) | 143 ), + /// \brief The UserDouble1 parameter + PARAMETERID_UserDouble1 = ( (0 << 24) | 144 ), + /// \brief The UserString0 parameter + PARAMETERID_UserString0 = ( (0 << 24) | 145 ), + /// \brief The UserString1 parameter + PARAMETERID_UserString1 = ( (0 << 24) | 146 ), + /// \brief The EnDatEncoderSetup parameter + PARAMETERID_EnDatEncoderSetup = ( (0 << 24) | 147 ), + /// \brief The EnDatEncoderResolution parameter + PARAMETERID_EnDatEncoderResolution = ( (0 << 24) | 148 ), + /// \brief The EnDatEncoderTurns parameter + PARAMETERID_EnDatEncoderTurns = ( (0 << 24) | 149 ), + /// \brief The CommandSetup parameter + PARAMETERID_CommandSetup = ( (0 << 24) | 150 ), + /// \brief The SerialPort1XonCharacter parameter + PARAMETERID_SerialPort1XonCharacter = ( (0 << 24) | 152 ), + /// \brief The SerialPort1XoffCharacter parameter + PARAMETERID_SerialPort1XoffCharacter = ( (0 << 24) | 153 ), + /// \brief The SerialPort1BaudRate parameter + PARAMETERID_SerialPort1BaudRate = ( (0 << 24) | 154 ), + /// \brief The SerialPort1Setup parameter + PARAMETERID_SerialPort1Setup = ( (0 << 24) | 155 ), + /// \brief The RequiredAxes parameter + PARAMETERID_RequiredAxes = ( (0 << 24) | 156 ), + /// \brief The JoystickInput1MinVoltage parameter + PARAMETERID_JoystickInput1MinVoltage = ( (0 << 24) | 157 ), + /// \brief The JoystickInput1MaxVoltage parameter + PARAMETERID_JoystickInput1MaxVoltage = ( (0 << 24) | 158 ), + /// \brief The JoystickInput1Deadband parameter + PARAMETERID_JoystickInput1Deadband = ( (0 << 24) | 159 ), + /// \brief The JoystickInput0MinVoltage parameter + PARAMETERID_JoystickInput0MinVoltage = ( (0 << 24) | 160 ), + /// \brief The JoystickInput0MaxVoltage parameter + PARAMETERID_JoystickInput0MaxVoltage = ( (0 << 24) | 161 ), + /// \brief The JoystickInput0Deadband parameter + PARAMETERID_JoystickInput0Deadband = ( (0 << 24) | 162 ), + /// \brief The JoystickLowSpeed parameter + PARAMETERID_JoystickLowSpeed = ( (0 << 24) | 163 ), + /// \brief The JoystickHighSpeed parameter + PARAMETERID_JoystickHighSpeed = ( (0 << 24) | 164 ), + /// \brief The JoystickSetup parameter + PARAMETERID_JoystickSetup = ( (0 << 24) | 165 ), + /// \brief The HomePositionSet parameter + PARAMETERID_HomePositionSet = ( (0 << 24) | 166 ), + /// \brief The TaskTerminationAxes parameter + PARAMETERID_TaskTerminationAxes = ( (0 << 24) | 167 ), + /// \brief The TaskStopAbortAxes parameter + PARAMETERID_TaskStopAbortAxes = ( (0 << 24) | 168 ), + /// \brief The CalibrationFile2D parameter + PARAMETERID_CalibrationFile2D = ( (0 << 24) | 169 ), + /// \brief The FaultMaskDisableDelay parameter + PARAMETERID_FaultMaskDisableDelay = ( (0 << 24) | 170 ), + /// \brief The DefaultCoordinatedSpeed parameter + PARAMETERID_DefaultCoordinatedSpeed = ( (0 << 24) | 171 ), + /// \brief The DefaultCoordinatedRampRate parameter + PARAMETERID_DefaultCoordinatedRampRate = ( (0 << 24) | 172 ), + /// \brief The DefaultDependentCoordinatedRampRate parameter + PARAMETERID_DefaultDependentCoordinatedRampRate = ( (0 << 24) | 173 ), + /// \brief The GpibTerminatingCharacter parameter + PARAMETERID_GpibTerminatingCharacter = ( (0 << 24) | 174 ), + /// \brief The GpibPrimaryAddress parameter + PARAMETERID_GpibPrimaryAddress = ( (0 << 24) | 175 ), + /// \brief The GpibParallelResponse parameter + PARAMETERID_GpibParallelResponse = ( (0 << 24) | 176 ), + /// \brief The CommandTerminatingCharacter parameter + PARAMETERID_CommandTerminatingCharacter = ( (0 << 24) | 177 ), + /// \brief The CommandSuccessCharacter parameter + PARAMETERID_CommandSuccessCharacter = ( (0 << 24) | 178 ), + /// \brief The CommandInvalidCharacter parameter + PARAMETERID_CommandInvalidCharacter = ( (0 << 24) | 179 ), + /// \brief The CommandFaultCharacter parameter + PARAMETERID_CommandFaultCharacter = ( (0 << 24) | 180 ), + /// \brief The FaultAbortAxes parameter + PARAMETERID_FaultAbortAxes = ( (0 << 24) | 182 ), + /// \brief The HarmonicCancellation0Type parameter + PARAMETERID_HarmonicCancellation0Type = ( (0 << 24) | 185 ), + /// \brief The HarmonicCancellation0Period parameter + PARAMETERID_HarmonicCancellation0Period = ( (0 << 24) | 186 ), + /// \brief The HarmonicCancellation0Gain parameter + PARAMETERID_HarmonicCancellation0Gain = ( (0 << 24) | 188 ), + /// \brief The HarmonicCancellation0Phase parameter + PARAMETERID_HarmonicCancellation0Phase = ( (0 << 24) | 189 ), + /// \brief The HarmonicCancellation1Type parameter + PARAMETERID_HarmonicCancellation1Type = ( (0 << 24) | 190 ), + /// \brief The HarmonicCancellation1Period parameter + PARAMETERID_HarmonicCancellation1Period = ( (0 << 24) | 191 ), + /// \brief The HarmonicCancellation1Gain parameter + PARAMETERID_HarmonicCancellation1Gain = ( (0 << 24) | 193 ), + /// \brief The HarmonicCancellation1Phase parameter + PARAMETERID_HarmonicCancellation1Phase = ( (0 << 24) | 194 ), + /// \brief The HarmonicCancellation2Type parameter + PARAMETERID_HarmonicCancellation2Type = ( (0 << 24) | 195 ), + /// \brief The HarmonicCancellation2Period parameter + PARAMETERID_HarmonicCancellation2Period = ( (0 << 24) | 196 ), + /// \brief The HarmonicCancellation2Gain parameter + PARAMETERID_HarmonicCancellation2Gain = ( (0 << 24) | 198 ), + /// \brief The HarmonicCancellation2Phase parameter + PARAMETERID_HarmonicCancellation2Phase = ( (0 << 24) | 199 ), + /// \brief The CommandTimeout parameter + PARAMETERID_CommandTimeout = ( (0 << 24) | 202 ), + /// \brief The CommandTimeoutCharacter parameter + PARAMETERID_CommandTimeoutCharacter = ( (0 << 24) | 203 ), + /// \brief The ResolverReferenceGain parameter + PARAMETERID_ResolverReferenceGain = ( (0 << 24) | 204 ), + /// \brief The ResolverSetup parameter + PARAMETERID_ResolverSetup = ( (0 << 24) | 205 ), + /// \brief The ResolverReferencePhase parameter + PARAMETERID_ResolverReferencePhase = ( (0 << 24) | 206 ), + /// \brief The SoftwareLimitSetup parameter + PARAMETERID_SoftwareLimitSetup = ( (0 << 24) | 210 ), + /// \brief The SSINet1Setup parameter + PARAMETERID_SSINet1Setup = ( (0 << 24) | 211 ), + /// \brief The SSINet2Setup parameter + PARAMETERID_SSINet2Setup = ( (0 << 24) | 212 ), + /// \brief The EmulatedQuadratureDivider parameter + PARAMETERID_EmulatedQuadratureDivider = ( (0 << 24) | 213 ), + /// \brief The HarmonicCancellation3Type parameter + PARAMETERID_HarmonicCancellation3Type = ( (0 << 24) | 214 ), + /// \brief The HarmonicCancellation3Period parameter + PARAMETERID_HarmonicCancellation3Period = ( (0 << 24) | 215 ), + /// \brief The HarmonicCancellation3Gain parameter + PARAMETERID_HarmonicCancellation3Gain = ( (0 << 24) | 217 ), + /// \brief The HarmonicCancellation3Phase parameter + PARAMETERID_HarmonicCancellation3Phase = ( (0 << 24) | 218 ), + /// \brief The HarmonicCancellation4Type parameter + PARAMETERID_HarmonicCancellation4Type = ( (0 << 24) | 219 ), + /// \brief The HarmonicCancellation4Period parameter + PARAMETERID_HarmonicCancellation4Period = ( (0 << 24) | 220 ), + /// \brief The HarmonicCancellation4Gain parameter + PARAMETERID_HarmonicCancellation4Gain = ( (0 << 24) | 222 ), + /// \brief The HarmonicCancellation4Phase parameter + PARAMETERID_HarmonicCancellation4Phase = ( (0 << 24) | 223 ), + /// \brief The EnhancedThroughputChannel parameter + PARAMETERID_EnhancedThroughputChannel = ( (0 << 24) | 224 ), + /// \brief The EnhancedThroughputGain parameter + PARAMETERID_EnhancedThroughputGain = ( (0 << 24) | 225 ), + /// \brief The HarmonicCancellationSetup parameter + PARAMETERID_HarmonicCancellationSetup = ( (0 << 24) | 226 ), + /// \brief The EnhancedThroughputCurrentClamp parameter + PARAMETERID_EnhancedThroughputCurrentClamp = ( (0 << 24) | 227 ), + /// \brief The Analog0Filter0CoeffN0 parameter + PARAMETERID_Analog0Filter0CoeffN0 = ( (0 << 24) | 228 ), + /// \brief The Analog0Filter0CoeffN1 parameter + PARAMETERID_Analog0Filter0CoeffN1 = ( (0 << 24) | 229 ), + /// \brief The Analog0Filter0CoeffN2 parameter + PARAMETERID_Analog0Filter0CoeffN2 = ( (0 << 24) | 230 ), + /// \brief The Analog0Filter0CoeffD1 parameter + PARAMETERID_Analog0Filter0CoeffD1 = ( (0 << 24) | 231 ), + /// \brief The Analog0Filter0CoeffD2 parameter + PARAMETERID_Analog0Filter0CoeffD2 = ( (0 << 24) | 232 ), + /// \brief The Analog0Filter1CoeffN0 parameter + PARAMETERID_Analog0Filter1CoeffN0 = ( (0 << 24) | 233 ), + /// \brief The Analog0Filter1CoeffN1 parameter + PARAMETERID_Analog0Filter1CoeffN1 = ( (0 << 24) | 234 ), + /// \brief The Analog0Filter1CoeffN2 parameter + PARAMETERID_Analog0Filter1CoeffN2 = ( (0 << 24) | 235 ), + /// \brief The Analog0Filter1CoeffD1 parameter + PARAMETERID_Analog0Filter1CoeffD1 = ( (0 << 24) | 236 ), + /// \brief The Analog0Filter1CoeffD2 parameter + PARAMETERID_Analog0Filter1CoeffD2 = ( (0 << 24) | 237 ), + /// \brief The Analog1Filter0CoeffN0 parameter + PARAMETERID_Analog1Filter0CoeffN0 = ( (0 << 24) | 238 ), + /// \brief The Analog1Filter0CoeffN1 parameter + PARAMETERID_Analog1Filter0CoeffN1 = ( (0 << 24) | 239 ), + /// \brief The Analog1Filter0CoeffN2 parameter + PARAMETERID_Analog1Filter0CoeffN2 = ( (0 << 24) | 240 ), + /// \brief The Analog1Filter0CoeffD1 parameter + PARAMETERID_Analog1Filter0CoeffD1 = ( (0 << 24) | 241 ), + /// \brief The Analog1Filter0CoeffD2 parameter + PARAMETERID_Analog1Filter0CoeffD2 = ( (0 << 24) | 242 ), + /// \brief The Analog1Filter1CoeffN0 parameter + PARAMETERID_Analog1Filter1CoeffN0 = ( (0 << 24) | 243 ), + /// \brief The Analog1Filter1CoeffN1 parameter + PARAMETERID_Analog1Filter1CoeffN1 = ( (0 << 24) | 244 ), + /// \brief The Analog1Filter1CoeffN2 parameter + PARAMETERID_Analog1Filter1CoeffN2 = ( (0 << 24) | 245 ), + /// \brief The Analog1Filter1CoeffD1 parameter + PARAMETERID_Analog1Filter1CoeffD1 = ( (0 << 24) | 246 ), + /// \brief The Analog1Filter1CoeffD2 parameter + PARAMETERID_Analog1Filter1CoeffD2 = ( (0 << 24) | 247 ), + /// \brief The GlobalStrings parameter + PARAMETERID_GlobalStrings = ( (0 << 24) | 248 ), + /// \brief The DefaultCoordinatedRampMode parameter + PARAMETERID_DefaultCoordinatedRampMode = ( (0 << 24) | 249 ), + /// \brief The DefaultCoordinatedRampTime parameter + PARAMETERID_DefaultCoordinatedRampTime = ( (0 << 24) | 250 ), + /// \brief The DefaultCoordinatedRampDistance parameter + PARAMETERID_DefaultCoordinatedRampDistance = ( (0 << 24) | 251 ), + /// \brief The DefaultRampMode parameter + PARAMETERID_DefaultRampMode = ( (0 << 24) | 252 ), + /// \brief The DefaultRampTime parameter + PARAMETERID_DefaultRampTime = ( (0 << 24) | 253 ), + /// \brief The DefaultRampDistance parameter + PARAMETERID_DefaultRampDistance = ( (0 << 24) | 254 ), + /// \brief The ServoFilterSetup parameter + PARAMETERID_ServoFilterSetup = ( (0 << 24) | 255 ), + /// \brief The FeedbackSetup parameter + PARAMETERID_FeedbackSetup = ( (0 << 24) | 256 ), + /// \brief The EncoderMultiplierSetup parameter + PARAMETERID_EncoderMultiplierSetup = ( (0 << 24) | 257 ), + /// \brief The FaultSetup parameter + PARAMETERID_FaultSetup = ( (0 << 24) | 258 ), + /// \brief The ThresholdScheduleSetup parameter + PARAMETERID_ThresholdScheduleSetup = ( (0 << 24) | 259 ), + /// \brief The ThresholdRegion2High parameter + PARAMETERID_ThresholdRegion2High = ( (0 << 24) | 260 ), + /// \brief The ThresholdRegion2Low parameter + PARAMETERID_ThresholdRegion2Low = ( (0 << 24) | 261 ), + /// \brief The ThresholdRegion3GainKpos parameter + PARAMETERID_ThresholdRegion3GainKpos = ( (0 << 24) | 262 ), + /// \brief The ThresholdRegion3GainKp parameter + PARAMETERID_ThresholdRegion3GainKp = ( (0 << 24) | 263 ), + /// \brief The ThresholdRegion3GainKi parameter + PARAMETERID_ThresholdRegion3GainKi = ( (0 << 24) | 264 ), + /// \brief The ThresholdRegion3GainKpi parameter + PARAMETERID_ThresholdRegion3GainKpi = ( (0 << 24) | 265 ), + /// \brief The ThresholdRegion4High parameter + PARAMETERID_ThresholdRegion4High = ( (0 << 24) | 266 ), + /// \brief The ThresholdRegion4Low parameter + PARAMETERID_ThresholdRegion4Low = ( (0 << 24) | 267 ), + /// \brief The ThresholdRegion5GainKpos parameter + PARAMETERID_ThresholdRegion5GainKpos = ( (0 << 24) | 268 ), + /// \brief The ThresholdRegion5GainKp parameter + PARAMETERID_ThresholdRegion5GainKp = ( (0 << 24) | 269 ), + /// \brief The ThresholdRegion5GainKi parameter + PARAMETERID_ThresholdRegion5GainKi = ( (0 << 24) | 270 ), + /// \brief The ThresholdRegion5GainKpi parameter + PARAMETERID_ThresholdRegion5GainKpi = ( (0 << 24) | 271 ), + /// \brief The DynamicScheduleSetup parameter + PARAMETERID_DynamicScheduleSetup = ( (0 << 24) | 272 ), + /// \brief The DynamicGainKposScale parameter + PARAMETERID_DynamicGainKposScale = ( (0 << 24) | 273 ), + /// \brief The DynamicGainKpScale parameter + PARAMETERID_DynamicGainKpScale = ( (0 << 24) | 274 ), + /// \brief The DynamicGainKiScale parameter + PARAMETERID_DynamicGainKiScale = ( (0 << 24) | 275 ), + /// \brief The ServoFilter4CoeffN0 parameter + PARAMETERID_ServoFilter4CoeffN0 = ( (0 << 24) | 276 ), + /// \brief The ServoFilter4CoeffN1 parameter + PARAMETERID_ServoFilter4CoeffN1 = ( (0 << 24) | 277 ), + /// \brief The ServoFilter4CoeffN2 parameter + PARAMETERID_ServoFilter4CoeffN2 = ( (0 << 24) | 278 ), + /// \brief The ServoFilter4CoeffD1 parameter + PARAMETERID_ServoFilter4CoeffD1 = ( (0 << 24) | 279 ), + /// \brief The ServoFilter4CoeffD2 parameter + PARAMETERID_ServoFilter4CoeffD2 = ( (0 << 24) | 280 ), + /// \brief The ServoFilter5CoeffN0 parameter + PARAMETERID_ServoFilter5CoeffN0 = ( (0 << 24) | 281 ), + /// \brief The ServoFilter5CoeffN1 parameter + PARAMETERID_ServoFilter5CoeffN1 = ( (0 << 24) | 282 ), + /// \brief The ServoFilter5CoeffN2 parameter + PARAMETERID_ServoFilter5CoeffN2 = ( (0 << 24) | 283 ), + /// \brief The ServoFilter5CoeffD1 parameter + PARAMETERID_ServoFilter5CoeffD1 = ( (0 << 24) | 284 ), + /// \brief The ServoFilter5CoeffD2 parameter + PARAMETERID_ServoFilter5CoeffD2 = ( (0 << 24) | 285 ), + /// \brief The ServoFilter6CoeffN0 parameter + PARAMETERID_ServoFilter6CoeffN0 = ( (0 << 24) | 286 ), + /// \brief The ServoFilter6CoeffN1 parameter + PARAMETERID_ServoFilter6CoeffN1 = ( (0 << 24) | 287 ), + /// \brief The ServoFilter6CoeffN2 parameter + PARAMETERID_ServoFilter6CoeffN2 = ( (0 << 24) | 288 ), + /// \brief The ServoFilter6CoeffD1 parameter + PARAMETERID_ServoFilter6CoeffD1 = ( (0 << 24) | 289 ), + /// \brief The ServoFilter6CoeffD2 parameter + PARAMETERID_ServoFilter6CoeffD2 = ( (0 << 24) | 290 ), + /// \brief The ServoFilter7CoeffN0 parameter + PARAMETERID_ServoFilter7CoeffN0 = ( (0 << 24) | 291 ), + /// \brief The ServoFilter7CoeffN1 parameter + PARAMETERID_ServoFilter7CoeffN1 = ( (0 << 24) | 292 ), + /// \brief The ServoFilter7CoeffN2 parameter + PARAMETERID_ServoFilter7CoeffN2 = ( (0 << 24) | 293 ), + /// \brief The ServoFilter7CoeffD1 parameter + PARAMETERID_ServoFilter7CoeffD1 = ( (0 << 24) | 294 ), + /// \brief The ServoFilter7CoeffD2 parameter + PARAMETERID_ServoFilter7CoeffD2 = ( (0 << 24) | 295 ), + /// \brief The LinearAmpMaxPower parameter + PARAMETERID_LinearAmpMaxPower = ( (0 << 24) | 296 ), + /// \brief The LinearAmpDeratingFactor parameter + PARAMETERID_LinearAmpDeratingFactor = ( (0 << 24) | 297 ), + /// \brief The LinearAmpBusVoltage parameter + PARAMETERID_LinearAmpBusVoltage = ( (0 << 24) | 298 ), + /// \brief The MotorResistance parameter + PARAMETERID_MotorResistance = ( (0 << 24) | 299 ), + /// \brief The MotorBackEMFConstant parameter + PARAMETERID_MotorBackEMFConstant = ( (0 << 24) | 300 ), + /// \brief The GantrySetup parameter + PARAMETERID_GantrySetup = ( (0 << 24) | 302 ), + /// \brief The RolloverMode parameter + PARAMETERID_RolloverMode = ( (0 << 24) | 303 ), + /// \brief The ResolverCoarseChannel parameter + PARAMETERID_ResolverCoarseChannel = ( (0 << 24) | 306 ), + /// \brief The ResolverFeedbackRatio parameter + PARAMETERID_ResolverFeedbackRatio = ( (0 << 24) | 307 ), + /// \brief The ResolverFeedbackOffset parameter + PARAMETERID_ResolverFeedbackOffset = ( (0 << 24) | 308 ), + /// \brief The InPositionTime parameter + PARAMETERID_InPositionTime = ( (0 << 24) | 319 ), + /// \brief The ExternalFaultAnalogInput parameter + PARAMETERID_ExternalFaultAnalogInput = ( (0 << 24) | 424 ), + /// \brief The ExternalFaultThreshold parameter + PARAMETERID_ExternalFaultThreshold = ( (0 << 24) | 425 ), + /// \brief The DisplayAxes parameter + PARAMETERID_DisplayAxes = ( (0 << 24) | 426 ), + /// \brief The DefaultDependentCoordinatedSpeed parameter + PARAMETERID_DefaultDependentCoordinatedSpeed = ( (0 << 24) | 427 ), + /// \brief The AnalogFilterSetup parameter + PARAMETERID_AnalogFilterSetup = ( (0 << 24) | 482 ), + /// \brief The ModbusMasterSlaveIPAddress parameter + PARAMETERID_ModbusMasterSlaveIPAddress = ( (0 << 24) | 489 ), + /// \brief The ModbusMasterSlavePort parameter + PARAMETERID_ModbusMasterSlavePort = ( (0 << 24) | 490 ), + /// \brief The ModbusMasterSlaveID parameter + PARAMETERID_ModbusMasterSlaveID = ( (0 << 24) | 491 ), + /// \brief The ModbusMasterInputWords parameter + PARAMETERID_ModbusMasterInputWords = ( (0 << 24) | 492 ), + /// \brief The ModbusMasterOutputWords parameter + PARAMETERID_ModbusMasterOutputWords = ( (0 << 24) | 493 ), + /// \brief The ModbusMasterInputBits parameter + PARAMETERID_ModbusMasterInputBits = ( (0 << 24) | 494 ), + /// \brief The ModbusMasterOutputBits parameter + PARAMETERID_ModbusMasterOutputBits = ( (0 << 24) | 495 ), + /// \brief The ModbusMasterSetup parameter + PARAMETERID_ModbusMasterSetup = ( (0 << 24) | 496 ), + /// \brief The ModbusMasterVirtualInputs parameter + PARAMETERID_ModbusMasterVirtualInputs = ( (0 << 24) | 499 ), + /// \brief The ModbusMasterVirtualOutputs parameter + PARAMETERID_ModbusMasterVirtualOutputs = ( (0 << 24) | 500 ), + /// \brief The ModbusMasterOutputWordsSections parameter + PARAMETERID_ModbusMasterOutputWordsSections = ( (0 << 24) | 501 ), + /// \brief The ModbusMasterOutputBitsSections parameter + PARAMETERID_ModbusMasterOutputBitsSections = ( (0 << 24) | 502 ), + /// \brief The ModbusMasterRWReadOffset parameter + PARAMETERID_ModbusMasterRWReadOffset = ( (0 << 24) | 503 ), + /// \brief The ModbusMasterInputWordsOffset parameter + PARAMETERID_ModbusMasterInputWordsOffset = ( (0 << 24) | 504 ), + /// \brief The ModbusMasterOutputWordsOffset parameter + PARAMETERID_ModbusMasterOutputWordsOffset = ( (0 << 24) | 505 ), + /// \brief The ModbusMasterInputBitsOffset parameter + PARAMETERID_ModbusMasterInputBitsOffset = ( (0 << 24) | 506 ), + /// \brief The ModbusMasterOutputBitsOffset parameter + PARAMETERID_ModbusMasterOutputBitsOffset = ( (0 << 24) | 507 ), + /// \brief The ModbusMasterStatusWordsOffset parameter + PARAMETERID_ModbusMasterStatusWordsOffset = ( (0 << 24) | 508 ), + /// \brief The ModbusMasterStatusBitsOffset parameter + PARAMETERID_ModbusMasterStatusBitsOffset = ( (0 << 24) | 509 ), + /// \brief The ModbusMasterVirtualInputsOffset parameter + PARAMETERID_ModbusMasterVirtualInputsOffset = ( (0 << 24) | 510 ), + /// \brief The ModbusMasterVirtualOutputsOffset parameter + PARAMETERID_ModbusMasterVirtualOutputsOffset = ( (0 << 24) | 511 ), + /// \brief The ModbusMasterRWWriteOffset parameter + PARAMETERID_ModbusMasterRWWriteOffset = ( (0 << 24) | 512 ), + /// \brief The ModbusMasterFunctions parameter + PARAMETERID_ModbusMasterFunctions = ( (0 << 24) | 513 ), + /// \brief The ModbusMasterSlaveType parameter + PARAMETERID_ModbusMasterSlaveType = ( (0 << 24) | 514 ), + /// \brief The ModbusSlaveUnitID parameter + PARAMETERID_ModbusSlaveUnitID = ( (0 << 24) | 516 ), + /// \brief The ModbusSlaveInputWords parameter + PARAMETERID_ModbusSlaveInputWords = ( (0 << 24) | 517 ), + /// \brief The ModbusSlaveOutputWords parameter + PARAMETERID_ModbusSlaveOutputWords = ( (0 << 24) | 518 ), + /// \brief The ModbusSlaveInputBits parameter + PARAMETERID_ModbusSlaveInputBits = ( (0 << 24) | 519 ), + /// \brief The ModbusSlaveOutputBits parameter + PARAMETERID_ModbusSlaveOutputBits = ( (0 << 24) | 520 ), + /// \brief The ModbusSlaveInputWordsOffset parameter + PARAMETERID_ModbusSlaveInputWordsOffset = ( (0 << 24) | 521 ), + /// \brief The ModbusSlaveOutputWordsOffset parameter + PARAMETERID_ModbusSlaveOutputWordsOffset = ( (0 << 24) | 522 ), + /// \brief The ModbusSlaveInputBitsOffset parameter + PARAMETERID_ModbusSlaveInputBitsOffset = ( (0 << 24) | 523 ), + /// \brief The ModbusSlaveOutputBitsOffset parameter + PARAMETERID_ModbusSlaveOutputBitsOffset = ( (0 << 24) | 524 ), + /// \brief The ModbusSlaveRWReadOffset parameter + PARAMETERID_ModbusSlaveRWReadOffset = ( (0 << 24) | 525 ), + /// \brief The ModbusSlaveRWWriteOffset parameter + PARAMETERID_ModbusSlaveRWWriteOffset = ( (0 << 24) | 526 ), + /// \brief The CurrentOffsetA parameter + PARAMETERID_CurrentOffsetA = ( (0 << 24) | 662 ), + /// \brief The CurrentOffsetB parameter + PARAMETERID_CurrentOffsetB = ( (0 << 24) | 663 ), + /// \brief The CommandShaperSetup parameter + PARAMETERID_CommandShaperSetup = ( (0 << 24) | 666 ), + /// \brief The CommandShaperTime00 parameter + PARAMETERID_CommandShaperTime00 = ( (0 << 24) | 667 ), + /// \brief The CommandShaperTime01 parameter + PARAMETERID_CommandShaperTime01 = ( (0 << 24) | 668 ), + /// \brief The CommandShaperTime02 parameter + PARAMETERID_CommandShaperTime02 = ( (0 << 24) | 669 ), + /// \brief The CommandShaperTime03 parameter + PARAMETERID_CommandShaperTime03 = ( (0 << 24) | 670 ), + /// \brief The CommandShaperTime04 parameter + PARAMETERID_CommandShaperTime04 = ( (0 << 24) | 671 ), + /// \brief The CommandShaperTime05 parameter + PARAMETERID_CommandShaperTime05 = ( (0 << 24) | 672 ), + /// \brief The CommandShaperTime06 parameter + PARAMETERID_CommandShaperTime06 = ( (0 << 24) | 673 ), + /// \brief The CommandShaperTime07 parameter + PARAMETERID_CommandShaperTime07 = ( (0 << 24) | 674 ), + /// \brief The CommandShaperTime08 parameter + PARAMETERID_CommandShaperTime08 = ( (0 << 24) | 675 ), + /// \brief The CommandShaperTime09 parameter + PARAMETERID_CommandShaperTime09 = ( (0 << 24) | 676 ), + /// \brief The CommandShaperTime10 parameter + PARAMETERID_CommandShaperTime10 = ( (0 << 24) | 677 ), + /// \brief The CommandShaperTime11 parameter + PARAMETERID_CommandShaperTime11 = ( (0 << 24) | 678 ), + /// \brief The CommandShaperTime12 parameter + PARAMETERID_CommandShaperTime12 = ( (0 << 24) | 679 ), + /// \brief The CommandShaperTime13 parameter + PARAMETERID_CommandShaperTime13 = ( (0 << 24) | 680 ), + /// \brief The CommandShaperTime14 parameter + PARAMETERID_CommandShaperTime14 = ( (0 << 24) | 681 ), + /// \brief The CommandShaperTime15 parameter + PARAMETERID_CommandShaperTime15 = ( (0 << 24) | 682 ), + /// \brief The CommandShaperCoeff00 parameter + PARAMETERID_CommandShaperCoeff00 = ( (0 << 24) | 683 ), + /// \brief The CommandShaperCoeff01 parameter + PARAMETERID_CommandShaperCoeff01 = ( (0 << 24) | 684 ), + /// \brief The CommandShaperCoeff02 parameter + PARAMETERID_CommandShaperCoeff02 = ( (0 << 24) | 685 ), + /// \brief The CommandShaperCoeff03 parameter + PARAMETERID_CommandShaperCoeff03 = ( (0 << 24) | 686 ), + /// \brief The CommandShaperCoeff04 parameter + PARAMETERID_CommandShaperCoeff04 = ( (0 << 24) | 687 ), + /// \brief The CommandShaperCoeff05 parameter + PARAMETERID_CommandShaperCoeff05 = ( (0 << 24) | 688 ), + /// \brief The CommandShaperCoeff06 parameter + PARAMETERID_CommandShaperCoeff06 = ( (0 << 24) | 689 ), + /// \brief The CommandShaperCoeff07 parameter + PARAMETERID_CommandShaperCoeff07 = ( (0 << 24) | 690 ), + /// \brief The CommandShaperCoeff08 parameter + PARAMETERID_CommandShaperCoeff08 = ( (0 << 24) | 691 ), + /// \brief The CommandShaperCoeff09 parameter + PARAMETERID_CommandShaperCoeff09 = ( (0 << 24) | 692 ), + /// \brief The CommandShaperCoeff10 parameter + PARAMETERID_CommandShaperCoeff10 = ( (0 << 24) | 693 ), + /// \brief The CommandShaperCoeff11 parameter + PARAMETERID_CommandShaperCoeff11 = ( (0 << 24) | 694 ), + /// \brief The CommandShaperCoeff12 parameter + PARAMETERID_CommandShaperCoeff12 = ( (0 << 24) | 695 ), + /// \brief The CommandShaperCoeff13 parameter + PARAMETERID_CommandShaperCoeff13 = ( (0 << 24) | 696 ), + /// \brief The CommandShaperCoeff14 parameter + PARAMETERID_CommandShaperCoeff14 = ( (0 << 24) | 697 ), + /// \brief The CommandShaperCoeff15 parameter + PARAMETERID_CommandShaperCoeff15 = ( (0 << 24) | 698 ), + /// \brief The CommandShaper0Type parameter + PARAMETERID_CommandShaper0Type = ( (0 << 24) | 703 ), + /// \brief The CommandShaper0Frequency parameter + PARAMETERID_CommandShaper0Frequency = ( (0 << 24) | 704 ), + /// \brief The CommandShaper0Damping parameter + PARAMETERID_CommandShaper0Damping = ( (0 << 24) | 705 ), + /// \brief The CommandShaper1Type parameter + PARAMETERID_CommandShaper1Type = ( (0 << 24) | 706 ), + /// \brief The CommandShaper1Frequency parameter + PARAMETERID_CommandShaper1Frequency = ( (0 << 24) | 707 ), + /// \brief The CommandShaper1Damping parameter + PARAMETERID_CommandShaper1Damping = ( (0 << 24) | 708 ), + /// \brief The ResoluteEncoderSetup parameter + PARAMETERID_ResoluteEncoderSetup = ( (0 << 24) | 715 ), + /// \brief The ResoluteEncoderResolution parameter + PARAMETERID_ResoluteEncoderResolution = ( (0 << 24) | 716 ), + /// \brief The ResoluteEncoderUserResolution parameter + PARAMETERID_ResoluteEncoderUserResolution = ( (0 << 24) | 717 ), + /// \brief The AutofocusInput parameter + PARAMETERID_AutofocusInput = ( (0 << 24) | 721 ), + /// \brief The AutofocusTarget parameter + PARAMETERID_AutofocusTarget = ( (0 << 24) | 722 ), + /// \brief The AutofocusDeadband parameter + PARAMETERID_AutofocusDeadband = ( (0 << 24) | 723 ), + /// \brief The AutofocusGainKi parameter + PARAMETERID_AutofocusGainKi = ( (0 << 24) | 724 ), + /// \brief The AutofocusGainKp parameter + PARAMETERID_AutofocusGainKp = ( (0 << 24) | 725 ), + /// \brief The AutofocusLimitLow parameter + PARAMETERID_AutofocusLimitLow = ( (0 << 24) | 726 ), + /// \brief The AutofocusLimitHigh parameter + PARAMETERID_AutofocusLimitHigh = ( (0 << 24) | 727 ), + /// \brief The AutofocusSpeedClamp parameter + PARAMETERID_AutofocusSpeedClamp = ( (0 << 24) | 728 ), + /// \brief The AutofocusHoldInput parameter + PARAMETERID_AutofocusHoldInput = ( (0 << 24) | 729 ), + /// \brief The AutofocusSetup parameter + PARAMETERID_AutofocusSetup = ( (0 << 24) | 730 ), + /// \brief The ExternalSyncFrequency parameter + PARAMETERID_ExternalSyncFrequency = ( (0 << 24) | 731 ), + /// \brief The GainPff parameter + PARAMETERID_GainPff = ( (0 << 24) | 762 ), + /// \brief The AutofocusInitialRampTime parameter + PARAMETERID_AutofocusInitialRampTime = ( (0 << 24) | 763 ), +} PARAMETERID; + +#endif // __PARAMETER_ID_H__ diff --git a/motorApp/AerotechSrc/README b/motorApp/AerotechSrc/README index bd76290..a906c6e 100644 --- a/motorApp/AerotechSrc/README +++ b/motorApp/AerotechSrc/README @@ -91,6 +91,15 @@ between the call to drvAsynIPPortConfigure() and the call to EnsembleAsynConfig() in the st.cmd file must be less than the ->Socket2Timeout Parameter. If this is not done a socket timeout will occur during IOC initialization and prevent EPICS from making a communication connection.) +- In order to execute a home search from EPICS, configure the following. + - Set the System > TaskExecutionSetup parameter so that the Auxiliary task is enabled + - Copy the HomeAsync.ab from + C:\Program Files (x86)\Aerotech\Ensemble\Samples\AeroBasic + to convenient local directory, such as + C:\Users\Public\Documents\Aerotech\Ensemble\User Files\AeroBasicPrgms + - From Ensemble Motion Composer, select the Auxililary task, then build and load the HomeAsync program. + - Finally, from Ensemble Configuration Manager, drag and drop the HomeAsync.bcx file to the Ensemble congtroller's file system. + DRIVER LIMITATIONS diff --git a/motorApp/AerotechSrc/devAerotech.dbd b/motorApp/AerotechSrc/devAerotech.dbd index 1a742bf..3619889 100644 --- a/motorApp/AerotechSrc/devAerotech.dbd +++ b/motorApp/AerotechSrc/devAerotech.dbd @@ -10,4 +10,3 @@ driver(motorA3200) registrar(AerotechRegister) registrar(concatStringRegister) -registrar(EnsembleTrajectoryScanRegistrar) diff --git a/motorApp/AerotechSrc/devAerotechSeq.dbd b/motorApp/AerotechSrc/devAerotechSeq.dbd new file mode 100644 index 0000000..b3872d3 --- /dev/null +++ b/motorApp/AerotechSrc/devAerotechSeq.dbd @@ -0,0 +1 @@ +registrar(EnsembleTrajectoryScanRegistrar) diff --git a/motorApp/AerotechSrc/devSoloist.cc b/motorApp/AerotechSrc/devSoloist.cc index dcd913c..41762da 100644 --- a/motorApp/AerotechSrc/devSoloist.cc +++ b/motorApp/AerotechSrc/devSoloist.cc @@ -2,10 +2,6 @@ * FILENAME... devSoloist.cc * USAGE... Motor record device level support for Aerotech Soloist. * -* Version: $Revision: 10834 $ -* Modified By: $Author: sluiter $ -* Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ -* HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/devSoloist.cc $ * */ @@ -44,6 +40,7 @@ #include #include #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -54,7 +51,7 @@ extern struct driver_table Soloist_access; /* ----------------Create the dsets for devSoloist----------------- */ static struct driver_table *drvtabptr; -static long Soloist_init (void *); +static long Soloist_init (int); static long Soloist_init_record (void *); static long Soloist_start_trans (struct motorRecord *); static RTN_STATUS Soloist_build_trans (motor_cmnd, double *, @@ -111,12 +108,11 @@ static struct board_stat **Soloist_cards; // initialize device support for Soloist -static long Soloist_init (void *arg) +static long Soloist_init (int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &Soloist_access; (drvtabptr->init)(); diff --git a/motorApp/AerotechSrc/doCommand.ab b/motorApp/AerotechSrc/doCommand.ab index 8879969..e459bc5 100755 --- a/motorApp/AerotechSrc/doCommand.ab +++ b/motorApp/AerotechSrc/doCommand.ab @@ -1,235 +1,235 @@ -HEADER - DEFINE cmdDONE 0 - DEFINE cmdVELOCITY_ON 1 - DEFINE cmdVELOCITY_OFF 2 - DEFINE cmdHALT 3 - DEFINE cmdSTART 4 - DEFINE cmdPVT_INIT_TIME_ABS 5 - DEFINE cmdPVT_INIT_TIME_INC 6 - DEFINE cmdPVT1 7 - DEFINE cmdPVT2 8 - DEFINE cmdPVT3 9 - DEFINE cmdPVT 10 - DEFINE cmdABORT 11 - DEFINE cmdSTARTABORT 12 - - DEFINE cmdSCOPEBUFFER 13 - DEFINE cmdSCOPEDATA 14 - DEFINE cmdSCOPESTATUS 15 - DEFINE cmdSCOPETRIG 16 - DEFINE cmdSCOPETRIGPERIOD 17 - DEFINE cmdDRIVEINFO 18 - DEFINE cmdLINEAR 19 - DEFINE cmdDATAACQ_TRIG 20 - DEFINE cmdDATAACQ_INP 21 - DEFINE cmdDATAACQ_ON 22 - DEFINE cmdDATAACQ_OFF 23 - DEFINE cmdDATAACQ_READ 24 - DEFINE cmdDOTRAJECTORY 25 - - DEFINE cmdVar 45 - DEFINE iarg1Var 46 - DEFINE iarg2Var 47 - DEFINE iarg3Var 48 - DEFINE iarg4Var 49 - DEFINE darg1Var 1 - DEFINE darg2Var 2 - DEFINE darg3Var 3 - DEFINE darg4Var 4 - DEFINE darg5Var 5 - DEFINE darg6Var 6 - DEFINE darg7Var 7 - DEFINE darg8Var 8 - DEFINE darg9Var 9 - DEFINE numIArg 44 - DEFINE numDArg 43 - DEFINE pvtWaitMSVar 42 - - ' Numerical values for first arg to scopedata() - DEFINE sd_PositionCommand 0 - DEFINE sd_PositionFeedback 1 - DEFINE sd_ExternalPosition 2 - DEFINE sd_AxisFault 3 - DEFINE sd_AxisStatus 4 - DEFINE sd_AnalogInput0 5 - DEFINE sd_AnalogInput1 6 - DEFINE sd_AnalogOutput0 7 - DEFINE sd_AnalogOutput1 8 - DEFINE sd_DigitalInput0 9 - DEFINE sd_DigitalInput1 10 - DEFINE sd_DigitalOutput0 11 - DEFINE sd_DigitalOutput1 12 - DEFINE sd_CurrentCommand 13 - DEFINE sd_CurrentFeedback 14 - DEFINE sd_OptionalData1 15 - DEFINE sd_OptionalData2 16 - DEFINE sd_ProgramCounter 17 - -END HEADER - -PROGRAM - - DIM axis1Number AS Integer - DIM axis2Number AS Integer - DIM axis3Number AS Integer - DIM axis4Number AS Integer - DIM keepon as Integer - DIM iarg as integer - DIM pvtWaitMS as integer - dim pos as double - dim vel as double - dim timeval as double - dim timeIsAbs as integer - dim timeInitialized as integer - dim numpoints as integer - dim i as integer - - wait mode nowait - ABS - keepon = 1 - pvtWaitMS = IGLOBAL(pvtWaitMSVar) - IF pvtWaitMS < 1 THEN - pvtWaitMS = 50 - END IF - WHILE keepon - IF IGLOBAL(cmdVar) = cmdPVT1 THEN - axis1Number = IGLOBAL(iarg1Var) - pos = DGLOBAL(darg1Var) - vel = DGLOBAL(darg2Var) - timeval = DGLOBAL(darg3Var) - if timeIsAbs and not timeInitialized then - PVT INIT TIME ABS - timeInitialized = 1 - end if - PVT @axis1Number pos, vel TIME timeval - ELSEIF IGLOBAL(cmdVar) = cmdVELOCITY_ON THEN - VELOCITY ON - ELSEIF IGLOBAL(cmdVar) = cmdVELOCITY_OFF THEN - VELOCITY OFF - ELSEIF IGLOBAL(cmdVar) = cmdHALT THEN - HALT - ELSEIF IGLOBAL(cmdVar) = cmdSTARTABORT THEN - START - ABORT @0 - acknowledgeall - enable @0 - keepon = 0 - ELSEIF IGLOBAL(cmdVar) = cmdSTART THEN - START - keepon = 0 - ELSEIF IGLOBAL(cmdVar) = cmdPVT THEN - axis1Number = IGLOBAL(iarg1Var) - axis2Number = IGLOBAL(iarg2Var) - axis3Number = IGLOBAL(iarg3Var) - axis4Number = IGLOBAL(iarg4Var) - if IGLOBAL(numIArg) = 1 then - PVT @axis1Number DGLOBAL(darg1Var), DGLOBAL(darg2Var) TIME DGLOBAL(darg3Var) - elseif IGLOBAL(numIArg) = 2 then - PVT @axis1Number DGLOBAL(darg1Var), DGLOBAL(darg2Var) @axis2Number DGLOBAL(darg3Var), DGLOBAL(darg4Var) TIME DGLOBAL(darg5Var) - elseif IGLOBAL(numIArg) = 3 then - PVT @axis1Number DGLOBAL(darg1Var), DGLOBAL(darg2Var) @axis2Number DGLOBAL(darg3Var), DGLOBAL(darg4Var) @axis3Number DGLOBAL(darg5Var), DGLOBAL(darg6Var) TIME DGLOBAL(darg7Var) - elseif IGLOBAL(numIArg) = 4 then - PVT @axis1Number DGLOBAL(darg1Var), DGLOBAL(darg2Var) @axis2Number DGLOBAL(darg3Var), DGLOBAL(darg4Var) @axis3Number DGLOBAL(darg5Var), DGLOBAL(darg6Var) @axis4Number DGLOBAL(darg7Var), DGLOBAL(darg8Var) TIME DGLOBAL(darg9Var) - end if - ELSEIF IGLOBAL(cmdVar) = cmdPVT_INIT_TIME_ABS THEN - 'PVT INIT TIME ABS - timeIsAbs = 1 - timeInitialized = 0 - ELSEIF IGLOBAL(cmdVar) = cmdPVT_INIT_TIME_INC THEN - timeIsAbs = 0 - PVT INIT TIME INC - ELSEIF IGLOBAL(cmdVar) = cmdABORT THEN - axis1Number = IGLOBAL(iarg1Var) - axis2Number = IGLOBAL(iarg2Var) - axis3Number = IGLOBAL(iarg3Var) - axis4Number = IGLOBAL(iarg4Var) - if IGLOBAL(numIArg) = 1 then - ABORT @axis1Number - elseif IGLOBAL(numIArg) = 2 then - ABORT @axis1Number @axis2Number - elseif IGLOBAL(numIArg) = 3 then - ABORT @axis1Number @axis2Number @axis3Number - elseif IGLOBAL(numIArg) = 4 then - ABORT @axis1Number @axis2Number @axis3Number @axis4Number - end if - keepon = 0 - ELSEIF IGLOBAL(cmdVar) = cmdSCOPEBUFFER THEN - iarg = IGLOBAL(iarg1Var) - SCOPEBUFFER iarg - ELSEIF IGLOBAL(cmdVar) = cmdSCOPEDATA THEN - iarg = IGLOBAL(iarg1Var) - if iarg = sd_PositionCommand then - DGLOBAL(darg1Var) = SCOPEDATA(PositionCommand, IGLOBAL(iarg2Var)) - elseif iarg = sd_PositionFeedback then - DGLOBAL(darg1Var) = SCOPEDATA(PositionFeedback, IGLOBAL(iarg2Var)) - elseif iarg = sd_CurrentFeedback then - DGLOBAL(darg1Var) = SCOPEDATA(CurrentFeedback, IGLOBAL(iarg2Var)) - else - DGLOBAL(darg1Var) = -1.2345654321 - end if - ELSEIF IGLOBAL(cmdVar) = cmdSCOPESTATUS THEN - IGLOBAL(iarg1Var) = SCOPESTATUS(IGLOBAL(iarg1Var)) - ELSEIF IGLOBAL(cmdVar) = cmdSCOPETRIG THEN - if IGLOBAL(iarg1Var) = 1 then - SCOPETRIG STOP - ELSE - SCOPETRIG - END IF - ELSEIF IGLOBAL(cmdVar) = cmdSCOPETRIGPERIOD THEN - iarg = IGLOBAL(iarg1Var) - 'SCOPETRIGPERIOD iarg - SCOPETRIGPERIOD iarg*1.0 - ' Not until version 4.03 - ' ELSEIF IGLOBAL(cmdVar) = cmdDRIVEINFO THEN - ' IGLOBAL(iarg1Var) = DRIVEINFO(X, 59) - ELSEIF IGLOBAL(cmdVar) = cmdLINEAR THEN - axis1Number = IGLOBAL(iarg1Var) - LINEAR @axis1Number DGLOBAL(darg1Var) F DGLOBAL(darg2Var) - ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_TRIG THEN - axis1Number = IGLOBAL(iarg1Var) - DATAACQ @axis1Number TRIGGER IGLOBAL(iarg2Var) - ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_INP THEN - axis1Number = IGLOBAL(iarg1Var) - DATAACQ @axis1Number INPUT IGLOBAL(iarg2Var) - ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_ON THEN - axis1Number = IGLOBAL(iarg1Var) - DATAACQ @axis1Number ON IGLOBAL(iarg2Var) - ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_OFF THEN - axis1Number = IGLOBAL(iarg1Var) - DATAACQ @axis1Number OFF - ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_READ THEN - axis1Number = IGLOBAL(iarg1Var) - DATAACQ @axis1Number READ IGLOBAL(iarg2Var), IGLOBAL(iarg3Var) - ELSEIF IGLOBAL(cmdVar) = cmdDOTRAJECTORY THEN - axis1Number = IGLOBAL(iarg1Var) - numpoints = IGLOBAL(iarg2Var) - VELOCITY ON - PVT INIT TIME ABS - for i = 0 to numpoints-1 step 1 - pos = dglobal(3*i) - vel = dglobal(3*i+1) - timeVal = dglobal(3*i+2) - if i = numpoints-2 then - VELOCITY OFF - end if - PVT @axis1Number pos, vel time timeVal - dwell pvtWaitMS/1000 - next i - elseif IGLOBAL(cmdVar) = cmdDONE then - ' do nothing - ' else - ' IGLOBAL(cmdVar) = 1000 - END IF - - IF IGLOBAL(cmdVar) = cmdPVT1 THEN - D = pvtWaitMS/1000 - ELSE - D = .001 - END IF - if IGLOBAL(cmdVar) > 0 then - IGLOBAL(cmdVar) = -(IGLOBAL(cmdVar)) - end if - DWELL D - WEND - -END PROGRAM +HEADER + DEFINE cmdDONE 0 + DEFINE cmdVELOCITY_ON 1 + DEFINE cmdVELOCITY_OFF 2 + DEFINE cmdHALT 3 + DEFINE cmdSTART 4 + DEFINE cmdPVT_INIT_TIME_ABS 5 + DEFINE cmdPVT_INIT_TIME_INC 6 + DEFINE cmdPVT1 7 + DEFINE cmdPVT2 8 + DEFINE cmdPVT3 9 + DEFINE cmdPVT 10 + DEFINE cmdABORT 11 + DEFINE cmdSTARTABORT 12 + + DEFINE cmdSCOPEBUFFER 13 + DEFINE cmdSCOPEDATA 14 + DEFINE cmdSCOPESTATUS 15 + DEFINE cmdSCOPETRIG 16 + DEFINE cmdSCOPETRIGPERIOD 17 + DEFINE cmdDRIVEINFO 18 + DEFINE cmdLINEAR 19 + DEFINE cmdDATAACQ_TRIG 20 + DEFINE cmdDATAACQ_INP 21 + DEFINE cmdDATAACQ_ON 22 + DEFINE cmdDATAACQ_OFF 23 + DEFINE cmdDATAACQ_READ 24 + DEFINE cmdDOTRAJECTORY 25 + + DEFINE cmdVar 45 + DEFINE iarg1Var 46 + DEFINE iarg2Var 47 + DEFINE iarg3Var 48 + DEFINE iarg4Var 49 + DEFINE darg1Var 1 + DEFINE darg2Var 2 + DEFINE darg3Var 3 + DEFINE darg4Var 4 + DEFINE darg5Var 5 + DEFINE darg6Var 6 + DEFINE darg7Var 7 + DEFINE darg8Var 8 + DEFINE darg9Var 9 + DEFINE numIArg 44 + DEFINE numDArg 43 + DEFINE pvtWaitMSVar 42 + + ' Numerical values for first arg to scopedata() + DEFINE sd_PositionCommand 0 + DEFINE sd_PositionFeedback 1 + DEFINE sd_ExternalPosition 2 + DEFINE sd_AxisFault 3 + DEFINE sd_AxisStatus 4 + DEFINE sd_AnalogInput0 5 + DEFINE sd_AnalogInput1 6 + DEFINE sd_AnalogOutput0 7 + DEFINE sd_AnalogOutput1 8 + DEFINE sd_DigitalInput0 9 + DEFINE sd_DigitalInput1 10 + DEFINE sd_DigitalOutput0 11 + DEFINE sd_DigitalOutput1 12 + DEFINE sd_CurrentCommand 13 + DEFINE sd_CurrentFeedback 14 + DEFINE sd_OptionalData1 15 + DEFINE sd_OptionalData2 16 + DEFINE sd_ProgramCounter 17 + +END HEADER + +PROGRAM + + DIM axis1Number AS Integer + DIM axis2Number AS Integer + DIM axis3Number AS Integer + DIM axis4Number AS Integer + DIM keepon as Integer + DIM iarg as integer + DIM pvtWaitMS as integer + dim pos as double + dim vel as double + dim timeval as double + dim timeIsAbs as integer + dim timeInitialized as integer + dim numpoints as integer + dim i as integer + + wait mode nowait + ABS + keepon = 1 + pvtWaitMS = IGLOBAL(pvtWaitMSVar) + IF pvtWaitMS < 1 THEN + pvtWaitMS = 50 + END IF + WHILE keepon + IF IGLOBAL(cmdVar) = cmdPVT1 THEN + axis1Number = IGLOBAL(iarg1Var) + pos = DGLOBAL(darg1Var) + vel = DGLOBAL(darg2Var) + timeval = DGLOBAL(darg3Var) + if timeIsAbs and not timeInitialized then + PVT INIT TIME ABS + timeInitialized = 1 + end if + PVT @axis1Number pos, vel TIME timeval + ELSEIF IGLOBAL(cmdVar) = cmdVELOCITY_ON THEN + VELOCITY ON + ELSEIF IGLOBAL(cmdVar) = cmdVELOCITY_OFF THEN + VELOCITY OFF + ELSEIF IGLOBAL(cmdVar) = cmdHALT THEN + HALT + ELSEIF IGLOBAL(cmdVar) = cmdSTARTABORT THEN + START + ABORT @0 + acknowledgeall + enable @0 + keepon = 0 + ELSEIF IGLOBAL(cmdVar) = cmdSTART THEN + START + keepon = 0 + ELSEIF IGLOBAL(cmdVar) = cmdPVT THEN + axis1Number = IGLOBAL(iarg1Var) + axis2Number = IGLOBAL(iarg2Var) + axis3Number = IGLOBAL(iarg3Var) + axis4Number = IGLOBAL(iarg4Var) + if IGLOBAL(numIArg) = 1 then + PVT @axis1Number DGLOBAL(darg1Var), DGLOBAL(darg2Var) TIME DGLOBAL(darg3Var) + elseif IGLOBAL(numIArg) = 2 then + PVT @axis1Number DGLOBAL(darg1Var), DGLOBAL(darg2Var) @axis2Number DGLOBAL(darg3Var), DGLOBAL(darg4Var) TIME DGLOBAL(darg5Var) + elseif IGLOBAL(numIArg) = 3 then + PVT @axis1Number DGLOBAL(darg1Var), DGLOBAL(darg2Var) @axis2Number DGLOBAL(darg3Var), DGLOBAL(darg4Var) @axis3Number DGLOBAL(darg5Var), DGLOBAL(darg6Var) TIME DGLOBAL(darg7Var) + elseif IGLOBAL(numIArg) = 4 then + PVT @axis1Number DGLOBAL(darg1Var), DGLOBAL(darg2Var) @axis2Number DGLOBAL(darg3Var), DGLOBAL(darg4Var) @axis3Number DGLOBAL(darg5Var), DGLOBAL(darg6Var) @axis4Number DGLOBAL(darg7Var), DGLOBAL(darg8Var) TIME DGLOBAL(darg9Var) + end if + ELSEIF IGLOBAL(cmdVar) = cmdPVT_INIT_TIME_ABS THEN + 'PVT INIT TIME ABS + timeIsAbs = 1 + timeInitialized = 0 + ELSEIF IGLOBAL(cmdVar) = cmdPVT_INIT_TIME_INC THEN + timeIsAbs = 0 + PVT INIT TIME INC + ELSEIF IGLOBAL(cmdVar) = cmdABORT THEN + axis1Number = IGLOBAL(iarg1Var) + axis2Number = IGLOBAL(iarg2Var) + axis3Number = IGLOBAL(iarg3Var) + axis4Number = IGLOBAL(iarg4Var) + if IGLOBAL(numIArg) = 1 then + ABORT @axis1Number + elseif IGLOBAL(numIArg) = 2 then + ABORT @axis1Number @axis2Number + elseif IGLOBAL(numIArg) = 3 then + ABORT @axis1Number @axis2Number @axis3Number + elseif IGLOBAL(numIArg) = 4 then + ABORT @axis1Number @axis2Number @axis3Number @axis4Number + end if + keepon = 0 + ELSEIF IGLOBAL(cmdVar) = cmdSCOPEBUFFER THEN + iarg = IGLOBAL(iarg1Var) + SCOPEBUFFER iarg + ELSEIF IGLOBAL(cmdVar) = cmdSCOPEDATA THEN + iarg = IGLOBAL(iarg1Var) + if iarg = sd_PositionCommand then + DGLOBAL(darg1Var) = SCOPEDATA(PositionCommand, IGLOBAL(iarg2Var)) + elseif iarg = sd_PositionFeedback then + DGLOBAL(darg1Var) = SCOPEDATA(PositionFeedback, IGLOBAL(iarg2Var)) + elseif iarg = sd_CurrentFeedback then + DGLOBAL(darg1Var) = SCOPEDATA(CurrentFeedback, IGLOBAL(iarg2Var)) + else + DGLOBAL(darg1Var) = -1.2345654321 + end if + ELSEIF IGLOBAL(cmdVar) = cmdSCOPESTATUS THEN + IGLOBAL(iarg1Var) = SCOPESTATUS(IGLOBAL(iarg1Var)) + ELSEIF IGLOBAL(cmdVar) = cmdSCOPETRIG THEN + if IGLOBAL(iarg1Var) = 1 then + SCOPETRIG STOP + ELSE + SCOPETRIG + END IF + ELSEIF IGLOBAL(cmdVar) = cmdSCOPETRIGPERIOD THEN + iarg = IGLOBAL(iarg1Var) + 'SCOPETRIGPERIOD iarg + SCOPETRIGPERIOD iarg*1.0 + ' Not until version 4.03 + ' ELSEIF IGLOBAL(cmdVar) = cmdDRIVEINFO THEN + ' IGLOBAL(iarg1Var) = DRIVEINFO(X, 59) + ELSEIF IGLOBAL(cmdVar) = cmdLINEAR THEN + axis1Number = IGLOBAL(iarg1Var) + LINEAR @axis1Number DGLOBAL(darg1Var) F DGLOBAL(darg2Var) + ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_TRIG THEN + axis1Number = IGLOBAL(iarg1Var) + DATAACQ @axis1Number TRIGGER IGLOBAL(iarg2Var) + ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_INP THEN + axis1Number = IGLOBAL(iarg1Var) + DATAACQ @axis1Number INPUT IGLOBAL(iarg2Var) + ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_ON THEN + axis1Number = IGLOBAL(iarg1Var) + DATAACQ @axis1Number ON IGLOBAL(iarg2Var) + ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_OFF THEN + axis1Number = IGLOBAL(iarg1Var) + DATAACQ @axis1Number OFF + ELSEIF IGLOBAL(cmdVar) = cmdDATAACQ_READ THEN + axis1Number = IGLOBAL(iarg1Var) + DATAACQ @axis1Number READ IGLOBAL(iarg2Var), IGLOBAL(iarg3Var) + ELSEIF IGLOBAL(cmdVar) = cmdDOTRAJECTORY THEN + axis1Number = IGLOBAL(iarg1Var) + numpoints = IGLOBAL(iarg2Var) + VELOCITY ON + PVT INIT TIME ABS + for i = 0 to numpoints-1 step 1 + pos = dglobal(3*i) + vel = dglobal(3*i+1) + timeVal = dglobal(3*i+2) + if i = numpoints-2 then + VELOCITY OFF + end if + PVT @axis1Number pos, vel time timeVal + dwell pvtWaitMS/1000 + next i + elseif IGLOBAL(cmdVar) = cmdDONE then + ' do nothing + ' else + ' IGLOBAL(cmdVar) = 1000 + END IF + + IF IGLOBAL(cmdVar) = cmdPVT1 THEN + D = pvtWaitMS/1000 + ELSE + D = .001 + END IF + if IGLOBAL(cmdVar) > 0 then + IGLOBAL(cmdVar) = -(IGLOBAL(cmdVar)) + end if + DWELL D + WEND + +END PROGRAM diff --git a/motorApp/AerotechSrc/drvA3200Asyn.cc b/motorApp/AerotechSrc/drvA3200Asyn.cc index d217ba6..19719ef 100644 --- a/motorApp/AerotechSrc/drvA3200Asyn.cc +++ b/motorApp/AerotechSrc/drvA3200Asyn.cc @@ -2,10 +2,6 @@ FILENAME... drvA3200Asyn.cc USAGE... Motor record asyn driver level support for Aerotech A3200. -Version: $Revision: 17434 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-05-21 11:43:51 -0500 (Wed, 21 May 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/drvA3200Asyn.cc $ */ /* @@ -16,23 +12,35 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- ----------------------------------------------------------------------------- COPYRIGHT NOTICE ----------------------------------------------------------------------------- -Copyright (c) 2002 The University of Chicago, as Operator of Argonne -National Laboratory. +Copyright (c) 2002 The University of Chicago, as Operator of Argonne National Laboratory. Copyright (c) 2002 The Regents of the University of California, as Operator of Los Alamos National Laboratory. -Synapps Versions 4-5 -and higher are distributed subject to a Software License Agreement found +Synapps Versions 4-5 and higher are distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution. ----------------------------------------------------------------------------- * NOTES * ----- * Verified with firmware: * - 4.07.000 -* +* +* A3200 Task Usage - This driver uses a user selectable Task #n for the ASCII Interface and +* Task #(n+1) to clear Task #n errors and ABORT axis moves issued by Task #n. +* * Modification Log: * ----------------- * * .01 11-15-13 cjb Initialized from drvEnsembleAsyn.c (Aerotech) +* .02 30-04-14 rls - Removed "Task number" argument from A3200AsynConfig and switched to using Task #2 for the ASCII +* Interface. Task #3 is used to clear Task #2 errors and ABORT axis moves issued by Task #2. +* - Deleted duplicate A3200 Setup and Config arguments from AerotechRegister.cc. +* - Switched from "LINEAR" TO "MOVE[ABS/INC]" commands. +* - Added delays to motorAxisMove() and motorAxisVelocityMove() so controller has time to set +* MoveDone false before the 1st status update. +* - Added axis name to "RAMP RATE" command. +* .03 10-14-15 rls - Use "ReverseDirec" parameter to set "HomeSetup" parameter. +* .04 03-15-18 rls - Restored "Task number" argument to A3200AsynConfig. +* .05 05-01-18 rls - Do not check the limit switches of virtual axes. +* - Added "single-axis" (MOVE{ABS/INC} or "multi-axis" (LINEAR) user selectable move option. */ #include @@ -110,73 +118,74 @@ typedef union motorAxisDrvSET_t motorA3200 = { - 14, - motorAxisReport, /**< Standard EPICS driver report function (optional) */ - motorAxisInit, /**< Standard EPICS driver initialization function (optional) */ - motorAxisSetLog, /**< Defines an external logging function (optional) */ - motorAxisOpen, /**< Driver open function */ - motorAxisClose, /**< Driver close function */ - motorAxisSetCallback, /**< Provides a callback function the driver can call when the status updates */ - motorAxisSetDouble, /**< Pointer to function to set a double value */ - motorAxisSetInteger, /**< Pointer to function to set an integer value */ - motorAxisGetDouble, /**< Pointer to function to get a double value */ - motorAxisGetInteger, /**< Pointer to function to get an integer value */ - motorAxisHome, /**< Pointer to function to execute a move to reference or home */ - motorAxisMove, /**< Pointer to function to execute a position move */ - motorAxisVelocityMove, /**< Pointer to function to execute a velocity mode move */ - motorAxisStop, /**< Pointer to function to stop motion */ - motorAxisforceCallback, /**< Pointer to function to request a poller status update */ - motorAxisProfileMove, /**< Pointer to function to execute a profile move */ - motorAxisTriggerProfile /**< Pointer to function to trigger a profile move */ + 14, + motorAxisReport, /**< Standard EPICS driver report function (optional) */ + motorAxisInit, /**< Standard EPICS driver initialization function (optional) */ + motorAxisSetLog, /**< Defines an external logging function (optional) */ + motorAxisOpen, /**< Driver open function */ + motorAxisClose, /**< Driver close function */ + motorAxisSetCallback, /**< Provides a callback function the driver can call when the status updates */ + motorAxisSetDouble, /**< Pointer to function to set a double value */ + motorAxisSetInteger, /**< Pointer to function to set an integer value */ + motorAxisGetDouble, /**< Pointer to function to get a double value */ + motorAxisGetInteger, /**< Pointer to function to get an integer value */ + motorAxisHome, /**< Pointer to function to execute a move to reference or home */ + motorAxisMove, /**< Pointer to function to execute a position move */ + motorAxisVelocityMove, /**< Pointer to function to execute a velocity mode move */ + motorAxisStop, /**< Pointer to function to stop motion */ + motorAxisforceCallback, /**< Pointer to function to request a poller status update */ + motorAxisProfileMove, /**< Pointer to function to execute a profile move */ + motorAxisTriggerProfile /**< Pointer to function to trigger a profile move */ }; extern "C" { - epicsExportAddress(drvet, motorA3200); + epicsExportAddress(drvet, motorA3200); } typedef struct { - epicsMutexId controllerLock; - asynUser *pasynUser; - int numAxes; - double movingPollPeriod; - double idlePollPeriod; - epicsEventId pollEventId; - epicsMutexId sendReceiveMutex; - AXIS_HDL pAxis; /* array of axes */ - epicsUInt32 taskNumber; /* the task number to use for motion commands */ + epicsMutexId controllerLock; + asynUser *pasynUser; + int numAxes; + double movingPollPeriod; + double idlePollPeriod; + epicsEventId pollEventId; + epicsMutexId sendReceiveMutex; + AXIS_HDL pAxis; /* array of axes */ + epicsUInt32 taskNumber; /* the task number to use for motion commands */ + epicsUInt32 linear; } A3200Controller; typedef struct motorAxisHandle { - A3200Controller *pController; - PARAMS params; - double currentCmdPos; - double stepSize; - double homePreset; - int homeDirection; - int closedLoop; - int axisStatus; - int card; - int axis; - char axisName[128]; - int maxDigits; - motorAxisLogFunc print; - void *logParam; - epicsMutexId mutexId; - Switch_Level swconfig; - int lastFault; - bool reverseDirec; + A3200Controller *pController; + PARAMS params; + double currentCmdPos; + double stepSize; + double homePreset; + int homeDirection; + int closedLoop; + int axisStatus; + int card; + int axis; + char axisName[128]; + int maxDigits; + motorAxisLogFunc print; + void *logParam; + epicsMutexId mutexId; + Switch_Level swconfig; + int lastFault; + bool reverseDirec; } motorAxis; typedef struct { - AXIS_HDL pFirst; - epicsThreadId motorThread; - motorAxisLogFunc print; - void *logParam; - epicsTimeStamp now; + AXIS_HDL pFirst; + epicsThreadId motorThread; + motorAxisLogFunc print; + void *logParam; + epicsTimeStamp now; } motorA3200_t; extern "C" { static int motorA3200LogMsg(void *, const motorAxisLogMask_t, const char *, ...); } @@ -187,777 +196,864 @@ static int numA3200Controllers; /* Pointer to array of controller structures */ static A3200Controller *pA3200Controller = NULL; -#define MAX(a, b) ((a)>(b) ? (a) : (b)) -#define MIN(a, b) ((a)<(b) ? (a) : (b)) - static void motorAxisReportAxis(AXIS_HDL pAxis, int level) { - if (level > 0) - { - printf("Axis %s\n", pAxis->axisName); - printf(" axisStatus: 0x%x\n", pAxis->axisStatus); - printf(" home preset: %f\n", pAxis->homePreset); - printf(" step size: %f\n", pAxis->stepSize); - printf(" max digits: %d\n", pAxis->maxDigits); - } + if (level > 0) + { + printf("Axis %s\n", pAxis->axisName); + printf(" axisStatus: 0x%x\n", pAxis->axisStatus); + printf(" home preset: %f\n", pAxis->homePreset); + printf(" step size: %f\n", pAxis->stepSize); + printf(" max digits: %d\n", pAxis->maxDigits); + } } static void motorAxisReport(int level) { - int i, j; - - for (i = 0; i < numA3200Controllers; i++) - { - if (level) - { - printf(" moving poll period: %f\n", pA3200Controller[i].movingPollPeriod); - printf(" idle poll period: %f\n", pA3200Controller[i].idlePollPeriod); - } - for (j = 0; j < pA3200Controller[i].numAxes; j++) - { - motorAxisReportAxis(&pA3200Controller[i].pAxis[j], level); - } - } + int i, j; + + for (i = 0; i < numA3200Controllers; i++) + { + if (level) + { + printf(" moving poll period: %f\n", pA3200Controller[i].movingPollPeriod); + printf(" idle poll period: %f\n", pA3200Controller[i].idlePollPeriod); + } + for (j = 0; j < pA3200Controller[i].numAxes; j++) + { + motorAxisReportAxis(&pA3200Controller[i].pAxis[j], level); + } + } } static int motorAxisInit(void) { - int controller, axis; - - for (controller = 0; controller < numA3200Controllers; controller++) - { - AXIS_HDL pAxis; - for (axis = 0; axis < pA3200Controller[controller].numAxes; axis++) - { - pAxis = &pA3200Controller[controller].pAxis[axis]; - if (!pAxis->mutexId) - break; - epicsMutexLock(pAxis->mutexId); - - /*Set GAIN_SUPPORT on so that at least, CNEN functions. */ - motorParam->setInteger(pAxis->params, motorAxisHasClosedLoop, 1); - - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - } - return MOTOR_AXIS_OK; + int controller, axis; + + for (controller = 0; controller < numA3200Controllers; controller++) + { + AXIS_HDL pAxis; + for (axis = 0; axis < pA3200Controller[controller].numAxes; axis++) + { + pAxis = &pA3200Controller[controller].pAxis[axis]; + if (!pAxis->mutexId) + break; + epicsMutexLock(pAxis->mutexId); + + /*Set GAIN_SUPPORT on so that at least, CNEN functions. */ + motorParam->setInteger(pAxis->params, motorAxisHasClosedLoop, 1); + + motorParam->callCallback(pAxis->params); + epicsMutexUnlock(pAxis->mutexId); + } + } + return MOTOR_AXIS_OK; } static int motorAxisSetLog(AXIS_HDL pAxis, motorAxisLogFunc logFunc, void * param) { - if (pAxis == NULL) - { - if (logFunc == NULL) - { - drv.print= motorA3200LogMsg; - drv.logParam = NULL; - } - else - { - drv.print = logFunc; - drv.logParam = param; - } - } - else - { - if (logFunc == NULL) - { - pAxis->print = motorA3200LogMsg; - pAxis->logParam = NULL; - } - else - { - pAxis->print = logFunc; - pAxis->logParam = param; - } - } - return MOTOR_AXIS_OK; + if (pAxis == NULL) + { + if (logFunc == NULL) + { + drv.print = motorA3200LogMsg; + drv.logParam = NULL; + } + else + { + drv.print = logFunc; + drv.logParam = param; + } + } + else + { + if (logFunc == NULL) + { + pAxis->print = motorA3200LogMsg; + pAxis->logParam = NULL; + } + else + { + pAxis->print = logFunc; + pAxis->logParam = param; + } + } + return MOTOR_AXIS_OK; } static AXIS_HDL motorAxisOpen(int card, int axis, char * param) { - AXIS_HDL pAxis; + AXIS_HDL pAxis; - if (card >= numA3200Controllers) - return NULL; - if (axis >= pA3200Controller[card].numAxes) - return NULL; + if (card >= numA3200Controllers) + return NULL; + if (axis >= pA3200Controller[card].numAxes) + return NULL; - pAxis = &pA3200Controller[card].pAxis[axis]; - return pAxis; + pAxis = &pA3200Controller[card].pAxis[axis]; + return pAxis; } static int motorAxisClose(AXIS_HDL pAxis) { - return MOTOR_AXIS_OK; + return MOTOR_AXIS_OK; } static int motorAxisGetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int * value) { - if (pAxis == NULL || pAxis->params == NULL) - return MOTOR_AXIS_ERROR; - else - return motorParam->getInteger(pAxis->params, (paramIndex) function, value); + if (pAxis == NULL || pAxis->params == NULL) + return MOTOR_AXIS_ERROR; + else + return motorParam->getInteger(pAxis->params, (paramIndex) function, value); } static int motorAxisGetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double * value) { - if (pAxis == NULL || pAxis->params == NULL) - return MOTOR_AXIS_ERROR; - else - return motorParam->getDouble(pAxis->params, (paramIndex) function, value); + if (pAxis == NULL || pAxis->params == NULL) + return MOTOR_AXIS_ERROR; + else + return motorParam->getDouble(pAxis->params, (paramIndex) function, value); } static int motorAxisSetCallback(AXIS_HDL pAxis, motorAxisCallbackFunc callback, void * param) { - if (pAxis == NULL || pAxis->params == NULL) - return MOTOR_AXIS_ERROR; - else - return motorParam->setCallback(pAxis->params, callback, param); + if (pAxis == NULL || pAxis->params == NULL) + return MOTOR_AXIS_ERROR; + else + return motorParam->setCallback(pAxis->params, callback, param); } static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double value) { - asynStatus status = asynSuccess; - char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; - - if (pAxis == NULL || pAxis->pController == NULL) - return asynError; - - epicsMutexLock(pAxis->mutexId); - - switch (function) - { - case motorAxisPosition: - { - double offset = value * fabs(pAxis->stepSize); - sprintf(outputBuff, "POSOFFSET SET %s %.*f", pAxis->axisName, pAxis->maxDigits, offset); - status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - if (inputBuff[0] != ASCII_ACK_CHAR) - status = asynError; - break; - } - case motorAxisEncoderRatio: - { - PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting encoder ratio\n"); - break; - } - case motorAxisResolution: - { - /* we need to scale over a dozen other parameters if this changed in some cases, so the user should just use - * the Configuration Manager to change this setting to ensure that this is done correctly */ - PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting motor resolution\n"); - break; - } - case motorAxisLowLimit: - { - PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: Driver does not set A3200's Low Limit\n"); - break; - } - case motorAxisHighLimit: - { - PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: Driver does not set A3200's High Limit\n"); - break; - } - case motorAxisPGain: - { - PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting proportional gain\n"); - break; - } - case motorAxisIGain: - { - PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting integral gain\n"); - break; - } - case motorAxisDGain: - { - PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting derivative gain\n"); - break; - } - default: - PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: unknown function %d\n", function); - break; - } - if (status == asynSuccess) - { - motorParam->setDouble(pAxis->params, function, value); - motorParam->callCallback(pAxis->params); - } - epicsMutexUnlock(pAxis->mutexId); - - return status; + asynStatus status = asynSuccess; + char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + + if (pAxis == NULL || pAxis->pController == NULL) + return asynError; + + epicsMutexLock(pAxis->mutexId); + + switch (function) + { + case motorAxisPosition: + { + double offset = value * fabs(pAxis->stepSize); + sprintf(outputBuff, "POSOFFSET SET %s %.*f", pAxis->axisName, pAxis->maxDigits, offset); + status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (inputBuff[0] != ASCII_ACK_CHAR) + status = asynError; + break; + } + case motorAxisEncoderRatio: + { + PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting encoder ratio\n"); + break; + } + case motorAxisResolution: + { + /* we need to scale over a dozen other parameters if this changed in some cases, so the user should just use + * the Configuration Manager to change this setting to ensure that this is done correctly */ + PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting motor resolution\n"); + break; + } + case motorAxisLowLimit: + { + PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: Driver does not set A3200's Low Limit\n"); + break; + } + case motorAxisHighLimit: + { + PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: Driver does not set A3200's High Limit\n"); + break; + } + case motorAxisPGain: + { + PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting proportional gain\n"); + break; + } + case motorAxisIGain: + { + PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting integral gain\n"); + break; + } + case motorAxisDGain: + { + PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: A3200 does not support setting derivative gain\n"); + break; + } + default: + PRINT(pAxis->logParam, TERROR, "motorAxisSetDouble: unknown function %d\n", function); + break; + } + if (status == asynSuccess) + { + motorParam->setDouble(pAxis->params, function, value); + motorParam->callCallback(pAxis->params); + } + epicsMutexUnlock(pAxis->mutexId); + + return status; } static int motorAxisSetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int value) { - int ret_status = MOTOR_AXIS_ERROR; - char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; - - if (pAxis == NULL || pAxis->pController == NULL) - return MOTOR_AXIS_ERROR; - - epicsMutexLock(pAxis->mutexId); - - switch (function) - { - case motorAxisClosedLoop: - if (value == 0) - sprintf(outputBuff, "DISABLE %s", pAxis->axisName); - else - { - if(pAxis->lastFault) - { - sprintf(outputBuff, "FAULTACK %s", pAxis->axisName); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - } - sprintf(outputBuff, "ENABLE %s", pAxis->axisName); - } - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - break; - default: - PRINT(pAxis->logParam, TERROR, "motorAxisSetInteger: unknown function %d\n", function); - break; - } - if (ret_status != MOTOR_AXIS_ERROR) - { - motorParam->setInteger(pAxis->params, function, value); - motorParam->callCallback(pAxis->params); - } - epicsMutexUnlock(pAxis->mutexId); - return ret_status; + int tasknum, taskNstate, taskN1state, ret_status = MOTOR_AXIS_ERROR; + char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + + if (pAxis == NULL || pAxis->pController == NULL) + return MOTOR_AXIS_ERROR; + + tasknum = pAxis->pController->taskNumber; + + epicsMutexLock(pAxis->mutexId); + + switch (function) + { + case motorAxisClosedLoop: + sprintf(outputBuff, "~STATUS (%u, TaskState) (%u, TaskState)", tasknum, tasknum + 1); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (ret_status != asynSuccess || inputBuff[0] != ASCII_ACK_CHAR) + { + motorParam->setInteger(pAxis->params, motorAxisCommError, 1); + break; + } + + sscanf(&inputBuff[1], "%d %d", &taskNstate, &taskN1state); + if (taskNstate == TASKSTATE_Idle) + { + sprintf(outputBuff, "~INITQUEUE %u", tasknum); + sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + } + if (value == 0) + sprintf(outputBuff, "DISABLE %s", pAxis->axisName); + else + { + if (pAxis->lastFault) + { + if (pAxis->lastFault == 52 || pAxis->lastFault == 78) + { + sprintf(outputBuff, "~TASK %u", tasknum + 1); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + /* Prevent Task #3 from blocking during LINEAR commands. */ + ret_status = sendAndReceive(pAxis->pController, (char *) "WAIT MODE AUTO", inputBuff, sizeof(inputBuff)); + ret_status = sendAndReceive(pAxis->pController, (char *) "ACKNOWLEDGEALL", inputBuff, sizeof(inputBuff)); + sprintf(outputBuff, "~TASK %u", tasknum); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + sprintf(outputBuff, "~INITQUEUE"); + } + else + sprintf(outputBuff, "FAULTACK %s", pAxis->axisName); + + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + pAxis->lastFault = 0; /* Clear fault indicator. */ + motorParam->setInteger(pAxis->params, motorAxisProblem, 0); + } + sprintf(outputBuff, "ENABLE %s", pAxis->axisName); + } + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + /* Set indicator to force status update when Enable does not work. */ + motorParam->setInteger(pAxis->params, motorAxisPowerOn, value); + + /* Prevent Task #2 from blocking during LINEAR commands. */ + ret_status = sendAndReceive(pAxis->pController, (char *) "WAIT MODE AUTO", inputBuff, sizeof(inputBuff)); + + break; + + default: + PRINT(pAxis->logParam, TERROR, "motorAxisSetInteger: unknown function %d\n", function); + break; + } + if (ret_status != MOTOR_AXIS_ERROR) + { + motorParam->setInteger(pAxis->params, function, value); + motorParam->callCallback(pAxis->params); + } + epicsMutexUnlock(pAxis->mutexId); + return ret_status; } static int motorAxisMove(AXIS_HDL pAxis, double position, int relative, - double min_velocity, double max_velocity, double acceleration) + double min_velocity, double max_velocity, double acceleration) { - int ret_status; - char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; - const char *moveCommand; - bool posdir; - - if (pAxis == NULL || pAxis->pController == NULL) - return MOTOR_AXIS_ERROR; - - PRINT(pAxis->logParam, FLOW, "Set card %d, axis %s move to %f, min vel=%f, max_vel=%f, accel=%f\n", - pAxis->card, pAxis->axisName, position, min_velocity, max_velocity, acceleration); - - if (relative) - { - posdir = position >= 0.0; - moveCommand = "INCREMENTAL"; - } - else - { - posdir = position >= pAxis->currentCmdPos; - moveCommand = "ABSOLUTE"; - } - - ret_status = sendAndReceive(pAxis->pController, moveCommand, inputBuff, sizeof(inputBuff)); - if (ret_status) - return MOTOR_AXIS_ERROR; - - if (acceleration > 0) - { /* only use the acceleration if > 0 */ - sprintf(outputBuff, "RAMP RATE %.*f", pAxis->maxDigits, acceleration * fabs(pAxis->stepSize)); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - } - - sprintf(outputBuff, "LINEAR %s %.*f F%.*f", pAxis->axisName, pAxis->maxDigits, position * fabs(pAxis->stepSize), - pAxis->maxDigits, max_velocity * fabs(pAxis->stepSize)); - - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - if (ret_status) - return MOTOR_AXIS_ERROR; - - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) - { - motorParam->setInteger(pAxis->params, motorAxisDirection, (int) posdir); - /* Ensure that the motor record's next status update sees motorAxisDone = False. */ - motorParam->setInteger(pAxis->params, motorAxisDone, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - - return MOTOR_AXIS_OK; + int ret_status; + char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + const char *moveCommand; + bool posdir; + + if (pAxis == NULL || pAxis->pController == NULL) + return MOTOR_AXIS_ERROR; + + PRINT(pAxis->logParam, FLOW, "Set card %d, axis %s move to %f, min vel=%f, max_vel=%f, accel=%f\n", + pAxis->card, pAxis->axisName, position, min_velocity, max_velocity, acceleration); + + if (relative) + posdir = position >= 0.0; + else + posdir = position >= pAxis->currentCmdPos; + + if (pAxis->pController->linear == 1) + { + if (relative) + moveCommand = "INCREMENTAL"; + else + moveCommand = "ABSOLUTE"; + ret_status = sendAndReceive(pAxis->pController, moveCommand, inputBuff, sizeof(inputBuff)); + if (ret_status) + return MOTOR_AXIS_ERROR; + } + else + { + if (relative) + moveCommand = "MOVEIINC"; + else + moveCommand = "MOVEABS"; + } + + if (acceleration > 0) + { /* only use the acceleration if > 0 */ + if (pAxis->pController->linear == 1) + sprintf(outputBuff, "RAMP RATE %.*f", pAxis->maxDigits, acceleration * fabs(pAxis->stepSize)); + else + sprintf(outputBuff, "RAMP RATE %s %.*f", pAxis->axisName, pAxis->maxDigits, acceleration * fabs(pAxis->stepSize)); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + } + + if (pAxis->pController->linear == 1) + sprintf(outputBuff, "LINEAR %s %.*f F%.*f", pAxis->axisName, pAxis->maxDigits, position * fabs(pAxis->stepSize), + pAxis->maxDigits, max_velocity * fabs(pAxis->stepSize)); + else + sprintf(outputBuff, "%s %s %.*f %.*f", moveCommand, pAxis->axisName, pAxis->maxDigits, position * fabs(pAxis->stepSize), + pAxis->maxDigits, max_velocity * fabs(pAxis->stepSize)); + + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (ret_status || inputBuff[0] != ASCII_ACK_CHAR) + { + if (inputBuff[0] == ASCII_FAULT_CHAR) + { + int taskerr; + + motorParam->setInteger(pAxis->params, motorAxisProblem, 1); /* Signal "Controller Error" to user. */ + sprintf(outputBuff, "~STATUS(%u, TaskErrorCode)", pAxis->pController->taskNumber); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + taskerr = atoi(&inputBuff[1]); + if (taskerr != 0) + pAxis->lastFault = taskerr; /* Indicate a Fault needs to be ACK'd. */ + } + return MOTOR_AXIS_ERROR; + } + + if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) + { + motorParam->setInteger(pAxis->params, motorAxisDirection, (int) posdir); + /* Ensure that the motor record's next status update sees motorAxisDone = False. */ + motorParam->setInteger(pAxis->params, motorAxisDone, 0); + motorParam->callCallback(pAxis->params); + epicsThreadSleep(0.010); /* Delay status update so controller has time to set MoveDone false. */ + epicsMutexUnlock(pAxis->mutexId); + } + + /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ + epicsEventSignal(pAxis->pController->pollEventId); + + return MOTOR_AXIS_OK; } static int motorAxisHome(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration, int forwards) { - int ret_status; - char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; - epicsUInt32 hparam; - int axis; - - if (pAxis == NULL || pAxis->pController == NULL) - return MOTOR_AXIS_ERROR; - - axis = pAxis->axis; - - PRINT(pAxis->logParam, FLOW, "motorAxisHome: set card %d, axis %d to home, forwards = %d\n", - pAxis->card, axis, forwards); - - if (max_velocity > 0) - { - sprintf(outputBuff, "HomeSpeed.%s = %.*f", pAxis->axisName, pAxis->maxDigits, - max_velocity * fabs(pAxis->stepSize)); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - } - - if (acceleration > 0) - { - sprintf(outputBuff, "HomeRampRate.%s = %.*f", pAxis->axisName, pAxis->maxDigits, - acceleration * fabs(pAxis->stepSize)); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - } - hparam = pAxis->homeDirection; - hparam = forwards ? 0x00000001 : 0x0; - pAxis->homeDirection = hparam; - - sprintf(outputBuff, "HomeSetup.%s = %d", pAxis->axisName, hparam); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - - sprintf(outputBuff, "HOME %s", pAxis->axisName); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - - if (ret_status) - return(MOTOR_AXIS_ERROR); - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) - { - motorParam->setInteger(pAxis->params, motorAxisDirection, forwards); - /* Ensure that the motor record's next status update sees motorAxisDone = False. */ - motorParam->setInteger(pAxis->params, motorAxisDone, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - - return MOTOR_AXIS_OK; + int ret_status; + char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + epicsUInt32 hparam; + int axis, posdir; + + if (pAxis == NULL || pAxis->pController == NULL) + return MOTOR_AXIS_ERROR; + + axis = pAxis->axis; + + PRINT(pAxis->logParam, FLOW, "motorAxisHome: set card %d, axis %d to home, forwards = %d\n", + pAxis->card, axis, forwards); + + if (max_velocity > 0) + { + sprintf(outputBuff, "HomeSpeed.%s = %.*f", pAxis->axisName, pAxis->maxDigits, + max_velocity * fabs(pAxis->stepSize)); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + } + + if (acceleration > 0) + { + sprintf(outputBuff, "HomeRampRate.%s = %.*f", pAxis->axisName, pAxis->maxDigits, + acceleration * fabs(pAxis->stepSize)); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + } + + posdir = (forwards == (int) pAxis->reverseDirec); /* Adjust home direction for Reverse Direction paramter. */ + hparam = pAxis->homeDirection; + if (posdir == 1) + hparam |= 0x00000001; + else + hparam &= 0xFFFFFFFE; + pAxis->homeDirection = hparam; + + sprintf(outputBuff, "HomeSetup.%s = %d", pAxis->axisName, hparam); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + + sprintf(outputBuff, "HOME %s", pAxis->axisName); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + + if (ret_status) + return(MOTOR_AXIS_ERROR); + if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) + { + motorParam->setInteger(pAxis->params, motorAxisDirection, forwards); + /* Ensure that the motor record's next status update sees motorAxisDone = False. */ + motorParam->setInteger(pAxis->params, motorAxisDone, 0); + motorParam->callCallback(pAxis->params); + epicsMutexUnlock(pAxis->mutexId); + } + + /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ + epicsEventSignal(pAxis->pController->pollEventId); + + return MOTOR_AXIS_OK; } static int motorAxisVelocityMove(AXIS_HDL pAxis, double min_velocity, double velocity, double acceleration) { - char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; - int ret_status; - - if (pAxis == NULL || pAxis->pController == NULL) - return MOTOR_AXIS_ERROR; - - sprintf(outputBuff, "AbortDecelRate.%s = %.*f", pAxis->axisName, pAxis->maxDigits, acceleration * fabs(pAxis->stepSize)); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - sprintf(outputBuff, "RAMP RATE %s %.*f", pAxis->axisName, pAxis->maxDigits, acceleration * fabs(pAxis->stepSize)); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - sprintf(outputBuff, "FREERUN %s %.*f", pAxis->axisName, pAxis->maxDigits, velocity * fabs(pAxis->stepSize)); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) - { - motorParam->setInteger(pAxis->params, motorAxisDirection, (velocity > 0.0 ? 1 : 0)); - /* Ensure that the motor record's next status update sees motorAxisDone = False. */ - motorParam->setInteger(pAxis->params, motorAxisDone, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - - return ret_status; + char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + int ret_status; + + if (pAxis == NULL || pAxis->pController == NULL) + return MOTOR_AXIS_ERROR; + + sprintf(outputBuff, "AbortDecelRate.%s = %.*f", pAxis->axisName, pAxis->maxDigits, acceleration * fabs(pAxis->stepSize)); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + sprintf(outputBuff, "RAMP RATE %s %.*f", pAxis->axisName, pAxis->maxDigits, acceleration * fabs(pAxis->stepSize)); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + sprintf(outputBuff, "FREERUN %s %.*f", pAxis->axisName, pAxis->maxDigits, velocity * fabs(pAxis->stepSize)); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + + if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) + { + motorParam->setInteger(pAxis->params, motorAxisDirection, (velocity > 0.0 ? 1 : 0)); + /* Ensure that the motor record's next status update sees motorAxisDone = False. */ + motorParam->setInteger(pAxis->params, motorAxisDone, 0); + motorParam->callCallback(pAxis->params); + epicsThreadSleep(0.010); /* Delay status update so controller has time to set MoveDone false. */ + epicsMutexUnlock(pAxis->mutexId); + } + + /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ + epicsEventSignal(pAxis->pController->pollEventId); + + return ret_status; } static int motorAxisProfileMove(AXIS_HDL pAxis, int npoints, double positions[], double times[], int relative, int trigger) { - return MOTOR_AXIS_ERROR; + return MOTOR_AXIS_ERROR; } static int motorAxisTriggerProfile(AXIS_HDL pAxis) { - return MOTOR_AXIS_ERROR; + return MOTOR_AXIS_ERROR; } static int motorAxisStop(AXIS_HDL pAxis, double acceleration) { - int ret_status; - char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + int tasknum, ret_status; + char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + + if (pAxis == NULL || pAxis->pController == NULL) + return MOTOR_AXIS_ERROR; - if (pAxis == NULL || pAxis->pController == NULL) - return MOTOR_AXIS_ERROR; + tasknum = pAxis->pController->taskNumber; - PRINT(pAxis->logParam, FLOW, "Abort on card %d, axis %d\n", pAxis->card, pAxis->axis); + PRINT(pAxis->logParam, FLOW, "Abort on card %d, axis %d\n", pAxis->card, pAxis->axis); - /* we can't accurately determine which type of motion is occurring on the controller, - * so don't worry about the acceleration rate, just stop the motion on the axis */ - sprintf(outputBuff, "ABORT %s", pAxis->axisName); - ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); - return ret_status; + /* we can't accurately determine which type of motion is occurring on the controller, + * so don't worry about the acceleration rate, just stop the motion on the axis */ + sprintf(outputBuff, "~TASK %u", tasknum + 1); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + sprintf(outputBuff, "ABORT %s", pAxis->axisName); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + sprintf(outputBuff, "~TASK %u", tasknum); + ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + return ret_status; } static int motorAxisforceCallback(AXIS_HDL pAxis) { - if (pAxis == NULL || pAxis->pController == NULL) - return MOTOR_AXIS_ERROR; + if (pAxis == NULL || pAxis->pController == NULL) + return MOTOR_AXIS_ERROR; - PRINT(pAxis->logParam, FLOW, "motorAxisforceCallback: request card %d, axis %d status update\n", pAxis->card, pAxis->axis); + PRINT(pAxis->logParam, FLOW, "motorAxisforceCallback: request card %d, axis %d status update\n", pAxis->card, pAxis->axis); - /* Force a status update. */ - motorParam->forceCallback(pAxis->params); + /* Force a status update. */ + motorParam->forceCallback(pAxis->params); - /* Send a signal to the poller task which will make it do a status update */ - epicsEventSignal(pAxis->pController->pollEventId); - return MOTOR_AXIS_OK; + /* Send a signal to the poller task which will make it do a status update */ + epicsEventSignal(pAxis->pController->pollEventId); + return MOTOR_AXIS_OK; } static void A3200Poller(A3200Controller *pController) { - /* This is the task that polls the A3200 */ - double timeout; - AXIS_HDL pAxis; - int itera; - bool anyMoving; - char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; - const char* STATUS_FORMAT_STRING = "~STATUS (%s, AxisStatus) (%s, DriveStatus) (%s, AxisFault) (%s, ProgramPositionFeedback) (%s, ProgramPositionCommand) (%s, ProgramVelocityFeedback)"; - int status; - int axis_status, drive_status, axis_fault; - double pfbk, pcmd, vfbk; - bool move_active; - - timeout = pController->idlePollPeriod; - epicsEventSignal(pController->pollEventId); /* Force on poll at startup */ - - while (1) - { - if (timeout != 0.) - status = epicsEventWaitWithTimeout(pController->pollEventId, timeout); - else - status = epicsEventWait(pController->pollEventId); - - anyMoving = false; - - for (itera = 0; itera < pController->numAxes; itera++) - { - PARAMS params; - - pAxis = &pController->pAxis[itera]; - params = pAxis->params; - - if (!pAxis->mutexId) - break; - epicsMutexLock(pAxis->mutexId); - sprintf(outputBuff, STATUS_FORMAT_STRING, - pAxis->axisName, - pAxis->axisName, - pAxis->axisName, - pAxis->axisName, - pAxis->axisName, - pAxis->axisName); - - status = sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - if (status != asynSuccess) - { - motorParam->setInteger(pAxis->params, motorAxisCommError, 1); - epicsMutexUnlock(pAxis->mutexId); - continue; - } - - if(inputBuff[0] != ASCII_ACK_CHAR) - { - motorParam->setInteger(pAxis->params, motorAxisCommError, 1); - epicsMutexUnlock(pAxis->mutexId); - continue; - } - - sscanf(&inputBuff[1], "%d %d %d %lf %lf %lf", &axis_status, &drive_status, &axis_fault, &pfbk, &pcmd, &vfbk); - - motorParam->setInteger(params, motorAxisCommError, 0); - - move_active = drive_status & DRIVESTATUS_MoveActive; - motorParam->setInteger(params, motorAxisDone, !move_active); - if (move_active) - anyMoving = true; - - motorParam->setInteger(pAxis->params, motorAxisPowerOn, (drive_status & DRIVESTATUS_Enabled) != 0); - motorParam->setInteger(pAxis->params, motorAxisHomeSignal, (axis_status & AXISSTATUS_Homed) != 0); - - if (pAxis->reverseDirec == false) - { - motorParam->setInteger(pAxis->params, motorAxisHighHardLimit, !((drive_status & DRIVESTATUS_CwEndOfTravelLimitInput) ^ pAxis->swconfig.Bits.CWEOTSWstate)); - motorParam->setInteger(pAxis->params, motorAxisLowHardLimit, !((drive_status & DRIVESTATUS_CcwEndOfTravelLimitInput) ^ pAxis->swconfig.Bits.CCWEOTSWstate)); - } - else - { - motorParam->setInteger(pAxis->params, motorAxisHighHardLimit, !((drive_status & DRIVESTATUS_CcwEndOfTravelLimitInput) ^ pAxis->swconfig.Bits.CCWEOTSWstate)); - motorParam->setInteger(pAxis->params, motorAxisLowHardLimit, !((drive_status & DRIVESTATUS_CwEndOfTravelLimitInput) ^ pAxis->swconfig.Bits.CWEOTSWstate)); - } - pAxis->axisStatus = axis_status; - - pfbk /= fabs(pAxis->stepSize); - motorParam->setDouble(pAxis->params, motorAxisEncoderPosn, pfbk); - - pcmd /= fabs(pAxis->stepSize); - motorParam->setDouble(pAxis->params, motorAxisPosition, pcmd); - pAxis->currentCmdPos = pcmd; - - PRINT(pAxis->logParam, IODRIVER, "A3200Poller: axis %s axisStatus=%x, position=%f\n", - pAxis->axisName, pAxis->axisStatus, pAxis->currentCmdPos); - - if(axis_fault && axis_fault != pAxis->lastFault) - { - PRINT(pAxis->logParam, TERROR, "A3200Poller: controller fault on axis=%s fault=0x%X\n", pAxis->axisName, axis_fault); - } - - pAxis->lastFault = axis_fault; - - vfbk /= fabs(pAxis->stepSize); - motorParam->setDouble(pAxis->params, motorAxisActualVel, vfbk); - - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } /* Next axis */ - - timeout = anyMoving ? pController->movingPollPeriod : pController->idlePollPeriod; - } /* End while */ + /* This is the task that polls the A3200 */ + double timeout; + AXIS_HDL pAxis; + int itera; + bool anyMoving; + char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + const char* STATUS_FORMAT_STRING = "~STATUS (%s, AxisStatus) (%s, DriveStatus) (%s, AxisFault) (%s, ProgramPositionFeedback) (%s, ProgramPositionCommand) (%s, ProgramVelocityFeedback)"; + int status; + int axis_status, drive_status, axis_fault; + double pfbk, pcmd, vfbk; + bool move_active; + + timeout = pController->idlePollPeriod; + epicsEventSignal(pController->pollEventId); /* Force on poll at startup */ + + while (1) + { + if (timeout != 0.) + status = epicsEventWaitWithTimeout(pController->pollEventId, timeout); + else + status = epicsEventWait(pController->pollEventId); + + anyMoving = false; + + for (itera = 0; itera < pController->numAxes; itera++) + { + PARAMS params; + + pAxis = &pController->pAxis[itera]; + params = pAxis->params; + + if (!pAxis->mutexId) + break; + epicsMutexLock(pAxis->mutexId); + sprintf(outputBuff, STATUS_FORMAT_STRING, + pAxis->axisName, + pAxis->axisName, + pAxis->axisName, + pAxis->axisName, + pAxis->axisName, + pAxis->axisName); + + status = sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (status != asynSuccess || inputBuff[0] != ASCII_ACK_CHAR) + { + motorParam->setInteger(pAxis->params, motorAxisCommError, 1); + epicsMutexUnlock(pAxis->mutexId); + continue; + } + + sscanf(&inputBuff[1], "%d %d %d %lf %lf %lf", &axis_status, &drive_status, &axis_fault, &pfbk, &pcmd, &vfbk); + + motorParam->setInteger(params, motorAxisCommError, 0); + + move_active = !(axis_status & AXISSTATUS_MoveDone); + motorParam->setInteger(params, motorAxisDone, !move_active); + if (move_active) + anyMoving = true; + + motorParam->setInteger(pAxis->params, motorAxisPowerOn, (drive_status & DRIVESTATUS_Enabled) != 0); + motorParam->setInteger(pAxis->params, motorAxisHomeSignal, (axis_status & AXISSTATUS_Homed) != 0); + + if ((axis_status & AXISSTATUS_NotVirtual) != 0) + { + if (pAxis->reverseDirec == false) + { + motorParam->setInteger(pAxis->params, motorAxisHighHardLimit, !((drive_status & DRIVESTATUS_CwEndOfTravelLimitInput) ^ pAxis->swconfig.Bits.CWEOTSWstate)); + motorParam->setInteger(pAxis->params, motorAxisLowHardLimit, !((drive_status & DRIVESTATUS_CcwEndOfTravelLimitInput) ^ pAxis->swconfig.Bits.CCWEOTSWstate)); + } + else + { + motorParam->setInteger(pAxis->params, motorAxisHighHardLimit, !((drive_status & DRIVESTATUS_CcwEndOfTravelLimitInput) ^ pAxis->swconfig.Bits.CCWEOTSWstate)); + motorParam->setInteger(pAxis->params, motorAxisLowHardLimit, !((drive_status & DRIVESTATUS_CwEndOfTravelLimitInput) ^ pAxis->swconfig.Bits.CWEOTSWstate)); + } + } + pAxis->axisStatus = axis_status; + + pfbk /= fabs(pAxis->stepSize); + motorParam->setDouble(pAxis->params, motorAxisEncoderPosn, pfbk); + + pcmd /= fabs(pAxis->stepSize); + motorParam->setDouble(pAxis->params, motorAxisPosition, pcmd); + pAxis->currentCmdPos = pcmd; + + PRINT(pAxis->logParam, IODRIVER, "A3200Poller: axis %s axisStatus=%x, position=%f\n", + pAxis->axisName, pAxis->axisStatus, pAxis->currentCmdPos); + + if (axis_fault && axis_fault != pAxis->lastFault) + { + PRINT(pAxis->logParam, TERROR, "A3200Poller: controller fault on axis=%s fault=0x%X\n", pAxis->axisName, axis_fault); + pAxis->lastFault = axis_fault; + } + + vfbk /= fabs(pAxis->stepSize); + motorParam->setDouble(pAxis->params, motorAxisActualVel, vfbk); + + motorParam->callCallback(pAxis->params); + epicsMutexUnlock(pAxis->mutexId); + } /* Next axis */ + + timeout = anyMoving ? pController->movingPollPeriod : pController->idlePollPeriod; + } /* End while */ } static int motorA3200LogMsg(void * param, const motorAxisLogMask_t mask, const char *pFormat, ...) { - va_list pvar; - int nchar; - - va_start(pvar, pFormat); - nchar = vfprintf(stdout, pFormat, pvar); - va_end (pvar); - printf("\n"); - return nchar; + va_list pvar; + int nchar; + + va_start(pvar, pFormat); + nchar = vfprintf(stdout, pFormat, pvar); + va_end(pvar); + printf("\n"); + return nchar; } int A3200AsynSetup(int num_controllers) /* number of A3200 controllers in system. */ { - - if (num_controllers < 1) - { - printf("A3200AsynSetup, num_controllers must be > 0\n"); - return MOTOR_AXIS_ERROR; - } - numA3200Controllers = num_controllers; - pA3200Controller = (A3200Controller *)calloc(numA3200Controllers, sizeof(A3200Controller)); - if(pA3200Controller == NULL) - { - printf("A3200AsynSetup, could not allocate memory\n"); - return MOTOR_AXIS_ERROR; - } - return MOTOR_AXIS_OK; + + if (num_controllers < 1) + { + printf("A3200AsynSetup, num_controllers must be > 0\n"); + return MOTOR_AXIS_ERROR; + } + numA3200Controllers = num_controllers; + pA3200Controller = (A3200Controller *)calloc(numA3200Controllers, sizeof(A3200Controller)); + if (pA3200Controller == NULL) + { + printf("A3200AsynSetup, could not allocate memory\n"); + return MOTOR_AXIS_ERROR; + } + return MOTOR_AXIS_OK; } int A3200AsynConfig(int card, /* Controller number */ - const char *portName, /* asyn port name of serial or GPIB port */ - int asynAddress, /* asyn subaddress for GPIB */ - int numAxes, /* The number of axes that the driver controls */ - int taskNumber, /* the task number to use for motion commands */ - int movingPollPeriod, /* Time to poll (msec) when an axis is in motion */ - int idlePollPeriod) /* Time to poll (msec) when an axis is idle. 0 for no polling */ - + const char *portName, /* asyn port name of serial or GPIB port */ + int asynAddress, /* asyn subaddress for GPIB */ + int numAxes, /* The number of axes that the driver controls */ + int movingPollPeriod, /* Time to poll (msec) when an axis is in motion */ + int idlePollPeriod, /* Time to poll (msec) when an axis is idle. 0 for no polling */ + int taskNumber, /* the task number to use for motion commands */ + int linear) /* Use linear (1) or single-axis (0) move commands. */ { - A3200Controller *pController; - char threadName[20]; - int axis, status, digits, retry = 0; - char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; - const char* GET_PARAM_FORMAT_STRING = "%s.%s"; - - if (numA3200Controllers < 1) - { - printf("A3200AsynConfig: no A3200 controllers allocated, call A3200 first\n"); - return MOTOR_AXIS_ERROR; - } - if ((card < 0) || (card >= numA3200Controllers)) - { - printf("A3200AsynConfig: card must in range 0 to %d\n", numA3200Controllers - 1); - return MOTOR_AXIS_ERROR; - } - - if(numAxes < 1 || numAxes > A3200_MAX_AXES) - { - printf("A3200AsynConfig: numAxes must be in the range of 1 to %u\n", A3200_MAX_AXES); - return MOTOR_AXIS_ERROR; - } - - pController = &pA3200Controller[card]; - - pController->numAxes = numAxes; - pController->taskNumber = taskNumber; - pController->movingPollPeriod = movingPollPeriod / 1000.; - pController->idlePollPeriod = idlePollPeriod / 1000.; - - pController->sendReceiveMutex = epicsMutexMustCreate(); - - status = pasynOctetSyncIO->connect(portName, asynAddress, &pController->pasynUser, NULL); - - if (status != asynSuccess) - { - printf("A3200AsynConfig: cannot connect to asyn port %s\n", portName); - return MOTOR_AXIS_ERROR; - } - - /* Set command End-of-string */ - pasynOctetSyncIO->setInputEos(pController->pasynUser, ASCII_EOS_STR, strlen(ASCII_EOS_STR)); - pasynOctetSyncIO->setOutputEos(pController->pasynUser, ASCII_EOS_STR, strlen(ASCII_EOS_STR)); - - pController->pAxis = (AXIS_HDL) calloc(numAxes, sizeof(motorAxis)); - if(pA3200Controller->pAxis == NULL) - { - printf("A3200AsynConfig, could not allocate memory\n"); - return MOTOR_AXIS_ERROR; - } - - retry = 0; - - do - { - sprintf(outputBuff, "~TASK %u", pController->taskNumber); - status = sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - retry++; - } while(status != asynSuccess && retry < 3); - - if(status != asynSuccess) - return MOTOR_AXIS_ERROR; - - sendAndReceive(pController, "~STOPTASK", inputBuff, sizeof(inputBuff)); // reset the task - - /* Get axes info */ - for (axis = 0; axis < numAxes; axis++) - { - sprintf(outputBuff, "$strtask0 = GETPARMSTRING %d, PARAMETERID_AxisName", axis); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - - sendAndReceive(pController, "~GETVARIABLE $strtask0", inputBuff, sizeof(inputBuff)); - if (inputBuff[0] == ASCII_ACK_CHAR) - { - AXIS_HDL pAxis = &pController->pAxis[axis]; - pAxis->pController = pController; - pAxis->card = card; - pAxis->axis = axis; - pAxis->mutexId = epicsMutexMustCreate(); - pAxis->params = motorParam->create(0, MOTOR_AXIS_NUM_PARAMS); - strncpy(pAxis->axisName, &inputBuff[1], sizeof(pAxis->axisName) - 1); - - sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "PositionFeedbackType", pAxis->axisName); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - if (inputBuff[0] == ASCII_ACK_CHAR && atoi(&inputBuff[1]) > 0) - { - pAxis->closedLoop = 1; - motorParam->setInteger(pAxis->params, motorAxisHasEncoder, 1); - } - - sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "CountsPerUnit", pAxis->axisName); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - if (inputBuff[0] == ASCII_ACK_CHAR) - pAxis->stepSize = 1 / atof(&inputBuff[1]); - else - pAxis->stepSize = 1; - digits = (int) -log10(fabs(pAxis->stepSize)) + 2; - pAxis->maxDigits = digits < 1 ? 1 : digits; - - sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "HomeOffset", pAxis->axisName); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - if (inputBuff[0] == ASCII_ACK_CHAR) - pAxis->homePreset = atof(&inputBuff[1]); - - sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "HomeSetup", pAxis->axisName); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - if (inputBuff[0] == ASCII_ACK_CHAR) - pAxis->homeDirection = atoi(&inputBuff[1]) & 0x1; - - sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "EndOfTravelLimitSetup", pAxis->axisName); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - if (inputBuff[0] == ASCII_ACK_CHAR) - pAxis->swconfig.All = atoi(&inputBuff[1]); - - /* Set RAMP MODE to RATE. */ - sprintf(outputBuff, "RAMP MODE RATE %s", pAxis->axisName); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - - /* Get Reverse Direction indicator. */ - sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "ReverseMotionDirection", pAxis->axisName); - if (inputBuff[0] == ASCII_ACK_CHAR) - pAxis->reverseDirec = (bool) atoi(&inputBuff[1]); - } - } - - sendAndReceive(pController, "~INITQUEUE", inputBuff, sizeof(inputBuff)); - - pController->pollEventId = epicsEventMustCreate(epicsEventEmpty); - - /* Create the poller thread for this controller */ - epicsSnprintf(threadName, sizeof(threadName), "A3200:%d", card); - epicsThreadCreate(threadName, epicsThreadPriorityMedium, epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) A3200Poller, (void *) pController); - - return MOTOR_AXIS_OK; + A3200Controller *pController; + char threadName[20]; + int axis, status, digits, retry = 0; + char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + const char* GET_PARAM_FORMAT_STRING = "%s.%s"; + + if (numA3200Controllers < 1) + { + printf("A3200AsynConfig: no A3200 controllers allocated, call A3200 first\n"); + return MOTOR_AXIS_ERROR; + } + if ((card < 0) || (card >= numA3200Controllers)) + { + printf("A3200AsynConfig: card must in range 0 to %d\n", numA3200Controllers - 1); + return MOTOR_AXIS_ERROR; + } + + if (numAxes < 1 || numAxes > A3200_MAX_AXES) + { + printf("A3200AsynConfig: numAxes must be in the range of 1 to %u\n", A3200_MAX_AXES); + return MOTOR_AXIS_ERROR; + } + + pController = &pA3200Controller[card]; + + pController->numAxes = numAxes; + pController->taskNumber = taskNumber; + pController->linear = linear; + pController->movingPollPeriod = movingPollPeriod / 1000.; + pController->idlePollPeriod = idlePollPeriod / 1000.; + + pController->sendReceiveMutex = epicsMutexMustCreate(); + + status = pasynOctetSyncIO->connect(portName, asynAddress, &pController->pasynUser, NULL); + + if (status != asynSuccess) + { + printf("A3200AsynConfig: cannot connect to asyn port %s\n", portName); + return MOTOR_AXIS_ERROR; + } + + /* Set command End-of-string */ + pasynOctetSyncIO->setInputEos(pController->pasynUser, ASCII_EOS_STR, strlen(ASCII_EOS_STR)); + pasynOctetSyncIO->setOutputEos(pController->pasynUser, ASCII_EOS_STR, strlen(ASCII_EOS_STR)); + + pController->pAxis = (AXIS_HDL) calloc(numAxes, sizeof(motorAxis)); + if (pA3200Controller->pAxis == NULL) + { + printf("A3200AsynConfig, could not allocate memory\n"); + return MOTOR_AXIS_ERROR; + } + + retry = 0; + + do + { + sprintf(outputBuff, "~TASK %u", pController->taskNumber); + status = sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + retry++; + } while(status != asynSuccess && retry < 3); + + if (status != asynSuccess) + return MOTOR_AXIS_ERROR; + + sendAndReceive(pController, "~STOPTASK", inputBuff, sizeof(inputBuff)); // reset the task + + /* Get axes info */ + for (axis = 0; axis < numAxes; axis++) + { + AXIS_HDL pAxis = &pController->pAxis[axis]; + pAxis->pController = pController; + pAxis->card = card; + pAxis->axis = axis; + pAxis->mutexId = epicsMutexMustCreate(); + pAxis->params = motorParam->create(0, MOTOR_AXIS_NUM_PARAMS); + + if (inputBuff[0] != ASCII_ACK_CHAR) + motorParam->setInteger(pAxis->params, motorAxisProblem, 1); /* Signal "Controller Error" to user. */ + else + { + sprintf(outputBuff, "$strtask0 = GETPARMSTRING %d, PARAMETERID_AxisName", axis); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + + sendAndReceive(pController, "~GETVARIABLE $strtask0", inputBuff, sizeof(inputBuff)); + + strncpy(pAxis->axisName, &inputBuff[1], sizeof(pAxis->axisName) - 1); + + sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "PositionFeedbackType", pAxis->axisName); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (inputBuff[0] == ASCII_ACK_CHAR && atoi(&inputBuff[1]) > 0) + { + pAxis->closedLoop = 1; + motorParam->setInteger(pAxis->params, motorAxisHasEncoder, 1); + } + + sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "CountsPerUnit", pAxis->axisName); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (inputBuff[0] == ASCII_ACK_CHAR) + pAxis->stepSize = 1 / atof(&inputBuff[1]); + else + pAxis->stepSize = 1; + digits = (int) -log10(fabs(pAxis->stepSize)) + 2; + pAxis->maxDigits = digits < 1 ? 1 : digits; + + sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "HomeOffset", pAxis->axisName); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (inputBuff[0] == ASCII_ACK_CHAR) + pAxis->homePreset = atof(&inputBuff[1]); + + sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "HomeSetup", pAxis->axisName); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (inputBuff[0] == ASCII_ACK_CHAR) + pAxis->homeDirection = atoi(&inputBuff[1]) & 0x1; + + sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "EndOfTravelLimitSetup", pAxis->axisName); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (inputBuff[0] == ASCII_ACK_CHAR) + pAxis->swconfig.All = atoi(&inputBuff[1]); + + /* Set RAMP MODE to RATE. */ + sprintf(outputBuff, "RAMP MODE RATE %s", pAxis->axisName); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + + /* Get Reverse Direction indicator. */ + sprintf(outputBuff, GET_PARAM_FORMAT_STRING, "ReverseMotionDirection", pAxis->axisName); + if (inputBuff[0] == ASCII_ACK_CHAR) + pAxis->reverseDirec = (bool) atoi(&inputBuff[1]); + } + } + + if (inputBuff[0] != ASCII_ACK_CHAR) + return MOTOR_AXIS_ERROR; + + sendAndReceive(pController, "~INITQUEUE", inputBuff, sizeof(inputBuff)); + + /* Prevent Task #2 and #3 from blocking during LINEAR commands. */ + sendAndReceive(pController, (char *) "WAIT MODE AUTO", inputBuff, sizeof(inputBuff)); + sprintf(outputBuff, "~TASK %u", pController->taskNumber + 1); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + sendAndReceive(pController, (char *) "WAIT MODE AUTO", inputBuff, sizeof(inputBuff)); + sprintf(outputBuff, "~TASK %u", pController->taskNumber); + sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); + + pController->pollEventId = epicsEventMustCreate(epicsEventEmpty); + + /* Create the poller thread for this controller */ + epicsSnprintf(threadName, sizeof(threadName), "A3200:%d", card); + epicsThreadCreate(threadName, epicsThreadPriorityMedium, epicsThreadGetStackSize(epicsThreadStackMedium), + (EPICSTHREADFUNC) A3200Poller, (void *) pController); + + return MOTOR_AXIS_OK; } static asynStatus sendAndReceive(A3200Controller *pController, const char *outputBuff, char *inputBuff, size_t inputSize) { - size_t nWriteRequested; - size_t nWrite, nRead; - int eomReason; - asynStatus status; - AXIS_HDL pAxis; - - if (pController == NULL) - return asynError; - - pAxis = &pController->pAxis[0]; - nWriteRequested = strlen(outputBuff); - - /* sendAndReceive is intended only for "fast" read-write operations (such as getting parameter/status values), - * so we don't expect much latency on read/writes */ - epicsMutexLock(pController->sendReceiveMutex); - - status = pasynOctetSyncIO->writeRead(pController->pasynUser, outputBuff, nWriteRequested, - inputBuff, inputSize, TIMEOUT, &nWrite, &nRead, &eomReason); - - if (nWrite != nWriteRequested) - status = asynError; - else if (status == asynTimeout) - { - int retry = 1; - - while (retry <= 3 && status == asynTimeout) - { - PRINT(pAxis->logParam, TERROR, "%s:sendAndReceive: Retrying read, retry# = %d.\n", DRIVER_NAME, retry); - status = pasynOctetSyncIO->read(pController->pasynUser, inputBuff, inputSize, TIMEOUT, &nRead, &eomReason); - retry++; - } - if (retry > 3) - PRINT(pAxis->logParam, TERROR, - "%s:sendAndReceive: Retries exhausted on response to command = %s.\n", DRIVER_NAME, outputBuff); - else - PRINT(pAxis->logParam, TERROR, - "%s:sendAndReceive: Retry succeeded for command = %s with response = %s\n", DRIVER_NAME, outputBuff, inputBuff); - } - - if (status != asynSuccess) - asynPrint(pController->pasynUser, ASYN_TRACE_ERROR, - "%s:sendAndReceive writeRead error, output=%s status=%d, error=%s\n", DRIVER_NAME, - outputBuff, status, pController->pasynUser->errorMessage); - else - { - /* read until we have an ACK followed by a string (most likely will be the numeric value we're looking for) */ - while (status == asynSuccess && nRead > 1 && inputBuff[0] == ASCII_ACK_CHAR && inputBuff[1] == ASCII_EOS_CHAR) - status = pasynOctetSyncIO->read(pController->pasynUser, inputBuff, inputSize, TIMEOUT, &nRead, &eomReason); - if (status != asynSuccess) - asynPrint(pController->pasynUser, ASYN_TRACE_ERROR, - "%s:sendAndReceive error calling read, status=%d, error=%s\n", DRIVER_NAME, - status, pController->pasynUser->errorMessage); - } - epicsMutexUnlock(pController->sendReceiveMutex); - return status; + size_t nWriteRequested; + size_t nWrite, nRead; + int eomReason; + asynStatus status; + AXIS_HDL pAxis; + + if (pController == NULL) + return asynError; + + pAxis = &pController->pAxis[0]; + nWriteRequested = strlen(outputBuff); + + /* sendAndReceive is intended only for "fast" read-write operations (such as getting parameter/status values), + * so we don't expect much latency on read/writes */ + epicsMutexLock(pController->sendReceiveMutex); + + status = pasynOctetSyncIO->writeRead(pController->pasynUser, outputBuff, nWriteRequested, + inputBuff, inputSize, TIMEOUT, &nWrite, &nRead, &eomReason); + + if (nWrite != nWriteRequested) + status = asynError; + else if (status == asynTimeout) + { + int retry = 1; + + while (retry <= 3 && status == asynTimeout) + { + PRINT(pAxis->logParam, TERROR, "%s:sendAndReceive: Retrying read, retry# = %d.\n", DRIVER_NAME, retry); + status = pasynOctetSyncIO->read(pController->pasynUser, inputBuff, inputSize, TIMEOUT, &nRead, &eomReason); + retry++; + } + if (retry > 3) + PRINT(pAxis->logParam, TERROR, + "%s:sendAndReceive: Retries exhausted on response to command = %s.\n", DRIVER_NAME, outputBuff); + else + PRINT(pAxis->logParam, TERROR, + "%s:sendAndReceive: Retry succeeded for command = %s with response = %s\n", DRIVER_NAME, outputBuff, inputBuff); + } + + if (status != asynSuccess) + asynPrint(pController->pasynUser, ASYN_TRACE_ERROR, + "%s:sendAndReceive writeRead error, output=%s status=%d, error=%s\n", DRIVER_NAME, + outputBuff, status, pController->pasynUser->errorMessage); + else + { + /* read until we have an ACK followed by a string (most likely will be the numeric value we're looking for) */ + while (status == asynSuccess && nRead > 1 && inputBuff[0] == ASCII_ACK_CHAR && inputBuff[1] == ASCII_EOS_CHAR) + status = pasynOctetSyncIO->read(pController->pasynUser, inputBuff, inputSize, TIMEOUT, &nRead, &eomReason); + if (status != asynSuccess) + asynPrint(pController->pasynUser, ASYN_TRACE_ERROR, + "%s:sendAndReceive error calling read, status=%d, error=%s\n", DRIVER_NAME, + status, pController->pasynUser->errorMessage); + } + epicsMutexUnlock(pController->sendReceiveMutex); + return status; } diff --git a/motorApp/AerotechSrc/drvA3200Asyn.h b/motorApp/AerotechSrc/drvA3200Asyn.h index 4e87cb9..8d57ac1 100644 --- a/motorApp/AerotechSrc/drvA3200Asyn.h +++ b/motorApp/AerotechSrc/drvA3200Asyn.h @@ -2,10 +2,6 @@ FILENAME... drvA3200Asyn.h USAGE... This file contains Aerotech A3200 Asyn driver "include" information. -Version: $Revision: 17434 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-05-21 11:43:51 -0500 (Wed, 21 May 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/drvA3200Asyn.h $ */ /* @@ -47,16 +43,16 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- extern "C" { #endif - int A3200AsynSetup(int numControllers); /* number of A3200 controllers in system. */ - - int A3200AsynConfig(int card, /* Controller number */ - const char *portName, /* asyn port name of serial or GPIB port */ - int asynAddress, /* asyn subaddress for GPIB */ - int numAxes, /* The number of axes that the driver controls */ - int taskNumber, /* The task number to use for motion commands */ - int movingPollPeriod, /* Time to poll (msec) when an axis is in motion */ - int idlePollPeriod); /* Time to poll (msec) when an axis is idle. 0 for no polling */ + int A3200AsynSetup(int numControllers); /* number of A3200 controllers in system. */ + int A3200AsynConfig(int card, /* Controller number */ + const char *portName, /* asyn port name of serial or GPIB port */ + int asynAddress, /* asyn subaddress for GPIB */ + int numAxes, /* The number of axes that the driver controls */ + int movingPollPeriod, /* Time to poll (msec) when an axis is in motion */ + int idlePollPeriod, /* Time to poll (msec) when an axis is idle. 0 for no polling */ + int taskNumber, /* the task number to use for motion commands */ + int linear); /* linear (1) or single-axis (0) move commands. */ #ifdef __cplusplus } #endif diff --git a/motorApp/AerotechSrc/drvEnsembleAsyn.cc b/motorApp/AerotechSrc/drvEnsembleAsyn.cc index d6c5620..92941bc 100644 --- a/motorApp/AerotechSrc/drvEnsembleAsyn.cc +++ b/motorApp/AerotechSrc/drvEnsembleAsyn.cc @@ -2,10 +2,6 @@ FILENAME... drvEnsembleAsyn.cc USAGE... Motor record asyn driver level support for Aerotech Ensemble. -Version: $Revision: 18150 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-11-24 11:47:32 -0600 (Mon, 24 Nov 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/drvEnsembleAsyn.cc $ */ /* @@ -68,6 +64,11 @@ in file LICENSE that is included with this distribution. * .19 09-11-14 rls - sendAndReceive() diagnostic message added when controller returns NAK. * .20 11-24-14 rls - Moved "WAIT MODE NOWAIT" from EnsembleAsynConfig to motorAxisSetInteger * where torque is enabled/disabled. +* .21 10-14-15 rls - Use "ReverseDirec" parameter to set "HomeSetup" parameter. +* .22 05-29-18 rls - To avoid EPICS IOC reboots after parameter file changes, update +* CountsPerUnit everytime torque is enabled. +* .23 06-28-18 rls - If disabling torque due to a fault, clear motorAxisProblem so that +* user can Jog off limit switch. */ @@ -96,9 +97,13 @@ in file LICENSE that is included with this distribution. #include "paramLib.h" #include "drvEnsembleAsyn.h" -#include "ParameterId.h" #include "epicsExport.h" +/* NOTE: The following two files are copied from the Ensemble C library include files. +* If changing the driver to target a different version of the Ensemble, copy the following two files from that version's C library include files */ +#include "EnsembleCommonStructures.h" +#include "EnsembleParameterId.h" + motorAxisDrvSET_t motorEnsemble = { 14, @@ -209,9 +214,6 @@ static int numEnsembleControllers; /* Pointer to array of controller structures */ static EnsembleController *pEnsembleController=NULL; -#define MAX(a,b) ((a)>(b)? (a): (b)) -#define MIN(a,b) ((a)<(b)? (a): (b)) - static void motorAxisReportAxis(AXIS_HDL pAxis, int level) { if (level > 0) @@ -414,6 +416,7 @@ static int motorAxisSetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int va int ret_status = MOTOR_AXIS_ERROR; int status, FaultStatus; char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; + static char getparamstr[] = "GETPARM(@%d, %d)"; if (pAxis == NULL || pAxis->pController == NULL) return (MOTOR_AXIS_ERROR); @@ -424,9 +427,24 @@ static int motorAxisSetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int va { case motorAxisClosedLoop: if (value == 0) + { + int TravelLimitFaultMask = (1 << AXISFAULTBITS_CwEndOfTravelLimitFaultBit) | (1 << AXISFAULTBITS_CcwEndOfTravelLimitFaultBit); sprintf(outputBuff, "DISABLE @%d", pAxis->axis); + if ((pAxis->lastFault & TravelLimitFaultMask) != 0 ) /* If disabled due to a Travel Limit fault, clear motorAxisProblem. */ + motorParam->setInteger(pAxis->params, motorAxisProblem, 0); + } else { + sprintf(outputBuff, getparamstr, pAxis->axis, PARAMETERID_CountsPerUnit); + sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + if (inputBuff[0] == ASCII_ACK_CHAR) + { + double localstepsize; + localstepsize = 1 / atof(&inputBuff[1]); + if (localstepsize != pAxis->stepSize) + pAxis->stepSize = localstepsize; /* Update new stepsize. */ + } + sprintf(outputBuff, "AXISFAULT @%d", pAxis->axis); ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); @@ -439,6 +457,8 @@ static int motorAxisSetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int va sprintf(outputBuff, "ENABLE @%d", pAxis->axis); } ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + /* Set indicator to force status update when Enable does not work. */ + motorParam->setInteger(pAxis->params, motorAxisPowerOn, value); /* Prevent ASCII interpreter from blocking during MOVEABS/INC commands. */ ret_status = sendAndReceive(pAxis->pController, (char *) "WAIT MODE NOWAIT", inputBuff, sizeof(inputBuff)); @@ -531,7 +551,7 @@ static int motorAxisHome(AXIS_HDL pAxis, double min_velocity, double max_velocit int ret_status; char inputBuff[BUFFER_SIZE], outputBuff[BUFFER_SIZE]; epicsUInt32 hparam; - int axis; + int axis, posdir; if (pAxis == NULL || pAxis->pController == NULL) return (MOTOR_AXIS_ERROR); @@ -552,8 +572,9 @@ static int motorAxisHome(AXIS_HDL pAxis, double min_velocity, double max_velocit sprintf(outputBuff, "SETPARM @%d, %d, %.*f", axis, PARAMETERID_HomeRampRate, pAxis->maxDigits, acceleration * fabs(pAxis->stepSize)); /* HomeAccelDecelRate */ + posdir = (forwards == (int) pAxis->ReverseDirec); /* Adjust home direction for Reverse Direction paramter. */ hparam = pAxis->homeDirection; - if (forwards == 1) + if (posdir == 1) hparam |= 0x00000001; else hparam &= 0xFFFFFFFE; @@ -820,7 +841,7 @@ static void EnsemblePoller(EnsembleController *pController) } else { - double actvelocity = atof(&inputBuff[1]) * 1000.; + double actvelocity = atof(&inputBuff[1]) / fabs(pAxis->stepSize); motorParam->setDouble(pAxis->params, motorAxisActualVel, actvelocity); } motorParam->callCallback(pAxis->params); diff --git a/motorApp/AerotechSrc/drvEnsembleAsyn.h b/motorApp/AerotechSrc/drvEnsembleAsyn.h index 3c22301..f1fae64 100644 --- a/motorApp/AerotechSrc/drvEnsembleAsyn.h +++ b/motorApp/AerotechSrc/drvEnsembleAsyn.h @@ -2,10 +2,6 @@ FILENAME... drvEnsembleAsyn.h USAGE... This file contains Aerotech Ensemble Asyn driver "include" information. -Version: $Revision: 10834 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/drvEnsembleAsyn.h $ */ /* diff --git a/motorApp/AerotechSrc/drvSoloist.cc b/motorApp/AerotechSrc/drvSoloist.cc index 87583da..dc0e0fd 100644 --- a/motorApp/AerotechSrc/drvSoloist.cc +++ b/motorApp/AerotechSrc/drvSoloist.cc @@ -2,10 +2,6 @@ * FILENAME... drvSoloist.cc * USAGE... Motor record driver level support for Aerotech Soloist. * -* Version: $Revision: 14155 $ -* Modified By: $Author: sluiter $ -* Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -* HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/drvSoloist.cc $ */ /* @@ -47,6 +43,8 @@ #include #include #include +#include +#include #include "motor.h" #include "drvSoloist.h" #include "asynOctetSyncIO.h" @@ -220,7 +218,7 @@ static int set_status(int card, int signal) // get the axis status sprintf(buff, "AXISSTATUS()"); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); comm_status = recv_mess(card, buff, 1); if (comm_status > 0 && buff[0] == ASCII_ACK_CHAR) { @@ -273,7 +271,7 @@ static int set_status(int card, int signal) /* get the axis fault status */ sprintf(buff, "AXISFAULT()"); - send_mess(card, buff, (char) NULL); + 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 & CW_FAULT_BIT ? 1 : 0; @@ -287,7 +285,7 @@ static int set_status(int card, int signal) // get the position sprintf(buff, "PFBKPROG()"); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); recv_mess(card, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { @@ -339,7 +337,7 @@ static int set_status(int card, int signal) if ((status.Bits.RA_DONE || ls_active) && nodeptr != 0 && nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -593,7 +591,7 @@ static int motor_init() // 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); + send_mess(card_index, buff, (char*) NULL); status = recv_mess(card_index, buff, 1); retry++; @@ -605,7 +603,7 @@ static int motor_init() brdptr->motor_in_motion = 0; // Read controller ID string strcpy(buff, "GETPARM(265)"); //UserString1 - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { @@ -622,7 +620,7 @@ static int motor_init() { // Does this axis actually exist? sprintf(buff, "GETPARM(257)"); //AxisName - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); // We know the axis exists if we got an ACK response @@ -647,7 +645,7 @@ static int motor_init() // Determine if encoder present based on open/closed loop mode. sprintf(buff, "GETPARM(58)"); //CfgFbkPosType - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { @@ -660,7 +658,7 @@ static int motor_init() // Determine if gains are supported based on the motor type. sprintf(buff, "GETPARM(33)"); //CfgMotType - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { @@ -673,12 +671,12 @@ static int motor_init() // Stop all motors sprintf(buff, "ABORT"); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); // Determine drive resolution sprintf(buff, "GETPARM(3)"); //PosScaleFactor - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { @@ -698,7 +696,7 @@ static int motor_init() // Save home preset position sprintf(buff, "GETPARM(108)"); //HomeOffset - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { @@ -707,7 +705,7 @@ static int motor_init() // Determine low limit sprintf(buff, "GETPARM(47)"); //ThresholdSoftCCW - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { @@ -716,7 +714,7 @@ static int motor_init() // Determine high limit sprintf(buff, "GETPARM(48)"); //ThresholdSoftCW - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { @@ -725,7 +723,7 @@ static int motor_init() // Save the HomeDirection parameter sprintf(buff, "GETPARM(106)"); //HomeDirection - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[0] == ASCII_ACK_CHAR) { diff --git a/motorApp/AerotechSrc/drvSoloist.h b/motorApp/AerotechSrc/drvSoloist.h index 8f1b829..ca7e686 100644 --- a/motorApp/AerotechSrc/drvSoloist.h +++ b/motorApp/AerotechSrc/drvSoloist.h @@ -2,10 +2,6 @@ FILENAME... drvSoloist.h USAGE... This file contains Aerotech Soloist driver "include" information. -Version: $Revision: 10834 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/AerotechSrc/drvSoloist.h $ */ /* diff --git a/motorApp/AttocubeSrc/drvANC150Asyn.cc b/motorApp/AttocubeSrc/drvANC150Asyn.cc index ef35b7d..416b2ef 100644 --- a/motorApp/AttocubeSrc/drvANC150Asyn.cc +++ b/motorApp/AttocubeSrc/drvANC150Asyn.cc @@ -3,9 +3,6 @@ FILENAME... drvANC150Asyn.cc USAGE... asyn motor driver support for attocube systems AG ANC150 Piezo Step Controller. -Version: $Revision: 1.9 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-08-13 20:05:24 $ */ diff --git a/motorApp/Db/ANF2Aux.template b/motorApp/Db/ANF2Aux.template new file mode 100644 index 0000000..93a255d --- /dev/null +++ b/motorApp/Db/ANF2Aux.template @@ -0,0 +1,28 @@ +# Database for extra PVs for AMCI ANG1 controllers + +record(bo,"$(P)$(R)ResetErrors") { + field(DESC,"Reset Errors") + field(PINI, "0") + field(VAL,"0") + field(DTYP, "asynInt32") + field(OUT,"@asyn($(PORT),$(ADDR))ANF2_RESET_ERRORS") + field(ZNAM, "Done") + field(ONAM, "Reset") +} + +record(bo,"$(P)$(R)GetInfo") { + field(DESC,"Get Info") + field(PINI, "0") + field(VAL,"0") + field(DTYP, "asynInt32") + field(OUT,"@asyn($(PORT),$(ADDR))ANF2_GET_INFO") +} + +# Reconfig isn't yet implemented in a generally-useful way +#record(longout,"$(P)$(R)Reconfig") { +# field(DESC,"Reconfig") +# field(PINI, "0") +# field(VAL,"0") +# field(DTYP, "asynInt32") +# field(OUT,"@asyn($(PORT),$(ADDR))ANF2_RECONFIG") +#} diff --git a/motorApp/Db/EnsemblePSOFly.db b/motorApp/Db/EnsemblePSOFly.db index ed9b636..f88da38 100644 --- a/motorApp/Db/EnsemblePSOFly.db +++ b/motorApp/Db/EnsemblePSOFly.db @@ -30,8 +30,8 @@ record(ao, "$(P)$(Q)startPos") { record(calcout, "$(P)$(Q)startPosDial") { field(INPA, "$(P)$(Q)startPos CP") - field(INPB, "$(M).OFF") - field(INPC, "$(M).DIR") + field(INPB, "$(M).OFF CP") + field(INPC, "$(M).DIR CP") field(PREC, "5") field(CALC, "(a-b)*(c?-1:1)") } @@ -44,8 +44,8 @@ record(ao, "$(P)$(Q)endPos") { record(calcout, "$(P)$(Q)endPosDial") { field(INPA, "$(P)$(Q)endPos CP") - field(INPB, "$(M).OFF") - field(INPC, "$(M).DIR") + field(INPB, "$(M).OFF CP") + field(INPC, "$(M).DIR CP") field(PREC, "5") field(CALC, "(a-b)*(c?-1:1)") } @@ -227,7 +227,7 @@ record(scalcout, "$(P)$(Q)calcPulseTime0") { } record(scalcout, "$(P)$(Q)calcPulseTime") { field(INPE, "$(P)$(Q)pulseType") - field(AA, "PSOPULSE X TIME ") + field(AA, "PSOPULSE $(AXIS=X) TIME ") field(BB, "2,1 ") field(INCC, "$(P)$(Q)calcPulseTime0.SVAL PP") field(CALC, "AA+(e?cc:bb)") @@ -236,19 +236,19 @@ record(scalcout, "$(P)$(Q)calcPulseTime") { record(sseq, "$(P)$(Q)initPSO") { field(LNK2, "$(P)$(Q)cmdWriteRead.BOUT CA") - field(STR2, "PSOOUTPUT X CONTROL 1") + field(STR2, "PSOOUTPUT $(AXIS=X) CONTROL 1") field(LNK3, "$(P)$(Q)cmdWriteRead.BOUT CA") field(DOL3, "$(P)$(Q)calcPulseTime.SVAL PP") field(LNK4, "$(P)$(Q)cmdWriteRead.BOUT CA") - field(STR4, "PSOOUTPUT X PULSE WINDOW MASK ") + field(STR4, "PSOOUTPUT $(AXIS=X) PULSE WINDOW MASK ") field(LNK5, "$(P)$(Q)cmdWriteRead.BOUT CA") - field(STR5, "PSOTRACK X INPUT 3") + field(STR5, "PSOTRACK $(AXIS=X) INPUT 3") field(LNK6, "$(P)$(Q)pulseDstBld.PROC CA") field(LNK7, "$(P)$(Q)cmdWriteRead.BOUT CA") - field(STR7, "PSOWINDOW X 1 INPUT 3") + field(STR7, "PSOWINDOW $(AXIS=X) 1 INPUT 3") field(LNK8, "$(P)$(Q)pulseWndwBld.PROC CA") field(LNK1, "$(P)$(Q)cmdWriteRead.BOUT CA") - field(STR1, "PSOCONTROL X RESET") + field(STR1, "PSOCONTROL $(AXIS=X) RESET") field(WAIT1, "Wait") field(WAIT2, "Wait") field(WAIT3, "Wait") @@ -273,7 +273,7 @@ record(scalcout, "$(P)$(Q)pulseDstBld") { field(CALC, "$P(AA,A)") field(INPA, "$(P)$(Q)scanDelta.VAL") field(OUT, "$(P)$(Q)cmdWriteRead.BOUT PP") - field(AA, "PSODISTANCE X FIXED %f UNITS") + field(AA, "PSODISTANCE $(AXIS=X) FIXED %f UNITS") } # The PSO range command arguments are relative to the motor position at which @@ -301,7 +301,7 @@ record(scalcout, "$(P)$(Q)pulseWndwBld") { field(INPC, "$(P)$(Q)calcRangeOffset PP") field(INPD, "$(P)$(Q)scanControl NPP") field(INPE, "$(P)$(Q)scanDelta NPP") - field(AA, "PSOWINDOW X 1 RANGE %.6f,") + field(AA, "PSOWINDOW $(AXIS=X) 1 RANGE %.6f,") field(CALC, "$P(AA,min(A,B)-(d?0:C)-(a>b?e:0))") field(OUT, "$(P)$(Q)pulseWndwBlds.A NPP") field(FLNK, "$(P)$(Q)pulseWndwBld2") @@ -335,16 +335,16 @@ record(aSub, "$(P)$(Q)pulseWndwBlds") { } record(scalcout, "$(P)$(Q)armPSO") { - field(AA, "PSOCONTROL X ARM") + field(AA, "PSOCONTROL $(AXIS=X) ARM") field(CALC, "aa") field(OUT, "$(P)$(Q)cmdWriteRead.BOUT PP") } record(sseq, "$(P)$(Q)disablePSO") { field(LNK1, "$(P)$(Q)cmdWriteRead.BOUT CA") - field(STR1, "PSOWINDOW X 1 OFF") + field(STR1, "PSOWINDOW $(AXIS=X) 1 OFF") field(LNK2, "$(P)$(Q)cmdWriteRead.BOUT CA") - field(STR2, "PSOCONTROL X OFF") + field(STR2, "PSOCONTROL $(AXIS=X) OFF") field(WAIT1, "Wait") field(WAIT2, "Wait") } @@ -353,8 +353,8 @@ record(stringout, "$(P)$(Q)motorName") { field(VAL, "$(M)") } -# Provide records for the user to program -# prefly and postfly operations +# Provide blank records for the user to program custom prefly and postfly +# operations record(bo, "$(P)$(Q)scanControl") { field(ZNAM, "Standard") field(ONAM, "Custom") @@ -364,8 +364,10 @@ record(calcout, "$(P)$(Q)userCalc1") { field(CALC, "0") } record(calcout, "$(P)$(Q)userCalc2") { + field(DESC, "") field(PREC, "5") field(CALC, "0") + } record(sseq, "$(P)$(Q)userPreTaxi") { field(SDIS, "$(P)$(Q)scanControl") diff --git a/motorApp/Db/Makefile b/motorApp/Db/Makefile index f872ed3..2c53922 100644 --- a/motorApp/Db/Makefile +++ b/motorApp/Db/Makefile @@ -26,6 +26,7 @@ DB += XPSAuxBo.db DB += XPSAuxLi.db DB += XPSAuxLo.db DB += XPS_extra.db +DB += XPSPositionCompare.db DB += XPSTclScript.template DB += HXP_extra.db DB += HXP_coords.db @@ -44,6 +45,8 @@ DB += profileMoveControllerXPS.template DB += profileMoveAxisXPS.template DB += PI_Support.db PI_SupportCtrl.db DB += Phytron_motor.db Phytron_I1AM01.db Phytron_MCM01.db +DB += asyn_auto_power.db +DB += ScriptMotorReload.db #---------------------------------------------------- # Declare template files which do not show up in DB diff --git a/motorApp/Db/ScriptMotorReload.db b/motorApp/Db/ScriptMotorReload.db new file mode 100644 index 0000000..6390445 --- /dev/null +++ b/motorApp/Db/ScriptMotorReload.db @@ -0,0 +1,9 @@ +record(bo, "$(P)$(PORT):ScriptReload") +{ + field(DESC, "$(PORT) Script Reload") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT), 0, 0)RELOAD_SCRIPT") + + field(ZNAM, "Loaded") + field(ONAM, "Reload") +} diff --git a/motorApp/Db/XPSAuxAo.db b/motorApp/Db/XPSAuxAo.db index cca84fe..c9cf191 100644 --- a/motorApp/Db/XPSAuxAo.db +++ b/motorApp/Db/XPSAuxAo.db @@ -1,9 +1,23 @@ -grecord(ao,"$(P)$(R)") { - field(DTYP,"asynFloat64") - field(OUT,"@asyn($(PORT) $(CHAN))ANALOG_OUTPUT") - field(DRVL,"$(DRVL)") - field(LOPR,"$(LOPR)") - field(DRVH,"$(DRVH)") - field(HOPR,"$(HOPR)") - field(PREC,"$(PREC)") +record(ao,"$(P)$(R)") { + field(DTYP,"asynFloat64") + field(OUT,"@asyn($(PORT) $(CHAN))ANALOG_OUTPUT") + field(DRVL,"$(DRVL)") + field(LOPR,"$(LOPR)") + field(DRVH,"$(DRVH)") + field(HOPR,"$(HOPR)") + field(PREC,"$(PREC)") +} + +record(ao,"$(P)$(R)_tweakVal") { + field(PREC,"$(PREC)") +} + +record(transform,"$(P)$(R)_tweak") { + field(CLCE,"a?d-c:b?d+c:d") + field(INPC,"$(P)$(R)_tweakVal.VAL NPP MS") + field(INPD,"$(P)$(R).VAL NPP MS") + field(OUTE,"$(P)$(R).VAL PP MS") + field(OUTF,"$(P)$(R)_tweak.A NPP MS") + field(OUTG,"$(P)$(R)_tweak.B NPP MS") + field(PREC,"3") } diff --git a/motorApp/Db/XPSPositionCompare.db b/motorApp/Db/XPSPositionCompare.db new file mode 100644 index 0000000..1165838 --- /dev/null +++ b/motorApp/Db/XPSPositionCompare.db @@ -0,0 +1,131 @@ +# Database for PositionerPositionCompare functions in Newport XPS +# Mark Rivers +# March 10, 2015 + +record(mbbo,"$(P)$(R)PositionCompareMode") { + field(DTYP, "asynInt32") + field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MODE") + field(ZRVL, "0") + field(ZRST, "Disable") + field(ONVL, "1") + field(ONST, "Position compare") + field(TWVL, "2") + field(TWST, "AquadB windowed") + field(THVL, "3") + field(THST, "AquadB always") +} + +record(mbbi,"$(P)$(R)PositionCompareMode_RBV") { + field(DTYP, "asynInt32") + field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MODE") + field(ZRVL, "0") + field(ZRST, "Disable") + field(ONVL, "1") + field(ONST, "Position compare") + field(TWVL, "2") + field(TWST, "AquadB windowed") + field(THVL, "3") + field(THST, "AquadB always") + field(SCAN, "I/O Intr") +} + +record(ao,"$(P)$(R)PositionCompareMinPosition") { + field(PINI, "YES") + field(PREC,"$(PREC)") + field(DTYP, "asynFloat64") + field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MIN_POSITION") +} + +record(ai,"$(P)$(R)PositionCompareMinPosition_RBV") { + field(PREC,"$(PREC)") + field(DTYP, "asynFloat64") + field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MIN_POSITION") + field(SCAN, "I/O Intr") +} + +record(ao,"$(P)$(R)PositionCompareMaxPosition") { + field(PINI, "YES") + field(PREC,"$(PREC)") + field(DTYP, "asynFloat64") + field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MAX_POSITION") +} + +record(ai,"$(P)$(R)PositionCompareMaxPosition_RBV") { + field(PREC,"$(PREC)") + field(DTYP, "asynFloat64") + field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MAX_POSITION") + field(SCAN, "I/O Intr") +} + +record(ao,"$(P)$(R)PositionCompareStepSize") { + field(PINI, "YES") + field(PREC,"$(PREC)") + field(DTYP, "asynFloat64") + field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_STEP_SIZE") +} + +record(ai,"$(P)$(R)PositionCompareStepSize_RBV") { + field(PREC,"$(PREC)") + field(DTYP, "asynFloat64") + field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_STEP_SIZE") + field(SCAN, "I/O Intr") +} + +record(mbbo,"$(P)$(R)PositionComparePulseWidth") { + field(PINI, "YES") + field(DTYP, "asynInt32") + field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_PULSE_WIDTH") + field(ZRVL, "0") + field(ZRST, "0.2") + field(ONVL, "1") + field(ONST, "1.0") + field(TWVL, "2") + field(TWST, "2.5") + field(THVL, "3") + field(THST, "10.0") +} + +record(mbbi,"$(P)$(R)PositionComparePulseWidth_RBV") { + field(PINI, "YES") + field(DTYP, "asynInt32") + field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_PULSE_WIDTH") + field(ZRVL, "0") + field(ZRST, "0.2") + field(ONVL, "1") + field(ONST, "1.0") + field(TWVL, "2") + field(TWST, "2.5") + field(THVL, "3") + field(THST, "10.0") + field(SCAN, "I/O Intr") +} + +record(mbbo,"$(P)$(R)PositionCompareSettlingTime") { + field(PINI, "YES") + field(DTYP, "asynInt32") + field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_SETTLING_TIME") + field(ZRVL, "0") + field(ZRST, "0.075") + field(ONVL, "1") + field(ONST, "1.0") + field(TWVL, "2") + field(TWST, "4.0") + field(THVL, "3") + field(THST, "12.0") +} + +record(mbbi,"$(P)$(R)PositionCompareSettlingTime_RBV") { + field(PINI, "YES") + field(DTYP, "asynInt32") + field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_SETTLING_TIME") + field(ZRVL, "0") + field(ZRST, "0.075") + field(ONVL, "1") + field(ONST, "1.0") + field(TWVL, "2") + field(TWST, "4.0") + field(THVL, "3") + field(THST, "12.0") + field(SCAN, "I/O Intr") +} + diff --git a/motorApp/Db/XPSPositionCompare_settings.req b/motorApp/Db/XPSPositionCompare_settings.req new file mode 100644 index 0000000..b810b55 --- /dev/null +++ b/motorApp/Db/XPSPositionCompare_settings.req @@ -0,0 +1,6 @@ +$(P)$(R)PositionCompareMode +$(p)$(r)pOSITIONcompareMinPosition +$(P)$(R)PositionCompareMaxPosition +$(P)$(R)PositionCompareStepSize +$(P)$(R)PositionComparePulseWidth +$(P)$(R)PositionCompareSettlingTime diff --git a/motorApp/Db/asyn_auto_power.db b/motorApp/Db/asyn_auto_power.db new file mode 100644 index 0000000..c80875c --- /dev/null +++ b/motorApp/Db/asyn_auto_power.db @@ -0,0 +1,90 @@ + +############################################################ +# +# Template to provide records that enable automatic control +# of the amplifier power. This works with the Asyn model 3 +# based drivers. Amplifier power control is done via the +# setClosedLoop driver function (which also maps to the +# motor record CNEN field). +# +# Macros: +# P, M - motor name +# PORT - asyn port +# ADDR - asyn addr +# FRAC - holding current % (optional, default 0) +# +# Matt Pearson, ORNL +# March 2015 +# +############################################################ + +# /// +# /// Automatically control amplifier power. +# /// +record(bo, "$(P)$(M):AutoEnable") +{ + field(DESC, "Auto Power Control") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_POWER_AUTO_ONOFF") + field(VAL, "0") + field(PINI, "YES") + field(ZNAM, "Disabled") + field(ONAM, "Enabled") + info(autosaveFields, "VAL") +} + +# /// +# /// Delay the move after the amplifier has been +# /// automatically enabled. +# /// +record(ao, "$(P)$(M):AutoEnableDelay") +{ + field(DESC, "Delay after power on") + field(DTYP, "asynFloat64") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_POWER_ON_DELAY") + field(VAL, "0") + field(PINI, "YES") + field(EGU, "s") + field(PREC, "1") + info(autosaveFields, "VAL") +} + +# /// +# /// Delay the end of move after the amplifier has been +# /// automatically disabled. +# /// This is independent of the motor record DLY +# /// field, but the delay will only start once the driver +# /// notified that the move is complete (which takes +# /// into account any controller specific post move delay). +# /// +record(ao, "$(P)$(M):AutoDisableDelay") +{ + field(DESC, "Delay after power off") + field(DTYP, "asynFloat64") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_POWER_OFF_DELAY") + field(VAL, "0") + field(PINI, "YES") + field(EGU, "s") + field(PREC, "1") + info(autosaveFields, "VAL") +} + +# /// +# /// Instead of power off completely, set a holding current +# /// which is a fraction of the moving current. +# /// +# /// If this is non zero it needs to be handled in the +# /// controller specific driver setClosedLoop function. +# /// +record(longout, "$(P)$(M):PowerOffFraction") +{ + field(DESC, "Holding Current %") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_POWER_OFF_FRACTION") + field(VAL, "$(FRAC=0)") + field(PINI, "YES") + field(HOPR, "100") + field(LOPR, "0") + info(autosaveFields, "VAL") +} + diff --git a/motorApp/Db/asyn_motor.db b/motorApp/Db/asyn_motor.db index f481121..aeb0a43 100644 --- a/motorApp/Db/asyn_motor.db +++ b/motorApp/Db/asyn_motor.db @@ -52,6 +52,40 @@ record(calcout, "$(P)$(M)_twCh") { field(OUT, "$(P)$(M).TWV") } +# These records make the motor resolution, offset and direction available to the driver +# which is needed for profile moves and other applications + +# Motor direction for this axis +record(longout,"$(P)$(M)Direction") { + field(DESC, "$(M) direction") + field(DOL, "$(P)$(M).DIR CP MS") + field(OMSL, "closed_loop") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_REC_DIRECTION") +} + + +# Motor offset for this axis +record(ao,"$(P)$(M)Offset") { + field(DESC, "$(M) offset") + field(DOL, "$(P)$(M).OFF CP MS") + field(OMSL, "closed_loop") + field(DTYP, "asynFloat64") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_REC_OFFSET") + field(PREC, "$(PREC)") +} + + +# Motor resolution for this axis +record(ao,"$(P)$(M)Resolution") { + field(DESC, "$(M) resolution") + field(DOL, "$(P)$(M).MRES CP MS") + field(OMSL, "closed_loop") + field(DTYP, "asynFloat64") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_REC_RESOLUTION") + field(PREC, "$(PREC)") +} + #! Further lines contain data used by VisualDCT #! View(405,484,0.9) #! Record("$(P)$(M)",840,675,0,0,"$(P)$(M)") diff --git a/motorApp/Db/asyn_motor_settings.req b/motorApp/Db/asyn_motor_settings.req index 57a0d9b..c6ca182 100644 --- a/motorApp/Db/asyn_motor_settings.req +++ b/motorApp/Db/asyn_motor_settings.req @@ -1,8 +1,4 @@ # FILE... motor_settings.req -# Version: $Revision$ -# Modified By: $Author$ -# Last Modified: $Date$ -# HeadURL: $URL$ file basic_motor_settings.req P=$(P),M=$(M) $(P)$(M)_able.VAL diff --git a/motorApp/Db/basic_asyn_motor.db b/motorApp/Db/basic_asyn_motor.db index c114689..a185980 100644 --- a/motorApp/Db/basic_asyn_motor.db +++ b/motorApp/Db/basic_asyn_motor.db @@ -19,3 +19,37 @@ record(motor,"$(P)$(M)") field(TWV,"1") } +# These records make the motor resolution, offset and direction available to the driver +# which is needed for profile moves and other applications + +# Motor direction for this axis +record(longout,"$(P)$(M)Direction") { + field(DESC, "$(M) direction") + field(DOL, "$(P)$(M).DIR CP MS") + field(OMSL, "closed_loop") + field(DTYP, "asynInt32") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_REC_DIRECTION") +} + + +# Motor offset for this axis +record(ao,"$(P)$(M)Offset") { + field(DESC, "$(M) offset") + field(DOL, "$(P)$(M).OFF CP MS") + field(OMSL, "closed_loop") + field(DTYP, "asynFloat64") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_REC_OFFSET") + field(PREC, "$(PREC)") +} + + +# Motor resolution for this axis +record(ao,"$(P)$(M)Resolution") { + field(DESC, "$(M) resolution") + field(DOL, "$(P)$(M).MRES CP MS") + field(OMSL, "closed_loop") + field(DTYP, "asynFloat64") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_REC_RESOLUTION") + field(PREC, "$(PREC)") +} + diff --git a/motorApp/Db/basic_motor_settings.req b/motorApp/Db/basic_motor_settings.req index 529046f..5b4a1aa 100644 --- a/motorApp/Db/basic_motor_settings.req +++ b/motorApp/Db/basic_motor_settings.req @@ -1,8 +1,4 @@ # FILE... basic_motor_settings.req -# Version: $Revision$ -# Modified By: $Author$ -# Last Modified: $Date$ -# HeadURL: $URL$ $(P)$(M).DIR $(P)$(M).DHLM @@ -19,6 +15,7 @@ $(P)$(M).BDST $(P)$(M).BVEL $(P)$(M).BACC $(P)$(M).RDBD +$(P)$(M).SPDB $(P)$(M).DESC $(P)$(M).EGU $(P)$(M).RTRY diff --git a/motorApp/Db/motor.db b/motorApp/Db/motor.db index 40df7fe..33ad212 100644 --- a/motorApp/Db/motor.db +++ b/motorApp/Db/motor.db @@ -43,7 +43,7 @@ record(calcout, "$(P)$(M)_vCh") { record(calcout, "$(P)$(M)_twCh") { field(DESC, "change TWV") - field(CALC, "min(max(a*b,c),d-e)") + field(CALC, "min(max(a*b,abs(c)),d-e)") field(INPB, "$(P)$(M).TWV") field(INPC, "$(P)$(M).MRES") field(INPD, "$(P)$(M).HLM") diff --git a/motorApp/Db/motor_settings.req b/motorApp/Db/motor_settings.req index 57a0d9b..c6ca182 100644 --- a/motorApp/Db/motor_settings.req +++ b/motorApp/Db/motor_settings.req @@ -1,8 +1,4 @@ # FILE... motor_settings.req -# Version: $Revision$ -# Modified By: $Author$ -# Last Modified: $Date$ -# HeadURL: $URL$ file basic_motor_settings.req P=$(P),M=$(M) $(P)$(M)_able.VAL diff --git a/motorApp/Db/profileMoveAxis.template b/motorApp/Db/profileMoveAxis.template index c0644e7..7dc34e1 100644 --- a/motorApp/Db/profileMoveAxis.template +++ b/motorApp/Db/profileMoveAxis.template @@ -67,36 +67,3 @@ record(waveform,"$(P)$(R)M$(M)FollowingErrors") { field(SCAN, "I/O Intr") } -# These records make the motor resolution, offset and direction available to the driver -# which is needed for profile moves - -# Motor direction for this axis -record(longout,"$(P)$(R)M$(M)Direction") { - field(DESC, "$(ADDR) direction") - field(DOL, "$(MOTOR).DIR CP MS") - field(OMSL, "closed_loop") - field(DTYP, "asynInt32") - field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))PROFILE_MOTOR_DIRECTION") -} - - -# Motor offset for this axis -record(ao,"$(P)$(R)M$(M)Offset") { - field(DESC, "$(ADDR) offset") - field(DOL, "$(MOTOR).OFF CP MS") - field(OMSL, "closed_loop") - field(DTYP, "asynFloat64") - field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))PROFILE_MOTOR_OFFSET") - field(PREC, "$(PREC)") -} - - -# Motor resolution for this axis -record(ao,"$(P)$(R)M$(M)Resolution") { - field(DESC, "$(ADDR) resolution") - field(DOL, "$(MOTOR).MRES CP MS") - field(OMSL, "closed_loop") - field(DTYP, "asynFloat64") - field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))PROFILE_MOTOR_RESOLUTION") - field(PREC, "$(PREC)") -} diff --git a/motorApp/Db/trajectoryScan.db b/motorApp/Db/trajectoryScan.db index f571f58..570fbcf 100644 --- a/motorApp/Db/trajectoryScan.db +++ b/motorApp/Db/trajectoryScan.db @@ -81,6 +81,10 @@ grecord(ao,"$(P)$(R)NewPulsePositions") { field(PREC, "3") } +grecord(longout,"$(P)$(R)NumPulsePositions") { + field(DESC,"Num pulse positions to load") +} + record(mbbo, "$(P)$(R)PulseDir") { field(DESC,"Both, Neg, or Pos") field(ZRVL, "0") diff --git a/motorApp/Db/trajectoryScan_settings.req b/motorApp/Db/trajectoryScan_settings.req index cca5183..2600d56 100644 --- a/motorApp/Db/trajectoryScan_settings.req +++ b/motorApp/Db/trajectoryScan_settings.req @@ -1,4 +1,4 @@ -$(P)$(R)Nelements +ed $(P)$(R)Nelements $(P)$(R)MoveMode $(P)$(R)Npulses $(P)$(R)StartPulses @@ -56,3 +56,4 @@ $(P)$(R)PulseLenUS $(P)$(R)PulseSrc $(P)$(R)PulseMode $(P)$(R)PulsePositions +$(P)$(R)NumPulsePositions diff --git a/motorApp/DeltaTauSrc/devPmac.cc b/motorApp/DeltaTauSrc/devPmac.cc index c5296bc..d159780 100644 --- a/motorApp/DeltaTauSrc/devPmac.cc +++ b/motorApp/DeltaTauSrc/devPmac.cc @@ -2,9 +2,6 @@ FILENAME... devPmac.cc USAGE... Device level support for Delta Tau PMAC. -Version: $Revision: 1.5 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:09:01 $ */ /* @@ -41,6 +38,7 @@ Last Modified: $Date: 2008-03-14 20:09:01 $ #include #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -52,7 +50,7 @@ extern int Pmac_num_cards; extern struct driver_table Pmac_access; /* ----------------Create the dsets for devOMS----------------- */ -static long Pmac_init(void *); +static long Pmac_init(int); static long Pmac_init_record(void *); static long Pmac_start_trans(struct motorRecord *); static RTN_STATUS Pmac_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -60,7 +58,7 @@ static RTN_STATUS Pmac_end_trans(struct motorRecord *); struct motor_dset devPmac = { - {8, NULL, Pmac_init, Pmac_init_record, NULL}, + {8, NULL, (DEVSUPFUN) Pmac_init, (DEVSUPFUN) Pmac_init_record, NULL}, motor_update_values, Pmac_start_trans, Pmac_build_trans, @@ -100,10 +98,8 @@ static msg_types Pmac_table[] = { static struct board_stat **Pmac_cards; static const char errmsg[] = {"\n\n!!!ERROR!!! - Oms driver uninitialized.\n"}; -static long Pmac_init(void *arg) +static long Pmac_init(int after) { - int after = (arg == 0) ? 0 : 1; - if (*(Pmac_access.init_indicator) == NO) { errlogSevPrintf(errlogMinor, "%s", errmsg); diff --git a/motorApp/DeltaTauSrc/drvPmac.cc b/motorApp/DeltaTauSrc/drvPmac.cc index 960f8b1..13a8851 100644 --- a/motorApp/DeltaTauSrc/drvPmac.cc +++ b/motorApp/DeltaTauSrc/drvPmac.cc @@ -2,9 +2,6 @@ FILENAME... drvPmac.cc USAGE... Driver level support for Delta Tau PMAC model. -Version: $Revision: 1.11 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-09-08 18:25:19 $ */ /* @@ -51,10 +48,12 @@ Last Modified: $Date: 2009-09-08 18:25:19 $ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -222,7 +221,7 @@ static int set_status(int card, int signal) status.Bits.EA_POSITION = (motorstat.word1.Bits.amp_enabled == YES) ? 1 : 0; sprintf(outbuf, "M%.2d61", (signal + 1)); // Get Commanded Position. - send_mess(card, outbuf, (char) NULL); + send_mess(card, outbuf, (char*) NULL); recv_mess(card, buff, 1); motorData = atof(buff); @@ -272,7 +271,7 @@ static int set_status(int card, int signal) status.Bits.EA_HOME = 0; sprintf(outbuf, "M%.2d62", (signal + 1)); - send_mess(card, outbuf, (char) NULL); // Get Actual Position. + send_mess(card, outbuf, (char*) NULL); // Get Actual Position. recv_mess(card, buff, 1); motorData = atof(buff); motor_info->encoder_position = (int32_t) motorData; @@ -295,7 +294,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -588,7 +587,7 @@ static int motorIsrEnable(int card) status = pdevLibVirtualOS->pDevConnectInterruptVME( PmacInterruptVector + card, -#if LT_EPICSBASE(3,14,8) +#if LT_EPICSBASE(3,14,8,0) (void (*)()) motorIsr, #else (void (*)(void *)) motorIsr, @@ -836,10 +835,10 @@ static int motor_init() count = pmotor->response[0]; } - send_mess(card_index, "TYPE", (char) NULL); + send_mess(card_index, "TYPE", (char*) NULL); recv_mess(card_index, (char *) pmotorState->ident, 1); - send_mess(card_index, "VERSION", (char) NULL); + send_mess(card_index, "VERSION", (char*) NULL); recv_mess(card_index, axis_pos, 1); strcat((char *) &pmotorState->ident, ", "); strcat((char *) &pmotorState->ident, axis_pos); @@ -852,7 +851,7 @@ static int motor_init() char outbuf[10]; sprintf(outbuf, "I%.2d00", (total_axis + 1)); - send_mess(card_index, outbuf, (char) NULL); + send_mess(card_index, outbuf, (char*) NULL); recv_mess(card_index, axis_pos, 1); if (strcmp(axis_pos, "0") == 0) errind = true; @@ -863,12 +862,12 @@ static int motor_init() // Set Ixx20=1 and Ixx21=0; control acceleration via Ixx19. sprintf(outbuf, "I%.2d20=1", (total_axis + 1)); - send_mess(card_index, outbuf, (char) NULL); + send_mess(card_index, outbuf, (char*) NULL); sprintf(outbuf, "I%.2d21=0", (total_axis + 1)); - send_mess(card_index, outbuf, (char) NULL); + send_mess(card_index, outbuf, (char*) NULL); sprintf(outbuf, "I%.2d08", (total_axis + 1)); - send_mess(card_index, outbuf, (char) NULL); + send_mess(card_index, outbuf, (char*) NULL); recv_mess(card_index, axis_pos, 1); cntrl->pos_scaleFac[total_axis] = atof(axis_pos) * 32.0; } diff --git a/motorApp/DeltaTauSrc/drvPmac.h b/motorApp/DeltaTauSrc/drvPmac.h index c314d7d..9ddb6ef 100644 --- a/motorApp/DeltaTauSrc/drvPmac.h +++ b/motorApp/DeltaTauSrc/drvPmac.h @@ -2,9 +2,6 @@ FILENAME... drvPmac.h USAGE... This file contains Delta Tau PMAC driver "include" information. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-05-01 18:26:29 $ */ /* diff --git a/motorApp/FaulhaberSrc/devMCDC2805.cc b/motorApp/FaulhaberSrc/devMCDC2805.cc index 7ad38cc..ffce31d 100644 --- a/motorApp/FaulhaberSrc/devMCDC2805.cc +++ b/motorApp/FaulhaberSrc/devMCDC2805.cc @@ -3,9 +3,6 @@ FILENAME... devMCDC2805.cc USAGE... Motor record device level support for Intelligent Motion Systems, Inc. MCDC2805 series of controllers. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:09:24 $ */ /* @@ -39,6 +36,7 @@ Last Modified: $Date: 2008-03-14 20:09:24 $ */ #include +#include #include "motorRecord.h" #include "motor.h" @@ -52,7 +50,7 @@ extern struct driver_table MCDC2805_access; /* ----------------Create the dsets for devMCDC2805----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long MCDC2805_init(void *); +STATIC long MCDC2805_init(int); STATIC long MCDC2805_init_record(void *); STATIC long MCDC2805_start_trans(struct motorRecord *); STATIC RTN_STATUS MCDC2805_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -106,12 +104,11 @@ static struct board_stat **MCDC2805_cards; /* initialize device support for MCDC2805 stepper motor */ -STATIC long MCDC2805_init(void *arg) +STATIC long MCDC2805_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &MCDC2805_access; (drvtabptr->init)(); diff --git a/motorApp/FaulhaberSrc/drvMCDC2805.cc b/motorApp/FaulhaberSrc/drvMCDC2805.cc index 00aeb34..63876c1 100644 --- a/motorApp/FaulhaberSrc/drvMCDC2805.cc +++ b/motorApp/FaulhaberSrc/drvMCDC2805.cc @@ -2,11 +2,6 @@ FILENAME... drvMCDC2805.cc USAGE... Motor record driver level support for Faulhaber MCDC2805 -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/FaulhaberSrc/drvMCDC2805.cc $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ */ /* @@ -52,6 +47,7 @@ DESIGN LIMITATIONS... #include #include #include +#include #include "motor.h" #include "drvMCDC2805.h" #include "asynOctetSyncIO.h" diff --git a/motorApp/FaulhaberSrc/drvMCDC2805.h b/motorApp/FaulhaberSrc/drvMCDC2805.h index a24dbef..9dae153 100644 --- a/motorApp/FaulhaberSrc/drvMCDC2805.h +++ b/motorApp/FaulhaberSrc/drvMCDC2805.h @@ -2,9 +2,6 @@ FILENAME... drvMCDC2805.h USAGE... This file contains driver "include" information for the Faulhaber MCDC 2805 controller. -Version: $Revision: 1.2 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2005-11-04 23:05:35 $ */ /* diff --git a/motorApp/HytecSrc/HytecMotorDriver.cpp b/motorApp/HytecSrc/HytecMotorDriver.cpp index a66da36..794d0ca 100644 --- a/motorApp/HytecSrc/HytecMotorDriver.cpp +++ b/motorApp/HytecSrc/HytecMotorDriver.cpp @@ -1067,6 +1067,9 @@ extern "C" int Hytec8601Configure(const char *portName, return(asynSuccess); } +extern "C" +{ + static const iocshArg Hy8601ConfigArg0 = {"portName", iocshArgString}; static const iocshArg Hy8601ConfigArg1 = {"numAxes", iocshArgInt}; static const iocshArg Hy8601ConfigArg2 = {"movingPollPeriod", iocshArgInt}; @@ -1110,4 +1113,4 @@ static void Hytec8601Register(void) epicsExportRegistrar(Hytec8601Register); - +} diff --git a/motorApp/HytecSrc/README_Hy8601Asyn b/motorApp/HytecSrc/README_Hy8601Asyn index e2c3962..47445d6 100644 --- a/motorApp/HytecSrc/README_Hy8601Asyn +++ b/motorApp/HytecSrc/README_Hy8601Asyn @@ -37,53 +37,53 @@ Support modules Hytec 8002/8003/8004 carrier card configuration =============================================== - -This board is a 6U VME64x carrier card. It provides four single size IP slots and -is configurable for many parameters. It supports interrupt level from 0 to 7. Any -IP cards can be enabled/disabled interrupt. The clock can be set to either 8MHz or -32MHz. For IPAC Memory space if required, the base address can be defined automatically -by geographical addressing when VME64x crate is used. For other type of crates, -the base address can be set by configuring a series of jumpers on the board or by -passing parameter to the memory offset register in the ipacAddCarrier call. - -The IPAC Carrier Driver for this board is found in the file drvHy8002.c which -implements two commands ipacAddHy8002 and Hy8002CarrierInfo. The ipacAddHy8002 -command is used to add a Hytec 8002/8003 board to the system. The Hy8002CarrierInfo -reports hardware information for a specified board or all boards in the system if -the parameter passed down is 0xFFFF. These commands are registered by the registrar -routine Hy8002Registrar to add them to the iocsh and link the driver into a final -IOC executable, for which it must be listed in the IOC's .dbd file thus: - - registrar(Hy8002Registrar) - - + +This board is a 6U VME64x carrier card. It provides four single size IP slots and +is configurable for many parameters. It supports interrupt level from 0 to 7. Any +IP cards can be enabled/disabled interrupt. The clock can be set to either 8MHz or +32MHz. For IPAC Memory space if required, the base address can be defined automatically +by geographical addressing when VME64x crate is used. For other type of crates, +the base address can be set by configuring a series of jumpers on the board or by +passing parameter to the memory offset register in the ipacAddCarrier call. + +The IPAC Carrier Driver for this board is found in the file drvHy8002.c which +implements two commands ipacAddHy8002 and Hy8002CarrierInfo. The ipacAddHy8002 +command is used to add a Hytec 8002/8003 board to the system. The Hy8002CarrierInfo +reports hardware information for a specified board or all boards in the system if +the parameter passed down is 0xFFFF. These commands are registered by the registrar +routine Hy8002Registrar to add them to the iocsh and link the driver into a final +IOC executable, for which it must be listed in the IOC's .dbd file thus: + + registrar(Hy8002Registrar) + + 1). Configuration Command and Parameter --------------------------------------- - -- int ipacAddHYy8002(const char *cardParams); - -The parameter string should comprise two (2) to six (6) parameters which are comma -separated. The first two are mandate and have to be separated only by one comma. +-------------------------------------- + +- int ipacAddHYy8002(const char *cardParams); + +The parameter string should comprise two (2) to six (6) parameters which are comma +separated. The first two are mandate and have to be separated only by one comma. The others are key/value pairs and are optional as per the conditions of the operating -system used. The format is defined as - -s,i,IPMEM=d,IPCLCK=d,ROAK=d,MEMOFFS=d - -where d is a decimal integer number. +system used. The format is defined as + +s,i,IPMEM=d,IPCLCK=d,ROAK=d,MEMOFFS=d + +where d is a decimal integer number. s defines the VME slot number of the carrier card. Valid number is 2 ~ 21. this number MUST be the same as the VME slot number where the carrier - card is plugged in. -i defines the interrupt level. Valid number is 0 ~ 7. -IPMEM=d defines the maximum memory size of the IP module. The valid values are 1, 2, + card is plugged in. +i defines the interrupt level. Valid number is 0 ~ 7. +IPMEM=d defines the maximum memory size of the IP module. The valid values are 1, 2, 4 or 8 that represent 1MB, 2MB, 4MB or 8MB respectively. Default is 1. For majority Hytec ADCs, DACs such as 8401, 8414, 8417, 8402 and 8415 etc, they all have 2MB on board. The user can choose to use either 1MB or 2MB. None of - the Hytec IPs has more than 2MB on board memory. Other vendors might have. -IPCLCK=d defines the clock that its value has to be either 8 for 8MHz or 32 for - 32Mhz. Default is 8. -ROAK=d if d =1, it defines carrier card to release the interrupt upon the - acknowledgment. If d=0, the interrupt is released by user interrupt - service routine. Default is 0. + the Hytec IPs has more than 2MB on board memory. Other vendors might have. +IPCLCK=d defines the clock that its value has to be either 8 for 8MHz or 32 for + 32Mhz. Default is 8. +ROAK=d if d =1, it defines carrier card to release the interrupt upon the + acknowledgment. If d=0, the interrupt is released by user interrupt + service routine. Default is 0. MEMOFFS=d this parameter defines the A32 memory access base address. "d" is a decimal number that represents the offset (the upper WORD) of the A32 base address. It is needed when any of the two statements below is true: @@ -150,15 +150,15 @@ the VME slot number in the calculation just makes better logical sense and fits natual of human being's thinking. Some examples are shown below. Let's assume IPMEM=1 (the default setting), this gives 4MB memory space for a 8002 -carrier so starting address line is A22. The remaining must be 0. - +carrier so starting address line is A22. The remaining must be 0. + MEMOFFS BIT 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 A31 A30 A29 A28 A27 A26 A25 A24 A23 A22 0 0 0 0 0 0 For a carrier in VME slot 2, we can define its A32 base address as 0x00400000, plus VME_A32_MSTR_LOCAL. For VME slot 3, it could be 0x00800000 plus VME_A32_MSTR_LOCAL -and for VME slot 4, it could be 0x00C00000 plus VME_A32_MSTR_LOCAL and so forth. - +and for VME slot 4, it could be 0x00C00000 plus VME_A32_MSTR_LOCAL and so forth. + Assuming VME_A32_MSTR_LOCAL is 0x20000000, then for VME slot 4, the calculated base address should be 0x00C00000 + 0x20000000 = 0x20C000000. Hence the MEMOFFS = 8384 (decimal, i.e. 0x20C0). For slot 5, the derived base address could be 0x01000000 + @@ -180,45 +180,45 @@ base address should be 0x01800000 + 0x20000000 = 0x218000000. Hence the MEMOFFS (decimal, i.e. 0x2180). For slot 5, the derived base address could be 0x02000000 + 0x20000000 = 0x22000000. Hence the MEMOFFS = 8704 (decimal, i.e. 0x2200) and so forth. - - -- int Hy8002CarrierInfo(int carrier); - -where 'carrier' is the registered carrier number in the system. If it is specified, -this function prints out the specified carrier hardware information. If carrier = 0xFFFF, -then all carriers' hardware information will be printed out. - - + + +- int Hy8002CarrierInfo(int carrier); + +where 'carrier' is the registered carrier number in the system. If it is specified, +this function prints out the specified carrier hardware information. If carrier = 0xFFFF, +then all carriers' hardware information will be printed out. + + 2). Configuration Examples -------------------------- - -ipacAddHy8002("3,2") - -This indicates that the carrier is in slot 3 and the interrupt level is set to 2. -IP memory uses default 1MB. Clock uses default 8MHz. RORA as default. use geographical -addressing etc. - -ipacAddHy8002("5,4,IPMEM=1,IPCLCK=8,ROAK=1,MEMOFFS=256 ") - -Here the slot is 5, interrupt level is 4. IP memory size is 1MB, clock uses 8MHz. -Use ROAK but not using geographic addressing. The memory offset is 256 which means its -base address is 0x01000000 assuming the VME_A32_MSTR_LOCAL is set to 0x00000000. - +------------------------- + +ipacAddHy8002("3,2") + +This indicates that the carrier is in slot 3 and the interrupt level is set to 2. +IP memory uses default 1MB. Clock uses default 8MHz. RORA as default. use geographical +addressing etc. + +ipacAddHy8002("5,4,IPMEM=1,IPCLCK=8,ROAK=1,MEMOFFS=256 ") + +Here the slot is 5, interrupt level is 4. IP memory size is 1MB, clock uses 8MHz. +Use ROAK but not using geographic addressing. The memory offset is 256 which means its +base address is 0x01000000 assuming the VME_A32_MSTR_LOCAL is set to 0x00000000. + 3). Interrupt Commands Supported -------------------------------- - -The interrupt level can be set by the second parameter of the ipacAddHy8002 routine. -Individual IP module can be set to generate interrupt or not. The commands supported -for ipmIrqCmd are illustrated below. - -cmd Value Returned -ipac_irqGetLevel Carrier interrupt level (0 ~ 7) -ipac_irqEnable 0 = OK -ipac_irqDisable 0 = OK -ipac_irqPoll >0 if the interrupt line is active, else 0 -(other commands) S_IPAC_notImplemented - - +------------------------------- + +The interrupt level can be set by the second parameter of the ipacAddHy8002 routine. +Individual IP module can be set to generate interrupt or not. The commands supported +for ipmIrqCmd are illustrated below. + +cmd Value Returned +ipac_irqGetLevel Carrier interrupt level (0 ~ 7) +ipac_irqEnable 0 = OK +ipac_irqDisable 0 = OK +ipac_irqPoll >0 if the interrupt line is active, else 0 +(other commands) S_IPAC_notImplemented + + Hy8601 IP Asyn Driver Usage ============================ @@ -507,4 +507,4 @@ The following example is for an IOC that uses RTEMS R4.9.4, MVME5500 processor b - + diff --git a/motorApp/ImsSrc/ImsMDrivePlusMotorAxis.cpp b/motorApp/ImsSrc/ImsMDrivePlusMotorAxis.cpp index 72ee756..7d9e821 100644 --- a/motorApp/ImsSrc/ImsMDrivePlusMotorAxis.cpp +++ b/motorApp/ImsSrc/ImsMDrivePlusMotorAxis.cpp @@ -3,8 +3,9 @@ //! MDrivePlus series; M17, M23, M34. //! Use "model 3" asyn motor, asynMotorController and asynMotorAxis classes. //! -//! Author : Nia Fong +//! Original Author : Nia Fong //! Date : 11-21-2011 +//! Current Author : Mitch D'Ewart (SLAC) // // Revision History // ---------------- diff --git a/motorApp/ImsSrc/ImsMDrivePlusMotorController.cpp b/motorApp/ImsSrc/ImsMDrivePlusMotorController.cpp index ecee321..440529e 100644 --- a/motorApp/ImsSrc/ImsMDrivePlusMotorController.cpp +++ b/motorApp/ImsSrc/ImsMDrivePlusMotorController.cpp @@ -3,8 +3,9 @@ //! MDrivePlus series; M17, M23, M34. //! Simple implementation using "model 3" asynMotorController and asynMotorAxis base classes (derived from asynPortDriver) //! -//! Author : Nia Fong +//! Original Author : Nia Fong //! Date : 11-21-2011 +//! Current Author : Mitch D'Ewart (SLAC) //! //! Assumptions : //! 1) Like all controllers, the MDrivePlus must be powered-on when EPICS is first booted up. @@ -62,7 +63,7 @@ ImsMDrivePlusMotorController::ImsMDrivePlusMotorController(const char *motorPort pAxes_ = (ImsMDrivePlusMotorAxis **)(asynMotorController::pAxes_); // copy names - strcpy(motorName, motorPortName); + strncpy(motorName, motorPortName, (MAX_NAME_LEN - 1)); // setup communication status = pasynOctetSyncIO->connect(IOPortName, 0, &pAsynUserIMS, NULL); @@ -110,7 +111,7 @@ ImsMDrivePlusMotorController::ImsMDrivePlusMotorController(const char *motorPort //////////////////////////////////////// void ImsMDrivePlusMotorController::initController(const char *devName, double movingPollPeriod, double idlePollPeriod) { - strcpy(this->deviceName, devName); + strncpy(this->deviceName, devName, (MAX_NAME_LEN - 1)); // initialize asynMotorController variables this->numAxes_ = NUM_AXES; // only support single axis diff --git a/motorApp/ImsSrc/ImsRegister.cc b/motorApp/ImsSrc/ImsRegister.cc index 8322ef2..15298d7 100644 --- a/motorApp/ImsSrc/ImsRegister.cc +++ b/motorApp/ImsSrc/ImsRegister.cc @@ -2,9 +2,6 @@ FILENAME... ImsRegister.cc USAGE... Register IMS motor device driver shell commands. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:10:15 $ */ /***************************************************************** diff --git a/motorApp/ImsSrc/devIM483PL.cc b/motorApp/ImsSrc/devIM483PL.cc index 6135d69..ca9ce84 100644 --- a/motorApp/ImsSrc/devIM483PL.cc +++ b/motorApp/ImsSrc/devIM483PL.cc @@ -3,10 +3,6 @@ FILENAME... devIM483PL.cc USAGE... Motor record device level support for Intelligent Motion Systems, Inc. IM483(I/IE). -Version: $Revision: 16590 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-06-17 09:20:08 -0500 (Mon, 17 Jun 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/ImsSrc/devIM483PL.cc $ */ /* @@ -45,6 +41,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motor */ #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -57,7 +54,7 @@ extern struct driver_table IM483PL_access; /* ----------------Create the dsets for devIM483PL----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long IM483PL_init(void *); +STATIC long IM483PL_init(int); STATIC long IM483PL_init_record(void *); STATIC long IM483PL_start_trans(struct motorRecord *); STATIC RTN_STATUS IM483PL_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -111,12 +108,11 @@ static struct board_stat **IM483PL_cards; /* initialize device support for IM483PL stepper motor */ -STATIC long IM483PL_init(void *arg) +STATIC long IM483PL_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &IM483PL_access; (drvtabptr->init)(); diff --git a/motorApp/ImsSrc/devIM483SM.cc b/motorApp/ImsSrc/devIM483SM.cc index ea60923..b4321e0 100644 --- a/motorApp/ImsSrc/devIM483SM.cc +++ b/motorApp/ImsSrc/devIM483SM.cc @@ -3,10 +3,6 @@ FILENAME... devIM483SM.cc USAGE... Motor record device level support for Intelligent Motion Systems, Inc. IM483(I/IE). -Version: $Revision: 16590 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-06-17 09:20:08 -0500 (Mon, 17 Jun 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/ImsSrc/devIM483SM.cc $ */ /* @@ -45,6 +41,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motor */ #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -57,7 +54,7 @@ extern struct driver_table IM483SM_access; /* ----------------Create the dsets for devIM483SM----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long IM483SM_init(void *); +STATIC long IM483SM_init(int); STATIC long IM483SM_init_record(void *); STATIC long IM483SM_start_trans(struct motorRecord *); STATIC RTN_STATUS IM483SM_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -111,12 +108,11 @@ static struct board_stat **IM483SM_cards; /* initialize device support for IM483SM stepper motor */ -STATIC long IM483SM_init(void *arg) +STATIC long IM483SM_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &IM483SM_access; (drvtabptr->init)(); diff --git a/motorApp/ImsSrc/devMDrive.cc b/motorApp/ImsSrc/devMDrive.cc index 5178229..633a371 100644 --- a/motorApp/ImsSrc/devMDrive.cc +++ b/motorApp/ImsSrc/devMDrive.cc @@ -3,10 +3,6 @@ FILENAME... devMDrive.cc USAGE... Motor record device level support for Intelligent Motion Systems, Inc. MDrive series of controllers. -Version: $Revision: 16590 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-06-17 09:20:08 -0500 (Mon, 17 Jun 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/ImsSrc/devMDrive.cc $ */ /* @@ -47,6 +43,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motor */ #include +#include #include "motorRecord.h" #include "motor.h" @@ -60,7 +57,7 @@ extern struct driver_table MDrive_access; /* ----------------Create the dsets for devMDrive----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long MDrive_init(void *); +STATIC long MDrive_init(int); STATIC long MDrive_init_record(void *); STATIC long MDrive_start_trans(struct motorRecord *); STATIC RTN_STATUS MDrive_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -114,12 +111,11 @@ static struct board_stat **MDrive_cards; /* initialize device support for MDrive stepper motor */ -STATIC long MDrive_init(void *arg) +STATIC long MDrive_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &MDrive_access; (drvtabptr->init)(); diff --git a/motorApp/ImsSrc/drvIM483.h b/motorApp/ImsSrc/drvIM483.h index c838113..f971c56 100644 --- a/motorApp/ImsSrc/drvIM483.h +++ b/motorApp/ImsSrc/drvIM483.h @@ -3,10 +3,6 @@ FILENAME... drvIM483.h USAGE... This file contains driver "include" information that is specific to Intelligent Motion Systems, Inc. IM483(I/IE) and MDrive controllers. -Version: $Revision: 16590 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-06-17 09:20:08 -0500 (Mon, 17 Jun 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/ImsSrc/drvIM483.h $ */ /* diff --git a/motorApp/ImsSrc/drvIM483PL.cc b/motorApp/ImsSrc/drvIM483PL.cc index 64b6745..c503ae6 100644 --- a/motorApp/ImsSrc/drvIM483PL.cc +++ b/motorApp/ImsSrc/drvIM483PL.cc @@ -3,10 +3,6 @@ FILENAME... drvIM483PL.cc USAGE... Motor record driver level support for Intelligent Motion Systems, Inc. IM483(I/IE). -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/ImsSrc/drvIM483PL.cc $ */ /***************************************************************** @@ -60,6 +56,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motor.h" #include "drvIM483.h" #include "asynOctetSyncIO.h" diff --git a/motorApp/ImsSrc/drvIM483SM.cc b/motorApp/ImsSrc/drvIM483SM.cc index 30e329f..5d0157e 100644 --- a/motorApp/ImsSrc/drvIM483SM.cc +++ b/motorApp/ImsSrc/drvIM483SM.cc @@ -3,10 +3,6 @@ FILENAME... drvIM483SM.cc USAGE... Motor record driver level support for Intelligent Motion Systems, Inc. IM483(I/IE). -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/ImsSrc/drvIM483SM.cc $ */ /***************************************************************** @@ -59,6 +55,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motor.h" #include "drvIM483.h" #include "asynOctetSyncIO.h" @@ -240,7 +238,7 @@ static int set_status(int card, int signal) nodeptr = motor_info->motor_motion; status.All = motor_info->status.All; - send_mess(card, "^", (char) NULL); + send_mess(card, "^", (char*) NULL); rtn_state = recv_mess(card, buff, 1); if (rtn_state > 0) { @@ -275,7 +273,7 @@ static int set_status(int card, int signal) * Skip to substring for this motor, convert to double */ - send_mess(card, "Z 0", (char) NULL); + send_mess(card, "Z 0", (char*) NULL); recv_mess(card, buff, 1); motorData = atof(&buff[5]); @@ -297,7 +295,7 @@ static int set_status(int card, int signal) plusdir = (status.Bits.RA_DIRECTION) ? true : false; - send_mess(card, "] 0", (char) NULL); + send_mess(card, "] 0", (char*) NULL); recv_mess(card, buff, 1); rtnval = atoi(&buff[5]); @@ -320,7 +318,7 @@ static int set_status(int card, int signal) else status.Bits.RA_MINUS_LS = 0; - send_mess(card, "] 1", (char) NULL); + send_mess(card, "] 1", (char*) NULL); recv_mess(card, buff, 1); rtnval = buff[5]; @@ -338,7 +336,7 @@ static int set_status(int card, int signal) motor_info->encoder_position = 0; else { - send_mess(card, "z 0", (char) NULL); + send_mess(card, "z 0", (char*) NULL); recv_mess(card, buff, 1); motorData = atof(&buff[5]); motor_info->encoder_position = (epicsInt32) motorData; @@ -361,7 +359,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -553,9 +551,9 @@ static int motor_init() /* flush any junk at input port - should not be any data available */ pasynOctetSyncIO->flush(cntrl->pasynUser); - send_mess(card_index, "\003", (char) NULL); /* Reset device. */ + send_mess(card_index, "\003", (char*) NULL); /* Reset device. */ epicsThreadSleep(1.0); - send_mess(card_index, " ", (char) NULL); + send_mess(card_index, " ", (char*) NULL); /* Save controller identification message. */ src = buff; diff --git a/motorApp/ImsSrc/drvMDrive.cc b/motorApp/ImsSrc/drvMDrive.cc index 93e1a1d..22ceabc 100644 --- a/motorApp/ImsSrc/drvMDrive.cc +++ b/motorApp/ImsSrc/drvMDrive.cc @@ -3,10 +3,6 @@ FILENAME... drvMDrive.cc USAGE... Motor record driver level support for Intelligent Motion Systems, Inc. MDrive series; M17, M23, M34. -Version: $Revision: 16385 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-04-24 11:01:47 -0500 (Wed, 24 Apr 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/ImsSrc/drvMDrive.cc $ */ /* @@ -80,6 +76,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motor.h" #include "drvIM483.h" #include "asynOctetSyncIO.h" diff --git a/motorApp/KohzuSrc/devSC800.cc b/motorApp/KohzuSrc/devSC800.cc index 9a2317e..4ca47bb 100644 --- a/motorApp/KohzuSrc/devSC800.cc +++ b/motorApp/KohzuSrc/devSC800.cc @@ -2,10 +2,6 @@ FILENAME... devSC800.cc USAGE... Motor record device level support for Kohzu SC800 motor controller. -Version: $Revision: 9857 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-12-09 10:21:24 -0600 (Wed, 09 Dec 2009) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/KohzuSrc/devSC800.cc $ */ @@ -42,6 +38,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -52,7 +50,7 @@ extern struct driver_table SC800_access; /* ----------------Create the dsets for devSC800----------------- */ static struct driver_table *drvtabptr; -static long SC800_init(void *); +static long SC800_init(int); static long SC800_init_record(void *); static long SC800_start_trans(struct motorRecord *); static RTN_STATUS SC800_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -110,12 +108,11 @@ static struct board_stat **SC800_cards; /* initialize device support for SC800 stepper motor */ -static long SC800_init(void *arg) +static long SC800_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &SC800_access; (drvtabptr->init)(); diff --git a/motorApp/KohzuSrc/drvSC800.cc b/motorApp/KohzuSrc/drvSC800.cc index c61e88c..74999a7 100644 --- a/motorApp/KohzuSrc/drvSC800.cc +++ b/motorApp/KohzuSrc/drvSC800.cc @@ -2,10 +2,6 @@ FILENAME... drvSC800.cc USAGE... Motor record driver level support for Kohzu SC800 -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/KohzuSrc/drvSC800.cc $ */ @@ -49,6 +45,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "motorRecord.h" #include "drvSC800.h" @@ -223,7 +221,7 @@ static int set_status(int card, int signal) charcnt = recv_mess(card, buff, FLUSH); sprintf(buff,"STR1/%d",(signal + 1)); - send_mess(card, buff, (char) NULL); /* Tell Status */ + send_mess(card, buff, (char*) NULL); /* Tell Status */ charcnt = recv_mess(card, buff, 1); convert_cnt = sscanf(buff, "C\tSTR%d\t1\t%d\t%d\t%d\t%d\t%d\t%d\t%d", &str_axis, &str_move, &str_norg, &str_orgg, @@ -258,7 +256,7 @@ static int set_status(int card, int signal) /* Parse motor position */ sprintf(buff,"RDP%d/0", (signal + 1)); - send_mess(card, buff, (char) NULL); /* Tell Position */ + send_mess(card, buff, (char*) NULL); /* Tell Position */ recv_mess(card, buff, 1); convert_cnt = sscanf(buff, "C\tRDP%d\t%d", &str_axis, &motorData); @@ -287,7 +285,7 @@ static int set_status(int card, int signal) /* Torque enabled? */ sprintf(buff,"RSY%d/21", (signal + 1)); - send_mess(card, buff, (char) NULL); /* Tell Position */ + send_mess(card, buff, (char*) NULL); /* Tell Position */ recv_mess(card, buff, 1); convert_cnt = sscanf(buff, "C\tRSY%d\t21\t%d", &str_axis, &str_move); status.Bits.EA_POSITION = (str_move == 0) ? 1 : 0; @@ -329,7 +327,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } diff --git a/motorApp/KohzuSrc/drvSC800.h b/motorApp/KohzuSrc/drvSC800.h index 4712cef..4089814 100644 --- a/motorApp/KohzuSrc/drvSC800.h +++ b/motorApp/KohzuSrc/drvSC800.h @@ -2,10 +2,6 @@ FILENAME... drvSC800.h USAGE... This file contains Kohzu SC800 motorRecord driver information. -Version: $Revision: 9857 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-12-09 10:21:24 -0600 (Wed, 09 Dec 2009) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/KohzuSrc/drvSC800.h $ */ /* diff --git a/motorApp/MXmotorSrc/MXRegister.cc b/motorApp/MXmotorSrc/MXRegister.cc index 84f2260..53b50de 100644 --- a/motorApp/MXmotorSrc/MXRegister.cc +++ b/motorApp/MXmotorSrc/MXRegister.cc @@ -2,9 +2,6 @@ FILENAME... MXRegister.cc USAGE... Register MX motor device driver shell commands. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-05-28 14:33:57 $ */ /***************************************************************** diff --git a/motorApp/MXmotorSrc/MXmotor.h b/motorApp/MXmotorSrc/MXmotor.h index 7a5402c..a4edd68 100644 --- a/motorApp/MXmotorSrc/MXmotor.h +++ b/motorApp/MXmotorSrc/MXmotor.h @@ -3,9 +3,6 @@ FILENAME... MXmotor.h USAGE... This file contains "include" information that is specific to MX motor device driver support. -Version: $Revision: 1.1 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2003-02-14 15:15:27 $ */ /* diff --git a/motorApp/MXmotorSrc/devMXmotor.cc b/motorApp/MXmotorSrc/devMXmotor.cc index de5fa0a..9f85208 100644 --- a/motorApp/MXmotorSrc/devMXmotor.cc +++ b/motorApp/MXmotorSrc/devMXmotor.cc @@ -2,9 +2,6 @@ FILENAME... devMXmotor.cc USAGE... Motor record device level support for MX device driver. -Version: $Revision: 1.6 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:12:06 $ */ /* @@ -39,7 +36,7 @@ extern int MXmotor_num_cards; extern struct driver_table MXmotor_access; /* ----------------Create the dsets for devMXmotor----------------- */ -static long MXmotor_init(void *); +static long MXmotor_init(int); static long MXmotor_init_record(void *); static long MXmotor_start_trans(struct motorRecord *); static RTN_STATUS MXmotor_build(motor_cmnd, double *, struct motorRecord *); @@ -89,17 +86,15 @@ static struct board_stat **MXmotor_cards; static const char errmsg[] = {"\n\n!!!ERROR!!! - MX driver uninitialized.\n"}; /* initialize device support for MX motor */ -static long MXmotor_init(void *after) +static long MXmotor_init(int after) { - int before_after = (after == 0) ? 0 : 1; - if (*(MXmotor_access.init_indicator) == NO) { errlogSevPrintf(errlogMinor, "%s", errmsg); return(ERROR); } else - return(motor_init_com(before_after, MXmotor_num_cards, &MXmotor_access, + return(motor_init_com(after, MXmotor_num_cards, &MXmotor_access, &MXmotor_cards)); } diff --git a/motorApp/MXmotorSrc/drvMXmotor.cc b/motorApp/MXmotorSrc/drvMXmotor.cc index f004e1e..342e58f 100644 --- a/motorApp/MXmotorSrc/drvMXmotor.cc +++ b/motorApp/MXmotorSrc/drvMXmotor.cc @@ -2,10 +2,6 @@ FILENAME... drvMXmotor.cc USAGE... Motor record driver level support for MX device driver. -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MXmotorSrc/drvMXmotor.cc $ */ /* diff --git a/motorApp/Makefile b/motorApp/Makefile index 9f89a65..d3275a0 100644 --- a/motorApp/Makefile +++ b/motorApp/Makefile @@ -84,8 +84,11 @@ AttocubeSrc_DEPEND_DIRS = MotorSrc DIRS += AerotechSrc AerotechSrc_DEPEND_DIRS = MotorSrc +# The Hytec support requires ipac +ifdef IPAC DIRS += HytecSrc HytecSrc_DEPEND_DIRS = MotorSrc +endif DIRS += ACRSrc ACRSrc_DEPEND_DIRS = MotorSrc @@ -102,6 +105,15 @@ MicronixSrc_DEPEND_DIRS = MotorSrc DIRS += PhytronSrc PhytronSrc_DEPEND_DIRS = MotorSrc +DIRS += AMCISrc +AMCISrc_DEPEND_DIRS = MotorSrc + +# The Script motor support requires the lua scripting module +ifdef LUA +DIRS += ScriptMotorSrc +ScriptMotorSrc_DEPEND_DIRS = MotorSrc +endif + endif # Install the edl files diff --git a/motorApp/MclennanSrc/MclennanRegister.cc b/motorApp/MclennanSrc/MclennanRegister.cc index 1563bdf..225d586 100644 --- a/motorApp/MclennanSrc/MclennanRegister.cc +++ b/motorApp/MclennanSrc/MclennanRegister.cc @@ -2,9 +2,6 @@ FILENAME... MclennanRegister.cc USAGE... Register Mclennan motor device driver shell commands. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:17:22 $ */ /***************************************************************** diff --git a/motorApp/MclennanSrc/devPM304.cc b/motorApp/MclennanSrc/devPM304.cc index 2cfb2e5..320d125 100644 --- a/motorApp/MclennanSrc/devPM304.cc +++ b/motorApp/MclennanSrc/devPM304.cc @@ -61,7 +61,7 @@ static inline void Debug(int level, const char *format, ...) { /* ----------------Create the dsets for devPM304----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long PM304_init(void *); +STATIC long PM304_init(int); STATIC long PM304_init_record(void *); STATIC long PM304_start_trans(struct motorRecord *); STATIC RTN_STATUS PM304_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -113,12 +113,11 @@ static struct board_stat **PM304_cards; /* initialize device support for PM304 stepper motor */ -STATIC long PM304_init(void *arg) +STATIC long PM304_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PM304_access; (drvtabptr->init)(); diff --git a/motorApp/MclennanSrc/drvPM304.cc b/motorApp/MclennanSrc/drvPM304.cc index 273992c..29d1350 100644 --- a/motorApp/MclennanSrc/drvPM304.cc +++ b/motorApp/MclennanSrc/drvPM304.cc @@ -36,6 +36,8 @@ #include #include #include +#include +#include #include "motor.h" #include "drvPM304.h" #include "asynOctetSyncIO.h" @@ -331,7 +333,7 @@ STATIC int set_status(int card, int signal) { strcpy(buff, nodeptr->postmsgptr); strcat(buff, "\r"); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } diff --git a/motorApp/MicosSrc/MicosRegister.cc b/motorApp/MicosSrc/MicosRegister.cc index 798ac68..8821555 100644 --- a/motorApp/MicosSrc/MicosRegister.cc +++ b/motorApp/MicosSrc/MicosRegister.cc @@ -2,9 +2,6 @@ FILENAME... MicosRegister.cc USAGE... Register Micos MoCo dc motor controller device driver shell commands. -Version: $Revision: 1.2 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:22:58 $ */ /***************************************************************** diff --git a/motorApp/MicosSrc/devMicos.cc b/motorApp/MicosSrc/devMicos.cc index d57f70e..c075d96 100644 --- a/motorApp/MicosSrc/devMicos.cc +++ b/motorApp/MicosSrc/devMicos.cc @@ -46,7 +46,7 @@ extern struct driver_table Micos_access; /* ----------------Create the dsets for devMicos----------------- */ static struct driver_table *drvtabptr; -static long Micos_init(void *); +static long Micos_init(int); static long Micos_init_record(void *); static long Micos_start_trans(struct motorRecord *); static RTN_STATUS Micos_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -97,13 +97,12 @@ static struct board_stat **Micos_cards; /* initialize device support for Micos DC motor */ -static long Micos_init(void *arg) +static long Micos_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; Debug(5, "Micos_init: entry\n"); - if (after == 0) + if (!after) { drvtabptr = &Micos_access; (drvtabptr->init)(); diff --git a/motorApp/MicosSrc/drvMicos.cc b/motorApp/MicosSrc/drvMicos.cc index 04c0c98..c6e7b2d 100644 --- a/motorApp/MicosSrc/drvMicos.cc +++ b/motorApp/MicosSrc/drvMicos.cc @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include "motor.h" #include "drvMicos.h" #include "epicsExport.h" @@ -284,7 +286,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); /* The Micos will not send back a response for a 'set' command, don't need next line */ /* recv_mess(card, buff, WAIT); */ nodeptr->postmsgptr = NULL; diff --git a/motorApp/MicroMoSrc/MicroMoRegister.cc b/motorApp/MicroMoSrc/MicroMoRegister.cc index 99eee9f..00fb5a9 100644 --- a/motorApp/MicroMoSrc/MicroMoRegister.cc +++ b/motorApp/MicroMoSrc/MicroMoRegister.cc @@ -3,9 +3,6 @@ FILENAME... MicroMoRegister.cc USAGE... Register MicroMo MVP 2001 B02 motor controller device driver shell commands. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:25:09 $ */ /***************************************************************** diff --git a/motorApp/MicroMoSrc/devMVP2001.cc b/motorApp/MicroMoSrc/devMVP2001.cc index 43cc4de..0c7959d 100644 --- a/motorApp/MicroMoSrc/devMVP2001.cc +++ b/motorApp/MicroMoSrc/devMVP2001.cc @@ -3,9 +3,6 @@ FILENAME... devMVP2001.cc USAGE... Motor record device level support for MicroMo MVP 2001 B02 (Linear, RS-485). -Version: $Revision: 1.4 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-06-06 17:16:51 $ */ /* @@ -92,6 +89,8 @@ Last Modified: $Date: 2008-06-06 17:16:51 $ #include #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -105,7 +104,7 @@ extern struct driver_table MVP2001_access; /* ----------------Create the dsets for devMVP2001----------------- */ static struct driver_table *drvtabptr; -static long MVP2001_init(void *); +static long MVP2001_init(int); static long MVP2001_init_record(void *); static long MVP2001_start_trans(struct motorRecord *); static RTN_STATUS MVP2001_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -159,10 +158,9 @@ static struct board_stat **MVP2001_cards; /* initialize device support for MVP2001 DC motor */ -static long MVP2001_init(void *arg) +static long MVP2001_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; drvtabptr = &MVP2001_access; rtnval = motor_init_com(after, *drvtabptr->cardcnt_ptr, drvtabptr, &MVP2001_cards); diff --git a/motorApp/MicroMoSrc/drvMVP2001.cc b/motorApp/MicroMoSrc/drvMVP2001.cc index 7566039..233cbb7 100644 --- a/motorApp/MicroMoSrc/drvMVP2001.cc +++ b/motorApp/MicroMoSrc/drvMVP2001.cc @@ -3,9 +3,6 @@ FILENAME... drvMVP2001.cc USAGE... Motor record driver level support for MicroMo MVP 2001 B02 (Linear, RS-485). -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ */ /* @@ -128,6 +125,8 @@ MORE DESIGN LIMITATIONS #include #include #include +#include +#include #include "motor.h" #include "drvMVP2001.h" #include "epicsExport.h" @@ -307,7 +306,7 @@ static int set_status(int card, int signal) statusStr[0] = positionStr[0] = buff[0] = '\0'; sprintf(buff, "%d ST", (signal + 1)); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); rtn_state = recv_mess(card, buff, 1); if (rtn_state > 0) { @@ -343,7 +342,7 @@ static int set_status(int card, int signal) status.Bits.RA_DONE = !mstat.Bits.inMotion; sprintf(buff, "%d POS", (signal + 1)); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); recv_mess(card, buff, 1); /* @@ -434,7 +433,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -645,7 +644,7 @@ static int motor_init() do { sprintf(buff, "%d ST", (total_axis + 1)); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); status = recv_mess(card_index, buff, 1); retry++; } while (status <= 0 && retry < 3); @@ -667,11 +666,11 @@ static int motor_init() /* stop and initialize the controller */ sprintf(buff, "%d V 0", (motor_index + 1)); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); sprintf(buff, "%d HO", (motor_index + 1)); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); sprintf(buff, "%d EN", (motor_index + 1)); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); motor_info->status.All = 0; motor_info->no_motion_count = 0; @@ -690,7 +689,7 @@ static int motor_init() limitStr[0] = '\0'; /* Determine low limit */ sprintf(buff, "%d LL -", (motor_index + 1)); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); strncat(limitStr, &buff[5], 8); motor_info->low_limit = (epicsInt32) strtoul(limitStr, NULL, 16); @@ -698,7 +697,7 @@ static int motor_init() limitStr[0] = '\0'; /* Determine high limit */ sprintf(buff, "%d LL", (motor_index + 1)); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); strncat(limitStr, &buff[5], 8); motor_info->high_limit = (epicsInt32) strtoul(limitStr, NULL, 16); @@ -716,7 +715,7 @@ static int motor_init() epicsThreadSleep(0.2); sprintf(buff, "%d HO", (motor_index + 1)); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); set_status(card_index, motor_index); /* Read status of each * motor */ diff --git a/motorApp/MicroMoSrc/drvMVP2001.h b/motorApp/MicroMoSrc/drvMVP2001.h index 3520731..610880c 100644 --- a/motorApp/MicroMoSrc/drvMVP2001.h +++ b/motorApp/MicroMoSrc/drvMVP2001.h @@ -3,9 +3,6 @@ FILENAME... drvMVP2001.h USAGE... This file contains driver "include" information that is specific to the MicroMo MVP 2001 B02 (Linear, RS-485). -Version: $Revision: 1.5 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2004-08-17 21:29:32 $ */ /* diff --git a/motorApp/MicronixSrc/MMC200Driver.cpp b/motorApp/MicronixSrc/MMC200Driver.cpp index d91a5f3..00bd317 100644 --- a/motorApp/MicronixSrc/MMC200Driver.cpp +++ b/motorApp/MicronixSrc/MMC200Driver.cpp @@ -136,6 +136,9 @@ MMC200Axis::MMC200Axis(MMC200Controller *pC, int axisNo) // controller axes are numbered from 1 axisIndex_ = axisNo + 1; + // Flush I/O in case there is lingering garbage + pC_->writeReadController(); + // Read the version string to determine controller model (200/100) sprintf(pC_->outString_, "%dVER?", axisIndex_); status = pC_->writeReadController(); diff --git a/motorApp/MotorSimSrc/devMotorSim.c b/motorApp/MotorSimSrc/devMotorSim.c index 1555241..f8889e3 100644 --- a/motorApp/MotorSimSrc/devMotorSim.c +++ b/motorApp/MotorSimSrc/devMotorSim.c @@ -6,6 +6,9 @@ #include #include +/* The following is needed to compile against Base R3.16.1 without a warning */ +#define USE_TYPED_RSET + #include "epicsFindSymbol.h" #include "dbAccess.h" #include "recGbl.h" diff --git a/motorApp/MotorSimSrc/drvMotorSim.c b/motorApp/MotorSimSrc/drvMotorSim.c index 0535181..d28abe7 100644 --- a/motorApp/MotorSimSrc/drvMotorSim.c +++ b/motorApp/MotorSimSrc/drvMotorSim.c @@ -2,9 +2,6 @@ FILENAME... drvMotorSim.c USAGE... Simulated Motor Support. -Version: $Revision: 1.10 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-06-18 19:38:20 $ */ /* diff --git a/motorApp/MotorSimSrc/motorSimDriver.cpp b/motorApp/MotorSimSrc/motorSimDriver.cpp index cb3d2f2..bc3e12a 100644 --- a/motorApp/MotorSimSrc/motorSimDriver.cpp +++ b/motorApp/MotorSimSrc/motorSimDriver.cpp @@ -390,6 +390,9 @@ void motorSimAxis::process(double delta ) { double lastpos; int done = 0; + double postMoveDelay = 0.0; + epicsTimeStamp nowTime; + double nowTimeSecs = 0.0; lastpos = nextpoint_.axis[0].p; nextpoint_.T += delta; @@ -430,12 +433,34 @@ void motorSimAxis::process(double delta ) if (nextpoint_.axis[0].v == 0) { if (!deferred_move_) { - done = 1; + if (!delayedDone_) { + done = 1; + } } } else { done = 0; } + //Post move delay + epicsTimeGetCurrent(&nowTime); + pC_->getDoubleParam(axisNo_, pC_->motorPostMoveDelay_, &postMoveDelay); + if ((lastDone_ == 0) && (done == 1)) { + if (postMoveDelay > 0) { + delayedDone_ = 1; + done = 0; + lastTimeSecs_ = nowTime.secPastEpoch + (nowTime.nsec / 1.e9); + } + } + if (delayedDone_ == 1) { + nowTimeSecs = nowTime.secPastEpoch + (nowTime.nsec / 1.e9); + if ((nowTimeSecs - lastTimeSecs_) >= postMoveDelay) { + done = 1; + delayedDone_ = 0; + } + } + + lastDone_ = done; + setDoubleParam (pC_->motorPosition_, (nextpoint_.axis[0].p+enc_offset_)); setDoubleParam (pC_->motorEncoderPosition_, (nextpoint_.axis[0].p+enc_offset_)); setIntegerParam(pC_->motorStatusDirection_, (nextpoint_.axis[0].v > 0)); diff --git a/motorApp/MotorSimSrc/motorSimDriver.h b/motorApp/MotorSimSrc/motorSimDriver.h index 9457c4a..2c9e814 100644 --- a/motorApp/MotorSimSrc/motorSimDriver.h +++ b/motorApp/MotorSimSrc/motorSimDriver.h @@ -52,6 +52,9 @@ class epicsShareClass motorSimAxis : public asynMotorAxis double deferred_position_; int deferred_move_; int deferred_relative_; + double lastTimeSecs_; + int delayedDone_; + int lastDone_; friend class motorSimController; }; diff --git a/motorApp/MotorSrc/README b/motorApp/MotorSrc/README index 9978185..034c35a 100644 --- a/motorApp/MotorSrc/README +++ b/motorApp/MotorSrc/README @@ -1,31 +1,32 @@ -Here's my best guess at what all this stuff is. TMM - Model 3 (asyn, C++) driver base classes --------------------------------- +--------------------------------------- asynMotorAxis.cpp asynMotorAxis.h asynMotorController.cpp asynMotorController.h Model 2 and Model 3 device support --------------------------------- +---------------------------------- devMotorAsyn.c +motor_interface.h Model 2 (asyn, C) --------------- +----------------- drvMotorAsyn.c -motor_interface.h paramLib.c paramLib.h +Definitions used in record, device support, and utilities +--------------------------------------------------------- +motor.h + motor record ------------ -motor.h motorRecord.cc motorRecord.dbd Model 1 (non-asyn) device/driver support ------------------------------- +---------------------------------------- motordevCom.cc motordevCom.h motordrvCom.cc diff --git a/motorApp/MotorSrc/asynMotorAxis.cpp b/motorApp/MotorSrc/asynMotorAxis.cpp index 5dc0b2d..29878b6 100644 --- a/motorApp/MotorSrc/asynMotorAxis.cpp +++ b/motorApp/MotorSrc/asynMotorAxis.cpp @@ -53,6 +53,10 @@ asynMotorAxis::asynMotorAxis(class asynMotorController *pC, int axisNo) /* Used to enable/disable move to home, and to tell driver how far to move.*/ referencingModeMove_ = 0; + wasMovingFlag_ = 0; + disableFlag_ = 0; + lastEndOfMoveTime_ = 0; + // Create the asynUser, connect to this axis pasynUser_ = pasynManager->createAsynUser(NULL, NULL); pasynManager->connectDevice(pasynUser_, pC->portName, axisNo); @@ -187,7 +191,6 @@ asynStatus asynMotorAxis::setEncoderRatio(double ratio) return asynSuccess; } - void asynMotorAxis::report(FILE *fp, int details) { } @@ -342,13 +345,13 @@ asynStatus asynMotorAxis::defineProfile(double *positions, size_t numPoints) asynPrint(pasynUser_, ASYN_TRACE_FLOW, "%s:%s: axis=%d, numPoints=%d, positions[0]=%f\n", - driverName, functionName, axisNo_, numPoints, positions[0]); + driverName, functionName, axisNo_, (int)numPoints, positions[0]); if (numPoints > pC_->maxProfilePoints_) return asynError; - status |= pC_->getDoubleParam(axisNo_, pC_->profileMotorResolution_, &resolution); - status |= pC_->getDoubleParam(axisNo_, pC_->profileMotorOffset_, &offset); - status |= pC_->getIntegerParam(axisNo_, pC_->profileMotorDirection_, &direction); + status |= pC_->getDoubleParam(axisNo_, pC_->motorRecResolution_, &resolution); + status |= pC_->getDoubleParam(axisNo_, pC_->motorRecOffset_, &offset); + status |= pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); asynPrint(pasynUser_, ASYN_TRACE_FLOW, "%s:%s: axis=%d, status=%d, offset=%f direction=%d, resolution=%f\n", driverName, functionName, axisNo_, status, offset, direction, resolution); @@ -415,9 +418,9 @@ asynStatus asynMotorAxis::readbackProfile() int status=0; //static const char *functionName = "readbackProfile"; - status |= pC_->getDoubleParam(axisNo_, pC_->profileMotorResolution_, &resolution); - status |= pC_->getDoubleParam(axisNo_, pC_->profileMotorOffset_, &offset); - status |= pC_->getIntegerParam(axisNo_, pC_->profileMotorDirection_, &direction); + status |= pC_->getDoubleParam(axisNo_, pC_->motorRecResolution_, &resolution); + status |= pC_->getDoubleParam(axisNo_, pC_->motorRecOffset_, &offset); + status |= pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); status |= pC_->getIntegerParam(0, pC_->profileNumReadbacks_, &numReadbacks); if (status) return asynError; @@ -431,3 +434,60 @@ asynStatus asynMotorAxis::readbackProfile() status |= pC_->doCallbacksFloat64Array(profileFollowingErrors_, numReadbacks, pC_->profileFollowingErrors_, axisNo_); return asynSuccess; } + +/****************************************************************************/ +/* The following functions are used by the automatic drive power control in the + base class poller in the asynMotorController class.*/ + +/** + * Read the flag that indicates if the last poll was moving. + */ +int asynMotorAxis::getWasMovingFlag(void) +{ + return wasMovingFlag_; +} + +/** + * Set this to 1 if the previous poll indicated moving state + */ +void asynMotorAxis::setWasMovingFlag(int wasMovingFlag) +{ + wasMovingFlag_ = wasMovingFlag; +} + +/** + * Read the flag that indicates if the drive should be automatically + * disabled. + */ +int asynMotorAxis::getDisableFlag(void) +{ + return disableFlag_; +} + +/** + * Set this to 1 if the drive should be automatically disabled. + */ +void asynMotorAxis::setDisableFlag(int disableFlag) +{ + disableFlag_ = disableFlag; +} + +/** + * Read the time in seconds of the last end of move. + */ +double asynMotorAxis::getLastEndOfMoveTime(void) +{ + return lastEndOfMoveTime_; +} + +/** + * Set this to the current time at the end of a move. + */ +void asynMotorAxis::setLastEndOfMoveTime(double time) +{ + lastEndOfMoveTime_ = time; +} + + +/********************************************************************/ + diff --git a/motorApp/MotorSrc/asynMotorAxis.h b/motorApp/MotorSrc/asynMotorAxis.h index 2904b7d..16cf044 100644 --- a/motorApp/MotorSrc/asynMotorAxis.h +++ b/motorApp/MotorSrc/asynMotorAxis.h @@ -1,78 +1,89 @@ -/* asynMotorAxis.h - * - * Mark Rivers - * - * This file defines the base class for an asynMotoAxis. It is the class - * from which real motor axes are derived. - */ -#ifndef asynMotorAxis_H -#define asynMotorAxis_H - -#include -#include - -#ifdef __cplusplus -#include - -#include "asynMotorController.h" - -/** Class from which motor axis objects are derived. */ -class epicsShareClass asynMotorAxis { - - public: - /* This is the constructor for the class. */ - asynMotorAxis(class asynMotorController *pController, int axisNumber); - virtual ~asynMotorAxis(); - - virtual asynStatus setIntegerParam(int index, int value); - virtual asynStatus setDoubleParam(int index, double value); - virtual asynStatus setStringParam(int index, const char *value); - virtual void report(FILE *fp, int details); - virtual asynStatus callParamCallbacks(); - - virtual asynStatus move(double position, int relative, double minVelocity, double maxVelocity, double acceleration); - virtual asynStatus moveVelocity(double minVelocity, double maxVelocity, double acceleration); - virtual asynStatus home(double minVelocity, double maxVelocity, double acceleration, int forwards); - virtual asynStatus stop(double acceleration); - virtual asynStatus poll(bool *moving); - virtual asynStatus setPosition(double position); - virtual asynStatus setEncoderPosition(double position); - virtual asynStatus setHighLimit(double highLimit); - virtual asynStatus setLowLimit(double lowLimit); - virtual asynStatus setPGain(double pGain); - virtual asynStatus setIGain(double iGain); - virtual asynStatus setDGain(double dGain); - virtual asynStatus setClosedLoop(bool closedLoop); - virtual asynStatus setEncoderRatio(double ratio); - virtual asynStatus doMoveToHome(); - - virtual asynStatus initializeProfile(size_t maxPoints); - virtual asynStatus defineProfile(double *positions, size_t numPoints); - virtual asynStatus buildProfile(); - virtual asynStatus executeProfile(); - virtual asynStatus abortProfile(); - virtual asynStatus readbackProfile(); - - void setReferencingModeMove(int distance); - int getReferencingModeMove(); - - protected: - class asynMotorController *pC_; /**< Pointer to the asynMotorController to which this axis belongs. - * Abbreviated because it is used very frequently */ - int axisNo_; /**< Index number of this axis (0 - pC_->numAxes_-1) */ - asynUser *pasynUser_; /**< asynUser connected to this axis for asynTrace debugging */ - double *profilePositions_; /**< Array of target positions for profile moves */ - double *profileReadbacks_; /**< Array of readback positions for profile moves */ - double *profileFollowingErrors_; /**< Array of following errors for profile moves */ - int referencingMode_; - - private: - MotorStatus status_; - int statusChanged_; - int referencingModeMove_; - - friend class asynMotorController; -}; - -#endif /* _cplusplus */ -#endif /* asynMotorAxis_H */ +/* asynMotorAxis.h + * + * Mark Rivers + * + * This file defines the base class for an asynMotorAxis. It is the class + * from which real motor axes are derived. + */ +#ifndef asynMotorAxis_H +#define asynMotorAxis_H + +#include +#include + +#ifdef __cplusplus +#include + +#include "asynMotorController.h" + +/** Class from which motor axis objects are derived. */ +class epicsShareClass asynMotorAxis { + + public: + /* This is the constructor for the class. */ + asynMotorAxis(class asynMotorController *pController, int axisNumber); + virtual ~asynMotorAxis(); + + virtual asynStatus setIntegerParam(int index, int value); + virtual asynStatus setDoubleParam(int index, double value); + virtual asynStatus setStringParam(int index, const char *value); + virtual void report(FILE *fp, int details); + virtual asynStatus callParamCallbacks(); + + virtual asynStatus move(double position, int relative, double minVelocity, double maxVelocity, double acceleration); + virtual asynStatus moveVelocity(double minVelocity, double maxVelocity, double acceleration); + virtual asynStatus home(double minVelocity, double maxVelocity, double acceleration, int forwards); + virtual asynStatus stop(double acceleration); + virtual asynStatus poll(bool *moving); + virtual asynStatus setPosition(double position); + virtual asynStatus setEncoderPosition(double position); + virtual asynStatus setHighLimit(double highLimit); + virtual asynStatus setLowLimit(double lowLimit); + virtual asynStatus setPGain(double pGain); + virtual asynStatus setIGain(double iGain); + virtual asynStatus setDGain(double dGain); + virtual asynStatus setClosedLoop(bool closedLoop); + virtual asynStatus setEncoderRatio(double ratio); + virtual asynStatus doMoveToHome(); + + virtual asynStatus initializeProfile(size_t maxPoints); + virtual asynStatus defineProfile(double *positions, size_t numPoints); + virtual asynStatus buildProfile(); + virtual asynStatus executeProfile(); + virtual asynStatus abortProfile(); + virtual asynStatus readbackProfile(); + + void setReferencingModeMove(int distance); + int getReferencingModeMove(); + + int getWasMovingFlag(); + void setWasMovingFlag(int wasMoving); + int getDisableFlag(); + void setDisableFlag(int disableFlag); + double getLastEndOfMoveTime(); + void setLastEndOfMoveTime(double time); + + protected: + class asynMotorController *pC_; /**< Pointer to the asynMotorController to which this axis belongs. + * Abbreviated because it is used very frequently */ + int axisNo_; /**< Index number of this axis (0 - pC_->numAxes_-1) */ + asynUser *pasynUser_; /**< asynUser connected to this axis for asynTrace debugging */ + double *profilePositions_; /**< Array of target positions for profile moves */ + double *profileReadbacks_; /**< Array of readback positions for profile moves */ + double *profileFollowingErrors_; /**< Array of following errors for profile moves */ + int referencingMode_; + + MotorStatus status_; + int statusChanged_; + + private: + int referencingModeMove_; + int wasMovingFlag_; + int disableFlag_; + double lastEndOfMoveTime_; + + friend class asynMotorController; +}; + +#endif /* _cplusplus */ +#endif /* asynMotorAxis_H */ diff --git a/motorApp/MotorSrc/asynMotorController.cpp b/motorApp/MotorSrc/asynMotorController.cpp index 9d0adb0..e5d069d 100644 --- a/motorApp/MotorSrc/asynMotorController.cpp +++ b/motorApp/MotorSrc/asynMotorController.cpp @@ -19,6 +19,14 @@ #include "asynMotorController.h" #include "asynMotorAxis.h" +#ifndef VERSION_INT +# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#endif + +#define MOTOR_ASYN_VERSION_INT VERSION_INT(ASYN_VERSION,ASYN_REVISION,ASYN_MODIFICATION,0) + +#define VERSION_INT_4_32 VERSION_INT(4,32,0,0) + static const char *driverName = "asynMotorController"; static void asynMotorPollerC(void *drvPvt); static void asynMotorMoveToHomeC(void *drvPvt); @@ -34,12 +42,14 @@ asynMotorController::asynMotorController(const char *portName, int numAxes, int int interfaceMask, int interruptMask, int asynFlags, int autoConnect, int priority, int stackSize) - : asynPortDriver(portName, numAxes, NUM_MOTOR_DRIVER_PARAMS+numParams, + : asynPortDriver(portName, numAxes, +#if MOTOR_ASYN_VERSION_INT < VERSION_INT_4_32 + NUM_MOTOR_DRIVER_PARAMS+numParams, +#endif interfaceMask | asynOctetMask | asynInt32Mask | asynFloat64Mask | asynFloat64ArrayMask | asynGenericPointerMask | asynDrvUserMask, interruptMask | asynOctetMask | asynInt32Mask | asynFloat64Mask | asynFloat64ArrayMask | asynGenericPointerMask, asynFlags, autoConnect, priority, stackSize), shuttingDown_(0), numAxes_(numAxes) - { static const char *functionName = "asynMotorController"; @@ -64,6 +74,11 @@ asynMotorController::asynMotorController(const char *portName, int numAxes, int createParam(motorHighLimitString, asynParamFloat64, &motorHighLimit_); createParam(motorLowLimitString, asynParamFloat64, &motorLowLimit_); createParam(motorClosedLoopString, asynParamInt32, &motorClosedLoop_); + createParam(motorPowerAutoOnOffString, asynParamInt32, &motorPowerAutoOnOff_); + createParam(motorPowerOnDelayString, asynParamFloat64, &motorPowerOnDelay_); + createParam(motorPowerOffDelayString, asynParamFloat64, &motorPowerOffDelay_); + createParam(motorPowerOffFractionString, asynParamInt32, &motorPowerOffFraction_); + createParam(motorPostMoveDelayString, asynParamFloat64, &motorPostMoveDelay_); createParam(motorStatusString, asynParamInt32, &motorStatus_); createParam(motorUpdateStatusString, asynParamInt32, &motorUpdateStatus_); createParam(motorStatusDirectionString, asynParamInt32, &motorStatusDirection_); @@ -82,6 +97,11 @@ asynMotorController::asynMotorController(const char *portName, int numAxes, int createParam(motorStatusLowLimitString, asynParamInt32, &motorStatusLowLimit_); createParam(motorStatusHomedString, asynParamInt32, &motorStatusHomed_); + // These are per-axis parameters for passing additional motor record information to the driver + createParam(motorRecResolutionString, asynParamFloat64, &motorRecResolution_); + createParam(motorRecDirectionString, asynParamInt32, &motorRecDirection_); + createParam(motorRecOffsetString, asynParamFloat64, &motorRecOffset_); + // These are the per-controller parameters for profile moves createParam(profileNumAxesString, asynParamInt32, &profileNumAxes_); createParam(profileNumPointsString, asynParamInt32, &profileNumPoints_); @@ -115,9 +135,6 @@ asynMotorController::asynMotorController(const char *portName, int numAxes, int createParam(profilePositionsString, asynParamFloat64Array, &profilePositions_); createParam(profileReadbacksString, asynParamFloat64Array, &profileReadbacks_); createParam(profileFollowingErrorsString, asynParamFloat64Array, &profileFollowingErrors_); - createParam(profileMotorResolutionString, asynParamFloat64, &profileMotorResolution_); - createParam(profileMotorDirectionString, asynParamInt32, &profileMotorDirection_); - createParam(profileMotorOffsetString, asynParamFloat64, &profileMotorOffset_); pAxes_ = (asynMotorAxis**) calloc(numAxes, sizeof(asynMotorAxis*)); pollEventId_ = epicsEventMustCreate(epicsEventEmpty); @@ -255,6 +272,8 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v asynMotorAxis *pAxis; int axis; int forwards; + int autoPower = 0; + double autoPowerOnDelay = 0.0; asynStatus status = asynError; static const char *functionName = "writeFloat64"; @@ -262,14 +281,21 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v if (!pAxis) return asynError; axis = pAxis->axisNo_; + getIntegerParam(axis, motorPowerAutoOnOff_, &autoPower); + getDoubleParam(axis, motorPowerOnDelay_, &autoPowerOnDelay); + /* Set the parameter and readback in the parameter library. */ status = pAxis->setDoubleParam(function, value); - getDoubleParam(axis, motorVelBase_, &baseVelocity); - getDoubleParam(axis, motorVelocity_, &velocity); - getDoubleParam(axis, motorAccel_, &acceleration); - if (function == motorMoveRel_) { + if (autoPower == 1) { + status = pAxis->setClosedLoop(true); + pAxis->setWasMovingFlag(1); + epicsThreadSleep(autoPowerOnDelay); + } + getDoubleParam(axis, motorVelBase_, &baseVelocity); + getDoubleParam(axis, motorVelocity_, &velocity); + getDoubleParam(axis, motorAccel_, &acceleration); status = pAxis->move(value, 1, baseVelocity, velocity, acceleration); pAxis->setIntegerParam(motorStatusDone_, 0); pAxis->callParamCallbacks(); @@ -279,6 +305,14 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v driverName, functionName, portName, pAxis->axisNo_, value, baseVelocity, velocity, acceleration ); } else if (function == motorMoveAbs_) { + if (autoPower == 1) { + status = pAxis->setClosedLoop(true); + pAxis->setWasMovingFlag(1); + epicsThreadSleep(autoPowerOnDelay); + } + getDoubleParam(axis, motorVelBase_, &baseVelocity); + getDoubleParam(axis, motorVelocity_, &velocity); + getDoubleParam(axis, motorAccel_, &acceleration); status = pAxis->move(value, 0, baseVelocity, velocity, acceleration); pAxis->setIntegerParam(motorStatusDone_, 0); pAxis->callParamCallbacks(); @@ -288,6 +322,13 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v driverName, functionName, portName, pAxis->axisNo_, value, baseVelocity, velocity, acceleration ); } else if (function == motorMoveVel_) { + if (autoPower == 1) { + status = pAxis->setClosedLoop(true); + pAxis->setWasMovingFlag(1); + epicsThreadSleep(autoPowerOnDelay); + } + getDoubleParam(axis, motorVelBase_, &baseVelocity); + getDoubleParam(axis, motorAccel_, &acceleration); status = pAxis->moveVelocity(baseVelocity, value, acceleration); pAxis->setIntegerParam(motorStatusDone_, 0); pAxis->callParamCallbacks(); @@ -298,6 +339,14 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v // Note, the motorHome command happens on the asynFloat64 interface, even though the value (direction) is really integer } else if (function == motorHome_) { + if (autoPower == 1) { + status = pAxis->setClosedLoop(true); + pAxis->setWasMovingFlag(1); + epicsThreadSleep(autoPowerOnDelay); + } + getDoubleParam(axis, motorVelBase_, &baseVelocity); + getDoubleParam(axis, motorVelocity_, &velocity); + getDoubleParam(axis, motorAccel_, &acceleration); forwards = (value == 0) ? 0 : 1; status = pAxis->home(baseVelocity, velocity, acceleration, forwards); pAxis->setIntegerParam(motorStatusDone_, 0); @@ -569,7 +618,11 @@ void asynMotorController::asynMotorPoller() int forcedFastPolls=0; bool anyMoving; bool moving; + epicsTimeStamp nowTime; + double nowTimeSecs = 0.0; asynMotorAxis *pAxis; + int autoPower = 0; + double autoPowerOffDelay = 0.0; int status; timeout = idlePollPeriod_; @@ -592,12 +645,42 @@ void asynMotorController::asynMotorPoller() unlock(); break; } + poll(); for (i=0; ipoll(&moving); - if (moving) anyMoving = true;; + pAxis=getAxis(i); + if (!pAxis) continue; + + getIntegerParam(i, motorPowerAutoOnOff_, &autoPower); + getDoubleParam(i, motorPowerOffDelay_, &autoPowerOffDelay); + + pAxis->poll(&moving); + if (moving) { + anyMoving = true; + pAxis->setWasMovingFlag(1); + } else { + if ((pAxis->getWasMovingFlag() == 1) && (autoPower == 1)) { + pAxis->setDisableFlag(1); + pAxis->setWasMovingFlag(0); + epicsTimeGetCurrent(&nowTime); + pAxis->setLastEndOfMoveTime(nowTime.secPastEpoch + (nowTime.nsec / 1.e9)); + } + } + + //Auto power off drive, if: + // We have detected an end of move + // We are not moving again + // Auto power off is enabled + // Auto power off delay timer has expired + if ((!moving) && (autoPower == 1) && (pAxis->getDisableFlag() == 1)) { + epicsTimeGetCurrent(&nowTime); + nowTimeSecs = nowTime.secPastEpoch + (nowTime.nsec / 1.e9); + if ((nowTimeSecs - pAxis->getLastEndOfMoveTime()) >= autoPowerOffDelay) { + pAxis->setClosedLoop(0); + pAxis->setDisableFlag(0); + } + } + } if (forcedFastPolls > 0) { timeout = movingPollPeriod_; diff --git a/motorApp/MotorSrc/asynMotorController.h b/motorApp/MotorSrc/asynMotorController.h index e1ff986..56b44e9 100644 --- a/motorApp/MotorSrc/asynMotorController.h +++ b/motorApp/MotorSrc/asynMotorController.h @@ -1,301 +1,315 @@ -/* asynMotorController.h - * - * Mark Rivers - * - * This file defines the base class for an asynMotorController. It is the class - * from which real motor controllers are derived. It derives from asynPortDriver. - */ -#ifndef asynMotorController_H -#define asynMotorController_H - -#include -#include - -#define MAX_CONTROLLER_STRING_SIZE 256 -#define DEFAULT_CONTROLLER_TIMEOUT 2.0 - -/** Strings defining parameters for the driver. - * These are the values passed to drvUserCreate. - * The driver will place in pasynUser->reason an integer to be used when the - * standard asyn interface methods are called. */ -#define motorMoveRelString "MOTOR_MOVE_REL" -#define motorMoveAbsString "MOTOR_MOVE_ABS" -#define motorMoveVelString "MOTOR_MOVE_VEL" -#define motorHomeString "MOTOR_HOME" -#define motorStopString "MOTOR_STOP_AXIS" -#define motorVelocityString "MOTOR_VELOCITY" -#define motorVelBaseString "MOTOR_VEL_BASE" -#define motorAccelString "MOTOR_ACCEL" -#define motorPositionString "MOTOR_POSITION" -#define motorEncoderPositionString "MOTOR_ENCODER_POSITION" -#define motorDeferMovesString "MOTOR_DEFER_MOVES" -#define motorMoveToHomeString "MOTOR_MOVE_HOME" -#define motorResolutionString "MOTOR_RESOLUTION" -#define motorEncoderRatioString "MOTOR_ENCODER_RATIO" -#define motorPGainString "MOTOR_PGAIN" -#define motorIGainString "MOTOR_IGAIN" -#define motorDGainString "MOTOR_DGAIN" -#define motorHighLimitString "MOTOR_HIGH_LIMIT" -#define motorLowLimitString "MOTOR_LOW_LIMIT" -#define motorClosedLoopString "MOTOR_CLOSED_LOOP" -#define motorStatusString "MOTOR_STATUS" -#define motorUpdateStatusString "MOTOR_UPDATE_STATUS" -#define motorStatusDirectionString "MOTOR_STATUS_DIRECTION" -#define motorStatusDoneString "MOTOR_STATUS_DONE" -#define motorStatusHighLimitString "MOTOR_STATUS_HIGH_LIMIT" -#define motorStatusAtHomeString "MOTOR_STATUS_AT_HOME" -#define motorStatusSlipString "MOTOR_STATUS_SLIP" -#define motorStatusPowerOnString "MOTOR_STATUS_POWERED" -#define motorStatusFollowingErrorString "MOTOR_STATUS_FOLLOWING_ERROR" -#define motorStatusHomeString "MOTOR_STATUS_HOME" -#define motorStatusHasEncoderString "MOTOR_STATUS_HAS_ENCODER" -#define motorStatusProblemString "MOTOR_STATUS_PROBLEM" -#define motorStatusMovingString "MOTOR_STATUS_MOVING" -#define motorStatusGainSupportString "MOTOR_STATUS_GAIN_SUPPORT" -#define motorStatusCommsErrorString "MOTOR_STATUS_COMMS_ERROR" -#define motorStatusLowLimitString "MOTOR_STATUS_LOW_LIMIT" -#define motorStatusHomedString "MOTOR_STATUS_HOMED" - -/* These are the per-controller parameters for profile moves (coordinated motion) */ -#define profileNumAxesString "PROFILE_NUM_AXES" -#define profileNumPointsString "PROFILE_NUM_POINTS" -#define profileCurrentPointString "PROFILE_CURRENT_POINT" -#define profileNumPulsesString "PROFILE_NUM_PULSES" -#define profileStartPulsesString "PROFILE_START_PULSES" -#define profileEndPulsesString "PROFILE_END_PULSES" -#define profileActualPulsesString "PROFILE_ACTUAL_PULSES" -#define profileNumReadbacksString "PROFILE_NUM_READBACKS" -#define profileTimeModeString "PROFILE_TIME_MODE" -#define profileFixedTimeString "PROFILE_FIXED_TIME" -#define profileTimeArrayString "PROFILE_TIME_ARRAY" -#define profileAccelerationString "PROFILE_ACCELERATION" -#define profileMoveModeString "PROFILE_MOVE_MODE" -#define profileBuildString "PROFILE_BUILD" -#define profileBuildStateString "PROFILE_BUILD_STATE" -#define profileBuildStatusString "PROFILE_BUILD_STATUS" -#define profileBuildMessageString "PROFILE_BUILD_MESSAGE" -#define profileExecuteString "PROFILE_EXECUTE" -#define profileExecuteStateString "PROFILE_EXECUTE_STATE" -#define profileExecuteStatusString "PROFILE_EXECUTE_STATUS" -#define profileExecuteMessageString "PROFILE_EXECUTE_MESSAGE" -#define profileAbortString "PROFILE_ABORT" -#define profileReadbackString "PROFILE_READBACK" -#define profileReadbackStateString "PROFILE_READBACK_STATE" -#define profileReadbackStatusString "PROFILE_READBACK_STATUS" -#define profileReadbackMessageString "PROFILE_READBACK_MESSAGE" - -/* These are the per-axis parameters for profile moves */ -#define profileUseAxisString "PROFILE_USE_AXIS" -#define profilePositionsString "PROFILE_POSITIONS" -#define profileReadbacksString "PROFILE_READBACKS" -#define profileFollowingErrorsString "PROFILE_FOLLOWING_ERRORS" -#define profileMotorResolutionString "PROFILE_MOTOR_RESOLUTION" -#define profileMotorDirectionString "PROFILE_MOTOR_DIRECTION" -#define profileMotorOffsetString "PROFILE_MOTOR_OFFSET" - -/** The structure that is passed back to devMotorAsyn when the status changes. */ -typedef struct MotorStatus { - double position; /**< Commanded motor position */ - double encoderPosition; /**< Actual encoder position */ - double velocity; /**< Actual velocity */ - epicsUInt32 status; /**< Word containing status bits (motion done, limits, etc.) */ -} MotorStatus; - -enum ProfileTimeMode{ - PROFILE_TIME_MODE_FIXED, - PROFILE_TIME_MODE_ARRAY -}; - -enum ProfileMoveMode{ - PROFILE_MOVE_MODE_ABSOLUTE, - PROFILE_MOVE_MODE_RELATIVE -}; - -/* State codes for Build, Read and Execute. Careful, these must match the - * corresponding MBBI records, but there is no way to check this */ -enum ProfileBuildState{ - PROFILE_BUILD_DONE, - PROFILE_BUILD_BUSY -}; - -enum ProfileExecuteState{ - PROFILE_EXECUTE_DONE, - PROFILE_EXECUTE_MOVE_START, - PROFILE_EXECUTE_EXECUTING, - PROFILE_EXECUTE_FLYBACK -}; - -enum ProfileReadbackState{ - PROFILE_READBACK_DONE, - PROFILE_READBACK_BUSY -}; - - -/* Status codes for Build, Execute and Read */ -enum ProfileStatus { - PROFILE_STATUS_UNDEFINED, - PROFILE_STATUS_SUCCESS, - PROFILE_STATUS_FAILURE, - PROFILE_STATUS_ABORT, - PROFILE_STATUS_TIMEOUT -}; - -#ifdef __cplusplus -#include - -class asynMotorAxis; - -class epicsShareClass asynMotorController : public asynPortDriver { - - public: - /* This is the constructor for the class. */ - asynMotorController(const char *portName, int numAxes, int numParams, - int interfaceMask, int interruptMask, - int asynFlags, int autoConnect, int priority, int stackSize); - - virtual ~asynMotorController(); - - /* These are the methods that we override from asynPortDriver */ - virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); - virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value); - virtual asynStatus writeFloat64Array(asynUser *pasynUser, epicsFloat64 *value, size_t nElements); - virtual asynStatus readFloat64Array(asynUser *pasynUser, epicsFloat64 *value, size_t nElements, size_t *nRead); - virtual asynStatus readGenericPointer(asynUser *pasynUser, void *pointer); - virtual void report(FILE *fp, int details); - - /* These are the methods that are new to this class */ - virtual asynMotorAxis* getAxis(asynUser *pasynUser); - virtual asynMotorAxis* getAxis(int axisNo); - virtual asynStatus startPoller(double movingPollPeriod, double idlePollPeriod, int forcedFastPolls); - virtual asynStatus wakeupPoller(); - virtual asynStatus poll(); - virtual asynStatus setDeferredMoves(bool defer); - void asynMotorPoller(); // This should be private but is called from C function - - /* Functions to deal with moveToHome.*/ - virtual asynStatus startMoveToHomeThread(); - void asynMotorMoveToHome(); - - /* These are the functions for profile moves */ - virtual asynStatus initializeProfile(size_t maxPoints); - virtual asynStatus buildProfile(); - virtual asynStatus executeProfile(); - virtual asynStatus abortProfile(); - virtual asynStatus readbackProfile(); - - virtual asynStatus setMovingPollPeriod(double movingPollPeriod); - virtual asynStatus setIdlePollPeriod(double idlePollPeriod); - - int shuttingDown_; /**< Flag indicating that IOC is shutting down. Stops poller */ - - protected: - /** These are the index numbers for the parameters in the parameter library. - * They are the values of pasynUser->reason in calls from device support */ - // These are the motor commands - #define FIRST_MOTOR_PARAM motorMoveRel_ - int motorMoveRel_; - int motorMoveAbs_; - int motorMoveVel_; - int motorHome_; - int motorStop_; - int motorVelocity_; - int motorVelBase_; - int motorAccel_; - int motorPosition_; - int motorEncoderPosition_; - int motorDeferMoves_; - int motorMoveToHome_; - int motorResolution_; - int motorEncoderRatio_; - int motorPGain_; - int motorIGain_; - int motorDGain_; - int motorHighLimit_; - int motorLowLimit_; - int motorClosedLoop_; - int motorStatus_; - int motorUpdateStatus_; - - // These are the status bits - int motorStatusDirection_; - int motorStatusDone_; - int motorStatusHighLimit_; - int motorStatusAtHome_; - int motorStatusSlip_; - int motorStatusPowerOn_; - int motorStatusFollowingError_; - int motorStatusHome_; - int motorStatusHasEncoder_; - int motorStatusProblem_; - int motorStatusMoving_; - int motorStatusGainSupport_; - int motorStatusCommsError_; - int motorStatusLowLimit_; - int motorStatusHomed_; - - // These are the per-controller parameters for profile moves - int profileNumAxes_; - int profileNumPoints_; - int profileCurrentPoint_; - int profileNumPulses_; - int profileStartPulses_; - int profileEndPulses_; - int profileActualPulses_; - int profileNumReadbacks_; - int profileTimeMode_; - int profileFixedTime_; - int profileTimeArray_; - int profileAcceleration_; - int profileMoveMode_; - int profileBuild_; - int profileBuildState_; - int profileBuildStatus_; - int profileBuildMessage_; - int profileExecute_; - int profileExecuteState_; - int profileExecuteStatus_; - int profileExecuteMessage_; - int profileAbort_; - int profileReadback_; - int profileReadbackState_; - int profileReadbackStatus_; - int profileReadbackMessage_; - - // These are the per-axis parameters for profile moves - int profileUseAxis_; - int profilePositions_; - int profileReadbacks_; - int profileFollowingErrors_; - int profileMotorResolution_; - int profileMotorDirection_; - int profileMotorOffset_; - #define LAST_MOTOR_PARAM profileMotorOffset_ - - int numAxes_; /**< Number of axes this controller supports */ - asynMotorAxis **pAxes_; /**< Array of pointers to axis objects */ - epicsEventId pollEventId_; /**< Event ID to wake up poller */ - epicsEventId moveToHomeId_; /**< Event ID to wake up move to home thread */ - double idlePollPeriod_; /**< The time between polls when no axes are moving */ - double movingPollPeriod_; /**< The time between polls when any axis is moving */ - int forcedFastPolls_; /**< The number of forced fast polls when the poller wakes up */ - - size_t maxProfilePoints_; /**< Maximum number of profile points */ - double *profileTimes_; /**< Array of times per profile point */ - - int moveToHomeAxis_; - - /* These are convenience functions for controllers that use asynOctet interfaces to the hardware */ - asynStatus writeController(); - asynStatus writeController(const char *output, double timeout); - asynStatus writeReadController(); - asynStatus writeReadController(const char *output, char *response, size_t maxResponseLen, size_t *responseLen, double timeout); - asynUser *pasynUserController_; - char outString_[MAX_CONTROLLER_STRING_SIZE]; - char inString_[MAX_CONTROLLER_STRING_SIZE]; - - friend class asynMotorAxis; -}; -#define NUM_MOTOR_DRIVER_PARAMS (&LAST_MOTOR_PARAM - &FIRST_MOTOR_PARAM + 1) - -#endif /* _cplusplus */ -#endif /* asynMotorController_H */ +/* asynMotorController.h + * + * Mark Rivers + * + * This file defines the base class for an asynMotorController. It is the class + * from which real motor controllers are derived. It derives from asynPortDriver. + */ +#ifndef asynMotorController_H +#define asynMotorController_H + +#include +#include + +#define MAX_CONTROLLER_STRING_SIZE 256 +#define DEFAULT_CONTROLLER_TIMEOUT 2.0 + +/** Strings defining parameters for the driver. + * These are the values passed to drvUserCreate. + * The driver will place in pasynUser->reason an integer to be used when the + * standard asyn interface methods are called. */ +#define motorMoveRelString "MOTOR_MOVE_REL" +#define motorMoveAbsString "MOTOR_MOVE_ABS" +#define motorMoveVelString "MOTOR_MOVE_VEL" +#define motorHomeString "MOTOR_HOME" +#define motorStopString "MOTOR_STOP_AXIS" +#define motorVelocityString "MOTOR_VELOCITY" +#define motorVelBaseString "MOTOR_VEL_BASE" +#define motorAccelString "MOTOR_ACCEL" +#define motorPositionString "MOTOR_POSITION" +#define motorEncoderPositionString "MOTOR_ENCODER_POSITION" +#define motorDeferMovesString "MOTOR_DEFER_MOVES" +#define motorMoveToHomeString "MOTOR_MOVE_HOME" +#define motorResolutionString "MOTOR_RESOLUTION" +#define motorEncoderRatioString "MOTOR_ENCODER_RATIO" +#define motorPGainString "MOTOR_PGAIN" +#define motorIGainString "MOTOR_IGAIN" +#define motorDGainString "MOTOR_DGAIN" +#define motorHighLimitString "MOTOR_HIGH_LIMIT" +#define motorLowLimitString "MOTOR_LOW_LIMIT" +#define motorClosedLoopString "MOTOR_CLOSED_LOOP" +#define motorPowerAutoOnOffString "MOTOR_POWER_AUTO_ONOFF" +#define motorPowerOnDelayString "MOTOR_POWER_ON_DELAY" +#define motorPowerOffDelayString "MOTOR_POWER_OFF_DELAY" +#define motorPowerOffFractionString "MOTOR_POWER_OFF_FRACTION" +#define motorPostMoveDelayString "MOTOR_POST_MOVE_DELAY" +#define motorStatusString "MOTOR_STATUS" +#define motorUpdateStatusString "MOTOR_UPDATE_STATUS" +#define motorStatusDirectionString "MOTOR_STATUS_DIRECTION" +#define motorStatusDoneString "MOTOR_STATUS_DONE" +#define motorStatusHighLimitString "MOTOR_STATUS_HIGH_LIMIT" +#define motorStatusAtHomeString "MOTOR_STATUS_AT_HOME" +#define motorStatusSlipString "MOTOR_STATUS_SLIP" +#define motorStatusPowerOnString "MOTOR_STATUS_POWERED" +#define motorStatusFollowingErrorString "MOTOR_STATUS_FOLLOWING_ERROR" +#define motorStatusHomeString "MOTOR_STATUS_HOME" +#define motorStatusHasEncoderString "MOTOR_STATUS_HAS_ENCODER" +#define motorStatusProblemString "MOTOR_STATUS_PROBLEM" +#define motorStatusMovingString "MOTOR_STATUS_MOVING" +#define motorStatusGainSupportString "MOTOR_STATUS_GAIN_SUPPORT" +#define motorStatusCommsErrorString "MOTOR_STATUS_COMMS_ERROR" +#define motorStatusLowLimitString "MOTOR_STATUS_LOW_LIMIT" +#define motorStatusHomedString "MOTOR_STATUS_HOMED" + +/* These are per-axis parameters for passing additional motor record information to the driver */ +#define motorRecResolutionString "MOTOR_REC_RESOLUTION" +#define motorRecDirectionString "MOTOR_REC_DIRECTION" +#define motorRecOffsetString "MOTOR_REC_OFFSET" + +/* These are the per-controller parameters for profile moves (coordinated motion) */ +#define profileNumAxesString "PROFILE_NUM_AXES" +#define profileNumPointsString "PROFILE_NUM_POINTS" +#define profileCurrentPointString "PROFILE_CURRENT_POINT" +#define profileNumPulsesString "PROFILE_NUM_PULSES" +#define profileStartPulsesString "PROFILE_START_PULSES" +#define profileEndPulsesString "PROFILE_END_PULSES" +#define profileActualPulsesString "PROFILE_ACTUAL_PULSES" +#define profileNumReadbacksString "PROFILE_NUM_READBACKS" +#define profileTimeModeString "PROFILE_TIME_MODE" +#define profileFixedTimeString "PROFILE_FIXED_TIME" +#define profileTimeArrayString "PROFILE_TIME_ARRAY" +#define profileAccelerationString "PROFILE_ACCELERATION" +#define profileMoveModeString "PROFILE_MOVE_MODE" +#define profileBuildString "PROFILE_BUILD" +#define profileBuildStateString "PROFILE_BUILD_STATE" +#define profileBuildStatusString "PROFILE_BUILD_STATUS" +#define profileBuildMessageString "PROFILE_BUILD_MESSAGE" +#define profileExecuteString "PROFILE_EXECUTE" +#define profileExecuteStateString "PROFILE_EXECUTE_STATE" +#define profileExecuteStatusString "PROFILE_EXECUTE_STATUS" +#define profileExecuteMessageString "PROFILE_EXECUTE_MESSAGE" +#define profileAbortString "PROFILE_ABORT" +#define profileReadbackString "PROFILE_READBACK" +#define profileReadbackStateString "PROFILE_READBACK_STATE" +#define profileReadbackStatusString "PROFILE_READBACK_STATUS" +#define profileReadbackMessageString "PROFILE_READBACK_MESSAGE" + +/* These are the per-axis parameters for profile moves */ +#define profileUseAxisString "PROFILE_USE_AXIS" +#define profilePositionsString "PROFILE_POSITIONS" +#define profileReadbacksString "PROFILE_READBACKS" +#define profileFollowingErrorsString "PROFILE_FOLLOWING_ERRORS" + +/** The structure that is passed back to devMotorAsyn when the status changes. */ +typedef struct MotorStatus { + double position; /**< Commanded motor position */ + double encoderPosition; /**< Actual encoder position */ + double velocity; /**< Actual velocity */ + epicsUInt32 status; /**< Word containing status bits (motion done, limits, etc.) */ +} MotorStatus; + +enum ProfileTimeMode{ + PROFILE_TIME_MODE_FIXED, + PROFILE_TIME_MODE_ARRAY +}; + +enum ProfileMoveMode{ + PROFILE_MOVE_MODE_ABSOLUTE, + PROFILE_MOVE_MODE_RELATIVE +}; + +/* State codes for Build, Read and Execute. Careful, these must match the + * corresponding MBBI records, but there is no way to check this */ +enum ProfileBuildState{ + PROFILE_BUILD_DONE, + PROFILE_BUILD_BUSY +}; + +enum ProfileExecuteState{ + PROFILE_EXECUTE_DONE, + PROFILE_EXECUTE_MOVE_START, + PROFILE_EXECUTE_EXECUTING, + PROFILE_EXECUTE_FLYBACK +}; + +enum ProfileReadbackState{ + PROFILE_READBACK_DONE, + PROFILE_READBACK_BUSY +}; + + +/* Status codes for Build, Execute and Read */ +enum ProfileStatus { + PROFILE_STATUS_UNDEFINED, + PROFILE_STATUS_SUCCESS, + PROFILE_STATUS_FAILURE, + PROFILE_STATUS_ABORT, + PROFILE_STATUS_TIMEOUT +}; + +#ifdef __cplusplus +#include + +class asynMotorAxis; + +class epicsShareClass asynMotorController : public asynPortDriver { + + public: + /* This is the constructor for the class. */ + asynMotorController(const char *portName, int numAxes, int numParams, + int interfaceMask, int interruptMask, + int asynFlags, int autoConnect, int priority, int stackSize); + + virtual ~asynMotorController(); + + /* These are the methods that we override from asynPortDriver */ + virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); + virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value); + virtual asynStatus writeFloat64Array(asynUser *pasynUser, epicsFloat64 *value, size_t nElements); + virtual asynStatus readFloat64Array(asynUser *pasynUser, epicsFloat64 *value, size_t nElements, size_t *nRead); + virtual asynStatus readGenericPointer(asynUser *pasynUser, void *pointer); + virtual void report(FILE *fp, int details); + + /* These are the methods that are new to this class */ + virtual asynMotorAxis* getAxis(asynUser *pasynUser); + virtual asynMotorAxis* getAxis(int axisNo); + virtual asynStatus startPoller(double movingPollPeriod, double idlePollPeriod, int forcedFastPolls); + virtual asynStatus wakeupPoller(); + virtual asynStatus poll(); + virtual asynStatus setDeferredMoves(bool defer); + void asynMotorPoller(); // This should be private but is called from C function + + /* Functions to deal with moveToHome.*/ + virtual asynStatus startMoveToHomeThread(); + void asynMotorMoveToHome(); + + /* These are the functions for profile moves */ + virtual asynStatus initializeProfile(size_t maxPoints); + virtual asynStatus buildProfile(); + virtual asynStatus executeProfile(); + virtual asynStatus abortProfile(); + virtual asynStatus readbackProfile(); + + virtual asynStatus setMovingPollPeriod(double movingPollPeriod); + virtual asynStatus setIdlePollPeriod(double idlePollPeriod); + + int shuttingDown_; /**< Flag indicating that IOC is shutting down. Stops poller */ + + protected: + /** These are the index numbers for the parameters in the parameter library. + * They are the values of pasynUser->reason in calls from device support */ + // These are the motor commands + #define FIRST_MOTOR_PARAM motorMoveRel_ + int motorMoveRel_; + int motorMoveAbs_; + int motorMoveVel_; + int motorHome_; + int motorStop_; + int motorVelocity_; + int motorVelBase_; + int motorAccel_; + int motorPosition_; + int motorEncoderPosition_; + int motorDeferMoves_; + int motorMoveToHome_; + int motorResolution_; + int motorEncoderRatio_; + int motorPGain_; + int motorIGain_; + int motorDGain_; + int motorHighLimit_; + int motorLowLimit_; + int motorClosedLoop_; + int motorPowerAutoOnOff_; + int motorPowerOnDelay_; + int motorPowerOffDelay_; + int motorPowerOffFraction_; + int motorPostMoveDelay_; + int motorStatus_; + int motorUpdateStatus_; + + // These are the status bits + int motorStatusDirection_; + int motorStatusDone_; + int motorStatusHighLimit_; + int motorStatusAtHome_; + int motorStatusSlip_; + int motorStatusPowerOn_; + int motorStatusFollowingError_; + int motorStatusHome_; + int motorStatusHasEncoder_; + int motorStatusProblem_; + int motorStatusMoving_; + int motorStatusGainSupport_; + int motorStatusCommsError_; + int motorStatusLowLimit_; + int motorStatusHomed_; + + // These are per-axis parameters for passing additional motor record information to the driver + int motorRecResolution_; + int motorRecDirection_; + int motorRecOffset_; + + // These are the per-controller parameters for profile moves + int profileNumAxes_; + int profileNumPoints_; + int profileCurrentPoint_; + int profileNumPulses_; + int profileStartPulses_; + int profileEndPulses_; + int profileActualPulses_; + int profileNumReadbacks_; + int profileTimeMode_; + int profileFixedTime_; + int profileTimeArray_; + int profileAcceleration_; + int profileMoveMode_; + int profileBuild_; + int profileBuildState_; + int profileBuildStatus_; + int profileBuildMessage_; + int profileExecute_; + int profileExecuteState_; + int profileExecuteStatus_; + int profileExecuteMessage_; + int profileAbort_; + int profileReadback_; + int profileReadbackState_; + int profileReadbackStatus_; + int profileReadbackMessage_; + + // These are the per-axis parameters for profile moves + int profileUseAxis_; + int profilePositions_; + int profileReadbacks_; + int profileFollowingErrors_; + #define LAST_MOTOR_PARAM profileFollowingErrors_ + + int numAxes_; /**< Number of axes this controller supports */ + asynMotorAxis **pAxes_; /**< Array of pointers to axis objects */ + epicsEventId pollEventId_; /**< Event ID to wake up poller */ + epicsEventId moveToHomeId_; /**< Event ID to wake up move to home thread */ + double idlePollPeriod_; /**< The time between polls when no axes are moving */ + double movingPollPeriod_; /**< The time between polls when any axis is moving */ + int forcedFastPolls_; /**< The number of forced fast polls when the poller wakes up */ + + size_t maxProfilePoints_; /**< Maximum number of profile points */ + double *profileTimes_; /**< Array of times per profile point */ + + int moveToHomeAxis_; + + /* These are convenience functions for controllers that use asynOctet interfaces to the hardware */ + asynStatus writeController(); + asynStatus writeController(const char *output, double timeout); + asynStatus writeReadController(); + asynStatus writeReadController(const char *output, char *response, size_t maxResponseLen, size_t *responseLen, double timeout); + asynUser *pasynUserController_; + char outString_[MAX_CONTROLLER_STRING_SIZE]; + char inString_[MAX_CONTROLLER_STRING_SIZE]; + + friend class asynMotorAxis; +}; +#define NUM_MOTOR_DRIVER_PARAMS (&LAST_MOTOR_PARAM - &FIRST_MOTOR_PARAM + 1) + +#endif /* _cplusplus */ +#endif /* asynMotorController_H */ diff --git a/motorApp/MotorSrc/devMotorAsyn.c b/motorApp/MotorSrc/devMotorAsyn.c index 00d6ef8..c09834e 100644 --- a/motorApp/MotorSrc/devMotorAsyn.c +++ b/motorApp/MotorSrc/devMotorAsyn.c @@ -11,9 +11,6 @@ * Notwithstanding the above, explicit permission is granted for APS to * redistribute this software. * - * Version: $Revision: 1.32 $ - * Modified by: $Author: rivers $ - * Last Modified: $Date: 2009-09-01 14:05:38 $ * * Original Author: Peter Denison * Current Author: Peter Denison @@ -41,6 +38,11 @@ * * .05 2014-09-11 RLS * Moved CA posting of changes to the RMP, REP and RVEL fields from motor record to update_values(). + * + * .06 2015-07-29 RLS + * Added "Use Relative" (use_rel) indicator to init_controller()'s "LOAD_POS" logic. + * See README R6-10 item #6 for details. + * */ #include @@ -49,15 +51,7 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include /* !! for callocMustSucceed() */ -#include +#include "motor_epics_inc.h" #include #include @@ -177,14 +171,16 @@ static void init_controller(struct motorRecord *pmr, asynUser *pasynUser ) double position = pPvt->status.position; double rdbd = (fabs(pmr->rdbd) < fabs(pmr->mres) ? fabs(pmr->mres) : fabs(pmr->rdbd) ); double encRatio[2] = {pmr->mres, pmr->eres}; + int use_rel = (pmr->rtry != 0 && pmr->rmod != motorRMOD_I && (pmr->ueip || pmr->urip)); /*Before setting position, set the correct encoder ratio.*/ start_trans(pmr); build_trans(SET_ENC_RATIO, encRatio, pmr); end_trans(pmr); - if ((fabs(pmr->dval) > rdbd && pmr->mres != 0) && - (fabs(position * pmr->mres) < rdbd)) + if ((use_rel != 0) || + ((fabs(pmr->dval) > rdbd) && (pmr->mres != 0) && (fabs(position * pmr->mres) < rdbd)) + ) { double setPos = pmr->dval / pmr->mres; epicsEventId initEvent = epicsEventCreate( epicsEventEmpty ); diff --git a/motorApp/MotorSrc/drvMotorAsyn.c b/motorApp/MotorSrc/drvMotorAsyn.c index f75e72a..311edb8 100644 --- a/motorApp/MotorSrc/drvMotorAsyn.c +++ b/motorApp/MotorSrc/drvMotorAsyn.c @@ -19,9 +19,6 @@ * of this distribution. * ************************************************************************ * - * Version: $Revision: 1.22 $ - * Modified by: $Author: rivers $ - * Last Modified: $Date: 2009-09-01 14:05:07 $ * * Original Author: Peter Denison * Current Author: Peter Denison diff --git a/motorApp/MotorSrc/motor.h b/motorApp/MotorSrc/motor.h index 4d30d92..b718684 100644 --- a/motorApp/MotorSrc/motor.h +++ b/motorApp/MotorSrc/motor.h @@ -3,9 +3,6 @@ FILENAME... motor.h USAGE... Definitions and structures common to all levels of motorRecord support (i.e., record, device and driver). -Version: $Revision: 1.21 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-04-27 14:28:42 $ */ /* @@ -66,7 +63,11 @@ Last Modified: $Date: 2009-04-27 14:28:42 $ #include /* Less than EPICS base version test.*/ -#define LT_EPICSBASE(v,r,l) ((EPICS_VERSION<=(v)) && (EPICS_REVISION<=(r)) && (EPICS_MODIFICATION<(l))) +#ifndef EPICS_VERSION_INT +#define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#define EPICS_VERSION_INT VERSION_INT(EPICS_VERSION, EPICS_REVISION, EPICS_MODIFICATION, EPICS_PATCH_LEVEL) +#endif +#define LT_EPICSBASE(V,R,M,P) (EPICS_VERSION_INT < VERSION_INT((V),(R),(M),(P))) /* Maximum message size of all supported devices; see drv[device].h for maximum message size for each device. */ diff --git a/motorApp/MotorSrc/motorRecord.cc b/motorApp/MotorSrc/motorRecord.cc index 1589c0c..3aaf1a3 100644 --- a/motorApp/MotorSrc/motorRecord.cc +++ b/motorApp/MotorSrc/motorRecord.cc @@ -2,10 +2,6 @@ FILENAME... motorRecord.cc USAGE... Motor Record Support. -Version: $Revision: 17843 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-09-11 10:37:22 -0500 (Thu, 11 Sep 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motorRecord.cc $ */ /* @@ -183,24 +179,29 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- * - Fix for LOAD_POS not posting RVAL. * - Reversed order of issuing SET_VEL_BASE and SET_VELOCITY commands. Fixes MAXv * command errors. + * .71 02-25-15 rls - Fix for excessive motor record forward link processing. + * .72 03-13-15 rls - Changed RDBL to set RRBV rather than DRBV. + * .73 02-15-16 rls - JOGF/R soft limit error check was using the wrong coordinate sytem limits. + * Changed error checks from dial to user limits. + * .74 09-28-16 rls - Reverted .71 FLNK change. Except for the condition that DMOV == FALSE, FLNK + * processing was standard. If processing is needed on a DMOV false to true + * transition, a new motor record field should be added. + * .75 05-18-17 rls - Stop motor if URIP is Yes and RDBL read returns an error. + * .76 04-04-18 rls - If URIP is Yes and RDBL is inaccessible (e.g., CA server is down), do not start + * a new target position move (sans Home search or Jog). + * .78 08-21-18 kmp - Reverted .69 stop on RA_PROBLEM true. */ -#define VERSION 6.9 +#define VERSION 6.10 #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include "motor_epics_inc.h" + #define GEN_SIZE_OFFSET #include "motorRecord.h" #undef GEN_SIZE_OFFSET @@ -242,38 +243,39 @@ static void syncTargetPosition(motorRecord *); /*** Record Support Entry Table (RSET) functions. ***/ -static long init_record(dbCommon *, int); -static long process(dbCommon *); +extern "C" { +static long init_record(struct dbCommon*, int); +static long process(struct dbCommon*); static long special(DBADDR *, int); -static long get_units(const DBADDR *, char *); -static long get_precision(const DBADDR *, long *); -static long get_graphic_double(const DBADDR *, struct dbr_grDouble *); -static long get_control_double(const DBADDR *, struct dbr_ctrlDouble *); -static long get_alarm_double(const DBADDR *, struct dbr_alDouble *); - +static long get_units(DBADDR *, char *); +static long get_precision(const struct dbAddr *, long *); +static long get_graphic_double(DBADDR *, struct dbr_grDouble *); +static long get_control_double(DBADDR *, struct dbr_ctrlDouble *); +static long get_alarm_double(DBADDR *, struct dbr_alDouble *); rset motorRSET = { RSETNUMBER, NULL, NULL, - (RECSUPFUN) init_record, - (RECSUPFUN) process, - (RECSUPFUN) special, + RECSUPFUN_CAST init_record, + RECSUPFUN_CAST process, + RECSUPFUN_CAST special, NULL, NULL, NULL, NULL, - (RECSUPFUN) get_units, - (RECSUPFUN) get_precision, + RECSUPFUN_CAST get_units, + RECSUPFUN_CAST get_precision, NULL, NULL, NULL, - (RECSUPFUN) get_graphic_double, - (RECSUPFUN) get_control_double, - (RECSUPFUN) get_alarm_double + RECSUPFUN_CAST get_graphic_double, + RECSUPFUN_CAST get_control_double, + RECSUPFUN_CAST get_alarm_double }; -extern "C" {epicsExportAddress(rset, motorRSET);} +epicsExportAddress(rset, motorRSET); +} /******************************************************************************* @@ -464,7 +466,7 @@ static void callbackFunc(struct callback *pcb) { pmr->mip &= ~MIP_DELAY_REQ; /* Turn off REQ. */ pmr->mip |= MIP_DELAY_ACK; /* Turn on ACK. */ -#if LT_EPICSBASE(3,14,10) +#if LT_EPICSBASE(3,14,10,0) scanOnce(pmr); #else scanOnce((struct dbCommon *) pmr); @@ -511,7 +513,8 @@ again. Initialize Limit violation field false. IF (Software Travel limits are NOT disabled), AND, (Dial readback violates dial high limit), OR, - (Dial readback violates dial low limit) + (Dial readback violates dial low limit), OR, + (Dial low limit is greater than dial high limit) Set Limit violation field true. ENDIF ... @@ -660,7 +663,8 @@ static long init_record(dbCommon* arg, int pass) if ((pmr->dhlm == pmr->dllm) && (pmr->dllm == 0.0)) ; - else if ((pmr->drbv > pmr->dhlm + pmr->mres) || (pmr->drbv < pmr->dllm - pmr->mres)) + else if ((pmr->drbv > pmr->dhlm + pmr->mres) || (pmr->drbv < pmr->dllm - pmr->mres) || + (pmr->dllm > pmr->dhlm)) { pmr->lvio = 1; MARK(M_LVIO); @@ -704,8 +708,7 @@ any of several reasons: ... ELSE IF done stopping after jog, OR, done with move. IF |backlash distance| > |motor resolution|. - IF Retry enabled, AND, [(encoder present, AND, use encoder true), - OR, use readback link true] + IF Retry enabled, AND, [use encoder true, OR, use readback link true] Set relative positioning indicator true. ELSE Set relative positioning indicator false. @@ -721,8 +724,7 @@ any of several reasons: ... ELSE IF done with 1st phase take out backlash after jog. Calculate backlash velocity, base velocity, backlash accel. and backlash position. - IF Retry enabled, AND, [(encoder present, AND, use encoder true), - OR, use readback link true] + IF Retry enabled, AND, [use encoder true, OR, use readback link true] Set relative positioning indicator true. ELSE Set relative positioning indicator false. @@ -785,7 +787,7 @@ static long postProcess(motorRecord * pmr) double vbase = pmr->vbas / fabs(pmr->mres); double hpos = 0; double hvel = pmr->hvel / fabs(pmr->mres); - double acc = (hvel - vbase) / pmr->accl; + double acc = (hvel - vbase) > 0 ? ((hvel - vbase)/ pmr->accl): (hvel / pmr->accl); motor_cmnd command; @@ -845,7 +847,7 @@ static long postProcess(motorRecord * pmr) /* Use if encoder or ReadbackLink is in use. */ msta.All = pmr->msta; - bool use_rel = (pmr->rtry != 0 && pmr->rmod != motorRMOD_I && ((msta.Bits.EA_PRESENT && pmr->ueip) || pmr->urip)); + bool use_rel = (pmr->rtry != 0 && pmr->rmod != motorRMOD_I && (pmr->ueip || pmr->urip)); double relpos = pmr->diff / pmr->mres; double relbpos = ((pmr->dval - pmr->bdst) - pmr->drbv) / pmr->mres; @@ -857,7 +859,7 @@ static long postProcess(motorRecord * pmr) if (pmr->mip & MIP_JOG_STOP) { - double acc = (vel - vbase) / pmr->accl; + double acc = (vel - vbase) > 0 ? ((vel - vbase)/ pmr->accl) : (vel / pmr->accl); if (vel <= vbase) vel = vbase + 1; @@ -874,7 +876,7 @@ static long postProcess(motorRecord * pmr) else { double bvel = pmr->bvel / fabs(pmr->mres); - double bacc = (bvel - vbase) / pmr->bacc; + double bacc = (bvel - vbase) > 0 ? ((bvel - vbase)/ pmr->bacc) : (bvel / pmr->bacc); if (bvel <= vbase) bvel = vbase + 1; @@ -910,12 +912,12 @@ static long postProcess(motorRecord * pmr) /* First part of jog done. Do backlash correction. */ double bvel = pmr->bvel / fabs(pmr->mres); double vbase = pmr->vbas / fabs(pmr->mres); - double bacc = (bvel - vbase) / pmr->bacc; + double bacc = (bvel - vbase) > 0 ? ((bvel - vbase)/ pmr->bacc) : (bvel / pmr->bacc); double bpos = (pmr->dval - pmr->bdst) / pmr->mres; /* Use if encoder or ReadbackLink is in use. */ msta.All = pmr->msta; - bool use_rel = (pmr->rtry != 0 && pmr->rmod != motorRMOD_I && ((msta.Bits.EA_PRESENT && pmr->ueip) || pmr->urip)); + bool use_rel = (pmr->rtry != 0 && pmr->rmod != motorRMOD_I && (pmr->ueip || pmr->urip)); double relpos = pmr->diff / pmr->mres; double relbpos = ((pmr->dval - pmr->bdst) - pmr->drbv) / pmr->mres; @@ -967,7 +969,12 @@ that it will happen when we return. ******************************************************************************/ static void maybeRetry(motorRecord * pmr) { - if ((fabs(pmr->diff) >= pmr->rdbd) && !pmr->hls && !pmr->lls) + bool user_cdir; + + /* Commanded direction in user coordinates. */ + user_cdir = ((pmr->dir == motorDIR_Pos) == (pmr->mres >= 0)) ? pmr->cdir : !pmr->cdir; + + if ((fabs(pmr->diff) >= pmr->rdbd) && !(pmr->hls && user_cdir) && !(pmr->lls && !user_cdir)) { /* No, we're not close enough. Try again. */ Debug(1, "maybeRetry: not close enough; diff = %f\n", pmr->diff); @@ -1118,8 +1125,9 @@ where the motor is in a sequence of movements that comprise a single motion. Call postProcess(). ENDIF ENDIF - IF the Done Moving field (DMOV) is TRUE. - Initialize delay ticks. + IF a limit switch is activated, OR, a load-position command is in progress (MIP = MIP_LOAD_P) + Set MIP to DONE and MARK it. + ELSE IF Done Moving (DMOV) is TRUE IF process delay acknowledged is true, OR, ticks <= 0. Clear process delay request and ack. indicators in MIP field. Mark MIP as changed. @@ -1139,7 +1147,7 @@ where the motor is in a sequence of movements that comprise a single motion. Clear Limit violation field. ELSE IF Jog indicator is true in MIP field. - Update Limit violation (LVIO) based on Jog direction (JOGF/JOGR) and velocity (JVEL). + Update Limit violation (LVIO) based on Jog direction (JOGF/JOGR) and velocity (JVEL) or DLLM > HLLM ELSE IF Homing indicator is true in MIP field. Set Limit violation (LVIO) FALSE. ENDIF @@ -1164,7 +1172,8 @@ where the motor is in a sequence of movements that comprise a single motion. Update record timestamp, call recGblGetTimeStamp(). Process alarms, call alarm_sub(). Monitor changes to record fields, call monitor(). - IF Done Moving field (DMOV) is TRUE. + + IF Done Moving field (DMOV) is TRUE Process the forward-scan-link record, call recGblFwdLink(). ENDIF Set Processing Active indicator field (PACT) false. @@ -1269,12 +1278,22 @@ static long process(dbCommon *arg) /* Assume we're done moving until we find out otherwise. */ if (pmr->dmov == FALSE) { + Debug(3, "%s:%d motor has stopped pp=%d mip=0x%0x\n", + __FILE__, __LINE__, pmr->pp, pmr->mip); pmr->dmov = TRUE; MARK(M_DMOV); + if (pmr->mip == MIP_JOGF || pmr->mip == MIP_JOGR) + { + /* Motor stopped while jogging and we didn't stop it */ + pmr->mip = MIP_DONE; + MARK(M_MIP); + clear_buttons(pmr); + pmr->pp = TRUE; + } } /* Do another update after LS error. */ - if (pmr->mip != MIP_DONE && (pmr->rhls || pmr->rlls)) + if (pmr->mip != MIP_DONE && ((pmr->rhls && pmr->cdir) || (pmr->rlls && !pmr->cdir))) { /* Restore DMOV to false and UNMARK it so it is not posted. */ pmr->dmov = FALSE; @@ -1303,8 +1322,13 @@ static long process(dbCommon *arg) status = postProcess(pmr); } - /* Are we "close enough" to desired position? */ - if (pmr->dmov == TRUE && !(pmr->rhls || pmr->rlls)) + /* Should we test for a retry? Consider limit only if in direction of move.*/ + if (((pmr->rhls && pmr->cdir) || (pmr->rlls && !pmr->cdir)) || (pmr->mip == MIP_LOAD_P)) + { + pmr->mip = MIP_DONE; + MARK(M_MIP); + } + else if (pmr->dmov == TRUE) { mmap_bits.All = pmr->mmap; /* Initialize for MARKED. */ @@ -1362,8 +1386,9 @@ static long process(dbCommon *arg) else { if (pmr->mip & MIP_JOG) - pmr->lvio = (pmr->jogf && (pmr->drbv > pmr->dhlm - pmr->jvel)) || - (pmr->jogr && (pmr->drbv < pmr->dllm + pmr->jvel)); + pmr->lvio = (pmr->jogf && (pmr->rbv > pmr->hlm - pmr->jvel)) || + (pmr->jogr && (pmr->rbv < pmr->llm + pmr->jvel)) || + (pmr->dllm > pmr->dhlm); else if (pmr->mip & MIP_HOME) pmr->lvio = false; /* Disable soft-limit error check during home search. */ } @@ -1371,7 +1396,7 @@ static long process(dbCommon *arg) if (pmr->lvio != old_lvio) { MARK(M_LVIO); - if (pmr->lvio && !pmr->set) + if (pmr->lvio && (!pmr->set && !pmr->igset)) { pmr->stop = 1; MARK(M_STOP); @@ -1402,9 +1427,9 @@ static long process(dbCommon *arg) alarm_sub(pmr); /* If we've violated alarm limits, yell. */ monitor(pmr); /* If values have changed, broadcast them. */ - if (pmr->dmov) - recGblFwdLink(pmr); /* Process the forward-scan-link record. */ - + if (pmr->dmov != 0) + recGblFwdLink(pmr); /* Process the forward-scan-link record. */ + pmr->pact = 0; Debug(4, "process:---------------------- end; motor \"%s\"\n", pmr->name); return (status); @@ -1590,8 +1615,7 @@ OFFset = userVAL - DialVAL * DIR ELSE Calculate.... - IF Retry enabled, AND, [(encoder present, AND, use encoder true), - OR, use readback link true] + IF Retry enabled, AND, Retry mode is Not "In-Position", AND, [use encoder true, OR, use readback link true] Set relative positioning indicator true. ELSE Set relative positioning indicator false. @@ -1621,6 +1645,8 @@ OFFset = userVAL - DialVAL * DIR IF this is not a retry. Reset retry counter and mark RCNT for dbposting. + ELSE + Process retry based on retry mode (RMOD). ENDIF IF (relative move indicator is OFF, AND, sign of absolute move @@ -1632,16 +1658,23 @@ OFFset = userVAL - DialVAL * DIR Set preferred direction indicator OFF. ENDIF - IF the dial DIFF is within the retry deadband. - IF MIP state is DONE. - Update last target positions. - Terminate move. Set DMOV TRUE. - ENDIF - NORMAL RETURN. + Process soft-travel limit. + + IF URIP is set to Yes + Test and set indicator on RDBL access in case it is a CA link that is down. + ENDIF + IF soft-travel limit error, OR, RDBL CA server disconnect error. + Restore previous target positions. + IF MIP indicates this is a retry. + Set MIP to Done. + ENDIF + IF MIP indicates Done Moving and DMOV is False + Set DMOV true. + ENDIF ENDIF .... .... - IF motion in progress indicator is false. + IF motion in progress indicator (MIP) is Done or Retry. Set MIP MOVE indicator ON and mark for posting. IF DMOV is TRUE. Set DMOV to FALSE and mark for posting. @@ -1786,9 +1819,13 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) /* Cancel any operations. */ if (pmr->mip & MIP_HOME) clear_buttons(pmr); - - pmr->mip = MIP_STOP; - MARK(M_MIP); + + if (!(pmr->mip & MIP_DELAY_REQ)) { + /* When we wait for DLY, keep it. */ + /* Otherwise the record may lock up */ + pmr->mip = MIP_STOP; + MARK(M_MIP); + } INIT_MSG(); WRITE_MSG(STOP_AXIS, NULL); SEND_MSG(); @@ -1844,8 +1881,8 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) /* Calculate encoder ratio. */ for (m = 10000000; (m > 1) && (fabs(m / pmr->eres) > 1.e6 || fabs(m / pmr->mres) > 1.e6); m /= 10); - ep_mp[0] = fabs(m / pmr->eres); - ep_mp[1] = fabs(m / pmr->mres); + ep_mp[0] = m / pmr->eres; + ep_mp[1] = m / pmr->mres; } else { @@ -1862,7 +1899,7 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) WRITE_MSG(SET_ENC_RATIO, ep_mp); SEND_MSG(); } - if (pmr->set) + if (pmr->set && !pmr->igset) { pmr->pp = TRUE; INIT_MSG(); @@ -1929,7 +1966,7 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) vbase = pmr->vbas / fabs(pmr->mres); hvel = pmr->hvel / fabs(pmr->mres); - acc = (hvel - vbase) / pmr->accl; + acc = (hvel - vbase) > 0 ? ((hvel - vbase) / pmr->accl) : (hvel / pmr->accl); hpos = 0; INIT_MSG(); @@ -1968,11 +2005,23 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) /* check for limit violation */ if ((pmr->dhlm == pmr->dllm) && (pmr->dllm == 0.0)) ; - else if ((pmr->jogf && (pmr->dval > pmr->dhlm - pmr->jvel)) || - (pmr->jogr && (pmr->dval < pmr->dllm + pmr->jvel))) + else if ((pmr->jogf && (pmr->val > pmr->hlm - pmr->jvel)) || + (pmr->jogr && (pmr->val < pmr->llm + pmr->jvel)) || + (pmr->dllm > pmr->dhlm)) { pmr->lvio = 1; MARK(M_LVIO); + /* Prevent record from locking up in mip=JOG_REQ */ + if (pmr->jogf) + { + pmr->jogf = 0; + MARK_AUX(M_JOGF); + } + if (pmr->jogr) + { + pmr->jogr = 0; + MARK_AUX(M_JOGR); + } return(OK); } pmr->mip = pmr->jogf ? MIP_JOGF : MIP_JOGR; @@ -2076,7 +2125,7 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) if (pmr->val != pmr->lval) { MARK(M_VAL); - if (set && !pmr->foff) + if ((set && !pmr->igset) && !pmr->foff) { /* * Act directly on .val. and return. User wants to redefine .val @@ -2126,7 +2175,7 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) pmr->rdif = NINT(pmr->diff / pmr->mres); MARK(M_RDIF); - if (set) + if (set && !pmr->igset) { if ((pmr->mip & MIP_LOAD_P) == 0) /* Test for LOAD_POS completion. */ load_pos(pmr); @@ -2141,24 +2190,24 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) double newpos = pmr->dval / pmr->mres; /* where to go */ double vbase = pmr->vbas / fabs(pmr->mres); /* base speed */ double vel = pmr->velo / fabs(pmr->mres); /* normal speed */ - double acc = (vel - vbase) / pmr->accl; /* normal accel. */ + double acc = (vel - vbase) > 0 ? ((vel - vbase) / pmr->accl) : (vel / pmr->accl); /* normal accel. */ /* * 'bpos' is one backlash distance away from 'newpos'. */ double bpos = (pmr->dval - pmr->bdst) / pmr->mres; double bvel = pmr->bvel / fabs(pmr->mres); /* backlash speed */ - double bacc = (bvel - vbase) / pmr->bacc; /* backlash accel. */ + double bacc = (bvel - vbase) > 0 ? ((bvel - vbase) / pmr->bacc) : (bvel / pmr->bacc); /* backlash accel. */ bool use_rel, preferred_dir, too_small; double relpos = pmr->diff / pmr->mres; double relbpos = ((pmr->dval - pmr->bdst) - pmr->drbv) / pmr->mres; double rbdst1 = 1.0 + (fabs(pmr->bdst) / fabs(pmr->mres)); long rdbdpos = NINT(pmr->rdbd / fabs(pmr->mres)); /* retry deadband steps */ - long rpos, npos; + long rpos, npos, rtnstat; msta_field msta; msta.All = pmr->msta; /*** Use if encoder or ReadbackLink is in use. ***/ - if (pmr->rtry != 0 && pmr->rmod != motorRMOD_I && ((msta.Bits.EA_PRESENT && pmr->ueip) || pmr->urip)) + if (pmr->rtry != 0 && pmr->rmod != motorRMOD_I && (pmr->ueip || pmr->urip)) use_rel = true; else use_rel = false; @@ -2185,6 +2234,18 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) { if (abs(npos - rpos) < 1) too_small = true; + if (!too_small) + { + double spdb = pmr->spdb; + if (spdb > 0) { + /* Don't move if new setpoint is within SPDB of DRBV */ + double drbv = pmr->drbv; + double dval = pmr->dval; + if (((dval - spdb) < drbv) && ((dval + spdb) > drbv)) { + too_small = true; + } + } + } } else if (abs(npos - rpos) < rdbdpos) too_small = true; @@ -2257,6 +2318,9 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) /* Check for soft-travel limit violation */ if ((pmr->dhlm == pmr->dllm) && (pmr->dllm == 0.0)) pmr->lvio = false; + /* At least one limit is violated when DLLM > DHLM */ + else if (pmr->dllm > pmr->dhlm) + pmr->lvio = true; /* LVIO = TRUE, AND, Move request towards valid travel limit range. */ else if (((pmr->dval > pmr->dhlm) && (pmr->dval < pmr->ldvl)) || ((pmr->dval < pmr->dllm) && (pmr->dval > pmr->ldvl))) @@ -2272,9 +2336,23 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) } } + if (pmr->urip == motorUEIP_Yes) + { + double test_drbv; + rtnstat = dbGetLink(&(pmr->rdbl), DBR_DOUBLE, &test_drbv, 0, 0 ); + if (RTN_SUCCESS(rtnstat)) + rtnstat = TRUE; + else + rtnstat = FALSE; + } + else + rtnstat = TRUE; + if (pmr->lvio != old_lvio) MARK(M_LVIO); - if (pmr->lvio) + + /* Test for travel limit violation, OR, URIP is True, but CA server is disconnected.*/ + if (pmr->lvio || rtnstat == FALSE) { pmr->val = pmr->lval; MARK(M_VAL); @@ -2824,10 +2902,32 @@ static long special(DBADDR *paddr, int after) /* new ueip flag */ case motorRecordUEIP: - MARK(M_UEIP); - /* Ideally, we should be recalculating speeds, but at the moment */ - /* we don't know whether hardware even has an encoder. */ - break; + if (pmr->ueip == motorUEIP_Yes) + { + if (msta.Bits.EA_PRESENT) + { + if (pmr->urip == motorUEIP_Yes) + { + pmr->urip = motorUEIP_No; /* Set URIP = No, if UEIP = Yes. */ + db_post_events(pmr, &pmr->urip, DBE_VAL_LOG); + } + } + else + { + pmr->ueip = motorUEIP_No; /* Override UEIP = Yes if EA_PRESENT is false. */ + MARK(M_UEIP); + } + } + break; + + /* new urip flag */ + case motorRecordURIP: + if ((pmr->urip == motorUEIP_Yes) && (pmr->ueip == motorUEIP_Yes)) + { + pmr->ueip = motorUEIP_No; /* Set UEIP = No, if URIP = Yes. */ + MARK(M_UEIP); + } + break; /* Set to SET mode */ case motorRecordSSET: @@ -3023,7 +3123,7 @@ static long special(DBADDR *paddr, int after) /****************************************************************************** get_units() *******************************************************************************/ -static long get_units(const DBADDR *paddr, char *units) +static long get_units(DBADDR *paddr, char *units) { motorRecord *pmr = (motorRecord *) paddr->precord; int siz = dbr_units_size - 1; /* "dbr_units_size" from dbAccess.h */ @@ -3080,7 +3180,7 @@ static long get_units(const DBADDR *paddr, char *units) /****************************************************************************** get_graphic_double() *******************************************************************************/ -static long get_graphic_double(const DBADDR *paddr, struct dbr_grDouble * pgd) +static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble * pgd) { motorRecord *pmr = (motorRecord *) paddr->precord; int fieldIndex = dbGetFieldIndex(paddr); @@ -3131,7 +3231,7 @@ static long get_graphic_double(const DBADDR *paddr, struct dbr_grDouble * pgd) get_control_double() *******************************************************************************/ static long - get_control_double(const DBADDR *paddr, struct dbr_ctrlDouble * pcd) + get_control_double(DBADDR *paddr, struct dbr_ctrlDouble * pcd) { motorRecord *pmr = (motorRecord *) paddr->precord; int fieldIndex = dbGetFieldIndex(paddr); @@ -3211,7 +3311,7 @@ static long get_precision(const DBADDR *paddr, long *precision) /****************************************************************************** get_alarm_double() *******************************************************************************/ -static long get_alarm_double(const DBADDR *paddr, struct dbr_alDouble * pad) +static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble * pad) { motorRecord *pmr = (motorRecord *) paddr->precord; int fieldIndex = dbGetFieldIndex(paddr); @@ -3244,7 +3344,8 @@ static void alarm_sub(motorRecord * pmr) status = recGblSetSevr((dbCommon *) pmr, UDF_ALARM, INVALID_ALARM); return; } - /* limit-switch and soft-limit violations */ + /* Limit-switch and soft-limit violations. Consider limit switches also if not in + * direction of move (limit hit by externally triggered move)*/ if (pmr->hlsv && (pmr->hls || (pmr->dval > pmr->dhlm))) { status = recGblSetSevr((dbCommon *) pmr, HIGH_ALARM, pmr->hlsv); @@ -3514,8 +3615,7 @@ static void monitor(motorRecord * pmr) /****************************************************************************** process_motor_info() *******************************************************************************/ -static void - process_motor_info(motorRecord * pmr, bool initcall) +static void process_motor_info(motorRecord * pmr, bool initcall) { double old_drbv = pmr->drbv; double old_rbv = pmr->rbv; @@ -3533,17 +3633,39 @@ static void /* Calculate raw and dial readback values. */ msta.All = pmr->msta; - if (msta.Bits.EA_PRESENT && pmr->ueip) + if (pmr->ueip == motorUEIP_Yes) { /* An encoder is present and the user wants us to use it. */ pmr->rrbv = pmr->rep; pmr->drbv = pmr->rrbv * pmr->eres; } - else + else if (pmr->urip == motorUEIP_Yes && initcall == false) { - pmr->rrbv = pmr->rmp; - if (pmr->urip == motorUEIP_No || initcall == true) + double rdblvalue; + long rtnstat; + + rtnstat = dbGetLink(&(pmr->rdbl), DBR_DOUBLE, &rdblvalue, 0, 0 ); + if (!RTN_SUCCESS(rtnstat)) + { + Debug(3, "process_motor_info: error reading RDBL link.\n"); + if (pmr->mip != MIP_DONE) + { + /* Error reading RDBL - stop move. */ + clear_buttons(pmr); + pmr->stop = 1; + MARK(M_STOP); + } + } + else + { + pmr->rrbv = NINT((rdblvalue * pmr->rres) / pmr->mres); pmr->drbv = pmr->rrbv * pmr->mres; + } + } + else /* UEIP = URIP = No */ + { + pmr->rrbv = pmr->rmp; + pmr->drbv = pmr->rrbv * pmr->mres; } if (pmr->rrbv != old_rrbv) @@ -3561,11 +3683,12 @@ static void if (pmr->tdir != old_tdir) MARK(M_TDIR); - /* Get states of high, low limit switches. */ - pmr->rhls = (msta.Bits.RA_PLUS_LS) && pmr->cdir; - pmr->rlls = (msta.Bits.RA_MINUS_LS) && !pmr->cdir; + /* Get states of high, low limit switches. State is independent of direction. */ + pmr->rhls = (msta.Bits.RA_PLUS_LS); + pmr->rlls = (msta.Bits.RA_MINUS_LS); - ls_active = (pmr->rhls || pmr->rlls) ? true : false; + /* Treat limit switch active only when it is pressed and in direction of movement. */ + ls_active = ((pmr->rhls && pmr->cdir) || (pmr->rlls && !pmr->cdir)) ? true : false; pmr->hls = ((pmr->dir == motorDIR_Pos) == (pmr->mres >= 0)) ? pmr->rhls : pmr->rlls; pmr->lls = ((pmr->dir == motorDIR_Pos) == (pmr->mres >= 0)) ? pmr->rlls : pmr->rhls; @@ -3581,11 +3704,6 @@ static void if (ls_active == true || msta.Bits.RA_PROBLEM) { clear_buttons(pmr); - if (msta.Bits.RA_PROBLEM) - { - pmr->stop = 1; - MARK(M_STOP); - } } } else @@ -3595,7 +3713,7 @@ static void MARK(M_MOVN); /* Get state of motor's or encoder's home switch. */ - if (msta.Bits.EA_PRESENT && pmr->ueip) + if (pmr->ueip) pmr->athm = (msta.Bits.EA_HOME) ? 1 : 0; else pmr->athm = (msta.Bits.RA_HOME) ? 1 : 0; @@ -3603,32 +3721,6 @@ static void if (pmr->athm != old_athm) MARK(M_ATHM); - - /* - * If we've got an external readback device, get Dial readback from it, and - * propagate to User readback. We do this after motor and encoder readbacks - * have been read and propagated to .rbv in case .rdbl is a link involving - * that field. - */ - if (pmr->urip && initcall == false) - { - long rtnstat; - - old_drbv = pmr->drbv; - rtnstat = dbGetLink(&(pmr->rdbl), DBR_DOUBLE, &(pmr->drbv), 0, 0 ); - if (!RTN_SUCCESS(rtnstat)) - pmr->drbv = old_drbv; - else - { - pmr->drbv *= pmr->rres; - pmr->rbv = pmr->drbv * dir + pmr->off; - if (pmr->drbv != old_drbv) - { - MARK(M_DRBV); - MARK(M_RBV); - } - } - } pmr->diff = pmr->dval - pmr->drbv; MARK(M_DIFF); pmr->rdif = NINT(pmr->diff / pmr->mres); @@ -4029,22 +4121,39 @@ static void syncTargetPosition(motorRecord *pmr) { int dir = (pmr->dir == motorDIR_Pos) ? 1 : -1; msta_field msta; + double rdblvalue; + long rtnstat; msta.All = pmr->msta; - if (msta.Bits.EA_PRESENT && pmr->ueip) + if (pmr->ueip) { /* An encoder is present and the user wants us to use it. */ pmr->rrbv = pmr->rep; pmr->drbv = pmr->rrbv * pmr->eres; } + else if (pmr->urip) + { + /* user wants us to use the readback link */ + rtnstat = dbGetLink(&(pmr->rdbl), DBR_DOUBLE, &rdblvalue, 0, 0 ); + if (!RTN_SUCCESS(rtnstat)) + printf("%s: syncTargetPosition: error reading RDBL link.\n", pmr->name); + else + { + pmr->rrbv = NINT((rdblvalue * pmr->rres) / pmr->mres); + pmr->drbv = pmr->rrbv * pmr->mres; + } + } else { pmr->rrbv = pmr->rmp; pmr->drbv = pmr->rrbv * pmr->mres; } + MARK(M_RRBV); + MARK(M_DRBV); pmr->rbv = pmr->drbv * dir + pmr->off; - + MARK(M_RBV); + pmr->val = pmr->lval = pmr->rbv ; MARK(M_VAL); pmr->dval = pmr->ldvl = pmr->drbv; diff --git a/motorApp/MotorSrc/motorRecord.dbd b/motorApp/MotorSrc/motorRecord.dbd index 00c173f..0e2d11c 100644 --- a/motorApp/MotorSrc/motorRecord.dbd +++ b/motorApp/MotorSrc/motorRecord.dbd @@ -1,9 +1,5 @@ # FILENAME... motorRecord.dbd -# Version: $Revision: 16592 $ -# Modified By: $Author: sluiter $ -# Last Modified: $Date: 2013-06-17 09:31:34 -0500 (Mon, 17 Jun 2013) $ -# HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motorRecord.dbd $ # Experimental Physics and Industrial Control System (EPICS) @@ -290,6 +286,7 @@ recordtype(motor) { field(URIP,DBF_MENU) { prompt("Use RDBL Link If Presen") promptgroup(GUI_COMMON) + special(SPC_MOD) pp(TRUE) interest(1) menu(motorUEIP) @@ -418,6 +415,12 @@ recordtype(motor) { special(SPC_MOD) interest(1) } + field(SPDB,DBF_DOUBLE) { + prompt("Setpoint Deadband (EGU)") + promptgroup(GUI_COMMON) + special(SPC_MOD) + interest(1) + } field(RCNT,DBF_SHORT) { prompt("Retry count") special(SPC_NOMOD) @@ -791,4 +794,8 @@ recordtype(motor) { pp(TRUE) interest(1) } + field(IGSET,DBF_SHORT) { + prompt("Ignore SET field") + interest(2) + } } diff --git a/motorApp/MotorSrc/motorUtil.cc b/motorApp/MotorSrc/motorUtil.cc index 9cfc600..aa8bc6f 100644 --- a/motorApp/MotorSrc/motorUtil.cc +++ b/motorApp/MotorSrc/motorUtil.cc @@ -2,10 +2,6 @@ FILENAME... motorUtil.cc USAGE... Motor Record Utility Support. -Version: $Revision: 17100 $ -Modified By: $Author: kpetersn $ -Last Modified: $Date: 2013-11-13 15:43:36 -0600 (Wed, 13 Nov 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motorUtil.cc $ */ diff --git a/motorApp/MotorSrc/motorUtilAux.cc b/motorApp/MotorSrc/motorUtilAux.cc index 20c9464..fef1690 100644 --- a/motorApp/MotorSrc/motorUtilAux.cc +++ b/motorApp/MotorSrc/motorUtilAux.cc @@ -2,10 +2,6 @@ FILENAME... motorUtilAux.cc USAGE... Motor Record Utility Support. -Version: $Revision: 15395 $ -Modified By: $Author: kpetersn $ -Last Modified: $Date: 2012-10-24 17:30:31 -0500 (Wed, 24 Oct 2012) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motorUtilAux.cc $ */ /* @@ -33,6 +29,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- */ #include +#include "motor_epics_inc.h" + #include #include diff --git a/motorApp/MotorSrc/motor_epics_inc.h b/motorApp/MotorSrc/motor_epics_inc.h new file mode 100644 index 0000000..0d4698c --- /dev/null +++ b/motorApp/MotorSrc/motor_epics_inc.h @@ -0,0 +1,33 @@ +#ifndef INCmotorepicsinc +#define INCmotorepicsinc 1 + +#include "epicsVersion.h" + +#ifndef VERSION_INT +# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#endif + +#define VERSION_INT_3_16 VERSION_INT(3,16,0,0) +#if EPICS_VERSION_INT < VERSION_INT_3_16 +#define RECSUPFUN_CAST (RECSUPFUN) +#else +#define RECSUPFUN_CAST +#define REC_TYPE motorRecord +#define USE_TYPED_RSET +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* !! for callocMustSucceed() */ +#include +#include + +#endif diff --git a/motorApp/MotorSrc/motordevCom.cc b/motorApp/MotorSrc/motordevCom.cc index 291bff3..b82bc8f 100644 --- a/motorApp/MotorSrc/motordevCom.cc +++ b/motorApp/MotorSrc/motordevCom.cc @@ -3,10 +3,6 @@ FILENAME: motordevCom.cc USAGE... This file contains device functions that are common to all motor record device support modules. -Version: $Revision: 17842 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-09-11 10:28:26 -0500 (Thu, 11 Sep 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motordevCom.cc $ */ /* @@ -59,18 +55,15 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- * .13 06/09/10 rls Set RA_PROBLEM instead of CNTRL_COMM_ERR when a NULL * motor_state[] ptr is detected in motor_end_trans_com(). * .14 08/19/14 rls Moved RMP and REP posting from record to here. + * .15 07/29/15 rls Added "Use Relative" (use_rel) indicator to "init_pos" logic in + * motor_init_record_com(). See README R6-10 item #6 for details. */ #include #include #include -#include -#include -#include -#include -#include -#include +#include "motor_epics_inc.h" #include "motorRecord.h" #include "motor.h" @@ -159,9 +152,9 @@ LOGIC... Set local encoder ratio to unity. ENDIF - Set Initialize position indicator based on (|DVAL| > RDBD, AND, MRES != 0, - AND, the above |"get_axis_info()" position| < RDBD) [NOTE: |controller - position| >= RDBD takes precedence over save/restore position]. + Set Initialize position indicator based on (Use Relative Moves indicator == TRUE, OR, + [|DVAL| > RDBD, AND, MRES != 0, AND, the above |"get_axis_info()" position| < RDBD)] + [NOTE: |controller position| >= RDBD takes precedence over save/restore position]. Set Command Primitive Initialization string indicator based on (non-NULL "init" pointer, AND, non-zero string length. @@ -203,6 +196,7 @@ motor_init_record_com(struct motorRecord *mr, int brdcnt, struct driver_table *t double ep_mp[2]; /* encoder pulses, motor pulses */ int rtnStat; msta_field msta; + bool use_rel = (mr->rtry != 0 && mr->rmod != motorRMOD_I && (mr->ueip || mr->urip)); /* allocate space for private field - an motor_trans structure */ mr->dpvt = (struct motor_trans *) malloc(sizeof(struct motor_trans)); @@ -294,9 +288,9 @@ motor_init_record_com(struct motorRecord *mr, int brdcnt, struct driver_table *t else ep_mp[0] = ep_mp[1] = 1.0; - initPos = (fabs(mr->dval) > mr->rdbd && mr->mres != 0 && - fabs(axis_query.position * mr->mres) < mr->rdbd) - ? true : false; + initPos = ((use_rel == true) || + (fabs(mr->dval) > mr->rdbd && mr->mres != 0 && fabs(axis_query.position * mr->mres) < mr->rdbd) + ) ? true : false; /* Test for command primitive initialization string. */ initString = (mr->init != NULL && strlen(mr->init)) ? true : false; /* Test for PID support. */ @@ -463,9 +457,9 @@ epicsShareFunc long motor_start_trans_com(struct motorRecord *mr, struct board_s motor_call->signal = axis; motor_call->type = UNDEFINED; motor_call->mrecord = (struct dbCommon *) mr; - motor_call->message[0] = (char) NULL; - motor_call->postmsgptr = (char) NULL; - motor_call->termstring = (char) NULL; + motor_call->message[0] = (char) NULL; + motor_call->postmsgptr = (char*) NULL; + motor_call->termstring = (char*) NULL; return (0); } diff --git a/motorApp/MotorSrc/motordevCom.h b/motorApp/MotorSrc/motordevCom.h index 72018dd..67c81a4 100644 --- a/motorApp/MotorSrc/motordevCom.h +++ b/motorApp/MotorSrc/motordevCom.h @@ -3,10 +3,6 @@ FILENAME... motordevCom.h USAGE... This file contains definitions and structures that are common to all motor record device support modules. -Version: $Revision: 16591 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-06-17 09:23:05 -0500 (Mon, 17 Jun 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motordevCom.h $ */ /* diff --git a/motorApp/MotorSrc/motordrvCom.cc b/motorApp/MotorSrc/motordrvCom.cc index b6f18a0..b032382 100644 --- a/motorApp/MotorSrc/motordrvCom.cc +++ b/motorApp/MotorSrc/motordrvCom.cc @@ -3,10 +3,6 @@ FILENAME... motordrvCom.cc USAGE... This file contains driver functions that are common to all motor record driver modules. -Version: $Revision: 17309 $ -Modified By: $Author: mooney $ -Last Modified: $Date: 2014-04-02 12:52:06 -0500 (Wed, 02 Apr 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motordrvCom.cc $ */ /* @@ -60,6 +56,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include #include "motor.h" diff --git a/motorApp/MotorSrc/motordrvCom.h b/motorApp/MotorSrc/motordrvCom.h index 31f4c36..c2351f5 100644 --- a/motorApp/MotorSrc/motordrvCom.h +++ b/motorApp/MotorSrc/motordrvCom.h @@ -4,10 +4,6 @@ FILENAME... motordrvCom.h USAGE... This file contains definitions and structures that are common to all motor record driver support modules. -Version: $Revision: 16591 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-06-17 09:23:05 -0500 (Mon, 17 Jun 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motordrvCom.h $ */ /* diff --git a/motorApp/MotorSrc/motordrvComCode.h b/motorApp/MotorSrc/motordrvComCode.h index 7641c7c..775d6f5 100644 --- a/motorApp/MotorSrc/motordrvComCode.h +++ b/motorApp/MotorSrc/motordrvComCode.h @@ -4,10 +4,6 @@ USAGE... This file contains local variables that are allocated in each motor record driver. The variables are allocated in each driver by including this file. -Version: $Revision: 16591 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-06-17 09:23:05 -0500 (Mon, 17 Jun 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/MotorSrc/motordrvComCode.h $ */ /* diff --git a/motorApp/NewFocusSrc/874xMotorDriver.cpp b/motorApp/NewFocusSrc/874xMotorDriver.cpp new file mode 100644 index 0000000..c3130d9 --- /dev/null +++ b/motorApp/NewFocusSrc/874xMotorDriver.cpp @@ -0,0 +1,349 @@ +/* +FILENAME... 874xMotorDriver.cpp +USAGE... Motor driver support for the NewFocus 874x series motor controller + +Based on ACRMotorDriver.cpp by: +Mark Rivers +March 4, 2011 + +== Modifications == +2015-12-01 - Wayne Lewis - Modify for NewFocus 874x series +*/ + +/* + * TODO: Extend for 8743 closed loop functionality + */ + +#include +#include +#include + +#include +#include + +#include + +#include "asynMotorController.h" +#include "asynMotorAxis.h" + +#include +#include "874xMotorDriver.h" + +static const char *driverName = "nf874xMotorDriver"; + +/** Creates a new nf874xController object. + * \param[in] portName The name of the asyn port that will be created for this driver + * \param[in] nf874xPortName The name of the drvAsynIPPPort that was created previously to connect to the nf874x controller + * \param[in] numAxes The number of axes that this controller supports. Create one extra axis to allow for base 1 indexing of NewFocus controllers. + * \param[in] movingPollPeriod The time between polls when any axis is moving + * \param[in] idlePollPeriod The time between polls when no axis is moving + */ +nf874xController::nf874xController(const char *portName, const char *nf874xPortName, int numAxes, + double movingPollPeriod, double idlePollPeriod) + //: asynMotorController(portName, numAxes, NUM_nf874x_PARAMS, + : asynMotorController(portName, numAxes+1, 0, + asynUInt32DigitalMask, + asynUInt32DigitalMask, + ASYN_CANBLOCK | ASYN_MULTIDEVICE, + 1, // autoconnect + 0, 0) // Default priority and stack size +{ + int axis; + asynStatus status; + static const char *functionName = "nf874xController"; + + /* Connect to nf874x controller */ + status = pasynOctetSyncIO->connect(nf874xPortName, 0, &pasynUserController_, NULL); + if (status) { + asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, + "%s:%s: cannot connect to nf874x controller\n", + driverName, functionName); + } + epicsThreadSleep(0.5); + // Create the axis objects + // Axis 0 will remain unused. This allows consistent axis numbering with + // NewFocus convention. + for (axis=1; axis<=numAxes; axis++) { + new nf874xAxis(this, axis); + } + + startPoller(movingPollPeriod, idlePollPeriod, 2); +} + + +/** Creates a new nf874xController object. + * Configuration command, called directly or from iocsh + * \param[in] portName The name of the asyn port that will be created for this driver + * \param[in] nf874xPortName The name of the drvAsynIPPPort that was created previously to connect to the nf874x controller + * \param[in] numAxes The number of axes that this controller supports. + * \param[in] movingPollPeriod The time in ms between polls when any axis is moving + * \param[in] idlePollPeriod The time in ms between polls when no axis is moving + */ +extern "C" int nf874xCreateController(const char *portName, const char *nf874xPortName, int numAxes, + int movingPollPeriod, int idlePollPeriod) +{ + new nf874xController(portName, nf874xPortName, numAxes, movingPollPeriod/1000., idlePollPeriod/1000.); + return(asynSuccess); +} + +/** Reports on status of the driver + * \param[in] fp The file pointer on which report information will be written + * \param[in] level The level of report detail desired + * + * If details > 0 then information is printed about each axis. + * After printing controller-specific information calls asynMotorController::report() + */ +void nf874xController::report(FILE *fp, int level) +{ + fprintf(fp, "nf874x motor driver %s, numAxes=%d, moving poll period=%f, idle poll period=%f\n", + this->portName, numAxes_, movingPollPeriod_, idlePollPeriod_); + + // Call the base class method + asynMotorController::report(fp, level); +} + +/** Returns a pointer to an nf874xMotorAxis object. + * Returns NULL if the axis number encoded in pasynUser is invalid. + * \param[in] pasynUser asynUser structure that encodes the axis index number. */ +nf874xAxis* nf874xController::getAxis(asynUser *pasynUser) +{ + return static_cast(asynMotorController::getAxis(pasynUser)); +} + +/** Returns a pointer to an nf874xMotorAxis object. + * Returns NULL if the axis number encoded in pasynUser is invalid. + * \param[in] axisNo Axis index number. */ +nf874xAxis* nf874xController::getAxis(int axisNo) +{ + return static_cast(asynMotorController::getAxis(axisNo)); +} + + +/** Called when asyn clients call pasynInt32->write(). + * Extracts the function and axis number from pasynUser. + * Sets the value in the parameter library. + * For all other functions it calls asynMotorController::writeInt32. + * Calls any registered callbacks for this pasynUser->reason and address. + * \param[in] pasynUser asynUser structure that encodes the reason and address. + * \param[in] value Value to write. */ +asynStatus nf874xController::writeInt32(asynUser *pasynUser, epicsInt32 value) +{ + int function = pasynUser->reason; + asynStatus status = asynSuccess; + nf874xAxis *pAxis = getAxis(pasynUser); + static const char *functionName = "writeInt32"; + + /* Set the parameter and readback in the parameter library. This may be overwritten when we read back the + * status at the end, but that's OK */ + status = setIntegerParam(pAxis->axisNo_, function, value); + + status = asynMotorController::writeInt32(pasynUser, value); + + /* Do callbacks so higher layers see any changes */ + callParamCallbacks(pAxis->axisNo_); + if (status) + asynPrint(pasynUser, ASYN_TRACE_ERROR, + "%s:%s: error, status=%d function=%d, value=%d\n", + driverName, functionName, status, function, value); + else + asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, + "%s:%s: function=%d, value=%d\n", + driverName, functionName, function, value); + return status; +} + +/** Called when asyn clients call pasynFloat64->write(). + * Extracts the function and axis number from pasynUser. + * Sets the value in the parameter library. + * Calls any registered callbacks for this pasynUser->reason and address. + * For all other functions it calls asynMotorController::writeFloat64. + * \param[in] pasynUser asynUser structure that encodes the reason and address. + * \param[in] value Value to write. */ +asynStatus nf874xController::writeFloat64(asynUser *pasynUser, epicsFloat64 value) +{ + int function = pasynUser->reason; + asynStatus status = asynSuccess; + nf874xAxis *pAxis = getAxis(pasynUser); + static const char *functionName = "writeFloat64"; + + + /* Set the parameter and readback in the parameter library. */ + status = setDoubleParam(pAxis->axisNo_, function, value); + + status = asynMotorController::writeFloat64(pasynUser, value); + + /* Do callbacks so higher layers see any changes */ + pAxis->callParamCallbacks(); + if (status) + asynPrint(pasynUser, ASYN_TRACE_ERROR, + "%s:%s: error, status=%d function=%d, value=%f\n", + driverName, functionName, status, function, value); + else + asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, + "%s:%s: function=%d, value=%f\n", + driverName, functionName, function, value); + return status; +} + +// These are the nf874xAxis methods + +/** Creates a new nf874xAxis object. + * \param[in] pC Pointer to the nf874xController to which this axis belongs. + * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1. + * + * Initializes register numbers, etc. + */ +nf874xAxis::nf874xAxis(nf874xController *pC, int axisNo) + : asynMotorAxis(pC, axisNo), + pC_(pC) +{ + sprintf(axisName_, "%d", axisNo); +} + +/** Reports on status of the driver + * \param[in] fp The file pointer on which report information will be written + * \param[in] level The level of report detail desired + * + * If details > 0 then information is printed about each axis. + * After printing controller-specific information calls asynMotorController::report() + */ +void nf874xAxis::report(FILE *fp, int level) +{ + if (level > 0) { + fprintf(fp, " axis %d\n", axisNo_ ); + } + + // Call the base class method + asynMotorAxis::report(fp, level); +} + + +asynStatus nf874xAxis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration) +{ + asynStatus status; + + sprintf(pC_->outString_, "%s AC %f", axisName_, acceleration); + status = pC_->writeController(); + sprintf(pC_->outString_, "%s VA %f", axisName_, maxVelocity); + status = pC_->writeController(); + if (relative) { + sprintf(pC_->outString_, "%s PR %f", axisName_, position); + status = pC_->writeController(); + } else { + sprintf(pC_->outString_, "%s PA %f", axisName_, position); + status = pC_->writeController(); + } + return status; +} + +asynStatus nf874xAxis::home(double minVelocity, double maxVelocity, double acceleration, int forwards) +{ + asynStatus status; + + sprintf(pC_->outString_, "%s AC %f", axisName_, acceleration); + status = pC_->writeController(); + sprintf(pC_->outString_, "%s VA %f", axisName_, acceleration); + status = pC_->writeController(); + sprintf(pC_->outString_, "%s DH", axisName_); + status = pC_->writeController(); + return status; +} + +asynStatus nf874xAxis::moveVelocity(double minVelocity, double maxVelocity, double acceleration) +{ + asynStatus status; + double speed=maxVelocity; + int forwards=1; + + if (speed < 0) { + speed = -speed; + forwards = 0; + } + sprintf(pC_->outString_, "%s AC %f", axisName_, acceleration); + status = pC_->writeController(); + sprintf(pC_->outString_, "%s VA %f", axisName_, speed); + status = pC_->writeController(); + sprintf(pC_->outString_, "%s MV %s", axisName_, forwards ? "+" : "-"); + status = pC_->writeController(); + return status; +} + +asynStatus nf874xAxis::stop(double acceleration ) +{ + asynStatus status; + + sprintf(pC_->outString_, "%s ST", axisName_); + status = pC_->writeController(); + return status; +} + +asynStatus nf874xAxis::setPosition(double position) +{ + asynStatus status; + + sprintf(pC_->outString_, "%s DH %f", axisName_, position); + status = pC_->writeController(); + return status; +} + +/** Polls the axis. + * This function reads the controller position, encoder position, the limit status, the moving status, + * and the drive power-on status. It does not current detect following error, etc. but this could be + * added. + * It calls setIntegerParam() and setDoubleParam() for each item that it polls, + * and then calls callParamCallbacks() at the end. + * \param[out] moving A flag that is set indicating that the axis is moving (1) or done (0). */ +asynStatus nf874xAxis::poll(bool *moving) +{ + int done; + asynStatus comStatus; + + // Read the current encoder position + sprintf(pC_->outString_, "%s TP?", axisName_); + comStatus = pC_->writeReadController(); + if (comStatus) goto skip; + encoderPosition_ = atof(pC_->inString_); + setDoubleParam(pC_->motorEncoderPosition_,encoderPosition_); + + // Read the current theoretical position + setDoubleParam(pC_->motorPosition_, encoderPosition_); + + // Read the current moving status + sprintf(pC_->outString_, "%s MD?", axisName_); + comStatus = pC_->writeReadController(); + if (comStatus) goto skip; + done = atoi(pC_->inString_); + setIntegerParam(pC_->motorStatusDone_, done); + *moving = done ? false:true; + + skip: + setIntegerParam(pC_->motorStatusProblem_, comStatus ? 1:0); + callParamCallbacks(); + return comStatus ? asynError : asynSuccess; +} + +/** Code for iocsh registration */ +static const iocshArg nf874xCreateControllerArg0 = {"Port name", iocshArgString}; +static const iocshArg nf874xCreateControllerArg1 = {"nf874x port name", iocshArgString}; +static const iocshArg nf874xCreateControllerArg2 = {"Number of axes", iocshArgInt}; +static const iocshArg nf874xCreateControllerArg3 = {"Moving poll period (ms)", iocshArgInt}; +static const iocshArg nf874xCreateControllerArg4 = {"Idle poll period (ms)", iocshArgInt}; +static const iocshArg * const nf874xCreateControllerArgs[] = {&nf874xCreateControllerArg0, + &nf874xCreateControllerArg1, + &nf874xCreateControllerArg2, + &nf874xCreateControllerArg3, + &nf874xCreateControllerArg4}; +static const iocshFuncDef nf874xCreateControllerDef = {"nf874xCreateController", 5, nf874xCreateControllerArgs}; +static void nf874xCreateContollerCallFunc(const iocshArgBuf *args) +{ + nf874xCreateController(args[0].sval, args[1].sval, args[2].ival, args[3].ival, args[4].ival); +} + +static void nf874xMotorRegister(void) +{ + iocshRegister(&nf874xCreateControllerDef, nf874xCreateContollerCallFunc); +} + +extern "C" { +epicsExportRegistrar(nf874xMotorRegister); +} diff --git a/motorApp/NewFocusSrc/874xMotorDriver.h b/motorApp/NewFocusSrc/874xMotorDriver.h new file mode 100644 index 0000000..7692925 --- /dev/null +++ b/motorApp/NewFocusSrc/874xMotorDriver.h @@ -0,0 +1,50 @@ +/* +FILENAME... 874xMotorDriver.h +USAGE... Motor driver support for the NewFocus 874x series of controllers + +Based on ACRMotorDriver.h by: +Mark Rivers +March 28, 2011 + +== Modifications == +2015-12-01 - Wayne Lewis - Modify for NewFocus 874x controllers +*/ + +#include "asynMotorController.h" +#include "asynMotorAxis.h" + +class epicsShareClass nf874xAxis : public asynMotorAxis +{ +public: + /* These are the methods we override from the base class */ + nf874xAxis(class nf874xController *pC, int axis); + void report(FILE *fp, int level); + asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); + asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration); + asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); + asynStatus stop(double acceleration); + asynStatus poll(bool *moving); + asynStatus setPosition(double position); + +private: + nf874xController *pC_; /**< Pointer to the asynMotorController to which this axis belongs. + * Abbreviated because it is used very frequently */ + char axisName_[10]; /**< Name of each axis, used in commands to nf874x controller */ + double encoderPosition_; /**< Cached copy of the encoder position */ + +friend class nf874xController; +}; + +class epicsShareClass nf874xController : public asynMotorController { +public: + nf874xController(const char *portName, const char *nf874xPortName, int numAxes, double movingPollPeriod, double idlePollPeriod); + + /* These are the methods that we override from asynMotorDriver */ + asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); + asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value); + void report(FILE *fp, int level); + nf874xAxis* getAxis(asynUser *pasynUser); + nf874xAxis* getAxis(int axisNo); + +friend class nf874xAxis; +}; diff --git a/motorApp/NewFocusSrc/Makefile b/motorApp/NewFocusSrc/Makefile index f98bdf6..bc5cf8e 100644 --- a/motorApp/NewFocusSrc/Makefile +++ b/motorApp/NewFocusSrc/Makefile @@ -11,10 +11,13 @@ DBD += devNewFocus.dbd LIBRARY_IOC = NewFocus -SRCS += NewFocusRegister.cc +NewFocus_SRCS += NewFocusRegister.cc # PMNC87xx (i.e., PMNC87xx) device driver. -SRCS += devPMNC87xx.cc drvPMNC87xx.cc +NewFocus_SRCS += devPMNC87xx.cc drvPMNC87xx.cc + +# NewFocus 874x driver +NewFocus_SRCS += 874xMotorDriver.cpp NewFocus_LIBS += motor asyn NewFocus_LIBS += $(EPICS_BASE_IOC_LIBS) diff --git a/motorApp/NewFocusSrc/devNewFocus.dbd b/motorApp/NewFocusSrc/devNewFocus.dbd index e188256..d9c6e6e 100644 --- a/motorApp/NewFocusSrc/devNewFocus.dbd +++ b/motorApp/NewFocusSrc/devNewFocus.dbd @@ -4,3 +4,6 @@ driver(drvPMNC87xx) registrar(NewFocusRegister) variable(drvPMNC87xxdebug) +# NewFocus 874x controller support +registrar(nf874xMotorRegister) + diff --git a/motorApp/NewFocusSrc/devPMNC87xx.cc b/motorApp/NewFocusSrc/devPMNC87xx.cc index 25430bf..b293e8c 100644 --- a/motorApp/NewFocusSrc/devPMNC87xx.cc +++ b/motorApp/NewFocusSrc/devPMNC87xx.cc @@ -44,6 +44,8 @@ Last Modified: 2004/12/20 21:10:53 #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -57,7 +59,7 @@ extern struct driver_table PMNC87xx_access; /* ----------------Create the dsets for devPMNC87xx----------------- */ /* static long report(); */ STATIC struct driver_table *drvtabptr; -STATIC long PMNC87xx_init(void *); +STATIC long PMNC87xx_init(int); STATIC long PMNC87xx_init_record(void *); STATIC long PMNC87xx_start_trans(struct motorRecord *); STATIC RTN_STATUS PMNC87xx_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -111,12 +113,11 @@ static struct board_stat **PMNC87xx_cards; /* initialize device support for PMNC87xx stepper motor */ -STATIC long PMNC87xx_init(void *arg) +STATIC long PMNC87xx_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PMNC87xx_access; (drvtabptr->init)(); diff --git a/motorApp/NewFocusSrc/drvPMNC87xx.cc b/motorApp/NewFocusSrc/drvPMNC87xx.cc index 800d51c..fb5c45f 100644 --- a/motorApp/NewFocusSrc/drvPMNC87xx.cc +++ b/motorApp/NewFocusSrc/drvPMNC87xx.cc @@ -66,6 +66,8 @@ Last Modified: 2005/03/30 19:10:48 #include #include #include +#include +#include #include "NewFocusRegister.h" #include "drvPMNCCom.h" #include "asynOctetSyncIO.h" diff --git a/motorApp/NewportSrc/AG_CONEX.cpp b/motorApp/NewportSrc/AG_CONEX.cpp index 8f016a2..04af446 100644 --- a/motorApp/NewportSrc/AG_CONEX.cpp +++ b/motorApp/NewportSrc/AG_CONEX.cpp @@ -1,6 +1,6 @@ /* FILENAME... AG_CONEX.cpp -USAGE... Motor driver support for the Newport CONEX-AGP and CONEX-CC series controllers. +USAGE... Motor driver support for the Newport CONEX-AGP, CONEX-CC and CONEX-PP series controllers. Mark Rivers April 11, 2013 @@ -29,6 +29,9 @@ April 11, 2013 #define CONEX_TIMEOUT 2.0 #define LINUX_WRITE_DELAY 0.1 +// We force minus end-of-run home type for Conex-PP for now +#define HOME_TYPE_MINUS_EOR 4 + /** Creates a new AG_CONEXController object. * \param[in] portName The name of the asyn port that will be created for this driver * \param[in] serialPortName The name of the drvAsynSerialPort that was created previously to connect to the CONEX controller @@ -169,7 +172,7 @@ AG_CONEXAxis* AG_CONEXController::getAxis(int axisNo) AG_CONEXAxis::AG_CONEXAxis(AG_CONEXController *pC) : asynMotorAxis(pC, 0), pC_(pC), - currentPosition_(0.), positionOffset_(0.) + currentPosition_(0.) { static const char *functionName = "AG_CONEXAxis::AG_CONEXAxis"; @@ -186,6 +189,9 @@ AG_CONEXAxis::AG_CONEXAxis(AG_CONEXController *pC) KIMax_ = 1.e6; KDMax_ = 1.e6; } + else if (strstr(pC->controllerVersion_, "Conex PP")) { + conexModel_ = ModelConexPP; + } else { asynPrint(pC->pasynUserSelf, ASYN_TRACE_ERROR, "%s: unknown model, firmware string=%s\n", @@ -196,12 +202,16 @@ AG_CONEXAxis::AG_CONEXAxis(AG_CONEXController *pC) // Read the stage ID sprintf(pC_->outString_, "%dID?", pC->controllerID_); pC_->writeReadController(); - strcpy(stageID_, &pC_->inString_[4]); + strcpy(stageID_, &pC_->inString_[3]); - // Read the encoder increment - sprintf(pC_->outString_, "%dSU?", pC->controllerID_); - pC_->writeReadController(); - encoderIncrement_ = atof(&pC_->inString_[3]); + // Read the encoder increment (CC and AGP only) + if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { + sprintf(pC_->outString_, "%dSU?", pC->controllerID_); + pC_->writeReadController(); + encoderIncrement_ = atof(&pC_->inString_[3]); + } else { + encoderIncrement_ = 1.; + } // Read the interpolation factor (AGP only) if (conexModel_ == ModelConexAGP) { @@ -212,8 +222,21 @@ AG_CONEXAxis::AG_CONEXAxis(AG_CONEXController *pC) interpolationFactor_ = 1.; } + if (conexModel_ == ModelConexPP) { + sprintf(pC_->outString_, "%dFRM?", pC->controllerID_); + pC_->writeReadController(); + microStepsPerFullStep_ = atoi(&pC_->inString_[4]); + sprintf(pC_->outString_, "%dFRS?", pC->controllerID_); + pC_->writeReadController(); + fullStepSize_ = atof(&pC_->inString_[4]); + } + // Compute the minimum step size - stepSize_ = encoderIncrement_ / interpolationFactor_; + if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { + stepSize_ = encoderIncrement_ / interpolationFactor_; + } else { + stepSize_ = fullStepSize_ / microStepsPerFullStep_ / 1000.; + } // Read the low and high software limits sprintf(pC_->outString_, "%dSL?", pC->controllerID_); @@ -223,8 +246,10 @@ AG_CONEXAxis::AG_CONEXAxis(AG_CONEXController *pC) pC_->writeReadController(); highLimit_ = atof(&pC_->inString_[3]); - // Tell the motor record that we have an gain supprt - setIntegerParam(pC_->motorStatusGainSupport_, 1); + // Tell the motor record that we have an gain support (CC and AGP only) + if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { + setIntegerParam(pC_->motorStatusGainSupport_, 1); + } } /** Reports on status of the axis @@ -236,32 +261,36 @@ AG_CONEXAxis::AG_CONEXAxis(AG_CONEXController *pC) void AG_CONEXAxis::report(FILE *fp, int level) { if (level > 0) { - // Read KOP, KI, LF - sprintf(pC_->outString_, "%dKP?", pC_->controllerID_); - pC_->writeReadController(); - KP_ = atof(&pC_->inString_[3]); - sprintf(pC_->outString_, "%dKI?", pC_->controllerID_); - pC_->writeReadController(); - KI_ = atof(&pC_->inString_[3]); - if (conexModel_ == ModelConexAGP) { - sprintf(pC_->outString_, "%dLF?", pC_->controllerID_); + // Read KOP, KI, LF (CC and AGP only) + if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { + sprintf(pC_->outString_, "%dKP?", pC_->controllerID_); pC_->writeReadController(); - LF_ = atof(&pC_->inString_[3]); - } else if (conexModel_ == ModelConexCC) { - sprintf(pC_->outString_, "%dKD?", pC_->controllerID_); + KP_ = atof(&pC_->inString_[3]); + sprintf(pC_->outString_, "%dKI?", pC_->controllerID_); pC_->writeReadController(); - KD_ = atof(&pC_->inString_[3]); - LF_ = KD_; // For printout below + KI_ = atof(&pC_->inString_[3]); + if (conexModel_ == ModelConexAGP) { + sprintf(pC_->outString_, "%dLF?", pC_->controllerID_); + pC_->writeReadController(); + LF_ = atof(&pC_->inString_[3]); + } else if (conexModel_ == ModelConexCC) { + sprintf(pC_->outString_, "%dKD?", pC_->controllerID_); + pC_->writeReadController(); + KD_ = atof(&pC_->inString_[3]); + LF_ = KD_; // For printout below + } } fprintf(fp, " stageID=%s\n" - " currentPosition=%f, positionOffset=%f, encoderIncrement=%f\n" + " currentPosition=%f, encoderIncrement=%f\n" " interpolationFactor=%f, stepSize=%f, lowLimit=%f, highLimit=%f\n" - " KP=%f, KI=%f, KD/LF=%f\n", + " KP=%f, KI=%f, KD/LF=%f\n" + " fullStepSize=%f, microStepsPerFullStep=%d\n", stageID_, - currentPosition_, positionOffset_, encoderIncrement_, + currentPosition_, encoderIncrement_, interpolationFactor_, stepSize_, lowLimit_, highLimit_, - KP_, KI_, LF_); + KP_, KI_, LF_, + fullStepSize_, microStepsPerFullStep_); } // Call the base class method @@ -273,8 +302,8 @@ asynStatus AG_CONEXAxis::move(double position, int relative, double minVelocity, asynStatus status; // static const char *functionName = "AG_CONEXAxis::move"; - // The CONEX-CC supports velocity and acceleration, the CONEX-AGP does not - if (conexModel_ == ModelConexCC) { + // The CONEX-CC and CONEX-PP support velocity and acceleration, the CONEX-AGP does not + if ((conexModel_ == ModelConexCC) || (conexModel_ == ModelConexPP)) { sprintf(pC_->outString_, "%dAC%f", pC_->controllerID_, acceleration*stepSize_); status = pC_->writeCONEX(); sprintf(pC_->outString_, "%dVA%f", pC_->controllerID_, maxVelocity*stepSize_); @@ -284,7 +313,7 @@ asynStatus AG_CONEXAxis::move(double position, int relative, double minVelocity, if (relative) { sprintf(pC_->outString_, "%dPR%f", pC_->controllerID_, position*stepSize_); } else { - sprintf(pC_->outString_, "%dPA%f", pC_->controllerID_, (position-positionOffset_)*stepSize_); + sprintf(pC_->outString_, "%dPA%f", pC_->controllerID_, position*stepSize_); } status = pC_->writeCONEX(); return status; @@ -304,6 +333,14 @@ asynStatus AG_CONEXAxis::home(double minVelocity, double maxVelocity, double acc // and writing to non-volatile memory with the OH command. // This is time-consuming and can only be done a limited number of times so we don't do it here. + // The CONEX-PP supports home velocity and home type. We force negative limit switch home type. + if (conexModel_ == ModelConexPP) { + sprintf(pC_->outString_, "%dOH%f", pC_->controllerID_, maxVelocity); + status = pC_->writeCONEX(); + sprintf(pC_->outString_, "%dHT%d", pC_->controllerID_, HOME_TYPE_MINUS_EOR); + status = pC_->writeCONEX(); + } + sprintf(pC_->outString_, "%dOR", pC_->controllerID_); status = pC_->writeCONEX(); return status; @@ -338,7 +375,6 @@ asynStatus AG_CONEXAxis::setPosition(double position) { //static const char *functionName = "AG_CONEXAxis::setPosition"; - positionOffset_ = position - currentPosition_; return asynSuccess; } @@ -368,52 +404,58 @@ asynStatus AG_CONEXAxis::getClosedLoop(bool *closedLoop) asynStatus AG_CONEXAxis::setPGain(double pGain) { - asynStatus status; + asynStatus status = asynSuccess; bool closedLoop; //static const char *functionName = "AG_CONEXAxis::setPGain"; - getClosedLoop(&closedLoop); - setClosedLoop(false); - // The pGain value from the motor record is between 0 and 1. - sprintf(pC_->outString_, "%dKP%f", pC_->controllerID_, pGain*KPMax_); - status = pC_->writeCONEX(); - if (closedLoop) setClosedLoop(true); + if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { + getClosedLoop(&closedLoop); + setClosedLoop(false); + // The pGain value from the motor record is between 0 and 1. + sprintf(pC_->outString_, "%dKP%f", pC_->controllerID_, pGain*KPMax_); + status = pC_->writeCONEX(); + if (closedLoop) setClosedLoop(true); + } return status; } asynStatus AG_CONEXAxis::setIGain(double iGain) { - asynStatus status; + asynStatus status = asynSuccess; bool closedLoop; //static const char *functionName = "AG_CONEXAxis::setIGain"; - getClosedLoop(&closedLoop); - setClosedLoop(false); - // The iGain value from the motor record is between 0 and 1. - sprintf(pC_->outString_, "%dKI%f", pC_->controllerID_, iGain*KIMax_); - status = pC_->writeCONEX(); - if (closedLoop) setClosedLoop(true); + if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { + getClosedLoop(&closedLoop); + setClosedLoop(false); + // The iGain value from the motor record is between 0 and 1. + sprintf(pC_->outString_, "%dKI%f", pC_->controllerID_, iGain*KIMax_); + status = pC_->writeCONEX(); + if (closedLoop) setClosedLoop(true); + } return status; } asynStatus AG_CONEXAxis::setDGain(double dGain) { - asynStatus status; + asynStatus status = asynSuccess; bool closedLoop; //static const char *functionName = "AG_CONEXAxis::setPGain"; - getClosedLoop(&closedLoop); - setClosedLoop(false); - if (conexModel_ == ModelConexCC) { - // The dGain value from the motor record is between 0 and 1. - sprintf(pC_->outString_, "%dKI%f", pC_->controllerID_, dGain*KDMax_); - } else if (conexModel_ == ModelConexAGP) { - // We are using the DGain for the Low pass filter frequency. - // DGain value is between 0 and 1 - sprintf(pC_->outString_, "%dLF%f", pC_->controllerID_, dGain*LFMax_); + if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { + getClosedLoop(&closedLoop); + setClosedLoop(false); + if (conexModel_ == ModelConexCC) { + // The dGain value from the motor record is between 0 and 1. + sprintf(pC_->outString_, "%dKI%f", pC_->controllerID_, dGain*KDMax_); + } else if (conexModel_ == ModelConexAGP) { + // We are using the DGain for the Low pass filter frequency. + // DGain value is between 0 and 1 + sprintf(pC_->outString_, "%dLF%f", pC_->controllerID_, dGain*LFMax_); + } + status = pC_->writeCONEX(); + if (closedLoop) setClosedLoop(true); } - status = pC_->writeCONEX(); - if (closedLoop) setClosedLoop(true); return status; } @@ -440,7 +482,7 @@ asynStatus AG_CONEXAxis::poll(bool *moving) if (comStatus) goto skip; // The response string is of the form "1TPxxx" position = atof(&pC_->inString_[3]); - currentPosition_ = (position + positionOffset_)/stepSize_; + currentPosition_ = position /stepSize_; setDoubleParam(pC_->motorPosition_, currentPosition_); // Read the moving status of this motor @@ -456,10 +498,10 @@ asynStatus AG_CONEXAxis::poll(bool *moving) setIntegerParam(pC_->motorStatusDone_, done); *moving = done ? false:true; - // The meaning of the error bits is different for the CC and AGP - if (conexModel_ == ModelConexCC) { - if (status & 0x100) lowLimit = 1; - if (status & 0x200) highLimit = 1; + // The meaning of the error bits is different for the CC, AGP, and PP + if ((conexModel_ == ModelConexCC) || (conexModel_ == ModelConexPP)) { + if (status & 0x100) lowLimit = 1; + if (status & 0x200) highLimit = 1; } setIntegerParam(pC_->motorStatusLowLimit_, lowLimit); diff --git a/motorApp/NewportSrc/AG_CONEX.h b/motorApp/NewportSrc/AG_CONEX.h index fba951f..f5ffbdf 100644 --- a/motorApp/NewportSrc/AG_CONEX.h +++ b/motorApp/NewportSrc/AG_CONEX.h @@ -12,7 +12,8 @@ April 11, 2013 typedef enum { ModelConexAGP, - ModelConexCC + ModelConexCC, + ModelConexPP } ConexModel_t; // No controller-specific parameters yet @@ -40,10 +41,11 @@ class epicsShareClass AG_CONEXAxis : public asynMotorAxis * Abbreviated because it is used very frequently */ asynStatus getClosedLoop(bool *closedLoop); double currentPosition_; - double positionOffset_; double encoderIncrement_; double interpolationFactor_; double stepSize_; + double fullStepSize_; + int microStepsPerFullStep_; double highLimit_; double lowLimit_; double KP_; diff --git a/motorApp/NewportSrc/HXPDriver.cpp b/motorApp/NewportSrc/HXPDriver.cpp index 418944e..a6f5646 100644 --- a/motorApp/NewportSrc/HXPDriver.cpp +++ b/motorApp/NewportSrc/HXPDriver.cpp @@ -20,9 +20,9 @@ Note: This driver was tested with the v1.3.x of the firmware #include "asynMotorController.h" #include "asynMotorAxis.h" -#include "hxp_drivers.h" #include +#include "hxp_drivers.h" #include "HXPDriver.h" #define NINT(f) (int)((f)>0 ? (f)+0.5 : (f)-0.5) diff --git a/motorApp/NewportSrc/Makefile b/motorApp/NewportSrc/Makefile index 211ea12..87aca9a 100644 --- a/motorApp/NewportSrc/Makefile +++ b/motorApp/NewportSrc/Makefile @@ -14,6 +14,9 @@ USR_CPPFLAGS_Linux += -Wno-write-strings INC += XPS_C8_drivers.h DBD += devNewport.dbd +ifdef SNCSEQ +DBD += devNewportSeq.dbd +endif LIBRARY_IOC = Newport diff --git a/motorApp/NewportSrc/NewportRegister.cc b/motorApp/NewportSrc/NewportRegister.cc index 7fc41f2..92390af 100644 --- a/motorApp/NewportSrc/NewportRegister.cc +++ b/motorApp/NewportSrc/NewportRegister.cc @@ -2,9 +2,6 @@ FILENAME... NewportRegister.cc USAGE... Register Newport motor device driver shell commands. -Version: $Revision: 1.13 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2006-06-15 19:02:59 $ */ /***************************************************************** diff --git a/motorApp/NewportSrc/NewportRegister.h b/motorApp/NewportSrc/NewportRegister.h index f781060..d3d36a5 100644 --- a/motorApp/NewportSrc/NewportRegister.h +++ b/motorApp/NewportSrc/NewportRegister.h @@ -2,9 +2,6 @@ FILENAME... NewportRegister.h USAGE... This file contains function prototypes for Newport IOC shell commands. -Version: $Revision: 1.11 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2006-06-15 19:04:58 $ */ /* diff --git a/motorApp/NewportSrc/SMC100Driver.cpp b/motorApp/NewportSrc/SMC100Driver.cpp index 4fdcb22..05e9ef0 100644 --- a/motorApp/NewportSrc/SMC100Driver.cpp +++ b/motorApp/NewportSrc/SMC100Driver.cpp @@ -23,6 +23,9 @@ K. Goetze 2012-03-23 Initial version #include +#include +#include + #include #include "SMC100Driver.h" diff --git a/motorApp/NewportSrc/SMC100Register.cc b/motorApp/NewportSrc/SMC100Register.cc index 3796d68..103d1fd 100644 --- a/motorApp/NewportSrc/SMC100Register.cc +++ b/motorApp/NewportSrc/SMC100Register.cc @@ -2,9 +2,6 @@ FILENAME... SMC100Register.cc USAGE... Register SMC100 motor device driver shell commands. -Version: $Revision: 1.4 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:06:58 $ */ /***************************************************************** diff --git a/motorApp/NewportSrc/SMC100Register.h b/motorApp/NewportSrc/SMC100Register.h index 9c0e506..e0f6bab 100644 --- a/motorApp/NewportSrc/SMC100Register.h +++ b/motorApp/NewportSrc/SMC100Register.h @@ -2,9 +2,6 @@ FILENAME... SMC100Register.h USAGE... This file contains function prototypes for SMC100 IOC shell commands. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-07-16 19:06:58 $ */ /* diff --git a/motorApp/NewportSrc/XPSAxis.cpp b/motorApp/NewportSrc/XPSAxis.cpp index e1b0edb..4eb3bcb 100644 --- a/motorApp/NewportSrc/XPSAxis.cpp +++ b/motorApp/NewportSrc/XPSAxis.cpp @@ -2,10 +2,6 @@ FILENAME... XPSMotorDriver.cpp USAGE... Newport XPS EPICS asyn motor device driver -Version: $Revision: 19717 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-12-09 10:21:24 -0600 (Wed, 09 Dec 2009) $ -HeadURL: $URL: https://subversion.xor.aps.anl.gov/synApps/trunk/support/motor/vstub/motorApp/NewportSrc/XPSMotorDriver.cpp $ */ /* @@ -96,10 +92,10 @@ using std::endl; #include "asynMotorController.h" #include "asynMotorAxis.h" +#include #include "XPSController.h" #include "XPS_C8_drivers.h" #include "asynOctetSocket.h" -#include #include "XPSAxis.h" #define XPSC8_END_OF_RUN_MINUS 0x80000100 @@ -360,6 +356,8 @@ asynStatus XPSAxis::home(double min_velocity, double max_velocity, double accele } moving_ = true; + setIntegerParam(pC_->motorStatusProblem_, 0); + return asynSuccess; } @@ -567,8 +565,8 @@ asynStatus XPSAxis::poll(bool *moving) &axisStatus_); if (!status) { status = GroupStatusStringGet(pollSocket_, - axisStatus_, - statusString); + axisStatus_, + statusString); } if (status) { asynPrint(pasynUser_, ASYN_TRACE_ERROR, @@ -606,17 +604,17 @@ asynStatus XPSAxis::poll(bool *moving) if (moving_) { status = ReadXPSSocket(moveSocket_, readResponse, sizeof(readResponse), 0); if (status < 0) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling ReadXPSSocket status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling ReadXPSSocket status=%d\n", + driverName, functionName, pC_->portName, axisNo_, status); + goto done; } if (status > 0) { - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: [%s,%d]: readXPSSocket returned nRead=%d, [%s]\n", - driverName, functionName, pC_->portName, axisNo_, status, readResponse); - status = 0; - moving_ = false; + asynPrint(pasynUser_, ASYN_TRACE_FLOW, + "%s:%s: [%s,%d]: readXPSSocket returned nRead=%d, [%s]\n", + driverName, functionName, pC_->portName, axisNo_, status, readResponse); + status = 0; + moving_ = false; } } } @@ -870,6 +868,227 @@ asynStatus XPSAxis::setClosedLoop(bool closedLoop) return (asynStatus)status; } +double XPSAxis::motorRecPositionToXPSPosition(double motorRecPosition) +{ + int direction; + double offset, resolution, XPSPosition; + + pC_->getDoubleParam (axisNo_, pC_->motorRecResolution_, &resolution); + pC_->getDoubleParam (axisNo_, pC_->motorRecOffset_, &offset); + pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); + + if (direction != 0) resolution = -resolution; + if (resolution == 0) resolution = 1; + XPSPosition = (motorRecPosition - offset) / resolution * stepSize_; + return XPSPosition; +} + +double XPSAxis::XPSPositionToMotorRecPosition(double XPSPosition) +{ + int direction; + double offset, resolution, motorRecPosition; + + pC_->getDoubleParam (axisNo_, pC_->motorRecResolution_, &resolution); + pC_->getDoubleParam (axisNo_, pC_->motorRecOffset_, &offset); + pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); + + if (direction != 0) resolution = -resolution; + if (stepSize_ == 0) stepSize_ = 1; + motorRecPosition = XPSPosition * resolution / stepSize_ + offset; + return motorRecPosition; +} + +double XPSAxis::motorRecStepToXPSStep(double motorRecStep) +{ + int direction; + double resolution, XPSStep; + + pC_->getDoubleParam (axisNo_, pC_->motorRecResolution_, &resolution); + pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); + + if (direction != 0) resolution = -resolution; + if (resolution == 0) resolution = 1; + XPSStep = motorRecStep / resolution * stepSize_; + return XPSStep; +} + +double XPSAxis::XPSStepToMotorRecStep(double XPSStep) +{ + int direction; + double resolution, motorRecStep; + + pC_->getDoubleParam (axisNo_, pC_->motorRecResolution_, &resolution); + pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); + + if (direction != 0) resolution = -resolution; + if (stepSize_ == 0) stepSize_ = 1; + motorRecStep = XPSStep * resolution / stepSize_; + return motorRecStep; +} + +asynStatus XPSAxis::setPositionCompare() +{ + int mode; + double minPosition, maxPosition, stepSize, pulseWidth, settlingTime; + int itemp; + int direction; + int status; + static const char *functionName = "setPositionCompare"; + + pC_->getIntegerParam(axisNo_, pC_->XPSPositionCompareMode_, &mode); + pC_->getDoubleParam (axisNo_, pC_->XPSPositionCompareMinPosition_, &minPosition); + pC_->getDoubleParam (axisNo_, pC_->XPSPositionCompareMaxPosition_, &maxPosition); + pC_->getDoubleParam (axisNo_, pC_->XPSPositionCompareStepSize_, &stepSize); + pC_->getIntegerParam(axisNo_, pC_->XPSPositionComparePulseWidth_, &itemp); + pulseWidth = positionComparePulseWidths[itemp]; + pC_->getIntegerParam(axisNo_, pC_->XPSPositionCompareSettlingTime_, &itemp); + settlingTime = positionCompareSettlingTimes[itemp]; + + // minPosition and maxPosition are in motor record units. Convert to XPS units + minPosition = motorRecPositionToXPSPosition(minPosition); + maxPosition = motorRecPositionToXPSPosition(maxPosition); + stepSize = fabs(motorRecStepToXPSStep(stepSize)); + + // Swap max and min positions if needed + pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); + if (direction != 0) { + double temp=maxPosition; + maxPosition = minPosition; + minPosition = temp; + } + + // Disable the position compare so we can set parameters + status = PositionerPositionCompareDisable(pollSocket_, positionerName_); + if (status) { + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling PositionerPositionCompareDisable status=%d\n", + driverName, functionName, pC_->portName, axisNo_, status); + return asynError; + } + status = PositionerPositionComparePulseParametersSet(pollSocket_, positionerName_, pulseWidth, settlingTime); + if (status) { + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling PositionerPositionComparePulseParametersSet" + " status=%d, pulseWidth=%f, settlingTime=%f\n", + driverName, functionName, pC_->portName, axisNo_, status, pulseWidth, settlingTime); + return asynError; + } + switch (mode) { + case XPSPositionCompareModeDisable: + break; + + case XPSPositionCompareModePulse: + status = PositionerPositionCompareSet(pollSocket_, positionerName_, minPosition, maxPosition, stepSize); + if (status) { + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling PositionerPositionCompareSet" + " status=%d, minPosition=%f, maxPosition=%f, stepSize=%f\n", + driverName, functionName, pC_->portName, axisNo_, status, minPosition, maxPosition, stepSize); + return asynError; + } + status = PositionerPositionCompareEnable(pollSocket_, positionerName_); + if (status) { + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling PositionerPositionCompareEnable status=%d\n", + driverName, functionName, pC_->portName, axisNo_, status); + return asynError; + } + break; + + case XPSPositionCompareModeAquadBWindowed: + status = PositionerPositionCompareAquadBWindowedSet(pollSocket_, positionerName_, minPosition, maxPosition); + if (status) { + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling PositionerPositionCompareAquadBWindowedSet" + " status=%d, minPosition=%f, maxPosition=%f\n", + driverName, functionName, pC_->portName, axisNo_, status, minPosition, maxPosition); + return asynError; + } + status = PositionerPositionCompareEnable(pollSocket_, positionerName_); + if (status) { + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling PositionerPositionCompareEnable status=%d\n", + driverName, functionName, pC_->portName, axisNo_, status); + return asynError; + } + break; + + case XPSPositionCompareModeAquadBAlways: + status = PositionerPositionCompareAquadBAlwaysEnable(pollSocket_, positionerName_); + if (status) { + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling PositionerPositionCompareAquadBAlwaysEnable status=%d\n", + driverName, functionName, pC_->portName, axisNo_, status); + return asynError; + } + break; + } + + asynPrint(pasynUser_, ASYN_TRACE_FLOW, + "%s:%s: set XPS %s, axis %d positionCompare set and enable\n", + driverName, functionName, pC_->portName, axisNo_); + + return asynSuccess; +} + +asynStatus XPSAxis::getPositionCompare() +{ + bool enable; + int status; + int i; + int direction; + double minPosition=0, maxPosition=0, stepSize=0, pulseWidth, settlingTime; + static const char *functionName = "getPositionCompare"; + + pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); + + status = PositionerPositionComparePulseParametersGet(pollSocket_, positionerName_, &pulseWidth, &settlingTime); + if (status) { + asynPrint(pasynUser_, ASYN_TRACE_ERROR, + "%s:%s: [%s,%d]: error calling PositionerPositionComparePulseParametersGet status=%d\n", + driverName, functionName, pC_->portName, axisNo_, status); + return asynError; + } + status = PositionerPositionCompareGet(pollSocket_, positionerName_, &minPosition, &maxPosition, &stepSize, &enable); + if (status == 0) { + // Swap max and min positions if needed + if (direction != 0) { + double temp=maxPosition; + maxPosition = minPosition; + minPosition = temp; + } +// setDoubleParam(pC_->XPSPositionCompareMinPosition_, XPSPositionToMotorRecPosition(minPosition)); +// setDoubleParam(pC_->XPSPositionCompareMaxPosition_, XPSPositionToMotorRecPosition(maxPosition)); + setDoubleParam(pC_->XPSPositionCompareStepSize_, fabs(XPSStepToMotorRecStep(stepSize))); + } + status = PositionerPositionCompareAquadBWindowedGet(pollSocket_, positionerName_, &minPosition, &maxPosition, &enable); + if (status == 0) { + // Swap max and min positions if needed + if (direction != 0) { + double temp=maxPosition; + maxPosition = minPosition; + minPosition = temp; + } +// setDoubleParam(pC_->XPSPositionCompareMinPosition_, XPSPositionToMotorRecPosition(minPosition)); +// setDoubleParam(pC_->XPSPositionCompareMaxPosition_, XPSPositionToMotorRecPosition(maxPosition)); + } + asynPrint(pasynUser_, ASYN_TRACE_FLOW, + "%s:%s: set XPS %s, axis %d " + " enable=%d, minPosition=%f, maxPosition=%f, stepSize=%f, pulseWidth=%f, settlingTime=%f\n", + driverName, functionName, pC_->portName, axisNo_, + enable, minPosition, maxPosition, stepSize, pulseWidth, settlingTime); + + for (i=0; iXPSPositionComparePulseWidth_, i); + for (i=0; iXPSPositionCompareSettlingTime_, i); + return asynSuccess; +} + char *XPSAxis::getXPSError(int status, char *buffer) { status = ErrorStringGet(pollSocket_, status, buffer); diff --git a/motorApp/NewportSrc/XPSAxis.h b/motorApp/NewportSrc/XPSAxis.h index 44a684f..2a04fd5 100644 --- a/motorApp/NewportSrc/XPSAxis.h +++ b/motorApp/NewportSrc/XPSAxis.h @@ -48,6 +48,8 @@ class epicsShareClass XPSAxis : public asynMotorAxis asynStatus setIGain(double gain); asynStatus setDGain(double gain); asynStatus setClosedLoop(bool closedLoop); + asynStatus setPositionCompare(); + asynStatus getPositionCompare(); virtual asynStatus defineProfile(double *positions, size_t numPoints); virtual asynStatus readbackProfile(); @@ -58,7 +60,11 @@ class epicsShareClass XPSAxis : public asynMotorAxis int isInGroup(); asynStatus setPID(const double * value, int pidoption); asynStatus getPID(); - asynStatus setPIDValue(const double * value, int pidoption); + asynStatus setPIDValue(const double * value, int pidoption); + double motorRecPositionToXPSPosition(double motorRecPosition); + double XPSPositionToMotorRecPosition(double XPSPosition); + double motorRecStepToXPSStep(double motorRecStep); + double XPSStepToMotorRecStep(double XPSStep); /* Wrapper functions for the verbose PositionerCorrector functions. */ asynStatus PositionerCorrectorPIPositionGet(); diff --git a/motorApp/NewportSrc/XPSController.cpp b/motorApp/NewportSrc/XPSController.cpp index 9e67142..4ab26be 100644 --- a/motorApp/NewportSrc/XPSController.cpp +++ b/motorApp/NewportSrc/XPSController.cpp @@ -2,10 +2,6 @@ FILENAME... XPSMotorDriver.cpp USAGE... Newport XPS EPICS asyn motor device driver -Version: $Revision: 19717 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-12-09 10:21:24 -0600 (Wed, 09 Dec 2009) $ -HeadURL: $URL: https://subversion.xor.aps.anl.gov/synApps/trunk/support/motor/vstub/motorApp/NewportSrc/XPSMotorDriver.cpp $ */ /* @@ -91,14 +87,14 @@ Versions: Release 4-5 and higher. #include #include -#include "XPS_C8_drivers.h" -#include "xps_ftp.h" #include "asynMotorController.h" #include "asynMotorAxis.h" -#include "XPSAxis.h" #include #include "XPSController.h" +#include "XPS_C8_drivers.h" +#include "xps_ftp.h" +#include "XPSAxis.h" static const char *driverName = "XPSController"; @@ -159,18 +155,24 @@ XPSController::XPSController(const char *portName, const char *IPAddress, int IP movesDeferred_ = false; // Create controller-specific parameters - createParam(XPSMinJerkString, asynParamFloat64, &XPSMinJerk_); - createParam(XPSMaxJerkString, asynParamFloat64, &XPSMaxJerk_); - createParam(XPSProfileMaxVelocityString, asynParamFloat64, &XPSProfileMaxVelocity_); - createParam(XPSProfileMaxAccelerationString, asynParamFloat64, &XPSProfileMaxAcceleration_); - createParam(XPSProfileMinPositionString, asynParamFloat64, &XPSProfileMinPosition_); - createParam(XPSProfileMaxPositionString, asynParamFloat64, &XPSProfileMaxPosition_); - createParam(XPSProfileGroupNameString, asynParamOctet, &XPSProfileGroupName_); - createParam(XPSTrajectoryFileString, asynParamOctet, &XPSTrajectoryFile_); - createParam(XPSStatusString, asynParamInt32, &XPSStatus_); - createParam(XPSStatusStringString, asynParamOctet, &XPSStatusString_); - createParam(XPSTclScriptString, asynParamOctet, &XPSTclScript_); - createParam(XPSTclScriptExecuteString, asynParamInt32, &XPSTclScriptExecute_); + createParam(XPSMinJerkString, asynParamFloat64, &XPSMinJerk_); + createParam(XPSMaxJerkString, asynParamFloat64, &XPSMaxJerk_); + createParam(XPSPositionCompareModeString, asynParamInt32, &XPSPositionCompareMode_); + createParam(XPSPositionCompareMinPositionString, asynParamFloat64, &XPSPositionCompareMinPosition_); + createParam(XPSPositionCompareMaxPositionString, asynParamFloat64, &XPSPositionCompareMaxPosition_); + createParam(XPSPositionCompareStepSizeString, asynParamFloat64, &XPSPositionCompareStepSize_); + createParam(XPSPositionComparePulseWidthString, asynParamInt32, &XPSPositionComparePulseWidth_); + createParam(XPSPositionCompareSettlingTimeString, asynParamInt32, &XPSPositionCompareSettlingTime_); + createParam(XPSProfileMaxVelocityString, asynParamFloat64, &XPSProfileMaxVelocity_); + createParam(XPSProfileMaxAccelerationString, asynParamFloat64, &XPSProfileMaxAcceleration_); + createParam(XPSProfileMinPositionString, asynParamFloat64, &XPSProfileMinPosition_); + createParam(XPSProfileMaxPositionString, asynParamFloat64, &XPSProfileMaxPosition_); + createParam(XPSProfileGroupNameString, asynParamOctet, &XPSProfileGroupName_); + createParam(XPSTrajectoryFileString, asynParamOctet, &XPSTrajectoryFile_); + createParam(XPSStatusString, asynParamInt32, &XPSStatus_); + createParam(XPSStatusStringString, asynParamOctet, &XPSStatusString_); + createParam(XPSTclScriptString, asynParamOctet, &XPSTclScript_); + createParam(XPSTclScriptExecuteString, asynParamInt32, &XPSTclScriptExecute_); // This socket is used for polling by the controller and all axes pollSocket_ = TCP_ConnectToServer((char *)IPAddress, IPPort, XPS_POLL_TIMEOUT); @@ -261,31 +263,75 @@ asynStatus XPSController::writeInt32(asynUser *pasynUser, epicsInt32 value) getStringParam(XPSTclScript_, (int)sizeof(fileName), fileName); if (fileName != NULL) { asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "Executing TCL script %s on XPS: %s\n", - fileName, this->portName); + "Executing TCL script %s on XPS: %s\n", + fileName, this->portName); status = TCLScriptExecute(pAxis->moveSocket_, - fileName,"0","0"); + fileName,"0","0"); if (status != 0) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "TCLScriptExecute returned error %d, on XPS: %s\n", - status, this->portName); - status = asynError; + asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, + "TCLScriptExecute returned error %d, on XPS: %s\n", + status, this->portName); + status = asynError; } } else { asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "TCL script name has not been set on XPS: %s\n", - this->portName); + "TCL script name has not been set on XPS: %s\n", + this->portName); status = asynError; } + + } else if ((function == XPSPositionCompareMode_) || + (function == XPSPositionComparePulseWidth_) || + (function == XPSPositionCompareStepSize_)) { + status = pAxis->setPositionCompare(); + status = pAxis->getPositionCompare(); + } else { /* Call base class method */ status = asynMotorController::writeInt32(pasynUser, value); } + /* Do callbacks so higher layers see any changes */ + pAxis->callParamCallbacks(); + return (asynStatus)status; } +/** Called when asyn clients call pasynFloat64->write(). + * \param[in] pasynUser asynUser structure that encodes the reason and address. + * \param[in] value Value to write. */ +asynStatus XPSController::writeFloat64(asynUser *pasynUser, epicsFloat64 value) +{ + int function = pasynUser->reason; + XPSAxis *pAxis; + asynStatus status = asynError; + //static const char *functionName = "writeFloat64"; + + pAxis = getAxis(pasynUser); + if (!pAxis) return asynError; + + /* Set the parameter and readback in the parameter library. */ + status = pAxis->setDoubleParam(function, value); + + if ((function == XPSPositionCompareMinPosition_) || + (function == XPSPositionCompareMaxPosition_) || + (function == XPSPositionCompareStepSize_)) { + status = pAxis->setPositionCompare(); + status = pAxis->getPositionCompare(); + + } else { + /* Call base class method */ + status = asynMotorController::writeFloat64(pasynUser, value); + + } + /* Do callbacks so higher layers see any changes */ + pAxis->callParamCallbacks(); + + return status; + +} + /** * Perform a deferred move (a coordinated group move) on all the axes in a group. * @param groupName Pointer to string naming the group on which to perform the group move. @@ -484,6 +530,7 @@ asynStatus XPSController::initializeProfile(size_t maxPoints, const char* ftpUse asynStatus XPSController::buildProfile() { FILE *trajFile; + char *trajectoryDirectory; int i, j; int status; bool buildOK=true; @@ -641,6 +688,7 @@ asynStatus XPSController::buildProfile() if (!inGroup[j]) continue; fprintf(trajFile,", %f, %f", pAxes_[j]->profilePostDistance_, 0.); } + fprintf(trajFile,"\n"); fclose (trajFile); /* FTP the trajectory file from the local directory to the XPS */ @@ -650,7 +698,16 @@ asynStatus XPSController::buildProfile() sprintf(message, "Error calling ftpConnect, status=%d\n", status); goto done; } - status = ftpChangeDir(ftpSocket, TRAJECTORY_DIRECTORY); + if (strstr(firmwareVersion_, "C8")) { + trajectoryDirectory = XPS_C8_TRAJECTORY_DIRECTORY; + } else if (strstr(firmwareVersion_, "Q8")) { + trajectoryDirectory = XPS_Q8_TRAJECTORY_DIRECTORY; + } else { + buildOK = false; + sprintf(message, "Firmware version does not contain C8 or Q8=%s\n", firmwareVersion_); + goto done; + } + status = ftpChangeDir(ftpSocket, trajectoryDirectory); if (status) { buildOK = false; sprintf(message, "Error calling ftpChangeDir, status=%d\n", status); diff --git a/motorApp/NewportSrc/XPSController.h b/motorApp/NewportSrc/XPSController.h index fab77d0..9451192 100644 --- a/motorApp/NewportSrc/XPSController.h +++ b/motorApp/NewportSrc/XPSController.h @@ -16,24 +16,42 @@ USAGE... Newport XPS EPICS asyn motor device driver #define XPS_MIN_PROFILE_ACCEL_TIME 0.25 /* Constants used for FTP to the XPS */ -#define TRAJECTORY_DIRECTORY "/Admin/Public/Trajectories" +#define XPS_C8_TRAJECTORY_DIRECTORY "/Admin/Public/Trajectories" +#define XPS_Q8_TRAJECTORY_DIRECTORY "/Public/Trajectories" #define MAX_FILENAME_LEN 256 #define MAX_MESSAGE_LEN 256 #define MAX_GROUPNAME_LEN 64 +#define MAX_PULSE_WIDTHS 4 +#define MAX_SETTLING_TIMES 4 +static const double positionComparePulseWidths[MAX_PULSE_WIDTHS] = {0.2, 1.0, 2.5, 10.0}; +static const double positionCompareSettlingTimes[MAX_SETTLING_TIMES] = {0.075, 1.0, 4.0, 12.0}; +typedef enum { + XPSPositionCompareModeDisable, + XPSPositionCompareModePulse, + XPSPositionCompareModeAquadBWindowed, + XPSPositionCompareModeAquadBAlways +} XPSPositionCompareMode_t; + // drvInfo strings for extra parameters that the XPS controller supports -#define XPSMinJerkString "XPS_MIN_JERK" -#define XPSMaxJerkString "XPS_MAX_JERK" -#define XPSProfileMaxVelocityString "XPS_PROFILE_MAX_VELOCITY" -#define XPSProfileMaxAccelerationString "XPS_PROFILE_MAX_ACCELERATION" -#define XPSProfileMinPositionString "XPS_PROFILE_MIN_POSITION" -#define XPSProfileMaxPositionString "XPS_PROFILE_MAX_POSITION" -#define XPSProfileGroupNameString "XPS_PROFILE_GROUP_NAME" -#define XPSTrajectoryFileString "XPS_TRAJECTORY_FILE" -#define XPSStatusString "XPS_STATUS" -#define XPSStatusStringString "XPS_STATUS_STRING" -#define XPSTclScriptString "XPS_TCL_SCRIPT" -#define XPSTclScriptExecuteString "XPS_TCL_SCRIPT_EXECUTE" +#define XPSMinJerkString "XPS_MIN_JERK" +#define XPSMaxJerkString "XPS_MAX_JERK" +#define XPSPositionCompareModeString "XPS_POSITION_COMPARE_MODE" +#define XPSPositionCompareMinPositionString "XPS_POSITION_COMPARE_MIN_POSITION" +#define XPSPositionCompareMaxPositionString "XPS_POSITION_COMPARE_MAX_POSITION" +#define XPSPositionCompareStepSizeString "XPS_POSITION_COMPARE_STEP_SIZE" +#define XPSPositionComparePulseWidthString "XPS_POSITION_COMPARE_PULSE_WIDTH" +#define XPSPositionCompareSettlingTimeString "XPS_POSITION_COMPARE_SETTLING_TIME" +#define XPSProfileMaxVelocityString "XPS_PROFILE_MAX_VELOCITY" +#define XPSProfileMaxAccelerationString "XPS_PROFILE_MAX_ACCELERATION" +#define XPSProfileMinPositionString "XPS_PROFILE_MIN_POSITION" +#define XPSProfileMaxPositionString "XPS_PROFILE_MAX_POSITION" +#define XPSProfileGroupNameString "XPS_PROFILE_GROUP_NAME" +#define XPSTrajectoryFileString "XPS_TRAJECTORY_FILE" +#define XPSStatusString "XPS_STATUS" +#define XPSStatusStringString "XPS_STATUS_STRING" +#define XPSTclScriptString "XPS_TCL_SCRIPT" +#define XPSTclScriptExecuteString "XPS_TCL_SCRIPT_EXECUTE" class epicsShareClass XPSController : public asynMotorController { @@ -44,6 +62,7 @@ class epicsShareClass XPSController : public asynMotorController { /* These are the methods that we override from asynMotorDriver */ asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); + asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value); void report(FILE *fp, int level); XPSAxis* getAxis(asynUser *pasynUser); XPSAxis* getAxis(int axisNo); @@ -81,6 +100,12 @@ class epicsShareClass XPSController : public asynMotorController { #define FIRST_XPS_PARAM XPSMinJerk_ int XPSMinJerk_; int XPSMaxJerk_; + int XPSPositionCompareMode_; + int XPSPositionCompareMinPosition_; + int XPSPositionCompareMaxPosition_; + int XPSPositionCompareStepSize_; + int XPSPositionComparePulseWidth_; + int XPSPositionCompareSettlingTime_; int XPSProfileMaxVelocity_; int XPSProfileMaxAcceleration_; int XPSProfileMinPosition_; diff --git a/motorApp/NewportSrc/XPSGathering2.c b/motorApp/NewportSrc/XPSGathering2.c index 030c881..1c258db 100644 --- a/motorApp/NewportSrc/XPSGathering2.c +++ b/motorApp/NewportSrc/XPSGathering2.c @@ -2,11 +2,11 @@ /**/ #include #include +#define epicsExportSharedSymbols +#include #include "XPS_C8_drivers.h" #include "Socket.h" #include "xps_ftp.h" -#define epicsExportSharedSymbols -#include #define XPS_ADDRESS "164.54.160.124" #define NUM_TRAJECTORY_ELEMENTS 6 diff --git a/motorApp/NewportSrc/XPS_C8_drivers.cpp b/motorApp/NewportSrc/XPS_C8_drivers.cpp index 8bc8270..3f21743 100644 --- a/motorApp/NewportSrc/XPS_C8_drivers.cpp +++ b/motorApp/NewportSrc/XPS_C8_drivers.cpp @@ -9,15 +9,13 @@ #include #include "Socket.h" +#define epicsExportSharedSymbols +#include +#include "XPS_C8_drivers.h" #ifdef _WIN32 - #define DLL _declspec(dllexport) - #include "strtok_r.h" -#else - #define DLL +#include "strtok_r.h" #endif -#include "XPS_C8_drivers.h" - #define SIZE_SMALL 1024 #define SIZE_NOMINAL 1024 #define SIZE_BIG 2048 diff --git a/motorApp/NewportSrc/XPS_C8_drivers.h b/motorApp/NewportSrc/XPS_C8_drivers.h index 458a91a..de5ecdd 100644 --- a/motorApp/NewportSrc/XPS_C8_drivers.h +++ b/motorApp/NewportSrc/XPS_C8_drivers.h @@ -5,18 +5,10 @@ * XPS functions * *************************************************/ +#define DLL epicsShareFunc -#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 +#if !defined(_WIN32) && !defined(CYGWIN32) +#define __stdcall #endif #ifdef __rtems__ diff --git a/motorApp/NewportSrc/XPS_C8_errors.h b/motorApp/NewportSrc/XPS_C8_errors.h index cd70875..2098187 100644 --- a/motorApp/NewportSrc/XPS_C8_errors.h +++ b/motorApp/NewportSrc/XPS_C8_errors.h @@ -1,107 +1,107 @@ -/*/////////////////////////////////////////////////////////////////// - * Created header file XPS_C8_errors.h for XPS function errors - */ - -/* TCL interpretor error */ -#define ERR_TCL_INTERPRETOR_ERROR 1 - -/* No error */ -#define SUCCESS 0 - -/* XPS errors */ -#define ERR_BUSY_SOCKET -1 -#define ERR_TCP_TIMEOUT -2 -#define ERR_STRING_TOO_LONG -3 -#define ERR_UNKNOWN_COMMAND -4 -#define ERR_POSITIONER_ERROR -5 -#define ERR_WRONG_FORMAT -7 -#define ERR_WRONG_OBJECT_TYPE -8 -#define ERR_WRONG_PARAMETERS_NUMBER -9 -#define ERR_WRONG_TYPE -10 -#define ERR_WRONG_TYPE_BIT_WORD -11 -#define ERR_WRONG_TYPE_BOOL -12 -#define ERR_WRONG_TYPE_CHAR -13 -#define ERR_WRONG_TYPE_DOUBLE -14 -#define ERR_WRONG_TYPE_INT -15 -#define ERR_WRONG_TYPE_UNSIGNEDINT -16 -#define ERR_PARAMETER_OUT_OF_RANGE -17 -#define ERR_POSITIONER_NAME -18 -#define ERR_GROUP_NAME -19 -#define ERR_FATAL_INIT -20 -#define ERR_IN_INITIALIZATION -21 -#define ERR_NOT_ALLOWED_ACTION -22 -#define ERR_POSITION_COMPARE_NOT_SET -23 -#define ERR_UNCOMPATIBLE -24 -#define ERR_FOLLOWING_ERROR -25 -#define ERR_EMERGENCY_SIGNAL -26 -#define ERR_GROUP_ABORT_MOTION -27 -#define ERR_GROUP_HOME_SEARCH_TIMEOUT -28 -#define ERR_MNEMOTYPEGATHERING -29 -#define ERR_GATHERING_NOT_STARTED -30 -#define ERR_HOME_OUT_RANGE -31 -#define ERR_GATHERING_NOT_CONFIGURED -32 -#define ERR_GROUP_MOTION_DONE_TIMEOUT -33 -#define ERR_TRAVEL_LIMITS -35 -#define ERR_UNKNOWN_TCL_FILE -36 -#define ERR_TCL_SCRIPT_KILL -38 -#define ERR_TCL_INTERPRETOR -37 -#define ERR_MNEMO_ACTION -39 -#define ERR_MNEMO_EVENT -40 -#define ERR_SLAVE_CONFIGURATION -41 -#define ERR_JOG_OUT_OF_RANGE -42 -#define ERR_GATHERING_RUNNING -43 -#define ERR_SLAVE -44 -#define ERR_END_OF_RUN -45 -#define ERR_NOT_ALLOWED_BACKLASH -46 -#define ERR_WRONG_TCL_TASKNAME -47 -#define ERR_BASE_VELOCITY -48 -#define ERR_GROUP_HOME_SEARCH_ZM_ERROR -49 -#define ERR_MOTOR_INITIALIZATION_ERROR -50 -#define ERR_SPIN_OUT_OF_RANGE -51 -#define ERR_WRITE_FILE -60 -#define ERR_READ_FILE -61 -#define ERR_TRAJ_ELEM_TYPE -62 -#define ERR_TRAJ_ELEM_RADIUS -63 -#define ERR_TRAJ_ELEM_SWEEP -64 -#define ERR_TRAJ_ELEM_LINE -65 -#define ERR_TRAJ_EMPTY -66 -#define ERR_TRAJ_VEL_LIMIT -68 -#define ERR_TRAJ_ACC_LIMIT -69 -#define ERR_TRAJ_FINAL_VELOCITY -70 -#define ERR_MSG_QUEUE -71 -#define ERR_TRAJ_INITIALIZATION -72 -#define ERR_END_OF_FILE -73 -#define ERR_READ_FILE_PARAMETER_KEY -74 -#define ERR_TRAJ_TIME -75 -#define ERR_EVENTS_NOT_CONFIGURED -80 -#define ERR_ACTIONS_NOT_CONFIGURED -81 -#define ERR_EVENT_BUFFER_FULL -82 -#define ERR_EVENT_ID_UNDEFINED -83 -#define ERR_HOME_SEARCH_GANTRY_TOLERANCE_ERROR -85 -#define ERR_FOCUS_RESERVED_SOCKET -90 -#define ERR_FOCUS_BUSY_EVENT_SCHEDULER -91 -#define ERR_OPTIONAL_EXTERNAL_MODULE_FILE -94 -#define ERR_OPTIONAL_EXTERNAL_MODULE_EXECUTE -95 -#define ERR_OPTIONAL_EXTERNAL_MODULE_KILL -96 -#define ERR_OPTIONAL_EXTERNAL_MODULE_LOAD -97 -#define ERR_OPTIONAL_EXTERNAL_MODULE_UNLOAD -98 -#define ERR_FATAL_EXTERNAL_MODULE_LOAD -99 -#define ERR_INTERNAL_ERROR -100 -#define ERR_RELAY_FEEDBACK_TEST_NO_OSCILLATION -101 -#define ERR_RELAY_FEEDBACK_TEST_SIGNAL_NOISY -102 -#define ERR_SIGNAL_POINTS_NOT_ENOUGH -103 -#define ERR_PID_TUNING_INITIALIZATION -104 -#define ERR_SCALING_CALIBRATION -105 -#define ERR_WRONG_USERNAME_OR_PASSWORD -106 -#define ERR_NEED_ADMINISTRATOR_RIGHTS -107 -#define ERR_SOCKET_CLOSED_BY_ADMIN -108 -#define ERR_NEED_TO_BE_HOMED_AT_LEAST_ONCE -109 -#define ERR_NOT_ALLOWED_FOR_GANTRY -110 -#define ERR_GATHERING_BUFFER_FULL -111 -#define ERR_EXCITATION_SIGNAL_INITIALIZATION -112 -#define ERR_BOTH_ENDS_OF_RUNS_ACTIVATED -113 -#define ERR_GROUP_CLAMPING_TIMEOUT -114 -#define ERR_HARDWARE_FUNCTION_NOT_SUPPORTED -115 -#define ERR_EXTERNAL_DRIVER_INIT -116 -#define ERR_FUNCTION_ONLY_ALLOWED_IN_DISABLED_STATE -117 -#define ERR_NOT_ALLOWED_DRIVER_NOT_INITIALIZED -118 +/*/////////////////////////////////////////////////////////////////// + * Created header file XPS_C8_errors.h for XPS function errors + */ + +/* TCL interpretor error */ +#define ERR_TCL_INTERPRETOR_ERROR 1 + +/* No error */ +#define SUCCESS 0 + +/* XPS errors */ +#define ERR_BUSY_SOCKET -1 +#define ERR_TCP_TIMEOUT -2 +#define ERR_STRING_TOO_LONG -3 +#define ERR_UNKNOWN_COMMAND -4 +#define ERR_POSITIONER_ERROR -5 +#define ERR_WRONG_FORMAT -7 +#define ERR_WRONG_OBJECT_TYPE -8 +#define ERR_WRONG_PARAMETERS_NUMBER -9 +#define ERR_WRONG_TYPE -10 +#define ERR_WRONG_TYPE_BIT_WORD -11 +#define ERR_WRONG_TYPE_BOOL -12 +#define ERR_WRONG_TYPE_CHAR -13 +#define ERR_WRONG_TYPE_DOUBLE -14 +#define ERR_WRONG_TYPE_INT -15 +#define ERR_WRONG_TYPE_UNSIGNEDINT -16 +#define ERR_PARAMETER_OUT_OF_RANGE -17 +#define ERR_POSITIONER_NAME -18 +#define ERR_GROUP_NAME -19 +#define ERR_FATAL_INIT -20 +#define ERR_IN_INITIALIZATION -21 +#define ERR_NOT_ALLOWED_ACTION -22 +#define ERR_POSITION_COMPARE_NOT_SET -23 +#define ERR_UNCOMPATIBLE -24 +#define ERR_FOLLOWING_ERROR -25 +#define ERR_EMERGENCY_SIGNAL -26 +#define ERR_GROUP_ABORT_MOTION -27 +#define ERR_GROUP_HOME_SEARCH_TIMEOUT -28 +#define ERR_MNEMOTYPEGATHERING -29 +#define ERR_GATHERING_NOT_STARTED -30 +#define ERR_HOME_OUT_RANGE -31 +#define ERR_GATHERING_NOT_CONFIGURED -32 +#define ERR_GROUP_MOTION_DONE_TIMEOUT -33 +#define ERR_TRAVEL_LIMITS -35 +#define ERR_UNKNOWN_TCL_FILE -36 +#define ERR_TCL_SCRIPT_KILL -38 +#define ERR_TCL_INTERPRETOR -37 +#define ERR_MNEMO_ACTION -39 +#define ERR_MNEMO_EVENT -40 +#define ERR_SLAVE_CONFIGURATION -41 +#define ERR_JOG_OUT_OF_RANGE -42 +#define ERR_GATHERING_RUNNING -43 +#define ERR_SLAVE -44 +#define ERR_END_OF_RUN -45 +#define ERR_NOT_ALLOWED_BACKLASH -46 +#define ERR_WRONG_TCL_TASKNAME -47 +#define ERR_BASE_VELOCITY -48 +#define ERR_GROUP_HOME_SEARCH_ZM_ERROR -49 +#define ERR_MOTOR_INITIALIZATION_ERROR -50 +#define ERR_SPIN_OUT_OF_RANGE -51 +#define ERR_WRITE_FILE -60 +#define ERR_READ_FILE -61 +#define ERR_TRAJ_ELEM_TYPE -62 +#define ERR_TRAJ_ELEM_RADIUS -63 +#define ERR_TRAJ_ELEM_SWEEP -64 +#define ERR_TRAJ_ELEM_LINE -65 +#define ERR_TRAJ_EMPTY -66 +#define ERR_TRAJ_VEL_LIMIT -68 +#define ERR_TRAJ_ACC_LIMIT -69 +#define ERR_TRAJ_FINAL_VELOCITY -70 +#define ERR_MSG_QUEUE -71 +#define ERR_TRAJ_INITIALIZATION -72 +#define ERR_END_OF_FILE -73 +#define ERR_READ_FILE_PARAMETER_KEY -74 +#define ERR_TRAJ_TIME -75 +#define ERR_EVENTS_NOT_CONFIGURED -80 +#define ERR_ACTIONS_NOT_CONFIGURED -81 +#define ERR_EVENT_BUFFER_FULL -82 +#define ERR_EVENT_ID_UNDEFINED -83 +#define ERR_HOME_SEARCH_GANTRY_TOLERANCE_ERROR -85 +#define ERR_FOCUS_RESERVED_SOCKET -90 +#define ERR_FOCUS_BUSY_EVENT_SCHEDULER -91 +#define ERR_OPTIONAL_EXTERNAL_MODULE_FILE -94 +#define ERR_OPTIONAL_EXTERNAL_MODULE_EXECUTE -95 +#define ERR_OPTIONAL_EXTERNAL_MODULE_KILL -96 +#define ERR_OPTIONAL_EXTERNAL_MODULE_LOAD -97 +#define ERR_OPTIONAL_EXTERNAL_MODULE_UNLOAD -98 +#define ERR_FATAL_EXTERNAL_MODULE_LOAD -99 +#define ERR_INTERNAL_ERROR -100 +#define ERR_RELAY_FEEDBACK_TEST_NO_OSCILLATION -101 +#define ERR_RELAY_FEEDBACK_TEST_SIGNAL_NOISY -102 +#define ERR_SIGNAL_POINTS_NOT_ENOUGH -103 +#define ERR_PID_TUNING_INITIALIZATION -104 +#define ERR_SCALING_CALIBRATION -105 +#define ERR_WRONG_USERNAME_OR_PASSWORD -106 +#define ERR_NEED_ADMINISTRATOR_RIGHTS -107 +#define ERR_SOCKET_CLOSED_BY_ADMIN -108 +#define ERR_NEED_TO_BE_HOMED_AT_LEAST_ONCE -109 +#define ERR_NOT_ALLOWED_FOR_GANTRY -110 +#define ERR_GATHERING_BUFFER_FULL -111 +#define ERR_EXCITATION_SIGNAL_INITIALIZATION -112 +#define ERR_BOTH_ENDS_OF_RUNS_ACTIVATED -113 +#define ERR_GROUP_CLAMPING_TIMEOUT -114 +#define ERR_HARDWARE_FUNCTION_NOT_SUPPORTED -115 +#define ERR_EXTERNAL_DRIVER_INIT -116 +#define ERR_FUNCTION_ONLY_ALLOWED_IN_DISABLED_STATE -117 +#define ERR_NOT_ALLOWED_DRIVER_NOT_INITIALIZED -118 diff --git a/motorApp/NewportSrc/XPS_trajectoryScan.st b/motorApp/NewportSrc/XPS_trajectoryScan.st index d3082e2..2c8a871 100644 --- a/motorApp/NewportSrc/XPS_trajectoryScan.st +++ b/motorApp/NewportSrc/XPS_trajectoryScan.st @@ -20,6 +20,8 @@ program XPS_trajectoryScan("P=13BMC:,R=traj1,IPADDR=164.54.160.34,PORT=5001," %% #include %% #include %% #include +%% #define epicsExportSharedSymbols +%% #include %% #include "XPS_C8_drivers.h" %% #include "XPS_C8_errors.h" %% #include "Socket.h" diff --git a/motorApp/NewportSrc/devESP300.cc b/motorApp/NewportSrc/devESP300.cc index b50fc5a..ec26a08 100644 --- a/motorApp/NewportSrc/devESP300.cc +++ b/motorApp/NewportSrc/devESP300.cc @@ -2,10 +2,6 @@ FILENAME... devESP300.cc USAGE... Motor record device level support for Newport ESP300. -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* @@ -42,6 +38,7 @@ HeadURL: $URL$ #include #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -53,7 +50,7 @@ extern struct driver_table ESP300_access; /* ----------------Create the dsets for devESP300----------------- */ /* static long report(); */ static struct driver_table *drvtabptr; -static long ESP300_init(void *); +static long ESP300_init(int); static long ESP300_init_record(void *); static long ESP300_start_trans(struct motorRecord *); static RTN_STATUS ESP300_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -107,12 +104,11 @@ static struct board_stat **ESP300_cards; /* initialize device support for ESP300 stepper motor */ -static long ESP300_init(void *arg) +static long ESP300_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &ESP300_access; (drvtabptr->init)(); @@ -243,7 +239,7 @@ static RTN_STATUS ESP300_build_trans(motor_cmnd command, double *parms, struct m sprintf(buff, "%.2dVA%f;", axis, cntrl_units); break; case SET_ACCEL: - sprintf(buff, "%.2dAC%f;", axis, cntrl_units); + sprintf(buff, "%.2dAC%f;%.2dAG%f;", axis, cntrl_units, axis, cntrl_units); break; case GO: /* diff --git a/motorApp/NewportSrc/devMM3000.cc b/motorApp/NewportSrc/devMM3000.cc index 1e5edb3..1f9cd99 100644 --- a/motorApp/NewportSrc/devMM3000.cc +++ b/motorApp/NewportSrc/devMM3000.cc @@ -2,9 +2,6 @@ FILENAME... devMM3000.cc USAGE... Motor record device level support for Newport MM3000. -Version: $Revision: 1.4 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:17:14 $ */ /* @@ -43,6 +40,9 @@ Last Modified: $Date: 2008-03-14 20:17:14 $ #include +#include +#include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -56,7 +56,7 @@ extern struct driver_table MM3000_access; /* ----------------Create the dsets for devMM3000----------------- */ /* static long report(); */ STATIC struct driver_table *drvtabptr; -STATIC long MM3000_init(void *); +STATIC long MM3000_init(int); STATIC long MM3000_init_record(void *); STATIC long MM3000_start_trans(struct motorRecord *); STATIC RTN_STATUS MM3000_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -110,12 +110,11 @@ static struct board_stat **MM3000_cards; /* initialize device support for MM3000 stepper motor */ -STATIC long MM3000_init(void *arg) +STATIC long MM3000_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &MM3000_access; (drvtabptr->init)(); @@ -277,6 +276,10 @@ STATIC RTN_STATUS MM3000_build_trans(motor_cmnd command, double *parms, struct m */ break; case SET_ENC_RATIO: + /* The motor record no longer passes unsigned values */ + parms[0] = fabs(parms[0]); + parms[1] = fabs(parms[1]); + /* MM3000 valid encoder ratio values < 10,000. */ while (parms[0] > 10000.0 || parms[1] > 10000.0) { diff --git a/motorApp/NewportSrc/devMM4000.cc b/motorApp/NewportSrc/devMM4000.cc index 5a606bb..f84acf3 100644 --- a/motorApp/NewportSrc/devMM4000.cc +++ b/motorApp/NewportSrc/devMM4000.cc @@ -2,10 +2,6 @@ FILENAME... devMM4000.cc USAGE... Motor record device level support for Newport MM4000. -Version: $Revision: 15620 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2012-12-06 16:20:02 -0600 (Thu, 06 Dec 2012) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/NewportSrc/devMM4000.cc $ */ /* @@ -48,6 +44,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -60,7 +57,7 @@ extern struct driver_table MM4000_access; /* ----------------Create the dsets for devMM4000----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long MM4000_init(void *); +STATIC long MM4000_init(int); STATIC long MM4000_init_record(void *); STATIC long MM4000_start_trans(struct motorRecord *); STATIC RTN_STATUS MM4000_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -114,12 +111,11 @@ static struct board_stat **MM4000_cards; /* initialize device support for MM4000 stepper motor */ -STATIC long MM4000_init(void *arg) +STATIC long MM4000_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &MM4000_access; (drvtabptr->init)(); diff --git a/motorApp/NewportSrc/devNewport.dbd b/motorApp/NewportSrc/devNewport.dbd index fc31f1d..73ebaee 100644 --- a/motorApp/NewportSrc/devNewport.dbd +++ b/motorApp/NewportSrc/devNewport.dbd @@ -18,9 +18,6 @@ registrar(XPSInterposeRegister) registrar(drvXPSAsynAuxRegister) registrar(AG_UCRegister) registrar(AG_CONEXRegister) -registrar(MM4005_trajectoryScanRegistrar) -registrar(XPS_trajectoryScanRegistrar) -registrar(xpsSlaveRegistrar) registrar(SMC100Register) #variable(devXPSC8Debug) #variable(drvXPSC8Debug) diff --git a/motorApp/NewportSrc/devNewportSeq.dbd b/motorApp/NewportSrc/devNewportSeq.dbd new file mode 100644 index 0000000..48aa842 --- /dev/null +++ b/motorApp/NewportSrc/devNewportSeq.dbd @@ -0,0 +1,4 @@ +# Newport SNL programs +registrar(MM4005_trajectoryScanRegistrar) +registrar(XPS_trajectoryScanRegistrar) +registrar(xpsSlaveRegistrar) diff --git a/motorApp/NewportSrc/devPM500.cc b/motorApp/NewportSrc/devPM500.cc index b077d58..ca052c8 100644 --- a/motorApp/NewportSrc/devPM500.cc +++ b/motorApp/NewportSrc/devPM500.cc @@ -3,9 +3,6 @@ FILENAME... devPM500.cc USAGE... Motor record device level support for the Newport PM500 motor controller. -Version: $Revision: 1.4 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-08-25 18:24:24 $ */ /* @@ -45,6 +42,7 @@ Last Modified: $Date: 2009-08-25 18:24:24 $ #include #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -57,7 +55,7 @@ extern struct driver_table PM500_access; /* ----------------Create the dsets for devPM500----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long PM500_init(void *); +STATIC long PM500_init(int); STATIC long PM500_init_record(void *); STATIC long PM500_start_trans(struct motorRecord *); STATIC RTN_STATUS PM500_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -113,12 +111,11 @@ static struct board_stat **PM500_cards; /* Initialize device support for PM500 controller. */ -STATIC long PM500_init(void *arg) +STATIC long PM500_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PM500_access; (drvtabptr->init)(); diff --git a/motorApp/NewportSrc/drvESP300.cc b/motorApp/NewportSrc/drvESP300.cc index 84b7a11..ef899e8 100644 --- a/motorApp/NewportSrc/drvESP300.cc +++ b/motorApp/NewportSrc/drvESP300.cc @@ -2,10 +2,6 @@ FILENAME... drvESP300.cc USAGE... Motor record driver level support for Newport ESP300/100. -Version: $Revision: 17447 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-05-23 10:33:19 -0500 (Fri, 23 May 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/NewportSrc/drvESP300.cc $ */ /* @@ -60,6 +56,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "NewportRegister.h" #include "drvMMCom.h" @@ -227,7 +225,7 @@ static int set_status(int card, int signal) status.All = motor_info->status.All; sprintf(outbuff, "%.2dMD", signal + 1); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); charcnt = recv_mess(card, inbuff, 1); if (charcnt == 1 && (inbuff[0] == '0' || inbuff[0] == '1')) @@ -257,7 +255,7 @@ static int set_status(int card, int signal) /* Get motor position. */ sprintf(outbuff, READ_POSITION, signal + 1); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); charcnt = recv_mess(card, inbuff, 1); motorData = atof(inbuff) / cntrl->drive_resolution[signal]; @@ -281,7 +279,7 @@ static int set_status(int card, int signal) /* Get travel limit switch status. */ sprintf(outbuff, "%.2dPH", signal + 1); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); charcnt = recv_mess(card, inbuff, 1); cptr = strchr(inbuff, 'H'); if (cptr == NULL) @@ -320,7 +318,7 @@ static int set_status(int card, int signal) /* Get motor power on/off status. */ sprintf(outbuff, "%.2dMO?", signal + 1); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); charcnt = recv_mess(card, inbuff, 1); power = atoi(inbuff) ? true : false; @@ -333,7 +331,7 @@ static int set_status(int card, int signal) /* Get error code. */ sprintf(outbuff, "%.2dTE?", signal + 1); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); charcnt = recv_mess(card, inbuff, 1); errcode = atoi(inbuff); if (errcode != 0) @@ -360,7 +358,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(outbuff, nodeptr->postmsgptr); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -640,7 +638,7 @@ static int motor_init() do { - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, buff, 1); retry++; /* Return value is length of response string */ @@ -654,7 +652,7 @@ static int motor_init() brdptr->motor_in_motion = 0; strcpy(brdptr->ident, &buff[1]); /* Skip "\n" */ - send_mess(card_index, "ZU", (char) NULL); + send_mess(card_index, "ZU", (char*) NULL); recv_mess(card_index, buff, 1); total_axis = buff[0] >> 4; if (total_axis > 4) @@ -666,7 +664,7 @@ static int motor_init() for (motor_index = 0; motor_index < total_axis; motor_index++) { sprintf(buff, STOP_AXIS, motor_index + 1); /* Stop motor */ - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); /* Initialize. */ brdptr->motor_info[motor_index].motor_motion = NULL; } @@ -676,6 +674,9 @@ static int motor_init() for (motor_index = 0; motor_index < total_axis; motor_index++) { struct mess_info *motor_info = &brdptr->motor_info[motor_index]; + int feedback; + double fullStep; + int microStep; /* Get controller's EGU for the user (see README). */ sprintf(buff, "%.2dSN?", motor_index + 1); @@ -683,11 +684,30 @@ static int motor_init() recv_mess(card_index, buff, 1); /* Set axis resolution. */ - sprintf(buff, "%.2dSU?", motor_index + 1); + /* Read the feedback status */ + sprintf(buff, "%.2dZB?", motor_index + 1); send_mess(card_index, buff, 0); recv_mess(card_index, buff, 1); - cntrl->drive_resolution[motor_index] = atof(&buff[0]); - + feedback = strtol(buff,0,16); + /* If stepper closed loop positioning is enabled (bit 9=1) and encoder feedback is disabled (bit 8=0) + * then use the full-step resolution (FR) and microstepping (QS) to determine drive_resolution. + * If not then use SU (encoder resolution) for drive_resolution. */ + if ((feedback & 0x300) == 0x200) { + sprintf(buff, "%.2dFR?", motor_index + 1); + send_mess(card_index, buff, 0); + recv_mess(card_index, buff, 1); + fullStep = atof(buff); + sprintf(buff, "%.2dQS?", motor_index + 1); + send_mess(card_index, buff, 0); + recv_mess(card_index, buff, 1); + microStep = strtol(buff, 0, 10); + cntrl->drive_resolution[motor_index] = fullStep / microStep; + } else { + sprintf(buff, "%.2dSU?", motor_index + 1); + send_mess(card_index, buff, 0); + recv_mess(card_index, buff, 1); + cntrl->drive_resolution[motor_index] = atof(&buff[0]); + } motor_info->status.All = 0; motor_info->no_motion_count = 0; motor_info->encoder_position = 0; diff --git a/motorApp/NewportSrc/drvMM3000.cc b/motorApp/NewportSrc/drvMM3000.cc index fe7268b..7131ed0 100644 --- a/motorApp/NewportSrc/drvMM3000.cc +++ b/motorApp/NewportSrc/drvMM3000.cc @@ -2,10 +2,6 @@ FILENAME... drvMM3000.cc USAGE... Motor record driver level support for Newport MM3000. -Version: $Revision: 15621 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2012-12-06 16:20:48 -0600 (Thu, 06 Dec 2012) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/NewportSrc/drvMM3000.cc $ */ /* @@ -72,6 +68,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "NewportRegister.h" #include "drvMMCom.h" @@ -247,7 +245,7 @@ STATIC int set_status(int card, int signal) status.All = motor_info->status.All; sprintf(outbuff, "%dMS", signal + 1); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); charcnt = recv_mess(card, inbuff, 1); if (charcnt > 0) { @@ -312,7 +310,7 @@ STATIC int set_status(int card, int signal) status.Bits.EA_HOME = 0; sprintf(outbuff, "%dTP", signal + 1); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); charcnt = recv_mess(card, inbuff, 1); if (charcnt > 0) { @@ -375,7 +373,7 @@ STATIC int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(outbuff, nodeptr->postmsgptr); - send_mess(card, outbuff, (char) NULL); + send_mess(card, outbuff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -633,7 +631,7 @@ STATIC int motor_init() /* flush any junk at input port - should not be any data available */ pasynOctetSyncIO->flush(cntrl->pasynUser); - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, axis_pos, 1); /* Return value is length of response string */ } @@ -642,12 +640,12 @@ STATIC int motor_init() { brdptr->localaddr = (char *) NULL; brdptr->motor_in_motion = 0; - send_mess(card_index, STOP_ALL, (char) NULL); /* Stop all motors */ - send_mess(card_index, GET_IDENT, (char) NULL); /* Read controller ID string */ + send_mess(card_index, STOP_ALL, (char*) NULL); /* Stop all motors */ + send_mess(card_index, GET_IDENT, (char*) NULL); /* Read controller ID string */ recv_mess(card_index, buff, 1); strncpy(brdptr->ident, &buff[0], MAX_IDENT_LEN); /* Skip "VE" */ - send_mess(card_index, "RC", (char) NULL); + send_mess(card_index, "RC", (char*) NULL); recv_mess(card_index, buff, 1); bufptr = epicsStrtok_r(buff, "=", &tok_save); bufptr = epicsStrtok_r(NULL, " ", &tok_save); @@ -694,7 +692,7 @@ STATIC int motor_init() else { sprintf(buff, "%dTPE", motor_index + 1); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (strcmp(buff, "E01") == 0) diff --git a/motorApp/NewportSrc/drvMM4000.cc b/motorApp/NewportSrc/drvMM4000.cc index 74b32f5..66a9bad 100644 --- a/motorApp/NewportSrc/drvMM4000.cc +++ b/motorApp/NewportSrc/drvMM4000.cc @@ -2,10 +2,6 @@ FILENAME... drvMM4000.cc USAGE... Motor record driver level support for Newport MM4000. -Version: $Revision: 15620 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2012-12-06 16:20:02 -0600 (Thu, 06 Dec 2012) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/NewportSrc/drvMM4000.cc $ */ /* @@ -88,6 +84,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "NewportRegister.h" #include "drvMMCom.h" @@ -261,14 +259,14 @@ static void start_status(int card) if (card >= 0) { cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - send_mess(card, READ_STATUS, (char) NULL); + send_mess(card, READ_STATUS, (char*) NULL); status = recv_mess(card, cntrl->status_string, 1); if (status > 0) { cntrl->status = NORMAL; - send_mess(card, READ_POSITION, (char) NULL); + send_mess(card, READ_POSITION, (char*) NULL); recv_mess(card, cntrl->position_string, 1); - send_mess(card, READ_FEEDBACK, (char) NULL); + send_mess(card, READ_FEEDBACK, (char*) NULL); recv_mess(card, cntrl->feedback_string, 1); } else @@ -286,7 +284,7 @@ static void start_status(int card) * responses. This minimizes the latency due to processing on each card */ for (itera = 0; (itera < total_cards) && motor_state[itera]; itera++) - send_mess(itera, READ_STATUS, (char) NULL); + send_mess(itera, READ_STATUS, (char*) NULL); for (itera = 0; (itera < total_cards) && motor_state[itera]; itera++) { cntrl = (struct MMcontroller *) motor_state[itera]->DevicePrivate; @@ -294,7 +292,7 @@ static void start_status(int card) if (status > 0) { cntrl->status = NORMAL; - send_mess(itera, READ_FEEDBACK, (char) NULL); + send_mess(itera, READ_FEEDBACK, (char*) NULL); recv_mess(itera, cntrl->feedback_string, 1); } else @@ -306,7 +304,7 @@ static void start_status(int card) } } for (itera = 0; (itera < total_cards) && motor_state[itera]; itera++) - send_mess(itera, READ_POSITION, (char) NULL); + send_mess(itera, READ_POSITION, (char*) NULL); for (itera = 0; (itera < total_cards) && motor_state[itera]; itera++) { cntrl = (struct MMcontroller *) motor_state[itera]->DevicePrivate; @@ -390,7 +388,7 @@ static int set_status(int card, int signal) if (motor_info->pid_present == YES && drvMM4000ReadbackDelay != 0) { epicsThreadSleep((double) drvMM4000ReadbackDelay/1000.0); - send_mess(card, READ_STATUS, (char) NULL); + send_mess(card, READ_STATUS, (char*) NULL); recv_mess(card, cntrl->status_string, 1); pos = signal*5 + 3; /* Offset in status string */ mstat.All = cntrl->status_string[pos]; @@ -471,7 +469,7 @@ static int set_status(int card, int signal) /* Check for controller error. */ - send_mess(card, "TE;", (char) NULL); + send_mess(card, "TE;", (char*) NULL); recv_mess(card, buff, 1); if (buff[2] == '@') status.Bits.RA_PROBLEM = 0; @@ -498,7 +496,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -710,7 +708,7 @@ static int motor_init() do { - send_mess(card_index, READ_POSITION, (char) NULL); + send_mess(card_index, READ_POSITION, (char*) NULL); status = recv_mess(card_index, axis_pos, 1); retry++; /* Return value is length of response string */ @@ -721,8 +719,8 @@ static int motor_init() { brdptr->localaddr = (char *) NULL; brdptr->motor_in_motion = 0; - send_mess(card_index, STOP_ALL, (char) NULL); /* Stop all motors */ - send_mess(card_index, GET_IDENT, (char) NULL); /* Read controller ID string */ + send_mess(card_index, STOP_ALL, (char*) NULL); /* Stop all motors */ + send_mess(card_index, GET_IDENT, (char*) NULL); /* Read controller ID string */ recv_mess(card_index, buff, 1); strcpy(brdptr->ident, &buff[2]); /* Skip "VE" */ @@ -746,7 +744,7 @@ static int motor_init() continue; } - send_mess(card_index, READ_POSITION, (char) NULL); + send_mess(card_index, READ_POSITION, (char*) NULL); recv_mess(card_index, axis_pos, 1); /* The return string will tell us how many axes this controller has */ @@ -771,7 +769,7 @@ static int motor_init() /* Determine if encoder present based on open/closed loop mode. */ sprintf(buff, "%dTC", motor_index + 1); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); loop_state = atoi(&buff[3]); /* Skip first 3 characters */ if (loop_state != 0) @@ -783,7 +781,7 @@ static int motor_init() /* Determine drive resolution. */ sprintf(buff, "%dTU", motor_index + 1); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); cntrl->drive_resolution[motor_index] = atof(&buff[3]); @@ -794,19 +792,19 @@ static int motor_init() /* Save home preset position. */ sprintf(buff, "%dXH", motor_index + 1); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); cntrl->home_preset[motor_index] = atof(&buff[3]); /* Determine low limit */ sprintf(buff, "%dTL", motor_index + 1); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); motor_info->low_limit = atof(&buff[3]); /* Determine high limit */ sprintf(buff, "%dTR", motor_index + 1); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); motor_info->high_limit = atof(&buff[3]); diff --git a/motorApp/NewportSrc/drvMM4000Asyn.c b/motorApp/NewportSrc/drvMM4000Asyn.c index 1e34802..16b39c8 100644 --- a/motorApp/NewportSrc/drvMM4000Asyn.c +++ b/motorApp/NewportSrc/drvMM4000Asyn.c @@ -2,10 +2,6 @@ FILENAME... drvMM4000Asyn.cc USAGE... Motor record asyn driver level support for Newport MM4000. -Version: $Revision: 15950 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2013-02-18 14:53:20 -0600 (Mon, 18 Feb 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/NewportSrc/drvMM4000Asyn.c $ */ /* diff --git a/motorApp/NewportSrc/drvMMCom.h b/motorApp/NewportSrc/drvMMCom.h index 1799756..44949ea 100644 --- a/motorApp/NewportSrc/drvMMCom.h +++ b/motorApp/NewportSrc/drvMMCom.h @@ -3,9 +3,6 @@ FILENAME... drvMMCom.h USAGE... This file contains Newport Motion Master (MM) driver "include" information that is specific to Motion Master models 3000/4000. -Version: $Revision: 1.10 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2004-08-17 21:28:22 $ */ /* diff --git a/motorApp/NewportSrc/drvPM500.cc b/motorApp/NewportSrc/drvPM500.cc index a757314..8dc213a 100644 --- a/motorApp/NewportSrc/drvPM500.cc +++ b/motorApp/NewportSrc/drvPM500.cc @@ -2,10 +2,6 @@ FILENAME... drvPM500.cc USAGE... Motor record driver level support for Newport PM500. -Version: $Revision: 15617 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2012-12-06 16:17:36 -0600 (Thu, 06 Dec 2012) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/NewportSrc/drvPM500.cc $ */ /* Device Driver Support routines for PM500 motor controller */ @@ -59,6 +55,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "NewportRegister.h" #include "drvMMCom.h" @@ -238,7 +236,7 @@ static int set_status(int card, int signal) /* Request the status and position of this motor */ sprintf(buff, "%sR", axis_name); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); rtnval = recv_mess(card, response, 1); if (rtnval > 0) { @@ -288,7 +286,7 @@ static int set_status(int card, int signal) /* Set Motor On/Off status */ sprintf(buff, "%sM?", axis_name); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); rtnval = recv_mess(card, response, 1); status.Bits.EA_POSITION = (int) atof(&response[2]); @@ -338,7 +336,7 @@ static int set_status(int card, int signal) { strcpy(buff, nodeptr->postmsgptr); strcat(buff, "\r"); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -545,7 +543,7 @@ static int motor_init() pasynOctetSyncIO->flush(cntrl->pasynUser); /* Send a SCUM 1 command to put device in this mode. */ - send_mess(card_index, "SCUM 1", (char) NULL); + send_mess(card_index, "SCUM 1", (char*) NULL); recv_mess(card_index, buff, 1); /* Set up basic controller parameters @@ -566,12 +564,12 @@ static int motor_init() * Bit 13=0, Eearly serial poll mapping * Bit 14=0, No SRQ assertion */ - send_mess(card_index, "SENAINT $AF", (char) NULL); + send_mess(card_index, "SENAINT $AF", (char*) NULL); recv_mess(card_index, buff, 1); /* Send a message and read response from controller to see if * it exists */ - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, buff, 1); /* Return value is length of response string */ } @@ -580,7 +578,7 @@ static int motor_init() { brdptr->localaddr = (char *) NULL; brdptr->motor_in_motion = 0; - send_mess(card_index, GET_IDENT, (char) NULL); /* Read controller ID string */ + send_mess(card_index, GET_IDENT, (char*) NULL); /* Read controller ID string */ recv_mess(card_index, buff, 1); strncpy(brdptr->ident, &buff[2], 50); /* Skip "XD" */ @@ -591,7 +589,7 @@ static int motor_init() int axis_name = (int) *PM500_axis_names[total_axis]; brdptr->motor_info[total_axis].motor_motion = NULL; sprintf(buff, "%cSTAT?", axis_name); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); if (buff[1] == 'E') break; @@ -616,7 +614,7 @@ static int motor_init() double res = 0.0; sprintf(buff, "%sCONFIG?", axis_name); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); recv_mess(card_index, buff, 1); firmware = &buff[8]; Debug(3, "motor_init: firmware = %s\n", firmware); diff --git a/motorApp/NewportSrc/drvXPSAsyn.c b/motorApp/NewportSrc/drvXPSAsyn.c index 0c4fa7b..eb1e865 100644 --- a/motorApp/NewportSrc/drvXPSAsyn.c +++ b/motorApp/NewportSrc/drvXPSAsyn.c @@ -2,10 +2,6 @@ FILENAME... drvXPSasyn.c USAGE... Newport XPS EPICS asyn motor device driver -Version: $Revision: 15944 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2013-02-18 14:50:16 -0600 (Mon, 18 Feb 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/NewportSrc/drvXPSAsyn.c $ */ /* @@ -616,6 +612,10 @@ static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double double positions[XPS_MAX_AXES] = {0.0}; if (pAxis == NULL) return MOTOR_AXIS_ERROR; + if (!pAxis->mutexId) { + PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble[%d,%d]: invalid mutex ID. Call XPSConfigAxis first for initialization.\n", pAxis->card, pAxis->axis); + return MOTOR_AXIS_ERROR; + } else { if (epicsMutexLock( pAxis->mutexId ) == epicsMutexLockOK) @@ -941,6 +941,11 @@ static int motorAxisMove(AXIS_HDL pAxis, double position, int relative, if (pAxis == NULL) return MOTOR_AXIS_ERROR; + if (!pAxis->mutexId) { + PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisMove[%d,%d]: invalid mutex ID. Call XPSConfigAxis first for initialization.\n", pAxis->card, pAxis->axis); + return MOTOR_AXIS_ERROR; + } + PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d move to %f, min vel=%f, max_vel=%f, accel=%f\n", pAxis->card, pAxis->axis, position, min_velocity, max_velocity, acceleration); diff --git a/motorApp/NewportSrc/drvXPSAsynAux.c b/motorApp/NewportSrc/drvXPSAsynAux.c index 11d2eb8..ab5671b 100644 --- a/motorApp/NewportSrc/drvXPSAsynAux.c +++ b/motorApp/NewportSrc/drvXPSAsynAux.c @@ -25,8 +25,8 @@ #include #include -#include #include +#include typedef struct { char *portName; diff --git a/motorApp/NewportSrc/hxp_drivers.cpp b/motorApp/NewportSrc/hxp_drivers.cpp index 1d00218..0ca5211 100644 --- a/motorApp/NewportSrc/hxp_drivers.cpp +++ b/motorApp/NewportSrc/hxp_drivers.cpp @@ -1,6904 +1,6899 @@ -/* - * Created source file hxp_drivers.cpp for API description - */ - - -#include -#include -#include -#include -#include "Socket.h" - -#ifdef _WIN32 - #define DLL _declspec(dllexport) - #include "strtok_r.h" -#else - #define DLL -#endif - -#include "hxp_drivers.h" - - - -#define SIZE_SMALL 1024 -#define SIZE_NOMINAL 1024 -#define SIZE_BIG 2048 -#define SIZE_HUGE 65536 - -#define SIZE_EXECUTE_METHOD 1024 - -#define SIZE_NAME 100 -#ifdef __cplusplus -extern "C" -{ -#else -#typedef int bool; /* C does not know bool, only C++ */ -#endif - - - -#define DLL_VERSION "Library version for HXP Firmware V1.3.x" - -/************************************************************************* -* Replace 'oldChar' by 'newChar' only between the startChar and endChar -*************************************************************************/ -void ReplaceCharacter (char *strSourceInOut, char oldChar, char newChar, char startChar, char endChar) -{ - char *pt; - char *ptNext; - ptNext = strSourceInOut; - do - { - pt = strchr(ptNext, startChar); - if (pt != NULL) - { - *pt++; - while ((pt != NULL) && (*pt != endChar)) - { - if (*pt == oldChar) - *pt = newChar; - pt++; - } - ptNext = pt++; - } - } - while ((pt != NULL) && (ptNext != NULL)); -} - -/************************************************************************* -* Delete space and tabulation characters between 'startChar' and 'endChar' -*************************************************************************/ -void CleanString (char *strSourceInOut, char startChar, char endChar) -{ - int len = 0; - int startIndex = 0; - int endIndex = 0; - int outputIndex = 0; - char outputString[SIZE_NOMINAL]; - len = strlen(strSourceInOut); - do - { - while ((strSourceInOut[startIndex] != startChar) && (startIndex < len) && (outputIndex < SIZE_NOMINAL)) - { - outputString[outputIndex] = strSourceInOut[startIndex]; - outputIndex++; - startIndex++; - } - while ((strSourceInOut[endIndex] != endChar) && (endIndex < len)) - endIndex++; - if ((startIndex != endIndex) && (startIndex < len)) - { - for (int i = startIndex; (i <= endIndex) && (outputIndex < SIZE_NOMINAL); i++) - { - if ((strSourceInOut[i] != ' ') && (strSourceInOut[i] != '\t')) - { - outputString[outputIndex] = strSourceInOut[i]; - outputIndex++; - } - } - endIndex++; - startIndex = endIndex; - } - } - while (startIndex < len); - outputString[outputIndex] = '\0'; - strcpy (strSourceInOut, outputString); -} - -/************************************************************************* -* Delete a specified characters -*************************************************************************/ -void DeleteCharacters (char *strSourceInOut, char *charactersToDelete) -{ - int len = 0; - int nbChar = 0; - int outputIndex = 0; - bool bCopy; - char outputString[SIZE_NOMINAL]; - len = strlen(strSourceInOut); - nbChar = strlen(charactersToDelete); - for (int i = 0; (i <= len) && (outputIndex < SIZE_NOMINAL); i++) - { - bCopy = true; - for (int j = 0; (j < nbChar) && (bCopy == true); j++) - { - if (strSourceInOut[i] == charactersToDelete[j]) - bCopy = false; - } - if (bCopy) - { - outputString[outputIndex] = strSourceInOut[i]; - outputIndex++; - } - } - outputString[outputIndex] = '\0'; - strcpy (strSourceInOut, outputString); -} - -/***********************************************************************/ -int __stdcall HXPTCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut) -{ - return (ConnectToServer(Ip_Address, Ip_Port, TimeOut)); -} -/***********************************************************************/ -void __stdcall HXPTCP_SetTimeout(int SocketIndex, double Timeout) -{ - SetTCPTimeout(SocketIndex, Timeout); -} -/***********************************************************************/ -void __stdcall HXPTCP_CloseSocket(int SocketIndex) -{ - CloseSocket(SocketIndex); -} -/***********************************************************************/ -char * __stdcall HXPTCP_GetError(int SocketIndex) -{ - return (GetError(SocketIndex)); -} -/***********************************************************************/ -char * __stdcall HXPGetLibraryVersion(void) -{ - return (DLL_VERSION); -} - -/*********************************************************************** - * ControllerMotionKernelTimeLoadGet : Get controller motion kernel time load - * - * - Parameters : - * int SocketIndex - * double *CPUTotalLoadRatio - * double *CPUCorrectorLoadRatio - * double *CPUProfilerLoadRatio - * double *CPUServitudesLoadRatio - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerMotionKernelTimeLoadGet (int SocketIndex, double * CPUTotalLoadRatio, double * CPUCorrectorLoadRatio, double * CPUProfilerLoadRatio, double * CPUServitudesLoadRatio) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelTimeLoadGet (double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUTotalLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUCorrectorLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUProfilerLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUServitudesLoadRatio); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ElapsedTimeGet : Return elapsed time from controller power on - * - * - Parameters : - * int SocketIndex - * double *ElapsedTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPElapsedTimeGet (int SocketIndex, double * ElapsedTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ElapsedTimeGet (double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", ElapsedTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ErrorStringGet : Return the error string corresponding to the error code - * - * - Parameters : - * int SocketIndex - * int ErrorCode - * char *ErrorString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ErrorStringGet (%d,char *)", ErrorCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ErrorString, pt); - ptNext = strchr (ErrorString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * FirmwareVersionGet : Return firmware version - * - * - Parameters : - * int SocketIndex - * char *Version - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPFirmwareVersionGet (int SocketIndex, char * Version) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "FirmwareVersionGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Version, pt); - ptNext = strchr (Version, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptExecute : Execute a TCL script from a TCL file - * - * - Parameters : - * int SocketIndex - * char *TCLFileName - * char *TaskName - * char *ParametersList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptExecute (%s,%s,%s)", TCLFileName, TaskName, ParametersList); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptExecuteAndWait : Execute a TCL script from a TCL file and wait the end of execution to return - * - * - Parameters : - * int SocketIndex - * char *TCLFileName - * char *TaskName - * char *InputParametersList - * char *OutputParametersList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTCLScriptExecuteAndWait (int SocketIndex, char * TCLFileName, char * TaskName, char * InputParametersList, char * OutputParametersList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptExecuteAndWait (%s,%s,%s,char *)", TCLFileName, TaskName, InputParametersList); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (OutputParametersList, pt); - ptNext = strchr (OutputParametersList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptKill : Kill TCL Task - * - * - Parameters : - * int SocketIndex - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTCLScriptKill (int SocketIndex, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptKill (%s)", TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TimerGet : Get a timer - * - * - Parameters : - * int SocketIndex - * char *TimerName - * int *FrequencyTicks - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TimerGet (%s,int *)", TimerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", FrequencyTicks); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TimerSet : Set a timer - * - * - Parameters : - * int SocketIndex - * char *TimerName - * int FrequencyTicks - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTimerSet (int SocketIndex, char * TimerName, int FrequencyTicks) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TimerSet (%s,%d)", TimerName, FrequencyTicks); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * Reboot : Reboot the controller - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPReboot (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "Reboot ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * Login : Log in - * - * - Parameters : - * int SocketIndex - * char *Name - * char *Password - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPLogin (int SocketIndex, char * Name, char * Password) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "Login (%s,%s)", Name, Password); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CloseAllOtherSockets : Close all socket beside the one used to send this command - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPCloseAllOtherSockets (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CloseAllOtherSockets ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventAdd : ** OBSOLETE ** Add an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * char *ActionName - * char *ActionParameter1 - * char *ActionParameter2 - * char *ActionParameter3 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventAdd (%s,%s,%s,%s,%s,%s,%s)", PositionerName, EventName, EventParameter, ActionName, ActionParameter1, ActionParameter2, ActionParameter3); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventGet : ** OBSOLETE ** Read events and actions list - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventsAndActionsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventGet (%s,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventsAndActionsList, pt); - ptNext = strchr (EventsAndActionsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventRemove : ** OBSOLETE ** Delete an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventRemove (%s,%s,%s)", PositionerName, EventName, EventParameter); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventWait : ** OBSOLETE ** Wait an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventWait (%s,%s,%s)", PositionerName, EventName, EventParameter); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationTriggerSet : Configure one or several events - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *ExtendedEventName - * char *EventParameter1 - * char *EventParameter2 - * char *EventParameter3 - * char *EventParameter4 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ExtendedEventNameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray1)[SIZE_NAME]; - stringArray1 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter1List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray1[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray1[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray1[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray1[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray2)[SIZE_NAME]; - stringArray2 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter2List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray2[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray2[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray2[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray2[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray3)[SIZE_NAME]; - stringArray3 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter3List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray3[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray3[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray3[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray3[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray4)[SIZE_NAME]; - stringArray4 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter4List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray4[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray4[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray4[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray4[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationTriggerSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%s,%s,%s,%s", stringArray0[i], stringArray1[i], stringArray2[i], stringArray3[i], stringArray4[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - delete [] stringArray1; - delete [] stringArray2; - delete [] stringArray3; - delete [] stringArray4; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationTriggerGet : Read the event configuration - * - * - Parameters : - * int SocketIndex - * char *EventTriggerConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationTriggerGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventTriggerConfiguration, pt); - ptNext = strchr (EventTriggerConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationActionSet : Configure one or several actions - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *ExtendedActionName - * char *ActionParameter1 - * char *ActionParameter2 - * char *ActionParameter3 - * char *ActionParameter4 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ExtendedActionNameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray1)[SIZE_NAME]; - stringArray1 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter1List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray1[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray1[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray1[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray1[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray2)[SIZE_NAME]; - stringArray2 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter2List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray2[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray2[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray2[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray2[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray3)[SIZE_NAME]; - stringArray3 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter3List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray3[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray3[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray3[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray3[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray4)[SIZE_NAME]; - stringArray4 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter4List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray4[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray4[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray4[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray4[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationActionSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%s,%s,%s,%s", stringArray0[i], stringArray1[i], stringArray2[i], stringArray3[i], stringArray4[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - delete [] stringArray1; - delete [] stringArray2; - delete [] stringArray3; - delete [] stringArray4; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationActionGet : Read the action configuration - * - * - Parameters : - * int SocketIndex - * char *ActionConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationActionGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionConfiguration, pt); - ptNext = strchr (ActionConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedStart : Launch the last event and action configuration and return an ID - * - * - Parameters : - * int SocketIndex - * int *ID - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedStart (int SocketIndex, int * ID) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedStart (int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ID); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedAllGet : Read all event and action configurations - * - * - Parameters : - * int SocketIndex - * char *EventActionConfigurations - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedAllGet (int SocketIndex, char * EventActionConfigurations) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedAllGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventActionConfigurations, pt); - ptNext = strchr (EventActionConfigurations, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedGet : Read the event and action configuration defined by ID - * - * - Parameters : - * int SocketIndex - * int ID - * char *EventTriggerConfiguration - * char *ActionConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedGet (%d,char *,char *)", ID); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventTriggerConfiguration, pt); - ptNext = strchr (EventTriggerConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionConfiguration, pt); - ptNext = strchr (ActionConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedRemove : Remove the event and action configuration defined by ID - * - * - Parameters : - * int SocketIndex - * int ID - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedRemove (int SocketIndex, int ID) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedRemove (%d)", ID); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedWait : Wait events from the last event configuration - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedWait (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedWait ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringConfigurationGet : Read different mnemonique type - * - * - Parameters : - * int SocketIndex - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringConfigurationGet (int SocketIndex, char * Type) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringConfigurationGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Type, pt); - ptNext = strchr (Type, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringConfigurationSet : Configuration acquisition - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, TypeList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringConfigurationSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringCurrentNumberGet : Maximum number of samples and current number during acquisition - * - * - Parameters : - * int SocketIndex - * int *CurrentNumber - * int *MaximumSamplesNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringCurrentNumberGet (int *,int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentNumber); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", MaximumSamplesNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringStopAndSave : Stop acquisition and save data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringStopAndSave (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringStopAndSave ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringDataAcquire : Acquire a configured data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringDataAcquire (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringDataAcquire ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringDataGet : Get a data line from gathering buffer - * - * - Parameters : - * int SocketIndex - * int IndexPoint - * char *DataBufferLine - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringDataGet (%d,char *)", IndexPoint); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DataBufferLine, pt); - ptNext = strchr (DataBufferLine, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringReset : Empty the gathered data in memory to start new gathering from scratch - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringReset (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringReset ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringRun : Start a new gathering - * - * - Parameters : - * int SocketIndex - * int DataNumber - * int Divisor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringRun (int SocketIndex, int DataNumber, int Divisor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringRun (%d,%d)", DataNumber, Divisor); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringStop : Stop the data gathering (without saving to file) - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringStop (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringStop ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalConfigurationSet : Configuration acquisition - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, TypeList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalConfigurationSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalConfigurationGet : Read different mnemonique type - * - * - Parameters : - * int SocketIndex - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalConfigurationGet (int SocketIndex, char * Type) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalConfigurationGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Type, pt); - ptNext = strchr (Type, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalCurrentNumberGet : Maximum number of samples and current number during acquisition - * - * - Parameters : - * int SocketIndex - * int *CurrentNumber - * int *MaximumSamplesNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalCurrentNumberGet (int *,int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentNumber); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", MaximumSamplesNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalStopAndSave : Stop acquisition and save data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalStopAndSave (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalStopAndSave ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GlobalArrayGet : Get global array value - * - * - Parameters : - * int SocketIndex - * int Number - * char *ValueString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGlobalArrayGet (int SocketIndex, int Number, char * ValueString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GlobalArrayGet (%d,char *)", Number); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ValueString, pt); - ptNext = strchr (ValueString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GlobalArraySet : Set global array value - * - * - Parameters : - * int SocketIndex - * int Number - * char *ValueString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGlobalArraySet (int SocketIndex, int Number, char * ValueString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GlobalArraySet (%d,%s)", Number, ValueString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * DoubleGlobalArrayGet : Get double global array value - * - * - Parameters : - * int SocketIndex - * int Number - * double *DoubleValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPDoubleGlobalArrayGet (int SocketIndex, int Number, double * DoubleValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "DoubleGlobalArrayGet (%d,double *)", Number); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DoubleValue); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * DoubleGlobalArraySet : Set double global array value - * - * - Parameters : - * int SocketIndex - * int Number - * double DoubleValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPDoubleGlobalArraySet (int SocketIndex, int Number, double DoubleValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "DoubleGlobalArraySet (%d,%.13g)", Number, DoubleValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGet : Read analog input or analog output for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * double *AnalogValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,double *", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &AnalogValue[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogSet : Set analog output for one or few output - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * double AnalogOutputValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%.13g", stringArray0[i], AnalogOutputValue[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGainGet : Read analog input gain (1, 2, 4 or 8) for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * int *AnalogInputGainValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIOAnalogGainGet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGainGet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,int *", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &AnalogInputGainValue[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGainSet : Set analog input gain (1, 2, 4 or 8) for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * int AnalogInputGainValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIOAnalogGainSet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGainSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%d", stringArray0[i], AnalogInputGainValue[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIODigitalGet : Read digital output or digital input - * - * - Parameters : - * int SocketIndex - * char *GPIOName - * unsigned short *DigitalValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIODigitalGet (%s,unsigned short *)", GPIOName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hu", DigitalValue); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIODigitalSet : Set Digital Output for one or few output TTL - * - * - Parameters : - * int SocketIndex - * char *GPIOName - * unsigned short Mask - * unsigned short DigitalOutputValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIODigitalSet (%s,%hu,%hu)", GPIOName, Mask, DigitalOutputValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupCorrectorOutputGet : Return corrector outputs - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *CorrectorOutput - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupCorrectorOutputGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &CorrectorOutput[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupHomeSearch : Start home search sequence - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupHomeSearch (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupHomeSearch (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupHomeSearchAndRelativeMove : Start home search sequence and execute a displacement - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupHomeSearchAndRelativeMove (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetDisplacement[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupInitialize : Start the initialization - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupInitialize (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupInitialize (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupInitializeWithEncoderCalibration : Start the initialization with encoder calibration - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupInitializeWithEncoderCalibration (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupKill : Kill the group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupKill (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupKill (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveAbort : Abort a move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMoveAbort (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveAbort (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveAbsolute : Do an absolute move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveAbsolute (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetPosition[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveRelative : Do a relative move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveRelative (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetDisplacement[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMotionDisable : Set Motion disable on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMotionDisable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMotionDisable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMotionEnable : Set Motion enable on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMotionEnable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMotionEnable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionCorrectedProfilerGet : Return corrected profiler positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double PositionX - * double PositionY - * double *CorrectedProfilerPositionX - * double *CorrectedProfilerPositionY - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionCorrectedProfilerGet (%s,%.13g,%.13g,double *,double *)", GroupName, PositionX, PositionY); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionX); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionY); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionCurrentGet : Return current positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *CurrentEncoderPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionCurrentGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &CurrentEncoderPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionSetpointGet : Return setpoint positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *SetPointPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionSetpointGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &SetPointPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionTargetGet : Return target positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *TargetPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionTargetGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &TargetPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusGet : Return group status - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int *Status - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupStatusGet (int SocketIndex, char * GroupName, int * Status) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusGet (%s,int *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", Status); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusStringGet : Return the group status string corresponding to the group status code - * - * - Parameters : - * int SocketIndex - * int GroupStatusCode - * char *GroupStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusStringGet (%d,char *)", GroupStatusCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (GroupStatusString, pt); - ptNext = strchr (GroupStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * KillAll : Put all groups in 'Not initialized' state - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPKillAll (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "KillAll ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * RestartApplication : Restart the Controller - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPRestartApplication (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "RestartApplication ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashGet : Read backlash value and status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *BacklashValue - * char *BacklaskStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashGet (%s,double *,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", BacklashValue); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (BacklaskStatus, pt); - ptNext = strchr (BacklaskStatus, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashSet : Set backlash value - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double BacklashValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashSet (%s,%.13g)", PositionerName, BacklashValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashEnable : Enable the backlash - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerBacklashEnable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashEnable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashDisable : Disable the backlash - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerBacklashDisable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashDisable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorNotchFiltersSet : Update filters parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double NotchFrequency1 - * double NotchBandwith1 - * double NotchGain1 - * double NotchFrequency2 - * double NotchBandwith2 - * double NotchGain2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, NotchFrequency1, NotchBandwith1, NotchGain1, NotchFrequency2, NotchBandwith2, NotchGain2); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorNotchFiltersGet : Read filters parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *NotchFrequency1 - * double *NotchBandwith1 - * double *NotchGain1 - * double *NotchFrequency2 - * double *NotchBandwith2 - * double *NotchGain2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersGet (%s,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchFrequency1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchBandwith1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchGain1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchFrequency2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchBandwith2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchGain2); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFAccelerationSet : Update corrector parameters - * - * - Parameters : - * 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 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDFFAccelerationSet (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) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationSet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainAcceleration); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFAccelerationGet : Read corrector parameters - * - * - Parameters : - * 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 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDFFAccelerationGet (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) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFVelocitySet : Update corrector parameters - * - * - Parameters : - * 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 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDFFVelocitySet (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) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocitySet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFVelocityGet : Read corrector parameters - * - * - Parameters : - * 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 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDFFVelocityGet (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) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocityGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainVelocity); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDDualFFVoltageSet : Update corrector parameters - * - * - Parameters : - * 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 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDDualFFVoltageSet (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) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageSet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity, FeedForwardGainAcceleration, Friction); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDDualFFVoltageGet : Read corrector parameters - * - * - Parameters : - * 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 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDDualFFVoltageGet (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) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainAcceleration); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Friction); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIPositionSet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double IntegrationTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIPositionSet (%s,%d,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, IntegrationTime); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIPositionGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *IntegrationTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIPositionGet (%s,bool *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorTypeGet : Read corrector type - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *CorrectorType - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorTypeGet (%s,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (CorrectorType, pt); - ptNext = strchr (CorrectorType, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCurrentVelocityAccelerationFiltersSet : Set current velocity and acceleration cut off frequencies - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double CurrentVelocityCutOffFrequency - * double CurrentAccelerationCutOffFrequency - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCurrentVelocityAccelerationFiltersSet (%s,%.13g,%.13g)", PositionerName, CurrentVelocityCutOffFrequency, CurrentAccelerationCutOffFrequency); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCurrentVelocityAccelerationFiltersGet : Get current velocity and acceleration cut off frequencies - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *CurrentVelocityCutOffFrequency - * double *CurrentAccelerationCutOffFrequency - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCurrentVelocityAccelerationFiltersGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentVelocityCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentAccelerationCutOffFrequency); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusGet : Read positioner driver status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *DriverStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", DriverStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusStringGet : Return the positioner driver status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerDriverStatus - * char *PositionerDriverStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusStringGet (%d,char *)", PositionerDriverStatus); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerDriverStatusString, pt); - ptNext = strchr (PositionerDriverStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerEncoderAmplitudeValuesGet : Read analog interpolated encoder amplitude values - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *CalibrationSinusAmplitude - * double *CurrentSinusAmplitude - * double *CalibrationCosinusAmplitude - * double *CurrentCosinusAmplitude - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * CalibrationSinusAmplitude, double * CurrentSinusAmplitude, double * CalibrationCosinusAmplitude, double * CurrentCosinusAmplitude) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerEncoderAmplitudeValuesGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CalibrationSinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentSinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CalibrationCosinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentCosinusAmplitude); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerEncoderCalibrationParametersGet : Read analog interpolated encoder calibration parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *SinusOffset - * double *CosinusOffset - * double *DifferentialGain - * double *PhaseCompensation - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerEncoderCalibrationParametersGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SinusOffset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CosinusOffset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DifferentialGain); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PhaseCompensation); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorGet : Read and clear positioner error code - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *ErrorCode - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ErrorCode); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorRead : Read only positioner error code without clear it - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *ErrorCode - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorRead (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ErrorCode); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorStringGet : Return the positioner status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerErrorCode - * char *PositionerErrorString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorStringGet (%d,char *)", PositionerErrorCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerErrorString, pt); - ptNext = strchr (PositionerErrorString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusGet : Read positioner hardware status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *HardwareStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", HardwareStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusStringGet : Return the positioner hardware status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerHardwareStatus - * char *PositionerHardwareStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusStringGet (%d,char *)", PositionerHardwareStatus); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerHardwareStatusString, pt); - ptNext = strchr (PositionerHardwareStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardInterpolatorFactorGet : Get hard interpolator parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *InterpolationFactor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardInterpolatorFactorGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", InterpolationFactor); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardInterpolatorFactorSet : Set hard interpolator parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int InterpolationFactor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardInterpolatorFactorSet (%s,%d)", PositionerName, InterpolationFactor); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMaximumVelocityAndAccelerationGet : Return maximum velocity and acceleration of the positioner - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *MaximumVelocity - * double *MaximumAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMaximumVelocityAndAccelerationGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMotionDoneGet : Read motion done parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *PositionWindow - * double *VelocityWindow - * double *CheckingTime - * double *MeanPeriod - * double *TimeOut - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMotionDoneGet (%s,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PositionWindow); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", VelocityWindow); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CheckingTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MeanPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", TimeOut); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMotionDoneSet : Update motion done parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double PositionWindow - * double VelocityWindow - * double CheckingTime - * double MeanPeriod - * double TimeOut - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMotionDoneSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, PositionWindow, VelocityWindow, CheckingTime, MeanPeriod, TimeOut); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaExactVelocityAjustedDisplacementGet : Return adjusted displacement to get exact velocity - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double DesiredDisplacement - * double *AdjustedDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaExactVelocityAjustedDisplacementGet (%s,%.13g,double *)", PositionerName, DesiredDisplacement); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", AdjustedDisplacement); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaParametersGet : Read dynamic parameters for one axe of a group for a future displacement - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *Velocity - * double *Acceleration - * double *MinimumTjerkTime - * double *MaximumTjerkTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerSGammaParametersGet (int SocketIndex, char * PositionerName, double * Velocity, double * Acceleration, double * MinimumTjerkTime, double * MaximumTjerkTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaParametersGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumTjerkTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumTjerkTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaParametersSet : Update dynamic parameters for one axe of a group for a future displacement - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double Velocity - * double Acceleration - * double MinimumTjerkTime - * double MaximumTjerkTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerSGammaParametersSet (int SocketIndex, char * PositionerName, double Velocity, double Acceleration, double MinimumTjerkTime, double MaximumTjerkTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaParametersSet (%s,%.13g,%.13g,%.13g,%.13g)", PositionerName, Velocity, Acceleration, MinimumTjerkTime, MaximumTjerkTime); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaPreviousMotionTimesGet : Read SettingTime and SettlingTime - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *SettingTime - * double *SettlingTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaPreviousMotionTimesGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SettingTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SettlingTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerStageParameterGet : Return the stage parameter - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *ParameterName - * char *ParameterValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerStageParameterGet (%s,%s,char *)", PositionerName, ParameterName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ParameterValue, pt); - ptNext = strchr (ParameterValue, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerStageParameterSet : Save the stage parameter - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *ParameterName - * char *ParameterValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerStageParameterSet (%s,%s,%s)", PositionerName, ParameterName, ParameterValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerUserTravelLimitsGet : Read UserMinimumTarget and UserMaximumTarget - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *UserMinimumTarget - * double *UserMaximumTarget - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerUserTravelLimitsGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserMinimumTarget); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserMaximumTarget); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerUserTravelLimitsSet : Update UserMinimumTarget and UserMaximumTarget - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double UserMinimumTarget - * double UserMaximumTarget - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerUserTravelLimitsSet (%s,%.13g,%.13g)", PositionerName, UserMinimumTarget, UserMaximumTarget); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodMoveAbsolute : Hexapod absolute move in a specific coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystem - * double X - * double Y - * double Z - * double U - * double V - * double W - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodMoveAbsolute (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodMoveAbsolute (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, X, Y, Z, U, V, W); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodMoveIncremental : Hexapod incremental move in a specific coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystem - * double dX - * double dY - * double dZ - * double dU - * double dV - * double dW - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodMoveIncremental (int SocketIndex, char * GroupName, char * CoordinateSystem, double dX, double dY, double dZ, double dU, double dV, double dW) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodMoveIncremental (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, dX, dY, dZ, dU, dV, dW); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodCoordinatesGet : Get coordinates in a specific coordinate system of a point specified in another coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystemIn - * char *CoordinateSystemOut - * double Xin - * double Yin - * double Zin - * double Uin - * double Vin - * double Win - * double *Xout - * double *Yout - * double *Zout - * double *Uout - * double *Vout - * double *Wout - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodCoordinatesGet (int SocketIndex, char * GroupName, char * CoordinateSystemIn, char * CoordinateSystemOut, double Xin, double Yin, double Zin, double Uin, double Vin, double Win, double * Xout, double * Yout, double * Zout, double * Uout, double * Vout, double * Wout) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodCoordinatesGet (%s,%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,double *,double *,double *,double *,double *,double *)", GroupName, CoordinateSystemIn, CoordinateSystemOut, Xin, Yin, Zin, Uin, Vin, Win); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Xout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Yout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Zout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Uout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Vout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Wout); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodCoordinateSystemSet : Modify the position of a coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystem - * double X - * double Y - * double Z - * double U - * double V - * double W - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodCoordinateSystemSet (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodCoordinateSystemSet (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, X, Y, Z, U, V, W); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodCoordinateSystemGet : Get the position of a coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystem - * double *X - * double *Y - * double *Z - * double *U - * double *V - * double *W - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodCoordinateSystemGet (int SocketIndex, char * GroupName, char * CoordinateSystem, double * X, double * Y, double * Z, double * U, double * V, double * W) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodCoordinateSystemGet (%s,%s,double *,double *,double *,double *,double *,double *)", GroupName, CoordinateSystem); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", X); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Y); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Z); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", U); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", W); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * OptionalModuleExecute : Execute an optional module - * - * - Parameters : - * int SocketIndex - * char *ModuleFileName - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPOptionalModuleExecute (int SocketIndex, char * ModuleFileName, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "OptionalModuleExecute (%s,%s)", ModuleFileName, TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * OptionalModuleKill : Kill an optional module - * - * - Parameters : - * int SocketIndex - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPOptionalModuleKill (int SocketIndex, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "OptionalModuleKill (%s)", TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerStatusGet : Read controller current status - * - * - Parameters : - * int SocketIndex - * int *ControllerStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerStatusGet (int SocketIndex, int * ControllerStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerStatusGet (int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ControllerStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerStatusStringGet : Return the controller status string corresponding to the controller status code - * - * - Parameters : - * int SocketIndex - * int ControllerStatusCode - * char *ControllerStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerStatusStringGet (int SocketIndex, int ControllerStatusCode, char * ControllerStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerStatusStringGet (%d,char *)", ControllerStatusCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ControllerStatusString, pt); - ptNext = strchr (ControllerStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMCIESet : Set CIE EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int CardNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMCIESet (%d,%s)", CardNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMDACOffsetCIESet : Set CIE DAC offsets - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * double DAC1Offset - * double DAC2Offset - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMDACOffsetCIESet (%d,%.13g,%.13g)", PlugNumber, DAC1Offset, DAC2Offset); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMDriverSet : Set Driver EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMDriverSet (%d,%s)", PlugNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMINTSet : Set INT EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int CardNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMINTSet (%d,%s)", CardNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CPUCoreAndBoardSupplyVoltagesGet : Get power informations - * - * - Parameters : - * int SocketIndex - * double *VoltageCPUCore - * double *SupplyVoltage1P5V - * double *SupplyVoltage3P3V - * double *SupplyVoltage5V - * double *SupplyVoltage12V - * double *SupplyVoltageM12V - * double *SupplyVoltageM5V - * double *SupplyVoltage5VSB - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPCPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CPUCoreAndBoardSupplyVoltagesGet (double *,double *,double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", VoltageCPUCore); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage1P5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage3P3V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage12V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltageM12V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltageM5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage5VSB); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CPUTemperatureAndFanSpeedGet : Get CPU temperature and fan speed - * - * - Parameters : - * int SocketIndex - * double *CPUTemperature - * double *CPUFanSpeed - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPCPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CPUTemperatureAndFanSpeedGet (double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUTemperature); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUFanSpeed); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ActionListGet : Action list - * - * - Parameters : - * int SocketIndex - * char *ActionList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPActionListGet (int SocketIndex, char * ActionList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ActionListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionList, pt); - ptNext = strchr (ActionList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ActionExtendedListGet : Action extended list - * - * - Parameters : - * int SocketIndex - * char *ActionList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPActionExtendedListGet (int SocketIndex, char * ActionList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ActionExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionList, pt); - ptNext = strchr (ActionList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * APIExtendedListGet : API method list - * - * - Parameters : - * int SocketIndex - * char *Method - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPAPIExtendedListGet (int SocketIndex, char * Method) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "APIExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Method, pt); - ptNext = strchr (Method, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * APIListGet : API method list without extended API - * - * - Parameters : - * int SocketIndex - * char *Method - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPAPIListGet (int SocketIndex, char * Method) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "APIListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Method, pt); - ptNext = strchr (Method, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ErrorListGet : Error list - * - * - Parameters : - * int SocketIndex - * char *ErrorsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPErrorListGet (int SocketIndex, char * ErrorsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "ErrorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ErrorsList, pt); - ptNext = strchr (ErrorsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventListGet : General event list - * - * - Parameters : - * int SocketIndex - * char *EventList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventListGet (int SocketIndex, char * EventList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventList, pt); - ptNext = strchr (EventList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringListGet : Gathering type list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExtendedListGet : Gathering type extended list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExtendedListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalListGet : External Gathering type list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusListGet : Group status list - * - * - Parameters : - * int SocketIndex - * char *GroupStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupStatusListGet (int SocketIndex, char * GroupStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (GroupStatusList, pt); - ptNext = strchr (GroupStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HardwareInternalListGet : Internal hardware list - * - * - Parameters : - * int SocketIndex - * char *InternalHardwareList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHardwareInternalListGet (int SocketIndex, char * InternalHardwareList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HardwareInternalListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (InternalHardwareList, pt); - ptNext = strchr (InternalHardwareList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HardwareDriverAndStageGet : Smart hardware - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * char *DriverName - * char *StageName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HardwareDriverAndStageGet (%d,char *,char *)", PlugNumber); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DriverName, pt); - ptNext = strchr (DriverName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (StageName, pt); - ptNext = strchr (StageName, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ObjectsListGet : Group name and positioner name - * - * - Parameters : - * int SocketIndex - * char *ObjectsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPObjectsListGet (int SocketIndex, char * ObjectsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "ObjectsListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ObjectsList, pt); - ptNext = strchr (ObjectsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorListGet : Positioner error list - * - * - Parameters : - * int SocketIndex - * char *PositionerErrorList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerErrorListGet (int SocketIndex, char * PositionerErrorList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerErrorList, pt); - ptNext = strchr (PositionerErrorList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusListGet : Positioner hardware status list - * - * - Parameters : - * int SocketIndex - * char *PositionerHardwareStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerHardwareStatusList, pt); - ptNext = strchr (PositionerHardwareStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusListGet : Positioner driver status list - * - * - Parameters : - * int SocketIndex - * char *PositionerDriverStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerDriverStatusList, pt); - ptNext = strchr (PositionerDriverStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ReferencingActionListGet : Get referencing action list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPReferencingActionListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ReferencingActionListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ReferencingSensorListGet : Get referencing sensor list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPReferencingSensorListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ReferencingSensorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringUserDatasGet : Return UserDatas values - * - * - Parameters : - * int SocketIndex - * double *UserData1 - * double *UserData2 - * double *UserData3 - * double *UserData4 - * double *UserData5 - * double *UserData6 - * double *UserData7 - * double *UserData8 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringUserDatasGet (double *,double *,double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData3); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData4); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData5); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData6); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData7); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData8); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerMotionKernelPeriodMinMaxGet : Get controller motion kernel min/max periods - * - * - Parameters : - * int SocketIndex - * double *MinimumCorrectorPeriod - * double *MaximumCorrectorPeriod - * double *MinimumProfilerPeriod - * double *MaximumProfilerPeriod - * double *MinimumServitudesPeriod - * double *MaximumServitudesPeriod - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerMotionKernelPeriodMinMaxGet (int SocketIndex, double * MinimumCorrectorPeriod, double * MaximumCorrectorPeriod, double * MinimumProfilerPeriod, double * MaximumProfilerPeriod, double * MinimumServitudesPeriod, double * MaximumServitudesPeriod) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelPeriodMinMaxGet (double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumCorrectorPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumCorrectorPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumProfilerPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumProfilerPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumServitudesPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumServitudesPeriod); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerMotionKernelPeriodMinMaxReset : Reset controller motion kernel min/max periods - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerMotionKernelPeriodMinMaxReset (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelPeriodMinMaxReset ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TestTCP : Test TCP/IP transfert - * - * - Parameters : - * int SocketIndex - * char *InputString - * char *ReturnString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTestTCP (int SocketIndex, char * InputString, char * ReturnString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TestTCP (%s,char *)", InputString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ReturnString, pt); - ptNext = strchr (ReturnString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PrepareForUpdate : Kill QNX processes for firmware update - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPrepareForUpdate (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PrepareForUpdate ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - - -#ifdef __cplusplus -} -#endif +/* + * Created source file hxp_drivers.cpp for API description + */ + + +#include +#include +#include +#include +#include "Socket.h" + +#define epicsExportSharedSymbols +#include +#include "XPS_C8_drivers.h" +#ifdef _WIN32 +#include "strtok_r.h" +#endif + +#define SIZE_SMALL 1024 +#define SIZE_NOMINAL 1024 +#define SIZE_BIG 2048 +#define SIZE_HUGE 65536 + +#define SIZE_EXECUTE_METHOD 1024 + +#define SIZE_NAME 100 +#ifdef __cplusplus +extern "C" +{ +#else +#typedef int bool; /* C does not know bool, only C++ */ +#endif + + +#define DLL_VERSION "Library version for HXP Firmware V1.3.x" + +/************************************************************************* +* Replace 'oldChar' by 'newChar' only between the startChar and endChar +*************************************************************************/ +void ReplaceCharacter (char *strSourceInOut, char oldChar, char newChar, char startChar, char endChar) +{ + char *pt; + char *ptNext; + ptNext = strSourceInOut; + do + { + pt = strchr(ptNext, startChar); + if (pt != NULL) + { + *pt++; + while ((pt != NULL) && (*pt != endChar)) + { + if (*pt == oldChar) + *pt = newChar; + pt++; + } + ptNext = pt++; + } + } + while ((pt != NULL) && (ptNext != NULL)); +} + +/************************************************************************* +* Delete space and tabulation characters between 'startChar' and 'endChar' +*************************************************************************/ +void CleanString (char *strSourceInOut, char startChar, char endChar) +{ + int len = 0; + int startIndex = 0; + int endIndex = 0; + int outputIndex = 0; + char outputString[SIZE_NOMINAL]; + len = strlen(strSourceInOut); + do + { + while ((strSourceInOut[startIndex] != startChar) && (startIndex < len) && (outputIndex < SIZE_NOMINAL)) + { + outputString[outputIndex] = strSourceInOut[startIndex]; + outputIndex++; + startIndex++; + } + while ((strSourceInOut[endIndex] != endChar) && (endIndex < len)) + endIndex++; + if ((startIndex != endIndex) && (startIndex < len)) + { + for (int i = startIndex; (i <= endIndex) && (outputIndex < SIZE_NOMINAL); i++) + { + if ((strSourceInOut[i] != ' ') && (strSourceInOut[i] != '\t')) + { + outputString[outputIndex] = strSourceInOut[i]; + outputIndex++; + } + } + endIndex++; + startIndex = endIndex; + } + } + while (startIndex < len); + outputString[outputIndex] = '\0'; + strcpy (strSourceInOut, outputString); +} + +/************************************************************************* +* Delete a specified characters +*************************************************************************/ +void DeleteCharacters (char *strSourceInOut, char *charactersToDelete) +{ + int len = 0; + int nbChar = 0; + int outputIndex = 0; + bool bCopy; + char outputString[SIZE_NOMINAL]; + len = strlen(strSourceInOut); + nbChar = strlen(charactersToDelete); + for (int i = 0; (i <= len) && (outputIndex < SIZE_NOMINAL); i++) + { + bCopy = true; + for (int j = 0; (j < nbChar) && (bCopy == true); j++) + { + if (strSourceInOut[i] == charactersToDelete[j]) + bCopy = false; + } + if (bCopy) + { + outputString[outputIndex] = strSourceInOut[i]; + outputIndex++; + } + } + outputString[outputIndex] = '\0'; + strcpy (strSourceInOut, outputString); +} + +/***********************************************************************/ +int __stdcall HXPTCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut) +{ + return (ConnectToServer(Ip_Address, Ip_Port, TimeOut)); +} +/***********************************************************************/ +void __stdcall HXPTCP_SetTimeout(int SocketIndex, double Timeout) +{ + SetTCPTimeout(SocketIndex, Timeout); +} +/***********************************************************************/ +void __stdcall HXPTCP_CloseSocket(int SocketIndex) +{ + CloseSocket(SocketIndex); +} +/***********************************************************************/ +char * __stdcall HXPTCP_GetError(int SocketIndex) +{ + return (GetError(SocketIndex)); +} +/***********************************************************************/ +char * __stdcall HXPGetLibraryVersion(void) +{ + return (DLL_VERSION); +} + +/*********************************************************************** + * ControllerMotionKernelTimeLoadGet : Get controller motion kernel time load + * + * - Parameters : + * int SocketIndex + * double *CPUTotalLoadRatio + * double *CPUCorrectorLoadRatio + * double *CPUProfilerLoadRatio + * double *CPUServitudesLoadRatio + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPControllerMotionKernelTimeLoadGet (int SocketIndex, double * CPUTotalLoadRatio, double * CPUCorrectorLoadRatio, double * CPUProfilerLoadRatio, double * CPUServitudesLoadRatio) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "ControllerMotionKernelTimeLoadGet (double *,double *,double *,double *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CPUTotalLoadRatio); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CPUCorrectorLoadRatio); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CPUProfilerLoadRatio); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CPUServitudesLoadRatio); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ElapsedTimeGet : Return elapsed time from controller power on + * + * - Parameters : + * int SocketIndex + * double *ElapsedTime + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPElapsedTimeGet (int SocketIndex, double * ElapsedTime) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "ElapsedTimeGet (double *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", ElapsedTime); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ErrorStringGet : Return the error string corresponding to the error code + * + * - Parameters : + * int SocketIndex + * int ErrorCode + * char *ErrorString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "ErrorStringGet (%d,char *)", ErrorCode); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ErrorString, pt); + ptNext = strchr (ErrorString, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * FirmwareVersionGet : Return firmware version + * + * - Parameters : + * int SocketIndex + * char *Version + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPFirmwareVersionGet (int SocketIndex, char * Version) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "FirmwareVersionGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (Version, pt); + ptNext = strchr (Version, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * TCLScriptExecute : Execute a TCL script from a TCL file + * + * - Parameters : + * int SocketIndex + * char *TCLFileName + * char *TaskName + * char *ParametersList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPTCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "TCLScriptExecute (%s,%s,%s)", TCLFileName, TaskName, ParametersList); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * TCLScriptExecuteAndWait : Execute a TCL script from a TCL file and wait the end of execution to return + * + * - Parameters : + * int SocketIndex + * char *TCLFileName + * char *TaskName + * char *InputParametersList + * char *OutputParametersList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPTCLScriptExecuteAndWait (int SocketIndex, char * TCLFileName, char * TaskName, char * InputParametersList, char * OutputParametersList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "TCLScriptExecuteAndWait (%s,%s,%s,char *)", TCLFileName, TaskName, InputParametersList); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (OutputParametersList, pt); + ptNext = strchr (OutputParametersList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * TCLScriptKill : Kill TCL Task + * + * - Parameters : + * int SocketIndex + * char *TaskName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPTCLScriptKill (int SocketIndex, char * TaskName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "TCLScriptKill (%s)", TaskName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * TimerGet : Get a timer + * + * - Parameters : + * int SocketIndex + * char *TimerName + * int *FrequencyTicks + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPTimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "TimerGet (%s,int *)", TimerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", FrequencyTicks); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * TimerSet : Set a timer + * + * - Parameters : + * int SocketIndex + * char *TimerName + * int FrequencyTicks + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPTimerSet (int SocketIndex, char * TimerName, int FrequencyTicks) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "TimerSet (%s,%d)", TimerName, FrequencyTicks); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * Reboot : Reboot the controller + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPReboot (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "Reboot ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * Login : Log in + * + * - Parameters : + * int SocketIndex + * char *Name + * char *Password + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPLogin (int SocketIndex, char * Name, char * Password) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "Login (%s,%s)", Name, Password); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * CloseAllOtherSockets : Close all socket beside the one used to send this command + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPCloseAllOtherSockets (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "CloseAllOtherSockets ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventAdd : ** OBSOLETE ** Add an event + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * char *EventName + * char *EventParameter + * char *ActionName + * char *ActionParameter1 + * char *ActionParameter2 + * char *ActionParameter3 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventAdd (%s,%s,%s,%s,%s,%s,%s)", PositionerName, EventName, EventParameter, ActionName, ActionParameter1, ActionParameter2, ActionParameter3); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventGet : ** OBSOLETE ** Read events and actions list + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * char *EventsAndActionsList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventGet (%s,char *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (EventsAndActionsList, pt); + ptNext = strchr (EventsAndActionsList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventRemove : ** OBSOLETE ** Delete an event + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * char *EventName + * char *EventParameter + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventRemove (%s,%s,%s)", PositionerName, EventName, EventParameter); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventWait : ** OBSOLETE ** Wait an event + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * char *EventName + * char *EventParameter + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventWait (%s,%s,%s)", PositionerName, EventName, EventParameter); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedConfigurationTriggerSet : Configure one or several events + * + * - Parameters : + * int SocketIndex + * int nbElement + * char *ExtendedEventName + * char *EventParameter1 + * char *EventParameter2 + * char *EventParameter3 + * char *EventParameter4 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Split list */ + char *token; + char seps[] = " \t;"; + int indice; + char list [SIZE_NOMINAL]; + char *list_r; + char subString[] = "{}"; + + char (*stringArray0)[SIZE_NAME]; + stringArray0 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, ExtendedEventNameList, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray0[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray0[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + char (*stringArray1)[SIZE_NAME]; + stringArray1 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, EventParameter1List, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray1[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray1[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray1[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray1[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + char (*stringArray2)[SIZE_NAME]; + stringArray2 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, EventParameter2List, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray2[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray2[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray2[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray2[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + char (*stringArray3)[SIZE_NAME]; + stringArray3 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, EventParameter3List, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray3[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray3[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray3[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray3[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + char (*stringArray4)[SIZE_NAME]; + stringArray4 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, EventParameter4List, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray4[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray4[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray4[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray4[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedConfigurationTriggerSet ("); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%s,%s,%s,%s,%s", stringArray0[i], stringArray1[i], stringArray2[i], stringArray3[i], stringArray4[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Clear memory */ + delete [] stringArray0; + delete [] stringArray1; + delete [] stringArray2; + delete [] stringArray3; + delete [] stringArray4; + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedConfigurationTriggerGet : Read the event configuration + * + * - Parameters : + * int SocketIndex + * char *EventTriggerConfiguration + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedConfigurationTriggerGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (EventTriggerConfiguration, pt); + ptNext = strchr (EventTriggerConfiguration, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedConfigurationActionSet : Configure one or several actions + * + * - Parameters : + * int SocketIndex + * int nbElement + * char *ExtendedActionName + * char *ActionParameter1 + * char *ActionParameter2 + * char *ActionParameter3 + * char *ActionParameter4 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Split list */ + char *token; + char seps[] = " \t;"; + int indice; + char list [SIZE_NOMINAL]; + char *list_r; + char subString[] = "{}"; + + char (*stringArray0)[SIZE_NAME]; + stringArray0 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, ExtendedActionNameList, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray0[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray0[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + char (*stringArray1)[SIZE_NAME]; + stringArray1 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, ActionParameter1List, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray1[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray1[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray1[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray1[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + char (*stringArray2)[SIZE_NAME]; + stringArray2 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, ActionParameter2List, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray2[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray2[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray2[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray2[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + char (*stringArray3)[SIZE_NAME]; + stringArray3 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, ActionParameter3List, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray3[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray3[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray3[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray3[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + char (*stringArray4)[SIZE_NAME]; + stringArray4 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, ActionParameter4List, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray4[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray4[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray4[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray4[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedConfigurationActionSet ("); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%s,%s,%s,%s,%s", stringArray0[i], stringArray1[i], stringArray2[i], stringArray3[i], stringArray4[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Clear memory */ + delete [] stringArray0; + delete [] stringArray1; + delete [] stringArray2; + delete [] stringArray3; + delete [] stringArray4; + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedConfigurationActionGet : Read the action configuration + * + * - Parameters : + * int SocketIndex + * char *ActionConfiguration + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedConfigurationActionGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ActionConfiguration, pt); + ptNext = strchr (ActionConfiguration, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedStart : Launch the last event and action configuration and return an ID + * + * - Parameters : + * int SocketIndex + * int *ID + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedStart (int SocketIndex, int * ID) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedStart (int *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", ID); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedAllGet : Read all event and action configurations + * + * - Parameters : + * int SocketIndex + * char *EventActionConfigurations + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedAllGet (int SocketIndex, char * EventActionConfigurations) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedAllGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (EventActionConfigurations, pt); + ptNext = strchr (EventActionConfigurations, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedGet : Read the event and action configuration defined by ID + * + * - Parameters : + * int SocketIndex + * int ID + * char *EventTriggerConfiguration + * char *ActionConfiguration + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedGet (%d,char *,char *)", ID); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (EventTriggerConfiguration, pt); + ptNext = strchr (EventTriggerConfiguration, ','); + if (ptNext != NULL) *ptNext = '\0'; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ActionConfiguration, pt); + ptNext = strchr (ActionConfiguration, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedRemove : Remove the event and action configuration defined by ID + * + * - Parameters : + * int SocketIndex + * int ID + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedRemove (int SocketIndex, int ID) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedRemove (%d)", ID); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventExtendedWait : Wait events from the last event configuration + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventExtendedWait (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventExtendedWait ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringConfigurationGet : Read different mnemonique type + * + * - Parameters : + * int SocketIndex + * char *Type + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringConfigurationGet (int SocketIndex, char * Type) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringConfigurationGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (Type, pt); + ptNext = strchr (Type, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringConfigurationSet : Configuration acquisition + * + * - Parameters : + * int SocketIndex + * int nbElement + * char *Type + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Split list */ + char *token; + char seps[] = " \t;"; + int indice; + char list [SIZE_NOMINAL]; + char *list_r; + char subString[] = "{}"; + + char (*stringArray0)[SIZE_NAME]; + stringArray0 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, TypeList, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray0[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray0[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringConfigurationSet ("); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%s", stringArray0[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Clear memory */ + delete [] stringArray0; + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringCurrentNumberGet : Maximum number of samples and current number during acquisition + * + * - Parameters : + * int SocketIndex + * int *CurrentNumber + * int *MaximumSamplesNumber + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringCurrentNumberGet (int *,int *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", CurrentNumber); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", MaximumSamplesNumber); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringStopAndSave : Stop acquisition and save data + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringStopAndSave (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringStopAndSave ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringDataAcquire : Acquire a configured data + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringDataAcquire (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringDataAcquire ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringDataGet : Get a data line from gathering buffer + * + * - Parameters : + * int SocketIndex + * int IndexPoint + * char *DataBufferLine + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringDataGet (%d,char *)", IndexPoint); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (DataBufferLine, pt); + ptNext = strchr (DataBufferLine, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringReset : Empty the gathered data in memory to start new gathering from scratch + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringReset (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringReset ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringRun : Start a new gathering + * + * - Parameters : + * int SocketIndex + * int DataNumber + * int Divisor + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringRun (int SocketIndex, int DataNumber, int Divisor) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringRun (%d,%d)", DataNumber, Divisor); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringStop : Stop the data gathering (without saving to file) + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringStop (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringStop ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringExternalConfigurationSet : Configuration acquisition + * + * - Parameters : + * int SocketIndex + * int nbElement + * char *Type + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Split list */ + char *token; + char seps[] = " \t;"; + int indice; + char list [SIZE_NOMINAL]; + char *list_r; + char subString[] = "{}"; + + char (*stringArray0)[SIZE_NAME]; + stringArray0 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, TypeList, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray0[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray0[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringExternalConfigurationSet ("); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%s", stringArray0[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Clear memory */ + delete [] stringArray0; + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringExternalConfigurationGet : Read different mnemonique type + * + * - Parameters : + * int SocketIndex + * char *Type + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringExternalConfigurationGet (int SocketIndex, char * Type) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringExternalConfigurationGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (Type, pt); + ptNext = strchr (Type, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringExternalCurrentNumberGet : Maximum number of samples and current number during acquisition + * + * - Parameters : + * int SocketIndex + * int *CurrentNumber + * int *MaximumSamplesNumber + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringExternalCurrentNumberGet (int *,int *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", CurrentNumber); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", MaximumSamplesNumber); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringExternalStopAndSave : Stop acquisition and save data + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringExternalStopAndSave (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringExternalStopAndSave ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GlobalArrayGet : Get global array value + * + * - Parameters : + * int SocketIndex + * int Number + * char *ValueString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGlobalArrayGet (int SocketIndex, int Number, char * ValueString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GlobalArrayGet (%d,char *)", Number); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ValueString, pt); + ptNext = strchr (ValueString, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GlobalArraySet : Set global array value + * + * - Parameters : + * int SocketIndex + * int Number + * char *ValueString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGlobalArraySet (int SocketIndex, int Number, char * ValueString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GlobalArraySet (%d,%s)", Number, ValueString); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * DoubleGlobalArrayGet : Get double global array value + * + * - Parameters : + * int SocketIndex + * int Number + * double *DoubleValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPDoubleGlobalArrayGet (int SocketIndex, int Number, double * DoubleValue) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "DoubleGlobalArrayGet (%d,double *)", Number); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", DoubleValue); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * DoubleGlobalArraySet : Set double global array value + * + * - Parameters : + * int SocketIndex + * int Number + * double DoubleValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPDoubleGlobalArraySet (int SocketIndex, int Number, double DoubleValue) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "DoubleGlobalArraySet (%d,%.13g)", Number, DoubleValue); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GPIOAnalogGet : Read analog input or analog output for one or few input + * + * - Parameters : + * int SocketIndex + * int nbElement + * char *GPIOName + * double *AnalogValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Split list */ + char *token; + char seps[] = " \t;"; + int indice; + char list [SIZE_NOMINAL]; + char *list_r; + char subString[] = "{}"; + + char (*stringArray0)[SIZE_NAME]; + stringArray0 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray0[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray0[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + + /* Convert to string */ + sprintf (ExecuteMethod, "GPIOAnalogGet ("); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%s,double *", stringArray0[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Clear memory */ + delete [] stringArray0; + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + + for (int i = 0; i < NbElements; i++) + { + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", &AnalogValue[i]); + } + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GPIOAnalogSet : Set analog output for one or few output + * + * - Parameters : + * int SocketIndex + * int nbElement + * char *GPIOName + * double AnalogOutputValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Split list */ + char *token; + char seps[] = " \t;"; + int indice; + char list [SIZE_NOMINAL]; + char *list_r; + char subString[] = "{}"; + + char (*stringArray0)[SIZE_NAME]; + stringArray0 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray0[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray0[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + + /* Convert to string */ + sprintf (ExecuteMethod, "GPIOAnalogSet ("); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%s,%.13g", stringArray0[i], AnalogOutputValue[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Clear memory */ + delete [] stringArray0; + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GPIOAnalogGainGet : Read analog input gain (1, 2, 4 or 8) for one or few input + * + * - Parameters : + * int SocketIndex + * int nbElement + * char *GPIOName + * int *AnalogInputGainValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGPIOAnalogGainGet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Split list */ + char *token; + char seps[] = " \t;"; + int indice; + char list [SIZE_NOMINAL]; + char *list_r; + char subString[] = "{}"; + + char (*stringArray0)[SIZE_NAME]; + stringArray0 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray0[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray0[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + + /* Convert to string */ + sprintf (ExecuteMethod, "GPIOAnalogGainGet ("); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%s,int *", stringArray0[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Clear memory */ + delete [] stringArray0; + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + + for (int i = 0; i < NbElements; i++) + { + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", &AnalogInputGainValue[i]); + } + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GPIOAnalogGainSet : Set analog input gain (1, 2, 4 or 8) for one or few input + * + * - Parameters : + * int SocketIndex + * int nbElement + * char *GPIOName + * int AnalogInputGainValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGPIOAnalogGainSet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Split list */ + char *token; + char seps[] = " \t;"; + int indice; + char list [SIZE_NOMINAL]; + char *list_r; + char subString[] = "{}"; + + char (*stringArray0)[SIZE_NAME]; + stringArray0 = new char [NbElements][SIZE_NAME]; + indice = 0; + strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); + ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ + CleanString(list, '{', '}'); + list_r = NULL; + token = strtok_r (list, seps, &list_r); + while ((NULL != token) && (indice < NbElements)) + { + memset(stringArray0[indice],'\0', SIZE_NAME); + strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); + ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); + DeleteCharacters (stringArray0[indice], subString); + token = strtok_r (NULL, seps, &list_r); + indice++; + } + + /* Convert to string */ + sprintf (ExecuteMethod, "GPIOAnalogGainSet ("); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%s,%d", stringArray0[i], AnalogInputGainValue[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Clear memory */ + delete [] stringArray0; + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GPIODigitalGet : Read digital output or digital input + * + * - Parameters : + * int SocketIndex + * char *GPIOName + * unsigned short *DigitalValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GPIODigitalGet (%s,unsigned short *)", GPIOName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%hu", DigitalValue); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GPIODigitalSet : Set Digital Output for one or few output TTL + * + * - Parameters : + * int SocketIndex + * char *GPIOName + * unsigned short Mask + * unsigned short DigitalOutputValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GPIODigitalSet (%s,%hu,%hu)", GPIOName, Mask, DigitalOutputValue); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupCorrectorOutputGet : Return corrector outputs + * + * - Parameters : + * int SocketIndex + * char *GroupName + * int nbElement + * double *CorrectorOutput + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupCorrectorOutputGet (%s,", GroupName); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "double *"); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + + for (int i = 0; i < NbElements; i++) + { + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", &CorrectorOutput[i]); + } + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupHomeSearch : Start home search sequence + * + * - Parameters : + * int SocketIndex + * char *GroupName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupHomeSearch (int SocketIndex, char * GroupName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupHomeSearch (%s)", GroupName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupHomeSearchAndRelativeMove : Start home search sequence and execute a displacement + * + * - Parameters : + * int SocketIndex + * char *GroupName + * double TargetDisplacement + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupHomeSearchAndRelativeMove (%s,", GroupName); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%.13g", TargetDisplacement[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupInitialize : Start the initialization + * + * - Parameters : + * int SocketIndex + * char *GroupName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupInitialize (int SocketIndex, char * GroupName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupInitialize (%s)", GroupName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupInitializeWithEncoderCalibration : Start the initialization with encoder calibration + * + * - Parameters : + * int SocketIndex + * char *GroupName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupInitializeWithEncoderCalibration (%s)", GroupName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupKill : Kill the group + * + * - Parameters : + * int SocketIndex + * char *GroupName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupKill (int SocketIndex, char * GroupName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupKill (%s)", GroupName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupMoveAbort : Abort a move + * + * - Parameters : + * int SocketIndex + * char *GroupName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupMoveAbort (int SocketIndex, char * GroupName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupMoveAbort (%s)", GroupName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupMoveAbsolute : Do an absolute move + * + * - Parameters : + * int SocketIndex + * char *GroupName + * double TargetPosition + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupMoveAbsolute (%s,", GroupName); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%.13g", TargetPosition[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupMoveRelative : Do a relative move + * + * - Parameters : + * int SocketIndex + * char *GroupName + * double TargetDisplacement + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupMoveRelative (%s,", GroupName); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "%.13g", TargetDisplacement[i]); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupMotionDisable : Set Motion disable on selected group + * + * - Parameters : + * int SocketIndex + * char *GroupName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupMotionDisable (int SocketIndex, char * GroupName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupMotionDisable (%s)", GroupName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupMotionEnable : Set Motion enable on selected group + * + * - Parameters : + * int SocketIndex + * char *GroupName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupMotionEnable (int SocketIndex, char * GroupName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupMotionEnable (%s)", GroupName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupPositionCorrectedProfilerGet : Return corrected profiler positions + * + * - Parameters : + * int SocketIndex + * char *GroupName + * double PositionX + * double PositionY + * double *CorrectedProfilerPositionX + * double *CorrectedProfilerPositionY + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupPositionCorrectedProfilerGet (%s,%.13g,%.13g,double *,double *)", GroupName, PositionX, PositionY); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionX); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionY); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupPositionCurrentGet : Return current positions + * + * - Parameters : + * int SocketIndex + * char *GroupName + * int nbElement + * double *CurrentEncoderPosition + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupPositionCurrentGet (%s,", GroupName); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "double *"); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + + for (int i = 0; i < NbElements; i++) + { + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", &CurrentEncoderPosition[i]); + } + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupPositionSetpointGet : Return setpoint positions + * + * - Parameters : + * int SocketIndex + * char *GroupName + * int nbElement + * double *SetPointPosition + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupPositionSetpointGet (%s,", GroupName); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "double *"); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + + for (int i = 0; i < NbElements; i++) + { + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", &SetPointPosition[i]); + } + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupPositionTargetGet : Return target positions + * + * - Parameters : + * int SocketIndex + * char *GroupName + * int nbElement + * double *TargetPosition + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + char temp[SIZE_NOMINAL]; + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupPositionTargetGet (%s,", GroupName); + for (int i = 0; i < NbElements; i++) + { + sprintf (temp, "double *"); + strncat (ExecuteMethod, temp, SIZE_SMALL); + if ((i + 1) < NbElements) + { + strncat (ExecuteMethod, ",", SIZE_SMALL); + } + } + strcat (ExecuteMethod, ")"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + + for (int i = 0; i < NbElements; i++) + { + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", &TargetPosition[i]); + } + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupStatusGet : Return group status + * + * - Parameters : + * int SocketIndex + * char *GroupName + * int *Status + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupStatusGet (int SocketIndex, char * GroupName, int * Status) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupStatusGet (%s,int *)", GroupName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", Status); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupStatusStringGet : Return the group status string corresponding to the group status code + * + * - Parameters : + * int SocketIndex + * int GroupStatusCode + * char *GroupStatusString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupStatusStringGet (%d,char *)", GroupStatusCode); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (GroupStatusString, pt); + ptNext = strchr (GroupStatusString, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * KillAll : Put all groups in 'Not initialized' state + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPKillAll (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "KillAll ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * RestartApplication : Restart the Controller + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPRestartApplication (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "RestartApplication ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerBacklashGet : Read backlash value and status + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *BacklashValue + * char *BacklaskStatus + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerBacklashGet (%s,double *,char *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", BacklashValue); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (BacklaskStatus, pt); + ptNext = strchr (BacklaskStatus, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerBacklashSet : Set backlash value + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double BacklashValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerBacklashSet (%s,%.13g)", PositionerName, BacklashValue); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerBacklashEnable : Enable the backlash + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerBacklashEnable (int SocketIndex, char * PositionerName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerBacklashEnable (%s)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerBacklashDisable : Disable the backlash + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerBacklashDisable (int SocketIndex, char * PositionerName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerBacklashDisable (%s)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorNotchFiltersSet : Update filters parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double NotchFrequency1 + * double NotchBandwith1 + * double NotchGain1 + * double NotchFrequency2 + * double NotchBandwith2 + * double NotchGain2 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, NotchFrequency1, NotchBandwith1, NotchGain1, NotchFrequency2, NotchBandwith2, NotchGain2); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorNotchFiltersGet : Read filters parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *NotchFrequency1 + * double *NotchBandwith1 + * double *NotchGain1 + * double *NotchFrequency2 + * double *NotchBandwith2 + * double *NotchGain2 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersGet (%s,double *,double *,double *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", NotchFrequency1); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", NotchBandwith1); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", NotchGain1); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", NotchFrequency2); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", NotchBandwith2); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", NotchGain2); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorPIDFFAccelerationSet : Update corrector parameters + * + * - Parameters : + * 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 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorPIDFFAccelerationSet (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) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationSet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainAcceleration); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorPIDFFAccelerationGet : Read corrector parameters + * + * - Parameters : + * 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 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorPIDFFAccelerationGet (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) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + int boolScanTmp; + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); + *ClosedLoopStatus = (bool) boolScanTmp; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KP); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KI); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KD); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KS); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKP); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKI); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKD); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KForm); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainAcceleration); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorPIDFFVelocitySet : Update corrector parameters + * + * - Parameters : + * 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 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorPIDFFVelocitySet (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) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocitySet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorPIDFFVelocityGet : Read corrector parameters + * + * - Parameters : + * 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 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorPIDFFVelocityGet (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) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + int boolScanTmp; + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocityGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); + *ClosedLoopStatus = (bool) boolScanTmp; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KP); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KI); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KD); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KS); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKP); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKI); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKD); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KForm); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainVelocity); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorPIDDualFFVoltageSet : Update corrector parameters + * + * - Parameters : + * 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 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorPIDDualFFVoltageSet (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) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageSet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity, FeedForwardGainAcceleration, Friction); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorPIDDualFFVoltageGet : Read corrector parameters + * + * - Parameters : + * 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 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorPIDDualFFVoltageGet (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) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + int boolScanTmp; + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); + *ClosedLoopStatus = (bool) boolScanTmp; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KP); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KI); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KD); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KS); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKP); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKI); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", GKD); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KForm); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainVelocity); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainAcceleration); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Friction); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorPIPositionSet : Update corrector parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * bool ClosedLoopStatus + * double KP + * double KI + * double IntegrationTime + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorPIPositionSet (%s,%d,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, IntegrationTime); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorPIPositionGet : Read corrector parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * bool *ClosedLoopStatus + * double *KP + * double *KI + * double *IntegrationTime + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + int boolScanTmp; + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorPIPositionGet (%s,bool *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); + *ClosedLoopStatus = (bool) boolScanTmp; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KP); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", KI); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCorrectorTypeGet : Read corrector type + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * char *CorrectorType + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCorrectorTypeGet (%s,char *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (CorrectorType, pt); + ptNext = strchr (CorrectorType, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCurrentVelocityAccelerationFiltersSet : Set current velocity and acceleration cut off frequencies + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double CurrentVelocityCutOffFrequency + * double CurrentAccelerationCutOffFrequency + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCurrentVelocityAccelerationFiltersSet (%s,%.13g,%.13g)", PositionerName, CurrentVelocityCutOffFrequency, CurrentAccelerationCutOffFrequency); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerCurrentVelocityAccelerationFiltersGet : Get current velocity and acceleration cut off frequencies + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *CurrentVelocityCutOffFrequency + * double *CurrentAccelerationCutOffFrequency + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerCurrentVelocityAccelerationFiltersGet (%s,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CurrentVelocityCutOffFrequency); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CurrentAccelerationCutOffFrequency); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerDriverStatusGet : Read positioner driver status + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * int *DriverStatus + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerDriverStatusGet (%s,int *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", DriverStatus); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerDriverStatusStringGet : Return the positioner driver status string corresponding to the positioner error code + * + * - Parameters : + * int SocketIndex + * int PositionerDriverStatus + * char *PositionerDriverStatusString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerDriverStatusStringGet (%d,char *)", PositionerDriverStatus); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (PositionerDriverStatusString, pt); + ptNext = strchr (PositionerDriverStatusString, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerEncoderAmplitudeValuesGet : Read analog interpolated encoder amplitude values + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *CalibrationSinusAmplitude + * double *CurrentSinusAmplitude + * double *CalibrationCosinusAmplitude + * double *CurrentCosinusAmplitude + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * CalibrationSinusAmplitude, double * CurrentSinusAmplitude, double * CalibrationCosinusAmplitude, double * CurrentCosinusAmplitude) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerEncoderAmplitudeValuesGet (%s,double *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CalibrationSinusAmplitude); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CurrentSinusAmplitude); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CalibrationCosinusAmplitude); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CurrentCosinusAmplitude); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerEncoderCalibrationParametersGet : Read analog interpolated encoder calibration parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *SinusOffset + * double *CosinusOffset + * double *DifferentialGain + * double *PhaseCompensation + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerEncoderCalibrationParametersGet (%s,double *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SinusOffset); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CosinusOffset); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", DifferentialGain); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", PhaseCompensation); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerErrorGet : Read and clear positioner error code + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * int *ErrorCode + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerErrorGet (%s,int *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", ErrorCode); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerErrorRead : Read only positioner error code without clear it + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * int *ErrorCode + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerErrorRead (%s,int *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", ErrorCode); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerErrorStringGet : Return the positioner status string corresponding to the positioner error code + * + * - Parameters : + * int SocketIndex + * int PositionerErrorCode + * char *PositionerErrorString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerErrorStringGet (%d,char *)", PositionerErrorCode); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (PositionerErrorString, pt); + ptNext = strchr (PositionerErrorString, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerHardwareStatusGet : Read positioner hardware status + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * int *HardwareStatus + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerHardwareStatusGet (%s,int *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", HardwareStatus); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerHardwareStatusStringGet : Return the positioner hardware status string corresponding to the positioner error code + * + * - Parameters : + * int SocketIndex + * int PositionerHardwareStatus + * char *PositionerHardwareStatusString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerHardwareStatusStringGet (%d,char *)", PositionerHardwareStatus); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (PositionerHardwareStatusString, pt); + ptNext = strchr (PositionerHardwareStatusString, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerHardInterpolatorFactorGet : Get hard interpolator parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * int *InterpolationFactor + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerHardInterpolatorFactorGet (%s,int *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", InterpolationFactor); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerHardInterpolatorFactorSet : Set hard interpolator parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * int InterpolationFactor + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerHardInterpolatorFactorSet (%s,%d)", PositionerName, InterpolationFactor); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerMaximumVelocityAndAccelerationGet : Return maximum velocity and acceleration of the positioner + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *MaximumVelocity + * double *MaximumAcceleration + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerMaximumVelocityAndAccelerationGet (%s,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MaximumVelocity); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MaximumAcceleration); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerMotionDoneGet : Read motion done parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *PositionWindow + * double *VelocityWindow + * double *CheckingTime + * double *MeanPeriod + * double *TimeOut + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerMotionDoneGet (%s,double *,double *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", PositionWindow); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", VelocityWindow); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CheckingTime); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MeanPeriod); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", TimeOut); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerMotionDoneSet : Update motion done parameters + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double PositionWindow + * double VelocityWindow + * double CheckingTime + * double MeanPeriod + * double TimeOut + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerMotionDoneSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, PositionWindow, VelocityWindow, CheckingTime, MeanPeriod, TimeOut); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerSGammaExactVelocityAjustedDisplacementGet : Return adjusted displacement to get exact velocity + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double DesiredDisplacement + * double *AdjustedDisplacement + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerSGammaExactVelocityAjustedDisplacementGet (%s,%.13g,double *)", PositionerName, DesiredDisplacement); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", AdjustedDisplacement); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerSGammaParametersGet : Read dynamic parameters for one axe of a group for a future displacement + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *Velocity + * double *Acceleration + * double *MinimumTjerkTime + * double *MaximumTjerkTime + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerSGammaParametersGet (int SocketIndex, char * PositionerName, double * Velocity, double * Acceleration, double * MinimumTjerkTime, double * MaximumTjerkTime) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerSGammaParametersGet (%s,double *,double *,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Velocity); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Acceleration); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MinimumTjerkTime); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MaximumTjerkTime); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerSGammaParametersSet : Update dynamic parameters for one axe of a group for a future displacement + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double Velocity + * double Acceleration + * double MinimumTjerkTime + * double MaximumTjerkTime + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerSGammaParametersSet (int SocketIndex, char * PositionerName, double Velocity, double Acceleration, double MinimumTjerkTime, double MaximumTjerkTime) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerSGammaParametersSet (%s,%.13g,%.13g,%.13g,%.13g)", PositionerName, Velocity, Acceleration, MinimumTjerkTime, MaximumTjerkTime); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerSGammaPreviousMotionTimesGet : Read SettingTime and SettlingTime + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *SettingTime + * double *SettlingTime + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerSGammaPreviousMotionTimesGet (%s,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SettingTime); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SettlingTime); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerStageParameterGet : Return the stage parameter + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * char *ParameterName + * char *ParameterValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerStageParameterGet (%s,%s,char *)", PositionerName, ParameterName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ParameterValue, pt); + ptNext = strchr (ParameterValue, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerStageParameterSet : Save the stage parameter + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * char *ParameterName + * char *ParameterValue + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerStageParameterSet (%s,%s,%s)", PositionerName, ParameterName, ParameterValue); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerUserTravelLimitsGet : Read UserMinimumTarget and UserMaximumTarget + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double *UserMinimumTarget + * double *UserMaximumTarget + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerUserTravelLimitsGet (%s,double *,double *)", PositionerName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserMinimumTarget); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserMaximumTarget); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerUserTravelLimitsSet : Update UserMinimumTarget and UserMaximumTarget + * + * - Parameters : + * int SocketIndex + * char *PositionerName + * double UserMinimumTarget + * double UserMaximumTarget + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerUserTravelLimitsSet (%s,%.13g,%.13g)", PositionerName, UserMinimumTarget, UserMaximumTarget); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * HexapodMoveAbsolute : Hexapod absolute move in a specific coordinate system + * + * - Parameters : + * int SocketIndex + * char *GroupName + * char *CoordinateSystem + * double X + * double Y + * double Z + * double U + * double V + * double W + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPHexapodMoveAbsolute (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "HexapodMoveAbsolute (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, X, Y, Z, U, V, W); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * HexapodMoveIncremental : Hexapod incremental move in a specific coordinate system + * + * - Parameters : + * int SocketIndex + * char *GroupName + * char *CoordinateSystem + * double dX + * double dY + * double dZ + * double dU + * double dV + * double dW + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPHexapodMoveIncremental (int SocketIndex, char * GroupName, char * CoordinateSystem, double dX, double dY, double dZ, double dU, double dV, double dW) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "HexapodMoveIncremental (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, dX, dY, dZ, dU, dV, dW); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * HexapodCoordinatesGet : Get coordinates in a specific coordinate system of a point specified in another coordinate system + * + * - Parameters : + * int SocketIndex + * char *GroupName + * char *CoordinateSystemIn + * char *CoordinateSystemOut + * double Xin + * double Yin + * double Zin + * double Uin + * double Vin + * double Win + * double *Xout + * double *Yout + * double *Zout + * double *Uout + * double *Vout + * double *Wout + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPHexapodCoordinatesGet (int SocketIndex, char * GroupName, char * CoordinateSystemIn, char * CoordinateSystemOut, double Xin, double Yin, double Zin, double Uin, double Vin, double Win, double * Xout, double * Yout, double * Zout, double * Uout, double * Vout, double * Wout) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "HexapodCoordinatesGet (%s,%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,double *,double *,double *,double *,double *,double *)", GroupName, CoordinateSystemIn, CoordinateSystemOut, Xin, Yin, Zin, Uin, Vin, Win); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Xout); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Yout); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Zout); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Uout); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Vout); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Wout); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * HexapodCoordinateSystemSet : Modify the position of a coordinate system + * + * - Parameters : + * int SocketIndex + * char *GroupName + * char *CoordinateSystem + * double X + * double Y + * double Z + * double U + * double V + * double W + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPHexapodCoordinateSystemSet (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "HexapodCoordinateSystemSet (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, X, Y, Z, U, V, W); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * HexapodCoordinateSystemGet : Get the position of a coordinate system + * + * - Parameters : + * int SocketIndex + * char *GroupName + * char *CoordinateSystem + * double *X + * double *Y + * double *Z + * double *U + * double *V + * double *W + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPHexapodCoordinateSystemGet (int SocketIndex, char * GroupName, char * CoordinateSystem, double * X, double * Y, double * Z, double * U, double * V, double * W) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "HexapodCoordinateSystemGet (%s,%s,double *,double *,double *,double *,double *,double *)", GroupName, CoordinateSystem); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", X); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Y); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", Z); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", U); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", V); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", W); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * OptionalModuleExecute : Execute an optional module + * + * - Parameters : + * int SocketIndex + * char *ModuleFileName + * char *TaskName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPOptionalModuleExecute (int SocketIndex, char * ModuleFileName, char * TaskName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "OptionalModuleExecute (%s,%s)", ModuleFileName, TaskName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * OptionalModuleKill : Kill an optional module + * + * - Parameters : + * int SocketIndex + * char *TaskName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPOptionalModuleKill (int SocketIndex, char * TaskName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "OptionalModuleKill (%s)", TaskName); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ControllerStatusGet : Read controller current status + * + * - Parameters : + * int SocketIndex + * int *ControllerStatus + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPControllerStatusGet (int SocketIndex, int * ControllerStatus) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "ControllerStatusGet (int *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%d", ControllerStatus); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ControllerStatusStringGet : Return the controller status string corresponding to the controller status code + * + * - Parameters : + * int SocketIndex + * int ControllerStatusCode + * char *ControllerStatusString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPControllerStatusStringGet (int SocketIndex, int ControllerStatusCode, char * ControllerStatusString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "ControllerStatusStringGet (%d,char *)", ControllerStatusCode); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ControllerStatusString, pt); + ptNext = strchr (ControllerStatusString, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EEPROMCIESet : Set CIE EEPROM reference string + * + * - Parameters : + * int SocketIndex + * int CardNumber + * char *ReferenceString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EEPROMCIESet (%d,%s)", CardNumber, ReferenceString); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EEPROMDACOffsetCIESet : Set CIE DAC offsets + * + * - Parameters : + * int SocketIndex + * int PlugNumber + * double DAC1Offset + * double DAC2Offset + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EEPROMDACOffsetCIESet (%d,%.13g,%.13g)", PlugNumber, DAC1Offset, DAC2Offset); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EEPROMDriverSet : Set Driver EEPROM reference string + * + * - Parameters : + * int SocketIndex + * int PlugNumber + * char *ReferenceString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EEPROMDriverSet (%d,%s)", PlugNumber, ReferenceString); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EEPROMINTSet : Set INT EEPROM reference string + * + * - Parameters : + * int SocketIndex + * int CardNumber + * char *ReferenceString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "EEPROMINTSet (%d,%s)", CardNumber, ReferenceString); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * CPUCoreAndBoardSupplyVoltagesGet : Get power informations + * + * - Parameters : + * int SocketIndex + * double *VoltageCPUCore + * double *SupplyVoltage1P5V + * double *SupplyVoltage3P3V + * double *SupplyVoltage5V + * double *SupplyVoltage12V + * double *SupplyVoltageM12V + * double *SupplyVoltageM5V + * double *SupplyVoltage5VSB + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPCPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "CPUCoreAndBoardSupplyVoltagesGet (double *,double *,double *,double *,double *,double *,double *,double *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", VoltageCPUCore); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage1P5V); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage3P3V); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage5V); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage12V); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SupplyVoltageM12V); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SupplyVoltageM5V); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage5VSB); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * CPUTemperatureAndFanSpeedGet : Get CPU temperature and fan speed + * + * - Parameters : + * int SocketIndex + * double *CPUTemperature + * double *CPUFanSpeed + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPCPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "CPUTemperatureAndFanSpeedGet (double *,double *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CPUTemperature); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", CPUFanSpeed); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ActionListGet : Action list + * + * - Parameters : + * int SocketIndex + * char *ActionList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPActionListGet (int SocketIndex, char * ActionList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "ActionListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ActionList, pt); + ptNext = strchr (ActionList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ActionExtendedListGet : Action extended list + * + * - Parameters : + * int SocketIndex + * char *ActionList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPActionExtendedListGet (int SocketIndex, char * ActionList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "ActionExtendedListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ActionList, pt); + ptNext = strchr (ActionList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * APIExtendedListGet : API method list + * + * - Parameters : + * int SocketIndex + * char *Method + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPAPIExtendedListGet (int SocketIndex, char * Method) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); + + /* Convert to string */ + sprintf (ExecuteMethod, "APIExtendedListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (Method, pt); + ptNext = strchr (Method, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * APIListGet : API method list without extended API + * + * - Parameters : + * int SocketIndex + * char *Method + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPAPIListGet (int SocketIndex, char * Method) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); + + /* Convert to string */ + sprintf (ExecuteMethod, "APIListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (Method, pt); + ptNext = strchr (Method, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ErrorListGet : Error list + * + * - Parameters : + * int SocketIndex + * char *ErrorsList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPErrorListGet (int SocketIndex, char * ErrorsList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); + + /* Convert to string */ + sprintf (ExecuteMethod, "ErrorListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ErrorsList, pt); + ptNext = strchr (ErrorsList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * EventListGet : General event list + * + * - Parameters : + * int SocketIndex + * char *EventList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPEventListGet (int SocketIndex, char * EventList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "EventListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (EventList, pt); + ptNext = strchr (EventList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringListGet : Gathering type list + * + * - Parameters : + * int SocketIndex + * char *list + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringListGet (int SocketIndex, char * list) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (list, pt); + ptNext = strchr (list, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringExtendedListGet : Gathering type extended list + * + * - Parameters : + * int SocketIndex + * char *list + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringExtendedListGet (int SocketIndex, char * list) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringExtendedListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (list, pt); + ptNext = strchr (list, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringExternalListGet : External Gathering type list + * + * - Parameters : + * int SocketIndex + * char *list + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringExternalListGet (int SocketIndex, char * list) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringExternalListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (list, pt); + ptNext = strchr (list, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GroupStatusListGet : Group status list + * + * - Parameters : + * int SocketIndex + * char *GroupStatusList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGroupStatusListGet (int SocketIndex, char * GroupStatusList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); + + /* Convert to string */ + sprintf (ExecuteMethod, "GroupStatusListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (GroupStatusList, pt); + ptNext = strchr (GroupStatusList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * HardwareInternalListGet : Internal hardware list + * + * - Parameters : + * int SocketIndex + * char *InternalHardwareList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPHardwareInternalListGet (int SocketIndex, char * InternalHardwareList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); + + /* Convert to string */ + sprintf (ExecuteMethod, "HardwareInternalListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (InternalHardwareList, pt); + ptNext = strchr (InternalHardwareList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * HardwareDriverAndStageGet : Smart hardware + * + * - Parameters : + * int SocketIndex + * int PlugNumber + * char *DriverName + * char *StageName + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPHardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); + + /* Convert to string */ + sprintf (ExecuteMethod, "HardwareDriverAndStageGet (%d,char *,char *)", PlugNumber); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (DriverName, pt); + ptNext = strchr (DriverName, ','); + if (ptNext != NULL) *ptNext = '\0'; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (StageName, pt); + ptNext = strchr (StageName, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ObjectsListGet : Group name and positioner name + * + * - Parameters : + * int SocketIndex + * char *ObjectsList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPObjectsListGet (int SocketIndex, char * ObjectsList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); + + /* Convert to string */ + sprintf (ExecuteMethod, "ObjectsListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ObjectsList, pt); + ptNext = strchr (ObjectsList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerErrorListGet : Positioner error list + * + * - Parameters : + * int SocketIndex + * char *PositionerErrorList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerErrorListGet (int SocketIndex, char * PositionerErrorList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerErrorListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (PositionerErrorList, pt); + ptNext = strchr (PositionerErrorList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerHardwareStatusListGet : Positioner hardware status list + * + * - Parameters : + * int SocketIndex + * char *PositionerHardwareStatusList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerHardwareStatusListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (PositionerHardwareStatusList, pt); + ptNext = strchr (PositionerHardwareStatusList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PositionerDriverStatusListGet : Positioner driver status list + * + * - Parameters : + * int SocketIndex + * char *PositionerDriverStatusList + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "PositionerDriverStatusListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (PositionerDriverStatusList, pt); + ptNext = strchr (PositionerDriverStatusList, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ReferencingActionListGet : Get referencing action list + * + * - Parameters : + * int SocketIndex + * char *list + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPReferencingActionListGet (int SocketIndex, char * list) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "ReferencingActionListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (list, pt); + ptNext = strchr (list, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ReferencingSensorListGet : Get referencing sensor list + * + * - Parameters : + * int SocketIndex + * char *list + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPReferencingSensorListGet (int SocketIndex, char * list) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); + + /* Convert to string */ + sprintf (ExecuteMethod, "ReferencingSensorListGet (char *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (list, pt); + ptNext = strchr (list, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * GatheringUserDatasGet : Return UserDatas values + * + * - Parameters : + * int SocketIndex + * double *UserData1 + * double *UserData2 + * double *UserData3 + * double *UserData4 + * double *UserData5 + * double *UserData6 + * double *UserData7 + * double *UserData8 + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPGatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "GatheringUserDatasGet (double *,double *,double *,double *,double *,double *,double *,double *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserData1); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserData2); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserData3); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserData4); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserData5); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserData6); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserData7); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", UserData8); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ControllerMotionKernelPeriodMinMaxGet : Get controller motion kernel min/max periods + * + * - Parameters : + * int SocketIndex + * double *MinimumCorrectorPeriod + * double *MaximumCorrectorPeriod + * double *MinimumProfilerPeriod + * double *MaximumProfilerPeriod + * double *MinimumServitudesPeriod + * double *MaximumServitudesPeriod + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPControllerMotionKernelPeriodMinMaxGet (int SocketIndex, double * MinimumCorrectorPeriod, double * MaximumCorrectorPeriod, double * MinimumProfilerPeriod, double * MaximumProfilerPeriod, double * MinimumServitudesPeriod, double * MaximumServitudesPeriod) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "ControllerMotionKernelPeriodMinMaxGet (double *,double *,double *,double *,double *,double *)"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MinimumCorrectorPeriod); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MaximumCorrectorPeriod); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MinimumProfilerPeriod); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MaximumProfilerPeriod); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MinimumServitudesPeriod); + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) sscanf (pt, "%lf", MaximumServitudesPeriod); + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * ControllerMotionKernelPeriodMinMaxReset : Reset controller motion kernel min/max periods + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPControllerMotionKernelPeriodMinMaxReset (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "ControllerMotionKernelPeriodMinMaxReset ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * TestTCP : Test TCP/IP transfert + * + * - Parameters : + * int SocketIndex + * char *InputString + * char *ReturnString + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPTestTCP (int SocketIndex, char * InputString, char * ReturnString) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "TestTCP (%s,char *)", InputString); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (ret == 0) + { + char * pt; + char * ptNext; + + pt = ReturnedValue; + ptNext = NULL; + if (pt != NULL) pt = strchr (pt, ','); + if (pt != NULL) pt++; + if (pt != NULL) strcpy (ReturnString, pt); + ptNext = strchr (ReturnString, ','); + if (ptNext != NULL) *ptNext = '\0'; + } + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + +/*********************************************************************** + * PrepareForUpdate : Kill QNX processes for firmware update + * + * - Parameters : + * int SocketIndex + * - Return : + * int errorCode + ***********************************************************************/ +int __stdcall HXPPrepareForUpdate (int SocketIndex) +{ + int ret = -1; + char ExecuteMethod[SIZE_EXECUTE_METHOD]; + char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); + + /* Convert to string */ + sprintf (ExecuteMethod, "PrepareForUpdate ()"); + + /* Send this string and wait return function from controller */ + /* return function : ==0 -> OK ; < 0 -> NOK */ + SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); + if (strlen (ReturnedValue) > 0) + sscanf (ReturnedValue, "%i", &ret); + + /* Get the returned values in the out parameters */ + if (NULL != ReturnedValue) + free (ReturnedValue); + + return (ret); +} + + + +#ifdef __cplusplus +} +#endif diff --git a/motorApp/NewportSrc/hxp_drivers.h b/motorApp/NewportSrc/hxp_drivers.h index 45c6bc2..09ddc3e 100644 --- a/motorApp/NewportSrc/hxp_drivers.h +++ b/motorApp/NewportSrc/hxp_drivers.h @@ -1,181 +1,180 @@ -/************************************************* - * XPS_API.h * - * * - * Description: * - * XPS functions * - *************************************************/ - -#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; /* C does not know bool, only C++ */ -#endif - - -DLL int __stdcall HXPTCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut); -DLL void __stdcall HXPTCP_SetTimeout(int SocketIndex, double Timeout); -DLL void __stdcall HXPTCP_CloseSocket(int SocketIndex); -DLL char * __stdcall HXPTCP_GetError(int SocketIndex); -DLL char * __stdcall HXPGetLibraryVersion(void); -DLL int __stdcall HXPControllerMotionKernelTimeLoadGet (int SocketIndex, double * CPUTotalLoadRatio, double * CPUCorrectorLoadRatio, double * CPUProfilerLoadRatio, double * CPUServitudesLoadRatio); /* Get controller motion kernel time load */ -DLL int __stdcall HXPElapsedTimeGet (int SocketIndex, double * ElapsedTime); /* Return elapsed time from controller power on */ -DLL int __stdcall HXPErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString); /* Return the error string corresponding to the error code */ -DLL int __stdcall HXPFirmwareVersionGet (int SocketIndex, char * Version); /* Return firmware version */ -DLL int __stdcall HXPTCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList); /* Execute a TCL script from a TCL file */ -DLL int __stdcall HXPTCLScriptExecuteAndWait (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 HXPTCLScriptKill (int SocketIndex, char * TaskName); /* Kill TCL Task */ -DLL int __stdcall HXPTimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks); /* Get a timer */ -DLL int __stdcall HXPTimerSet (int SocketIndex, char * TimerName, int FrequencyTicks); /* Set a timer */ -DLL int __stdcall HXPReboot (int SocketIndex); /* Reboot the controller */ -DLL int __stdcall HXPLogin (int SocketIndex, char * Name, char * Password); /* Log in */ -DLL int __stdcall HXPCloseAllOtherSockets (int SocketIndex); /* Close all socket beside the one used to send this command */ -DLL int __stdcall HXPEventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3); /* ** OBSOLETE ** Add an event */ -DLL int __stdcall HXPEventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList); /* ** OBSOLETE ** Read events and actions list */ -DLL int __stdcall HXPEventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Delete an event */ -DLL int __stdcall HXPEventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Wait an event */ -DLL int __stdcall HXPEventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List); /* Configure one or several events */ -DLL int __stdcall HXPEventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration); /* Read the event configuration */ -DLL int __stdcall HXPEventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List); /* Configure one or several actions */ -DLL int __stdcall HXPEventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration); /* Read the action configuration */ -DLL int __stdcall HXPEventExtendedStart (int SocketIndex, int * ID); /* Launch the last event and action configuration and return an ID */ -DLL int __stdcall HXPEventExtendedAllGet (int SocketIndex, char * EventActionConfigurations); /* Read all event and action configurations */ -DLL int __stdcall HXPEventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration); /* Read the event and action configuration defined by ID */ -DLL int __stdcall HXPEventExtendedRemove (int SocketIndex, int ID); /* Remove the event and action configuration defined by ID */ -DLL int __stdcall HXPEventExtendedWait (int SocketIndex); /* Wait events from the last event configuration */ -DLL int __stdcall HXPGatheringConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ -DLL int __stdcall HXPGatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ -DLL int __stdcall HXPGatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ -DLL int __stdcall HXPGatheringStopAndSave (int SocketIndex); /* Stop acquisition and save data */ -DLL int __stdcall HXPGatheringDataAcquire (int SocketIndex); /* Acquire a configured data */ -DLL int __stdcall HXPGatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine); /* Get a data line from gathering buffer */ -DLL int __stdcall HXPGatheringReset (int SocketIndex); /* Empty the gathered data in memory to start new gathering from scratch */ -DLL int __stdcall HXPGatheringRun (int SocketIndex, int DataNumber, int Divisor); /* Start a new gathering */ -DLL int __stdcall HXPGatheringStop (int SocketIndex); /* Stop the data gathering (without saving to file) */ -DLL int __stdcall HXPGatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ -DLL int __stdcall HXPGatheringExternalConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ -DLL int __stdcall HXPGatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ -DLL int __stdcall HXPGatheringExternalStopAndSave (int SocketIndex); /* Stop acquisition and save data */ -DLL int __stdcall HXPGlobalArrayGet (int SocketIndex, int Number, char * ValueString); /* Get global array value */ -DLL int __stdcall HXPGlobalArraySet (int SocketIndex, int Number, char * ValueString); /* Set global array value */ -DLL int __stdcall HXPDoubleGlobalArrayGet (int SocketIndex, int Number, double * DoubleValue); /* Get double global array value */ -DLL int __stdcall HXPDoubleGlobalArraySet (int SocketIndex, int Number, double DoubleValue); /* Set double global array value */ -DLL int __stdcall HXPGPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]); /* Read analog input or analog output for one or few input */ -DLL int __stdcall HXPGPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]); /* Set analog output for one or few output */ -DLL int __stdcall HXPGPIOAnalogGainGet (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 HXPGPIOAnalogGainSet (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 HXPGPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue); /* Read digital output or digital input */ -DLL int __stdcall HXPGPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue); /* Set Digital Output for one or few output TTL */ -DLL int __stdcall HXPGroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]); /* Return corrector outputs */ -DLL int __stdcall HXPGroupHomeSearch (int SocketIndex, char * GroupName); /* Start home search sequence */ -DLL int __stdcall HXPGroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Start home search sequence and execute a displacement */ -DLL int __stdcall HXPGroupInitialize (int SocketIndex, char * GroupName); /* Start the initialization */ -DLL int __stdcall HXPGroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName); /* Start the initialization with encoder calibration */ -DLL int __stdcall HXPGroupKill (int SocketIndex, char * GroupName); /* Kill the group */ -DLL int __stdcall HXPGroupMoveAbort (int SocketIndex, char * GroupName); /* Abort a move */ -DLL int __stdcall HXPGroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Do an absolute move */ -DLL int __stdcall HXPGroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Do a relative move */ -DLL int __stdcall HXPGroupMotionDisable (int SocketIndex, char * GroupName); /* Set Motion disable on selected group */ -DLL int __stdcall HXPGroupMotionEnable (int SocketIndex, char * GroupName); /* Set Motion enable on selected group */ -DLL int __stdcall HXPGroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY); /* Return corrected profiler positions */ -DLL int __stdcall HXPGroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]); /* Return current positions */ -DLL int __stdcall HXPGroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]); /* Return setpoint positions */ -DLL int __stdcall HXPGroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Return target positions */ -DLL int __stdcall HXPGroupStatusGet (int SocketIndex, char * GroupName, int * Status); /* Return group status */ -DLL int __stdcall HXPGroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString); /* Return the group status string corresponding to the group status code */ -DLL int __stdcall HXPKillAll (int SocketIndex); /* Put all groups in 'Not initialized' state */ -DLL int __stdcall HXPRestartApplication (int SocketIndex); /* Restart the Controller */ -DLL int __stdcall HXPPositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus); /* Read backlash value and status */ -DLL int __stdcall HXPPositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue); /* Set backlash value */ -DLL int __stdcall HXPPositionerBacklashEnable (int SocketIndex, char * PositionerName); /* Enable the backlash */ -DLL int __stdcall HXPPositionerBacklashDisable (int SocketIndex, char * PositionerName); /* Disable the backlash */ -DLL int __stdcall HXPPositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2); /* Update filters parameters */ -DLL int __stdcall HXPPositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2); /* Read filters parameters */ -DLL int __stdcall HXPPositionerCorrectorPIDFFAccelerationSet (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 HXPPositionerCorrectorPIDFFAccelerationGet (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 HXPPositionerCorrectorPIDFFVelocitySet (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 HXPPositionerCorrectorPIDFFVelocityGet (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 HXPPositionerCorrectorPIDDualFFVoltageSet (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 HXPPositionerCorrectorPIDDualFFVoltageGet (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 HXPPositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime); /* Update corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime); /* Read corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType); /* Read corrector type */ -DLL int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency); /* Set current velocity and acceleration cut off frequencies */ -DLL int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency); /* Get current velocity and acceleration cut off frequencies */ -DLL int __stdcall HXPPositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus); /* Read positioner driver status */ -DLL int __stdcall HXPPositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString); /* Return the positioner driver status string corresponding to the positioner error code */ -DLL int __stdcall HXPPositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * CalibrationSinusAmplitude, double * CurrentSinusAmplitude, double * CalibrationCosinusAmplitude, double * CurrentCosinusAmplitude); /* Read analog interpolated encoder amplitude values */ -DLL int __stdcall HXPPositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation); /* Read analog interpolated encoder calibration parameters */ -DLL int __stdcall HXPPositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read and clear positioner error code */ -DLL int __stdcall HXPPositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read only positioner error code without clear it */ -DLL int __stdcall HXPPositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString); /* Return the positioner status string corresponding to the positioner error code */ -DLL int __stdcall HXPPositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus); /* Read positioner hardware status */ -DLL int __stdcall HXPPositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString); /* Return the positioner hardware status string corresponding to the positioner error code */ -DLL int __stdcall HXPPositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor); /* Get hard interpolator parameters */ -DLL int __stdcall HXPPositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor); /* Set hard interpolator parameters */ -DLL int __stdcall HXPPositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration); /* Return maximum velocity and acceleration of the positioner */ -DLL int __stdcall HXPPositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut); /* Read motion done parameters */ -DLL int __stdcall HXPPositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut); /* Update motion done parameters */ -DLL int __stdcall HXPPositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement); /* Return adjusted displacement to get exact velocity */ -DLL int __stdcall HXPPositionerSGammaParametersGet (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 HXPPositionerSGammaParametersSet (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 HXPPositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime); /* Read SettingTime and SettlingTime */ -DLL int __stdcall HXPPositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Return the stage parameter */ -DLL int __stdcall HXPPositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Save the stage parameter */ -DLL int __stdcall HXPPositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget); /* Read UserMinimumTarget and UserMaximumTarget */ -DLL int __stdcall HXPPositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget); /* Update UserMinimumTarget and UserMaximumTarget */ -DLL int __stdcall HXPHexapodMoveAbsolute (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W); /* Hexapod absolute move in a specific coordinate system */ -DLL int __stdcall HXPHexapodMoveIncremental (int SocketIndex, char * GroupName, char * CoordinateSystem, double dX, double dY, double dZ, double dU, double dV, double dW); /* Hexapod incremental move in a specific coordinate system */ -DLL int __stdcall HXPHexapodCoordinatesGet (int SocketIndex, char * GroupName, char * CoordinateSystemIn, char * CoordinateSystemOut, double Xin, double Yin, double Zin, double Uin, double Vin, double Win, double * Xout, double * Yout, double * Zout, double * Uout, double * Vout, double * Wout); /* Get coordinates in a specific coordinate system of a point specified in another coordinate system */ -DLL int __stdcall HXPHexapodCoordinateSystemSet (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W); /* Modify the position of a coordinate system */ -DLL int __stdcall HXPHexapodCoordinateSystemGet (int SocketIndex, char * GroupName, char * CoordinateSystem, double * X, double * Y, double * Z, double * U, double * V, double * W); /* Get the position of a coordinate system */ -DLL int __stdcall HXPOptionalModuleExecute (int SocketIndex, char * ModuleFileName, char * TaskName); /* Execute an optional module */ -DLL int __stdcall HXPOptionalModuleKill (int SocketIndex, char * TaskName); /* Kill an optional module */ -DLL int __stdcall HXPControllerStatusGet (int SocketIndex, int * ControllerStatus); /* Read controller current status */ -DLL int __stdcall HXPControllerStatusStringGet (int SocketIndex, int ControllerStatusCode, char * ControllerStatusString); /* Return the controller status string corresponding to the controller status code */ -DLL int __stdcall HXPEEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString); /* Set CIE EEPROM reference string */ -DLL int __stdcall HXPEEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset); /* Set CIE DAC offsets */ -DLL int __stdcall HXPEEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString); /* Set Driver EEPROM reference string */ -DLL int __stdcall HXPEEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString); /* Set INT EEPROM reference string */ -DLL int __stdcall HXPCPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB); /* Get power informations */ -DLL int __stdcall HXPCPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed); /* Get CPU temperature and fan speed */ -DLL int __stdcall HXPActionListGet (int SocketIndex, char * ActionList); /* Action list */ -DLL int __stdcall HXPActionExtendedListGet (int SocketIndex, char * ActionList); /* Action extended list */ -DLL int __stdcall HXPAPIExtendedListGet (int SocketIndex, char * Method); /* API method list */ -DLL int __stdcall HXPAPIListGet (int SocketIndex, char * Method); /* API method list without extended API */ -DLL int __stdcall HXPErrorListGet (int SocketIndex, char * ErrorsList); /* Error list */ -DLL int __stdcall HXPEventListGet (int SocketIndex, char * EventList); /* General event list */ -DLL int __stdcall HXPGatheringListGet (int SocketIndex, char * list); /* Gathering type list */ -DLL int __stdcall HXPGatheringExtendedListGet (int SocketIndex, char * list); /* Gathering type extended list */ -DLL int __stdcall HXPGatheringExternalListGet (int SocketIndex, char * list); /* External Gathering type list */ -DLL int __stdcall HXPGroupStatusListGet (int SocketIndex, char * GroupStatusList); /* Group status list */ -DLL int __stdcall HXPHardwareInternalListGet (int SocketIndex, char * InternalHardwareList); /* Internal hardware list */ -DLL int __stdcall HXPHardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName); /* Smart hardware */ -DLL int __stdcall HXPObjectsListGet (int SocketIndex, char * ObjectsList); /* Group name and positioner name */ -DLL int __stdcall HXPPositionerErrorListGet (int SocketIndex, char * PositionerErrorList); /* Positioner error list */ -DLL int __stdcall HXPPositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList); /* Positioner hardware status list */ -DLL int __stdcall HXPPositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList); /* Positioner driver status list */ -DLL int __stdcall HXPReferencingActionListGet (int SocketIndex, char * list); /* Get referencing action list */ -DLL int __stdcall HXPReferencingSensorListGet (int SocketIndex, char * list); /* Get referencing sensor list */ -DLL int __stdcall HXPGatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8); /* Return UserDatas values */ -DLL int __stdcall HXPControllerMotionKernelPeriodMinMaxGet (int SocketIndex, double * MinimumCorrectorPeriod, double * MaximumCorrectorPeriod, double * MinimumProfilerPeriod, double * MaximumProfilerPeriod, double * MinimumServitudesPeriod, double * MaximumServitudesPeriod); /* Get controller motion kernel min/max periods */ -DLL int __stdcall HXPControllerMotionKernelPeriodMinMaxReset (int SocketIndex); /* Reset controller motion kernel min/max periods */ -DLL int __stdcall HXPTestTCP (int SocketIndex, char * InputString, char * ReturnString); /* Test TCP/IP transfert */ -DLL int __stdcall HXPPrepareForUpdate (int SocketIndex); /* Kill QNX processes for firmware update */ - - -#ifdef __cplusplus -} -#endif +/************************************************* + * XPS_API.h * + * * + * Description: * + * XPS functions * + *************************************************/ + +#define DLL epicsShareFunc + +#if !defined(_WIN32) && !defined(CYGWIN32) +#define __stdcall +#endif + +#ifdef __rtems__ + #include "strtok_r.h" +#endif + +#ifdef __cplusplus +extern "C" +{ +#else +typedef int bool; /* C does not know bool, only C++ */ +#endif + + + +DLL int __stdcall HXPTCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut); +DLL void __stdcall HXPTCP_SetTimeout(int SocketIndex, double Timeout); +DLL void __stdcall HXPTCP_CloseSocket(int SocketIndex); +DLL char * __stdcall HXPTCP_GetError(int SocketIndex); +DLL char * __stdcall HXPGetLibraryVersion(void); +DLL int __stdcall HXPControllerMotionKernelTimeLoadGet (int SocketIndex, double * CPUTotalLoadRatio, double * CPUCorrectorLoadRatio, double * CPUProfilerLoadRatio, double * CPUServitudesLoadRatio); /* Get controller motion kernel time load */ +DLL int __stdcall HXPElapsedTimeGet (int SocketIndex, double * ElapsedTime); /* Return elapsed time from controller power on */ +DLL int __stdcall HXPErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString); /* Return the error string corresponding to the error code */ +DLL int __stdcall HXPFirmwareVersionGet (int SocketIndex, char * Version); /* Return firmware version */ +DLL int __stdcall HXPTCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList); /* Execute a TCL script from a TCL file */ +DLL int __stdcall HXPTCLScriptExecuteAndWait (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 HXPTCLScriptKill (int SocketIndex, char * TaskName); /* Kill TCL Task */ +DLL int __stdcall HXPTimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks); /* Get a timer */ +DLL int __stdcall HXPTimerSet (int SocketIndex, char * TimerName, int FrequencyTicks); /* Set a timer */ +DLL int __stdcall HXPReboot (int SocketIndex); /* Reboot the controller */ +DLL int __stdcall HXPLogin (int SocketIndex, char * Name, char * Password); /* Log in */ +DLL int __stdcall HXPCloseAllOtherSockets (int SocketIndex); /* Close all socket beside the one used to send this command */ +DLL int __stdcall HXPEventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3); /* ** OBSOLETE ** Add an event */ +DLL int __stdcall HXPEventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList); /* ** OBSOLETE ** Read events and actions list */ +DLL int __stdcall HXPEventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Delete an event */ +DLL int __stdcall HXPEventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Wait an event */ +DLL int __stdcall HXPEventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List); /* Configure one or several events */ +DLL int __stdcall HXPEventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration); /* Read the event configuration */ +DLL int __stdcall HXPEventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List); /* Configure one or several actions */ +DLL int __stdcall HXPEventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration); /* Read the action configuration */ +DLL int __stdcall HXPEventExtendedStart (int SocketIndex, int * ID); /* Launch the last event and action configuration and return an ID */ +DLL int __stdcall HXPEventExtendedAllGet (int SocketIndex, char * EventActionConfigurations); /* Read all event and action configurations */ +DLL int __stdcall HXPEventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration); /* Read the event and action configuration defined by ID */ +DLL int __stdcall HXPEventExtendedRemove (int SocketIndex, int ID); /* Remove the event and action configuration defined by ID */ +DLL int __stdcall HXPEventExtendedWait (int SocketIndex); /* Wait events from the last event configuration */ +DLL int __stdcall HXPGatheringConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ +DLL int __stdcall HXPGatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ +DLL int __stdcall HXPGatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ +DLL int __stdcall HXPGatheringStopAndSave (int SocketIndex); /* Stop acquisition and save data */ +DLL int __stdcall HXPGatheringDataAcquire (int SocketIndex); /* Acquire a configured data */ +DLL int __stdcall HXPGatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine); /* Get a data line from gathering buffer */ +DLL int __stdcall HXPGatheringReset (int SocketIndex); /* Empty the gathered data in memory to start new gathering from scratch */ +DLL int __stdcall HXPGatheringRun (int SocketIndex, int DataNumber, int Divisor); /* Start a new gathering */ +DLL int __stdcall HXPGatheringStop (int SocketIndex); /* Stop the data gathering (without saving to file) */ +DLL int __stdcall HXPGatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ +DLL int __stdcall HXPGatheringExternalConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ +DLL int __stdcall HXPGatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ +DLL int __stdcall HXPGatheringExternalStopAndSave (int SocketIndex); /* Stop acquisition and save data */ +DLL int __stdcall HXPGlobalArrayGet (int SocketIndex, int Number, char * ValueString); /* Get global array value */ +DLL int __stdcall HXPGlobalArraySet (int SocketIndex, int Number, char * ValueString); /* Set global array value */ +DLL int __stdcall HXPDoubleGlobalArrayGet (int SocketIndex, int Number, double * DoubleValue); /* Get double global array value */ +DLL int __stdcall HXPDoubleGlobalArraySet (int SocketIndex, int Number, double DoubleValue); /* Set double global array value */ +DLL int __stdcall HXPGPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]); /* Read analog input or analog output for one or few input */ +DLL int __stdcall HXPGPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]); /* Set analog output for one or few output */ +DLL int __stdcall HXPGPIOAnalogGainGet (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 HXPGPIOAnalogGainSet (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 HXPGPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue); /* Read digital output or digital input */ +DLL int __stdcall HXPGPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue); /* Set Digital Output for one or few output TTL */ +DLL int __stdcall HXPGroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]); /* Return corrector outputs */ +DLL int __stdcall HXPGroupHomeSearch (int SocketIndex, char * GroupName); /* Start home search sequence */ +DLL int __stdcall HXPGroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Start home search sequence and execute a displacement */ +DLL int __stdcall HXPGroupInitialize (int SocketIndex, char * GroupName); /* Start the initialization */ +DLL int __stdcall HXPGroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName); /* Start the initialization with encoder calibration */ +DLL int __stdcall HXPGroupKill (int SocketIndex, char * GroupName); /* Kill the group */ +DLL int __stdcall HXPGroupMoveAbort (int SocketIndex, char * GroupName); /* Abort a move */ +DLL int __stdcall HXPGroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Do an absolute move */ +DLL int __stdcall HXPGroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Do a relative move */ +DLL int __stdcall HXPGroupMotionDisable (int SocketIndex, char * GroupName); /* Set Motion disable on selected group */ +DLL int __stdcall HXPGroupMotionEnable (int SocketIndex, char * GroupName); /* Set Motion enable on selected group */ +DLL int __stdcall HXPGroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY); /* Return corrected profiler positions */ +DLL int __stdcall HXPGroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]); /* Return current positions */ +DLL int __stdcall HXPGroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]); /* Return setpoint positions */ +DLL int __stdcall HXPGroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Return target positions */ +DLL int __stdcall HXPGroupStatusGet (int SocketIndex, char * GroupName, int * Status); /* Return group status */ +DLL int __stdcall HXPGroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString); /* Return the group status string corresponding to the group status code */ +DLL int __stdcall HXPKillAll (int SocketIndex); /* Put all groups in 'Not initialized' state */ +DLL int __stdcall HXPRestartApplication (int SocketIndex); /* Restart the Controller */ +DLL int __stdcall HXPPositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus); /* Read backlash value and status */ +DLL int __stdcall HXPPositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue); /* Set backlash value */ +DLL int __stdcall HXPPositionerBacklashEnable (int SocketIndex, char * PositionerName); /* Enable the backlash */ +DLL int __stdcall HXPPositionerBacklashDisable (int SocketIndex, char * PositionerName); /* Disable the backlash */ +DLL int __stdcall HXPPositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2); /* Update filters parameters */ +DLL int __stdcall HXPPositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2); /* Read filters parameters */ +DLL int __stdcall HXPPositionerCorrectorPIDFFAccelerationSet (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 HXPPositionerCorrectorPIDFFAccelerationGet (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 HXPPositionerCorrectorPIDFFVelocitySet (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 HXPPositionerCorrectorPIDFFVelocityGet (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 HXPPositionerCorrectorPIDDualFFVoltageSet (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 HXPPositionerCorrectorPIDDualFFVoltageGet (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 HXPPositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime); /* Update corrector parameters */ +DLL int __stdcall HXPPositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime); /* Read corrector parameters */ +DLL int __stdcall HXPPositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType); /* Read corrector type */ +DLL int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency); /* Set current velocity and acceleration cut off frequencies */ +DLL int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency); /* Get current velocity and acceleration cut off frequencies */ +DLL int __stdcall HXPPositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus); /* Read positioner driver status */ +DLL int __stdcall HXPPositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString); /* Return the positioner driver status string corresponding to the positioner error code */ +DLL int __stdcall HXPPositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * CalibrationSinusAmplitude, double * CurrentSinusAmplitude, double * CalibrationCosinusAmplitude, double * CurrentCosinusAmplitude); /* Read analog interpolated encoder amplitude values */ +DLL int __stdcall HXPPositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation); /* Read analog interpolated encoder calibration parameters */ +DLL int __stdcall HXPPositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read and clear positioner error code */ +DLL int __stdcall HXPPositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read only positioner error code without clear it */ +DLL int __stdcall HXPPositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString); /* Return the positioner status string corresponding to the positioner error code */ +DLL int __stdcall HXPPositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus); /* Read positioner hardware status */ +DLL int __stdcall HXPPositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString); /* Return the positioner hardware status string corresponding to the positioner error code */ +DLL int __stdcall HXPPositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor); /* Get hard interpolator parameters */ +DLL int __stdcall HXPPositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor); /* Set hard interpolator parameters */ +DLL int __stdcall HXPPositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration); /* Return maximum velocity and acceleration of the positioner */ +DLL int __stdcall HXPPositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut); /* Read motion done parameters */ +DLL int __stdcall HXPPositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut); /* Update motion done parameters */ +DLL int __stdcall HXPPositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement); /* Return adjusted displacement to get exact velocity */ +DLL int __stdcall HXPPositionerSGammaParametersGet (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 HXPPositionerSGammaParametersSet (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 HXPPositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime); /* Read SettingTime and SettlingTime */ +DLL int __stdcall HXPPositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Return the stage parameter */ +DLL int __stdcall HXPPositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Save the stage parameter */ +DLL int __stdcall HXPPositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget); /* Read UserMinimumTarget and UserMaximumTarget */ +DLL int __stdcall HXPPositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget); /* Update UserMinimumTarget and UserMaximumTarget */ +DLL int __stdcall HXPHexapodMoveAbsolute (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W); /* Hexapod absolute move in a specific coordinate system */ +DLL int __stdcall HXPHexapodMoveIncremental (int SocketIndex, char * GroupName, char * CoordinateSystem, double dX, double dY, double dZ, double dU, double dV, double dW); /* Hexapod incremental move in a specific coordinate system */ +DLL int __stdcall HXPHexapodCoordinatesGet (int SocketIndex, char * GroupName, char * CoordinateSystemIn, char * CoordinateSystemOut, double Xin, double Yin, double Zin, double Uin, double Vin, double Win, double * Xout, double * Yout, double * Zout, double * Uout, double * Vout, double * Wout); /* Get coordinates in a specific coordinate system of a point specified in another coordinate system */ +DLL int __stdcall HXPHexapodCoordinateSystemSet (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W); /* Modify the position of a coordinate system */ +DLL int __stdcall HXPHexapodCoordinateSystemGet (int SocketIndex, char * GroupName, char * CoordinateSystem, double * X, double * Y, double * Z, double * U, double * V, double * W); /* Get the position of a coordinate system */ +DLL int __stdcall HXPOptionalModuleExecute (int SocketIndex, char * ModuleFileName, char * TaskName); /* Execute an optional module */ +DLL int __stdcall HXPOptionalModuleKill (int SocketIndex, char * TaskName); /* Kill an optional module */ +DLL int __stdcall HXPControllerStatusGet (int SocketIndex, int * ControllerStatus); /* Read controller current status */ +DLL int __stdcall HXPControllerStatusStringGet (int SocketIndex, int ControllerStatusCode, char * ControllerStatusString); /* Return the controller status string corresponding to the controller status code */ +DLL int __stdcall HXPEEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString); /* Set CIE EEPROM reference string */ +DLL int __stdcall HXPEEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset); /* Set CIE DAC offsets */ +DLL int __stdcall HXPEEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString); /* Set Driver EEPROM reference string */ +DLL int __stdcall HXPEEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString); /* Set INT EEPROM reference string */ +DLL int __stdcall HXPCPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB); /* Get power informations */ +DLL int __stdcall HXPCPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed); /* Get CPU temperature and fan speed */ +DLL int __stdcall HXPActionListGet (int SocketIndex, char * ActionList); /* Action list */ +DLL int __stdcall HXPActionExtendedListGet (int SocketIndex, char * ActionList); /* Action extended list */ +DLL int __stdcall HXPAPIExtendedListGet (int SocketIndex, char * Method); /* API method list */ +DLL int __stdcall HXPAPIListGet (int SocketIndex, char * Method); /* API method list without extended API */ +DLL int __stdcall HXPErrorListGet (int SocketIndex, char * ErrorsList); /* Error list */ +DLL int __stdcall HXPEventListGet (int SocketIndex, char * EventList); /* General event list */ +DLL int __stdcall HXPGatheringListGet (int SocketIndex, char * list); /* Gathering type list */ +DLL int __stdcall HXPGatheringExtendedListGet (int SocketIndex, char * list); /* Gathering type extended list */ +DLL int __stdcall HXPGatheringExternalListGet (int SocketIndex, char * list); /* External Gathering type list */ +DLL int __stdcall HXPGroupStatusListGet (int SocketIndex, char * GroupStatusList); /* Group status list */ +DLL int __stdcall HXPHardwareInternalListGet (int SocketIndex, char * InternalHardwareList); /* Internal hardware list */ +DLL int __stdcall HXPHardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName); /* Smart hardware */ +DLL int __stdcall HXPObjectsListGet (int SocketIndex, char * ObjectsList); /* Group name and positioner name */ +DLL int __stdcall HXPPositionerErrorListGet (int SocketIndex, char * PositionerErrorList); /* Positioner error list */ +DLL int __stdcall HXPPositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList); /* Positioner hardware status list */ +DLL int __stdcall HXPPositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList); /* Positioner driver status list */ +DLL int __stdcall HXPReferencingActionListGet (int SocketIndex, char * list); /* Get referencing action list */ +DLL int __stdcall HXPReferencingSensorListGet (int SocketIndex, char * list); /* Get referencing sensor list */ +DLL int __stdcall HXPGatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8); /* Return UserDatas values */ +DLL int __stdcall HXPControllerMotionKernelPeriodMinMaxGet (int SocketIndex, double * MinimumCorrectorPeriod, double * MaximumCorrectorPeriod, double * MinimumProfilerPeriod, double * MaximumProfilerPeriod, double * MinimumServitudesPeriod, double * MaximumServitudesPeriod); /* Get controller motion kernel min/max periods */ +DLL int __stdcall HXPControllerMotionKernelPeriodMinMaxReset (int SocketIndex); /* Reset controller motion kernel min/max periods */ +DLL int __stdcall HXPTestTCP (int SocketIndex, char * InputString, char * ReturnString); /* Test TCP/IP transfert */ +DLL int __stdcall HXPPrepareForUpdate (int SocketIndex); /* Kill QNX processes for firmware update */ + + +#ifdef __cplusplus +} +#endif diff --git a/motorApp/NewportSrc/hxp_errors.h b/motorApp/NewportSrc/hxp_errors.h index 5219552..3bc40dc 100644 --- a/motorApp/NewportSrc/hxp_errors.h +++ b/motorApp/NewportSrc/hxp_errors.h @@ -1,98 +1,98 @@ -//////////////////////////////////////////////////////////////////// -// Created header file hxp_errors.h for XPS function errors -// - -// TCL interpretor error -#define ERR_TCL_INTERPRETOR_ERROR 1 - -// No error -#define SUCCESS 0 - -// XPS errors -#define ERR_TCL_INTERPRETOR_ERROR 1 -#define ERR_BUSY_SOCKET -1 -#define ERR_TCP_TIMEOUT -2 -#define ERR_STRING_TOO_LONG -3 -#define ERR_UNKNOWN_COMMAND -4 -#define ERR_POSITIONER_ERROR -5 -#define ERR_WRONG_FORMAT -7 -#define ERR_WRONG_OBJECT_TYPE -8 -#define ERR_WRONG_PARAMETERS_NUMBER -9 -#define ERR_WRONG_TYPE -10 -#define ERR_WRONG_TYPE_BIT_WORD -11 -#define ERR_WRONG_TYPE_BOOL -12 -#define ERR_WRONG_TYPE_CHAR -13 -#define ERR_WRONG_TYPE_DOUBLE -14 -#define ERR_WRONG_TYPE_INT -15 -#define ERR_WRONG_TYPE_UNSIGNEDINT -16 -#define ERR_PARAMETER_OUT_OF_RANGE -17 -#define ERR_POSITIONER_NAME -18 -#define ERR_GROUP_NAME -19 -#define ERR_FATAL_INIT -20 -#define ERR_IN_INITIALIZATION -21 -#define ERR_NOT_ALLOWED_ACTION -22 -#define ERR_POSITION_COMPARE_NOT_SET -23 -#define ERR_UNCOMPATIBLE -24 -#define ERR_FOLLOWING_ERROR -25 -#define ERR_EMERGENCY_SIGNAL -26 -#define ERR_GROUP_ABORT_MOTION -27 -#define ERR_GROUP_HOME_SEARCH_TIMEOUT -28 -#define ERR_MNEMOTYPEGATHERING -29 -#define ERR_GATHERING_NOT_STARTED -30 -#define ERR_HOME_OUT_RANGE -31 -#define ERR_GATHERING_NOT_CONFIGURED -32 -#define ERR_GROUP_MOTION_DONE_TIMEOUT -33 -#define ERR_TRAVEL_LIMITS -35 -#define ERR_UNKNOWN_TCL_FILE -36 -#define ERR_TCL_SCRIPT_KILL -38 -#define ERR_TCL_INTERPRETOR -37 -#define ERR_MNEMO_ACTION -39 -#define ERR_MNEMO_EVENT -40 -#define ERR_SLAVE_CONFIGURATION -41 -#define ERR_JOG_OUT_OF_RANGE -42 -#define ERR_GATHERING_RUNNING -43 -#define ERR_SLAVE -44 -#define ERR_END_OF_RUN -45 -#define ERR_NOT_ALLOWED_BACKLASH -46 -#define ERR_WRONG_TCL_TASKNAME -47 -#define ERR_BASE_VELOCITY -48 -#define ERR_GROUP_HOME_SEARCH_ZM_ERROR -49 -#define ERR_MOTOR_INITIALIZATION_ERROR -50 -#define ERR_WRITE_FILE -60 -#define ERR_READ_FILE -61 -#define ERR_TRAJ_ELEM_TYPE -62 -#define ERR_TRAJ_ELEM_LINE -65 -#define ERR_TRAJ_EMPTY -66 -#define ERR_TRAJ_VEL_LIMIT -68 -#define ERR_TRAJ_ACC_LIMIT -69 -#define ERR_TRAJ_FINAL_VELOCITY -70 -#define ERR_MSG_QUEUE -71 -#define ERR_TRAJ_INITIALIZATION -72 -#define ERR_END_OF_FILE -73 -#define ERR_READ_FILE_PARAMETER_KEY -74 -#define ERR_TRAJ_TIME -75 -#define ERR_EVENTS_NOT_CONFIGURED -80 -#define ERR_ACTIONS_NOT_CONFIGURED -81 -#define ERR_EVENT_BUFFER_FULL -82 -#define ERR_EVENT_ID_UNDEFINED -83 -#define ERR_HOME_SEARCH_GANTRY_TOLERANCE_ERROR -85 -#define ERR_OPTIONAL_EXTERNAL_MODULE_FILE -94 -#define ERR_OPTIONAL_EXTERNAL_MODULE_EXECUTE -95 -#define ERR_OPTIONAL_EXTERNAL_MODULE_KILL -96 -#define ERR_OPTIONAL_EXTERNAL_MODULE_LOAD -97 -#define ERR_OPTIONAL_EXTERNAL_MODULE_UNLOAD -98 -#define ERR_FATAL_EXTERNAL_MODULE_LOAD -99 -#define ERR_INTERNAL_ERROR -100 -#define ERR_RELAY_FEEDBACK_TEST_NO_OSCILLATION -101 -#define ERR_RELAY_FEEDBACK_TEST_SIGNAL_NOISY -102 -#define ERR_SIGNAL_POINTS_NOT_ENOUGH -103 -#define ERR_PID_TUNING_INITIALIZATION -104 -#define ERR_SCALING_CALIBRATION -105 -#define ERR_WRONG_USERNAME_OR_PASSWORD -106 -#define ERR_NEED_ADMINISTRATOR_RIGHTS -107 -#define ERR_SOCKET_CLOSED_BY_ADMIN -108 -#define ERR_NEED_TO_BE_HOMED_AT_LEAST_ONCE -109 -#define ERR_NOT_ALLOWED_FOR_GANTRY -110 -#define ERR_GATHERING_BUFFER_FULL -111 -#define ERR_BOTH_ENDS_OF_RUNS_ACTIVATED -113 -#define ERR_HARDWARE_FUNCTION_NOT_SUPPORTED -115 +//////////////////////////////////////////////////////////////////// +// Created header file hxp_errors.h for XPS function errors +// + +// TCL interpretor error +#define ERR_TCL_INTERPRETOR_ERROR 1 + +// No error +#define SUCCESS 0 + +// XPS errors +#define ERR_TCL_INTERPRETOR_ERROR 1 +#define ERR_BUSY_SOCKET -1 +#define ERR_TCP_TIMEOUT -2 +#define ERR_STRING_TOO_LONG -3 +#define ERR_UNKNOWN_COMMAND -4 +#define ERR_POSITIONER_ERROR -5 +#define ERR_WRONG_FORMAT -7 +#define ERR_WRONG_OBJECT_TYPE -8 +#define ERR_WRONG_PARAMETERS_NUMBER -9 +#define ERR_WRONG_TYPE -10 +#define ERR_WRONG_TYPE_BIT_WORD -11 +#define ERR_WRONG_TYPE_BOOL -12 +#define ERR_WRONG_TYPE_CHAR -13 +#define ERR_WRONG_TYPE_DOUBLE -14 +#define ERR_WRONG_TYPE_INT -15 +#define ERR_WRONG_TYPE_UNSIGNEDINT -16 +#define ERR_PARAMETER_OUT_OF_RANGE -17 +#define ERR_POSITIONER_NAME -18 +#define ERR_GROUP_NAME -19 +#define ERR_FATAL_INIT -20 +#define ERR_IN_INITIALIZATION -21 +#define ERR_NOT_ALLOWED_ACTION -22 +#define ERR_POSITION_COMPARE_NOT_SET -23 +#define ERR_UNCOMPATIBLE -24 +#define ERR_FOLLOWING_ERROR -25 +#define ERR_EMERGENCY_SIGNAL -26 +#define ERR_GROUP_ABORT_MOTION -27 +#define ERR_GROUP_HOME_SEARCH_TIMEOUT -28 +#define ERR_MNEMOTYPEGATHERING -29 +#define ERR_GATHERING_NOT_STARTED -30 +#define ERR_HOME_OUT_RANGE -31 +#define ERR_GATHERING_NOT_CONFIGURED -32 +#define ERR_GROUP_MOTION_DONE_TIMEOUT -33 +#define ERR_TRAVEL_LIMITS -35 +#define ERR_UNKNOWN_TCL_FILE -36 +#define ERR_TCL_SCRIPT_KILL -38 +#define ERR_TCL_INTERPRETOR -37 +#define ERR_MNEMO_ACTION -39 +#define ERR_MNEMO_EVENT -40 +#define ERR_SLAVE_CONFIGURATION -41 +#define ERR_JOG_OUT_OF_RANGE -42 +#define ERR_GATHERING_RUNNING -43 +#define ERR_SLAVE -44 +#define ERR_END_OF_RUN -45 +#define ERR_NOT_ALLOWED_BACKLASH -46 +#define ERR_WRONG_TCL_TASKNAME -47 +#define ERR_BASE_VELOCITY -48 +#define ERR_GROUP_HOME_SEARCH_ZM_ERROR -49 +#define ERR_MOTOR_INITIALIZATION_ERROR -50 +#define ERR_WRITE_FILE -60 +#define ERR_READ_FILE -61 +#define ERR_TRAJ_ELEM_TYPE -62 +#define ERR_TRAJ_ELEM_LINE -65 +#define ERR_TRAJ_EMPTY -66 +#define ERR_TRAJ_VEL_LIMIT -68 +#define ERR_TRAJ_ACC_LIMIT -69 +#define ERR_TRAJ_FINAL_VELOCITY -70 +#define ERR_MSG_QUEUE -71 +#define ERR_TRAJ_INITIALIZATION -72 +#define ERR_END_OF_FILE -73 +#define ERR_READ_FILE_PARAMETER_KEY -74 +#define ERR_TRAJ_TIME -75 +#define ERR_EVENTS_NOT_CONFIGURED -80 +#define ERR_ACTIONS_NOT_CONFIGURED -81 +#define ERR_EVENT_BUFFER_FULL -82 +#define ERR_EVENT_ID_UNDEFINED -83 +#define ERR_HOME_SEARCH_GANTRY_TOLERANCE_ERROR -85 +#define ERR_OPTIONAL_EXTERNAL_MODULE_FILE -94 +#define ERR_OPTIONAL_EXTERNAL_MODULE_EXECUTE -95 +#define ERR_OPTIONAL_EXTERNAL_MODULE_KILL -96 +#define ERR_OPTIONAL_EXTERNAL_MODULE_LOAD -97 +#define ERR_OPTIONAL_EXTERNAL_MODULE_UNLOAD -98 +#define ERR_FATAL_EXTERNAL_MODULE_LOAD -99 +#define ERR_INTERNAL_ERROR -100 +#define ERR_RELAY_FEEDBACK_TEST_NO_OSCILLATION -101 +#define ERR_RELAY_FEEDBACK_TEST_SIGNAL_NOISY -102 +#define ERR_SIGNAL_POINTS_NOT_ENOUGH -103 +#define ERR_PID_TUNING_INITIALIZATION -104 +#define ERR_SCALING_CALIBRATION -105 +#define ERR_WRONG_USERNAME_OR_PASSWORD -106 +#define ERR_NEED_ADMINISTRATOR_RIGHTS -107 +#define ERR_SOCKET_CLOSED_BY_ADMIN -108 +#define ERR_NEED_TO_BE_HOMED_AT_LEAST_ONCE -109 +#define ERR_NOT_ALLOWED_FOR_GANTRY -110 +#define ERR_GATHERING_BUFFER_FULL -111 +#define ERR_BOTH_ENDS_OF_RUNS_ACTIVATED -113 +#define ERR_HARDWARE_FUNCTION_NOT_SUPPORTED -115 diff --git a/motorApp/NewportSrc/tclCall.cc b/motorApp/NewportSrc/tclCall.cc index 22f5ba7..57a3ac5 100644 --- a/motorApp/NewportSrc/tclCall.cc +++ b/motorApp/NewportSrc/tclCall.cc @@ -10,11 +10,11 @@ #include -#include "XPS_C8_drivers.h" -#include "Socket.h" #define epicsExportSharedSymbols #include #include "tclCall.h" +#include "XPS_C8_drivers.h" +#include "Socket.h" #define TIMEOUT 1 diff --git a/motorApp/NewportSrc/xpsSlave.st b/motorApp/NewportSrc/xpsSlave.st index 9524e6e..690e015 100644 --- a/motorApp/NewportSrc/xpsSlave.st +++ b/motorApp/NewportSrc/xpsSlave.st @@ -8,6 +8,8 @@ option +r; /*option -w;*/ #include "seqPVmacros.h" +%%#define epicsExportSharedSymbols +%%#include %%#include "XPS_C8_drivers.h" #define PORT 5001 diff --git a/motorApp/OmsAsynSrc/omsBaseAxis.cpp b/motorApp/OmsAsynSrc/omsBaseAxis.cpp index cc6d137..119656d 100644 --- a/motorApp/OmsAsynSrc/omsBaseAxis.cpp +++ b/motorApp/OmsAsynSrc/omsBaseAxis.cpp @@ -2,10 +2,6 @@ FILENAME... omsBaseAxis.cpp USAGE... Pro-Dex OMS asyn motor base axes support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ @@ -32,6 +28,7 @@ omsBaseAxis::omsBaseAxis(omsBaseController *pController, int axis, char axisChar stepper = 1; invertLimit = 0; lastminvelo = 0; + encoderRatio = 1.0; } asynStatus omsBaseAxis::move(double position, int relative, double min_velocity, double max_velocity, double acceleration) @@ -40,9 +37,36 @@ asynStatus omsBaseAxis::move(double position, int relative, double min_velocity, static const char *functionName = "moveAxis"; asynStatus status = asynError; + + char buff[100]; + char encoderPositionResponse[64]; + + int hasEncoder = 0; + if (pC_->getIntegerParam(axisNo_, pC_->motorStatusHasEncoder_, &hasEncoder) == asynError) + { + return asynError; + } + + if (hasEncoder != 0) + { + sprintf(buff, "A%1c;RE;", axisChar); + status = pC_->sendReceiveLock(buff, encoderPositionResponse, 64); + if (status == asynError) + { + return status; + } + + int motorPosition = static_cast(atoi(encoderPositionResponse) / encoderRatio); + asynPrint(pasynUser_, ASYN_TRACE_FLOW, + "%s:%s: Set driver %s motor position %d from encoder position %s\n", + driverName, functionName, pC_->portName, motorPosition, encoderPositionResponse); + + sprintf(buff, "A%1c;LO%d;", axisChar, motorPosition); + status = pC_->sendOnlyLock(buff); + } + epicsInt32 minvelo, velo, acc, rela, pos; char *relabs[2] = {(char *) "MA", (char *) "MR"}; - char buff[100]; if (relative) rela = 1; @@ -85,7 +109,7 @@ asynStatus omsBaseAxis::move(double position, int relative, double min_velocity, status = pC_->sendOnlyLock(buff); asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: Set driver %s, axis %d move to %f, min vel=%f, max_vel=%f, accel=%f", + "%s:%s: Set driver %s, axis %d move to %f, min vel=%f, max_vel=%f, accel=%f\n", driverName, functionName, pC_->portName, axisNo_, position, min_velocity, max_velocity, acceleration ); return status; @@ -128,7 +152,7 @@ asynStatus omsBaseAxis::home(double min_velocity, double max_velocity, double ac homing = 1; asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: Set driver %s, axis %d to home %s, min vel=%f, max_vel=%f, accel=%f", + "%s:%s: Set driver %s, axis %d to home %s, min vel=%f, max_vel=%f, accel=%f\n", driverName, functionName, pC_->portName, axisNo_, (forwards?"FORWARDS":"REVERSE"), min_velocity, max_velocity, acceleration ); return status; diff --git a/motorApp/OmsAsynSrc/omsBaseAxis.h b/motorApp/OmsAsynSrc/omsBaseAxis.h index 0f5dc6d..7a1658e 100644 --- a/motorApp/OmsAsynSrc/omsBaseAxis.h +++ b/motorApp/OmsAsynSrc/omsBaseAxis.h @@ -2,10 +2,6 @@ FILENAME... omsBaseAxis.h USAGE... Pro-Dex OMS asyn motor base axes support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* @@ -33,11 +29,12 @@ class omsBaseAxis : public asynMotorAxis virtual asynStatus setPosition(double position); virtual asynStatus poll(bool *moving); - int getAxis(){return axisNo_;}; - int isStepper(){return stepper;}; - void setStepper(int val){stepper=val;}; - int getLimitInvert(){return invertLimit;}; - void setLimitInvert(int val){invertLimit=val;}; + int getAxis(){return axisNo_;} + int isStepper(){return stepper;} + void setStepper(int val){stepper=val;} + int getLimitInvert(){return invertLimit;} + void setLimitInvert(int val){invertLimit=val;} + virtual asynStatus setEncoderRatio(double ratio){encoderRatio=ratio; return asynSuccess;} int card; int moveDelay; char axisChar; @@ -49,6 +46,7 @@ class omsBaseAxis : public asynMotorAxis int stepper; int invertLimit; epicsInt32 lastminvelo; + double encoderRatio; friend class omsBaseController; }; diff --git a/motorApp/OmsAsynSrc/omsBaseController.cpp b/motorApp/OmsAsynSrc/omsBaseController.cpp index dfa096d..d0c26f2 100644 --- a/motorApp/OmsAsynSrc/omsBaseController.cpp +++ b/motorApp/OmsAsynSrc/omsBaseController.cpp @@ -2,10 +2,6 @@ FILENAME... omsBaseController.cpp USAGE... Pro-Dex OMS asyn motor base controller support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* diff --git a/motorApp/OmsAsynSrc/omsBaseController.h b/motorApp/OmsAsynSrc/omsBaseController.h index d3290c0..8b35b6f 100644 --- a/motorApp/OmsAsynSrc/omsBaseController.h +++ b/motorApp/OmsAsynSrc/omsBaseController.h @@ -2,10 +2,6 @@ FILENAME... omsBaseController.h USAGE... Pro-Dex OMS asyn motor base controller support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* diff --git a/motorApp/OmsAsynSrc/omsMAXnet.cpp b/motorApp/OmsAsynSrc/omsMAXnet.cpp index aeed780..e5eec78 100644 --- a/motorApp/OmsAsynSrc/omsMAXnet.cpp +++ b/motorApp/OmsAsynSrc/omsMAXnet.cpp @@ -2,10 +2,6 @@ FILENAME... omsMAXnet.cpp USAGE... Pro-Dex OMS MAXnet asyn motor controller support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* @@ -367,6 +363,9 @@ extern "C" int omsMAXnetConfig( /* Code for iocsh registration */ +extern "C" +{ + /* omsMAXnetConfig */ static const iocshArg omsMAXnetConfigArg0 = {"asyn motor port name", iocshArgString}; static const iocshArg omsMAXnetConfigArg1 = {"number of axes", iocshArgInt}; @@ -393,3 +392,4 @@ static void OmsMAXnetAsynRegister(void) epicsExportRegistrar(OmsMAXnetAsynRegister); +} diff --git a/motorApp/OmsAsynSrc/omsMAXnet.h b/motorApp/OmsAsynSrc/omsMAXnet.h index 4701b61..12726b4 100644 --- a/motorApp/OmsAsynSrc/omsMAXnet.h +++ b/motorApp/OmsAsynSrc/omsMAXnet.h @@ -2,10 +2,6 @@ FILENAME... omsMAXnet.h USAGE... Pro-Dex OMS MAXnet asyn motor controller support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* diff --git a/motorApp/OmsAsynSrc/omsMAXv.cpp b/motorApp/OmsAsynSrc/omsMAXv.cpp index 3b89423..44688af 100644 --- a/motorApp/OmsAsynSrc/omsMAXv.cpp +++ b/motorApp/OmsAsynSrc/omsMAXv.cpp @@ -2,10 +2,6 @@ FILENAME... omsMAXv.cpp USAGE... Pro-Dex OMS MAXv asyn motor controller support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* @@ -593,6 +589,10 @@ extern "C" int omsMAXvConfig2( } /* Code for iocsh registration */ + +extern "C" +{ + /* omsMAXvSetup */ static const iocshArg setupArg0 = {"Max. controller count", iocshArgInt}; static const iocshArg setupArg1 = {"VME address type", iocshArgInt}; @@ -653,3 +653,4 @@ static void OmsMAXvAsynRegister(void) epicsExportRegistrar(OmsMAXvAsynRegister); +} diff --git a/motorApp/OmsAsynSrc/omsMAXv.h b/motorApp/OmsAsynSrc/omsMAXv.h index f923e39..d9d9202 100644 --- a/motorApp/OmsAsynSrc/omsMAXv.h +++ b/motorApp/OmsAsynSrc/omsMAXv.h @@ -2,10 +2,6 @@ FILENAME... omsMAXv.h USAGE... Pro-Dex OMS MAXv asyn motor controller support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* diff --git a/motorApp/OmsAsynSrc/omsMAXvEncFunc.cpp b/motorApp/OmsAsynSrc/omsMAXvEncFunc.cpp index 83224a8..9d7948a 100644 --- a/motorApp/OmsAsynSrc/omsMAXvEncFunc.cpp +++ b/motorApp/OmsAsynSrc/omsMAXvEncFunc.cpp @@ -2,10 +2,6 @@ FILENAME... omsMAXvEncFunc.cpp USAGE... Pro-Dex OMS MAXv encoder asyn motor support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* diff --git a/motorApp/OmsAsynSrc/omsMAXvEncFunc.h b/motorApp/OmsAsynSrc/omsMAXvEncFunc.h index 3b993db..b948949 100644 --- a/motorApp/OmsAsynSrc/omsMAXvEncFunc.h +++ b/motorApp/OmsAsynSrc/omsMAXvEncFunc.h @@ -2,10 +2,6 @@ FILENAME... omsMAXvEncFunc.h USAGE... Pro-Dex OMS MAXv encoder asyn motor support -Version: $Revision$ -Modified By: $Author$ -Last Modified: $Date$ -HeadURL: $URL$ */ /* diff --git a/motorApp/OmsSrc/README b/motorApp/OmsSrc/README index b6388c9..38417c7 100644 --- a/motorApp/OmsSrc/README +++ b/motorApp/OmsSrc/README @@ -27,13 +27,13 @@ VME space | A16 | A24 | A32 | ----------|--------|-----------|-------------| MAXv size | 0x1000 | 0x01 0000 | 0x0100 0000 | ----------|--------|-----------|-------------| -valid MAXv| 0x0000 | 0x10 0000 | 0x1000 0000 | -addresses | 0x1000 | 0x11 0000 | 0x1100 0000 | - | 0x2000 | 0x12 0000 | 0x1200 0000 | +valid MAXv| 0x0000 | 0x00 0000 | 0x0000 0000 | +addresses | 0x1000 | 0x01 0000 | 0x0100 0000 | + | 0x2000 | 0x02 0000 | 0x0200 0000 | | ... | ... | ... | - | 0xE000 | 0x1E 0000 | 0x1E00 0000 | - | 0xF000 | 0x1F 0000 | 0x1F00 0000 | - | | 0x20 0000 | 0x2000 0000 | + | 0xE000 | 0x0E 0000 | 0x0E00 0000 | + | 0xF000 | 0x0F 0000 | 0x0F00 0000 | + | | 0x10 0000 | 0x1000 0000 | | | ... | ... | | | 0xFF 0000 | 0xFF00 0000 | ----------|--------|-----------|-------------| diff --git a/motorApp/OmsSrc/devMAXv.cc b/motorApp/OmsSrc/devMAXv.cc index bacf4c2..981492c 100644 --- a/motorApp/OmsSrc/devMAXv.cc +++ b/motorApp/OmsSrc/devMAXv.cc @@ -2,10 +2,6 @@ FILENAME... devMAXV.cc USAGE... Device level support for OMS MAXv model. -Version: $Revision: 10834 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/devMAXv.cc $ */ /* @@ -39,6 +35,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- * .01 04-05-05 rls Copied from devOms58.cc */ +#include + #include "motorRecord.h" #include "devOmsCom.h" #include "epicsExport.h" @@ -47,14 +45,14 @@ extern int MAXv_num_cards; extern struct driver_table MAXv_access; /* ----------------Create the dsets for devMAXv----------------- */ -static long MAXv_init(void *); +static long MAXv_init(int); static long MAXv_init_record(void *); static long MAXv_start_trans(struct motorRecord *); static RTN_STATUS MAXv_end_trans(struct motorRecord *); struct motor_dset devMAXv = { - {8, NULL, MAXv_init, MAXv_init_record, NULL}, + {8, NULL, (DEVSUPFUN) MAXv_init, (DEVSUPFUN) MAXv_init_record, NULL}, motor_update_values, MAXv_start_trans, oms_build_trans, @@ -66,10 +64,8 @@ extern "C" {epicsExportAddress(dset,devMAXv);} static struct board_stat **MAXv_cards; static const char errmsg[] = {"\n\n!!!ERROR!!! - Oms MAXv driver uninitialized.\n"}; -static long MAXv_init(void *arg) +static long MAXv_init(int after) { - int after = (arg == 0) ? 0 : 1; - if (*(MAXv_access.init_indicator) == NO) { errlogSevPrintf(errlogMinor, "%s", errmsg); diff --git a/motorApp/OmsSrc/devOms.cc b/motorApp/OmsSrc/devOms.cc index 9e61b70..018f58e 100644 --- a/motorApp/OmsSrc/devOms.cc +++ b/motorApp/OmsSrc/devOms.cc @@ -3,10 +3,6 @@ FILENAME... devOms.cc USAGE... Device level support for OMS VME8 and VME44 models. -Version: $Revision: 10834 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/devOms.cc $ */ /* @@ -68,14 +64,14 @@ extern int oms44_num_cards; extern struct driver_table oms_access; /* ----------------Create the dsets for devOMS----------------- */ -static long oms_init(void *); +static long oms_init(int); static long oms_init_record(void *); static long oms_start_trans(struct motorRecord *); static RTN_STATUS oms_end_trans(struct motorRecord *); struct motor_dset devOMS = { - {8, NULL, oms_init, oms_init_record, NULL}, + {8, NULL, (DEVSUPFUN) oms_init, (DEVSUPFUN) oms_init_record, NULL}, motor_update_values, oms_start_trans, oms_build_trans, @@ -87,10 +83,8 @@ extern "C" {epicsExportAddress(dset,devOMS);} static struct board_stat **oms_cards; static const char errmsg[] = {"\n\n!!!ERROR!!! - Oms driver uninitialized.\n"}; -static long oms_init(void *arg) +static long oms_init(int after) { - int after = (arg == 0) ? 0 : 1; - if (*(oms_access.init_indicator) == NO) { errlogSevPrintf(errlogMinor, "%s", errmsg); diff --git a/motorApp/OmsSrc/devOms.dbd b/motorApp/OmsSrc/devOms.dbd index d0b4f55..569232b 100644 --- a/motorApp/OmsSrc/devOms.dbd +++ b/motorApp/OmsSrc/devOms.dbd @@ -5,6 +5,7 @@ driver(drvOms) # Oregon Micro Systems VME58 driver support. device(motor,VME_IO,devOms58,"OMS VME58") driver(drvOms58) +registrar(oms58Registrar) # Oregon Micro Systems MAXv driver support. device(motor,VME_IO,devMAXv,"OMS MAXv") diff --git a/motorApp/OmsSrc/devOms58.cc b/motorApp/OmsSrc/devOms58.cc index f8e94f4..d788a06 100644 --- a/motorApp/OmsSrc/devOms58.cc +++ b/motorApp/OmsSrc/devOms58.cc @@ -2,10 +2,6 @@ FILENAME... devOms58.c USAGE... Motor record device level support for OMS VME58. -Version: $Revision: 10834 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/devOms58.cc $ */ /* @@ -66,14 +62,14 @@ extern int oms58_num_cards; extern struct driver_table oms58_access; /* ----------------Create the dsets for devOMS----------------- */ -static long oms_init(void *); +static long oms_init(int); static long oms_init_record(void *); static long oms_start_trans(struct motorRecord *); static RTN_STATUS oms_end_trans(struct motorRecord *); struct motor_dset devOms58 = { - {8, NULL, oms_init, oms_init_record, NULL}, + {8, NULL, (DEVSUPFUN) oms_init, (DEVSUPFUN) oms_init_record, NULL}, motor_update_values, oms_start_trans, oms_build_trans, @@ -85,10 +81,8 @@ extern "C" {epicsExportAddress(dset,devOms58);} static struct board_stat **oms_cards; static const char errmsg[] = {"\n\n!!!ERROR!!! - Oms58 driver uninitialized.\n"}; -static long oms_init(void *arg) +static long oms_init(int after) { - int after = (arg == 0) ? 0 : 1; - if (*(oms58_access.init_indicator) == NO) { errlogSevPrintf(errlogMinor, "%s", errmsg); diff --git a/motorApp/OmsSrc/devOmsCom.cc b/motorApp/OmsSrc/devOmsCom.cc index c1e4d3c..524d56d 100644 --- a/motorApp/OmsSrc/devOmsCom.cc +++ b/motorApp/OmsSrc/devOmsCom.cc @@ -2,10 +2,6 @@ FILENAME... devOmsCom.cc USAGE... Data and functions common to all OMS device level support. -Version: $Revision: 17420 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-05-09 16:51:25 -0500 (Fri, 09 May 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/devOmsCom.cc $ */ /* @@ -70,6 +66,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- * different polarity (signs). * .24 11-29-12 rls Terminate UU command argument with a ';' character. * Fixes "Command error" with MAXv ver:1.41 firmware. + * .25 03-13-15 rls Bug fix for incorrect deceleration calculation at end of + * JOG command. * */ @@ -80,6 +78,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include #include "motorRecord.h" #include "motor.h" @@ -265,7 +264,7 @@ RTN_STATUS oms_build_trans(motor_cmnd command, double *parms, struct motorRecord char respbuf[10]; (*tabptr->getmsg)(card, respbuf, -1); - (*tabptr->sendmsg)(card, "RB\r", (char) NULL); + (*tabptr->sendmsg)(card, "RB\r", (char*) NULL); (*tabptr->getmsg)(card, respbuf, 1); if (sscanf(respbuf, "%x", &response) == 0) response = 0; /* Force an error. */ @@ -311,7 +310,7 @@ RTN_STATUS oms_build_trans(motor_cmnd command, double *parms, struct motorRecord /* Use MIP to determine which acc. rate to use. */ if (mr->mip & MIP_JOG_STOP) - acc = ((mr->jar) / fabs(mr->mres)) / mr->accl; + acc = mr->jar / fabs(mr->mres); else acc = ((mr->velo - mr->vbas) / fabs(mr->mres)) / mr->accl; @@ -514,7 +513,7 @@ errorexit: errMessage(-1, "Invalid device directive"); if (MAXv == true && parms[0] == parms[1]) sprintf(buffer, " UF"); else - sprintf(buffer, " UU%f;", parms[0]/parms[1]); + sprintf(buffer, " UU%f;", fabs(parms[0]/parms[1])); strcat(motor_call->message, buffer); break; diff --git a/motorApp/OmsSrc/devOmsCom.h b/motorApp/OmsSrc/devOmsCom.h index 00f07d4..10722b2 100644 --- a/motorApp/OmsSrc/devOmsCom.h +++ b/motorApp/OmsSrc/devOmsCom.h @@ -4,10 +4,6 @@ FILENAME.. devOmsCom.h USAGE... This file contains OMS device information that is common to all OMS device support modules. -Version: $Revision: 10834 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/devOmsCom.h $ */ /* diff --git a/motorApp/OmsSrc/devOmsPC68.cc b/motorApp/OmsSrc/devOmsPC68.cc index 5757ad3..0df953c 100644 --- a/motorApp/OmsSrc/devOmsPC68.cc +++ b/motorApp/OmsSrc/devOmsPC68.cc @@ -2,10 +2,6 @@ FILENAME... devOmsPC68.c USAGE... Motor record device level support for OMS VME58. -Version: $Revision: 10834 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/devOmsPC68.cc $ */ /* @@ -63,14 +59,14 @@ extern int OmsPC68_num_cards; extern struct driver_table OmsPC68_access; /* ----------------Create the dsets for devOMS----------------- */ -STATIC long oms_init(void *); +STATIC long oms_init(int); STATIC long oms_init_record(void *); STATIC long oms_start_trans(struct motorRecord *); STATIC RTN_STATUS oms_end_trans(struct motorRecord *); struct motor_dset devOmsPC68 = { - {8, NULL, oms_init, oms_init_record, NULL}, + {8, NULL, (DEVSUPFUN) oms_init, (DEVSUPFUN) oms_init_record, NULL}, motor_update_values, oms_start_trans, oms_build_trans, @@ -84,10 +80,8 @@ STATIC const char errmsg[] = {"\n\n!!!ERROR!!! - OmsPC68 driver uninitialized.\n //__________________________________________________________________________________________ -STATIC long oms_init(void *arg) +STATIC long oms_init(int after) { - int after = (arg == 0) ? 0 : 1; - if (*(OmsPC68_access.init_indicator) == NO) { errlogSevPrintf(errlogMinor, "%s", errmsg); diff --git a/motorApp/OmsSrc/drvMAXv.cc b/motorApp/OmsSrc/drvMAXv.cc index 58e1a82..29ffee4 100644 --- a/motorApp/OmsSrc/drvMAXv.cc +++ b/motorApp/OmsSrc/drvMAXv.cc @@ -2,10 +2,6 @@ FILENAME... drvMAXv.cc USAGE... Motor record driver level support for OMS model MAXv. -Version: $Revision: 17754 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-08-19 09:18:35 -0500 (Tue, 19 Aug 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/drvMAXv.cc $ */ /* @@ -97,6 +93,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- * command into two commands. * - Fix for intermittent wrong command displayed from Command Error message. motorIsr() saves the * message in a separate static buffer. + * 26 02-08-16 rls - Valid IRQ levels are 2 thru 6. + * 27 04-04-17 rls - Added error check for new failure mode where board reboots after 1st command with response. * */ @@ -114,6 +112,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include #include "motorRecord.h" /* For Driver Power Monitor feature only. */ #include "motor.h" @@ -169,7 +168,7 @@ static epicsAddressType MAXv_ADDRS_TYPE; static volatile unsigned MAXvInterruptVector = 0; static volatile epicsUInt8 omsInterruptLevel = OMS_INT_LEVEL; static volatile int motionTO = 10; -static char *MAXv_axis[] = {"X", "Y", "Z", "T", "U", "V", "R", "S"}; +static const char *MAXv_axis[] = {"X", "Y", "Z", "T", "U", "V", "R", "S"}; static double quantum; static char **initstring = 0; static epicsUInt32 MAXv_brd_size; /* card address boundary */ @@ -256,7 +255,7 @@ struct driver_table MAXv_access = query_done, NULL, &initialized, - MAXv_axis + (char **) MAXv_axis }; struct drvMAXv_drvet @@ -310,10 +309,10 @@ static void query_done(int card, int axis, struct mess_node *nodeptr) { char buffer[MAX_IDENT_LEN]; - send_recv_mess(card, DONE_QUERY, MAXv_axis[axis], buffer, 1); + send_recv_mess(card, DONE_QUERY, (char *) MAXv_axis[axis], buffer, 1); if (nodeptr->status.Bits.RA_PROBLEM) - send_mess(card, AXIS_STOP, MAXv_axis[axis]); + send_mess(card, AXIS_STOP, (char *) MAXv_axis[axis]); } @@ -374,7 +373,6 @@ static int set_status(int card, int signal) char q_buf[MAX_IDENT_LEN], outbuf[50]; int index; bool ls_active = false; - bool got_encoder; msta_field status; int absoluteAxis = (configurationFlags[card] & (1 << signal)); @@ -392,13 +390,13 @@ static int set_status(int card, int signal) MAXvCntrl = (struct MAXvController *) brdptr->DevicePrivate; if (MAXvCntrl->fwver >= 1.33) { - send_recv_mess(card, "#WS", (char) NULL, q_buf, 1); + send_recv_mess(card, "#WS", (char *) NULL, q_buf, 1); if (strcmp(q_buf, "=0") != 0) { errlogPrintf(wdctrmsg, card, q_buf); status.Bits.RA_PROBLEM = 1; motor_info->status.All = status.All; - send_mess(card, STOP_ALL, (char) NULL); + send_mess(card, STOP_ALL, (char*) NULL); /* Disable board. */ motor_state[card] = (struct controller *) NULL; return(rtn_state = 1); /* End move. */ @@ -408,16 +406,14 @@ static int set_status(int card, int signal) if (motor_info->encoder_present == YES) { /* get 4 pieces of info from axis */ - send_recv_mess(card, "QA", MAXv_axis[signal], &q_buf[0], 1); + send_recv_mess(card, "QA", (char *) MAXv_axis[signal], &q_buf[0], 1); q_buf[4] = ','; - send_recv_mess(card, "EA", MAXv_axis[signal], &q_buf[5], 1); - got_encoder = true; + send_recv_mess(card, "EA", (char *) MAXv_axis[signal], &q_buf[5], 1); } else { /* get 2 pieces of info from axis */ - send_recv_mess(card, AXIS_INFO, MAXv_axis[signal], q_buf, 1); - got_encoder = false; + send_recv_mess(card, AXIS_INFO, (char *) MAXv_axis[signal], q_buf, 1); } for (index = 0, p = epicsStrtok_r(q_buf, ",", &tok_save); p; @@ -479,7 +475,7 @@ static int set_status(int card, int signal) if (motor_info->no_motion_count > motionTO) { status.Bits.RA_PROBLEM = 1; - send_mess(card, AXIS_STOP, MAXv_axis[signal]); + send_mess(card, AXIS_STOP, (char *) MAXv_axis[signal]); motor_info->no_motion_count = 0; errlogSevPrintf(errlogMinor, "Motor motion timeout ERROR on card: %d, signal: %d\n", card, signal); @@ -493,7 +489,7 @@ static int set_status(int card, int signal) status.Bits.RA_PROBLEM = 0; /* get command velocity */ - send_recv_mess(card, "RV", MAXv_axis[signal], q_buf, 1); + send_recv_mess(card, "RV", (char *) MAXv_axis[signal], q_buf, 1); motor_info->velocity = atoi(q_buf); /* Get encoder position */ @@ -586,7 +582,7 @@ errorexit: errMessage(-1, "Invalid device directive"); strcpy(buffer, nodeptr->postmsgptr); strcpy(outbuf, buffer); - send_mess(card, outbuf, MAXv_axis[signal]); + send_mess(card, outbuf, (char *) MAXv_axis[signal]); nodeptr->postmsgptr = NULL; } @@ -895,7 +891,7 @@ MAXvSetup(int num_cards, /* maximum number of cards in rack */ int addrs_type, /* VME address type; 16 - A16, 24 - A24 or 32 - A32. */ unsigned int addrs, /* Base Address. */ unsigned int vector, /* noninterrupting(0), valid vectors(64-255) */ - int int_level, /* interrupt level (1-6) */ + int int_level, /* interrupt level (2-6) */ int scan_rate) /* 1 <= polling rate <= (1/epicsThreadSleepQuantum) */ { int itera; @@ -995,9 +991,9 @@ MAXvSetup(int num_cards, /* maximum number of cards in rack */ } } - if (int_level < 1 || int_level > 6) + if (int_level < 2 || int_level > 6) { - char format[] = "%sinterrupt level = %d ***\n"; + char format[] = "%sinterrupt level = %d *** default = 5\n"; omsInterruptLevel = OMS_INT_LEVEL; errlogPrintf(format, errbase, int_level); epicsThreadSleep(5.0); @@ -1119,7 +1115,7 @@ static int motorIsrSetup(int card) status = pdevLibVirtualOS->pDevConnectInterruptVME( MAXvInterruptVector + card, -#if LT_EPICSBASE(3,14,8) +#if LT_EPICSBASE(3,14,8,0) (void (*)()) motorIsr, #else (void (*)(void *)) motorIsr, @@ -1195,6 +1191,7 @@ static int motor_init() epicsInt8 *startAddr; epicsInt8 *endAddr; bool wdtrip; + int rtn_code; Debug(2, "motor_init: card %d\n", card_index); @@ -1264,10 +1261,16 @@ static int motor_init() pmotor->status1_irq_enable.All = 0; pmotor->status2_irq_enable = 0; - send_mess(card_index, ERROR_CLEAR, (char) NULL); - send_mess(card_index, STOP_ALL, (char) NULL); + send_mess(card_index, ERROR_CLEAR, (char*) NULL); + send_mess(card_index, STOP_ALL, (char*) NULL); - send_recv_mess(card_index, GET_IDENT, (char) NULL, (char *) pmotorState->ident, 1); + rtn_code = send_recv_mess(card_index, GET_IDENT, (char* ) NULL, (char *) pmotorState->ident, 1); + if (rtn_code != 0) + { + errlogPrintf("\n***MAXv card #%d Disabled*** not responding to commands!\n\n", card_index); + motor_state[card_index] = (struct controller *) NULL; + goto loopend; + } Debug(3, "Identification = %s\n", pmotorState->ident); /* Save firmware version. */ @@ -1278,7 +1281,7 @@ static int motor_init() if (pvtdata->fwver >= 1.33) { - send_recv_mess(card_index, "#WS", (char) NULL, axis_pos, 1); + send_recv_mess(card_index, "#WS", (char *) NULL, axis_pos, 1); if (strcmp(axis_pos, "=0") != 0) { errlogPrintf(wdctrmsg, card_index, axis_pos); @@ -1290,9 +1293,9 @@ static int motor_init() if (wdtrip == false) { - send_mess(card_index, initstring[card_index], (char) NULL); + send_mess(card_index, initstring[card_index], (char*) NULL); - send_recv_mess(card_index, ALL_POS, (char) NULL, axis_pos, 1); + send_recv_mess(card_index, ALL_POS, (char *) NULL, axis_pos, 1); for (total_axis = 0, pos_ptr = epicsStrtok_r(axis_pos, ",", &tok_save); pos_ptr; pos_ptr = epicsStrtok_r(NULL, ",", &tok_save), total_axis++) @@ -1310,7 +1313,7 @@ static int motor_init() STATUS1 flag1; /* Test if motor has an encoder. */ - send_mess(card_index, ENCODER_QUERY, MAXv_axis[motor_index]); + send_mess(card_index, ENCODER_QUERY, (char *) MAXv_axis[motor_index]); while (!pmotor->status1_flag.Bits.done) /* Wait for command to complete. */ epicsThreadSleep(quantum); @@ -1329,7 +1332,7 @@ static int motor_init() } /* Test if motor has PID parameters. */ - send_mess(card_index, PID_QUERY, MAXv_axis[motor_index]); + send_mess(card_index, PID_QUERY, (char *) MAXv_axis[motor_index]); while (!pmotor->status1_flag.Bits.done) /* Wait for command to complete. */ epicsThreadSleep(quantum); if (pmotor->status1_flag.Bits.cmndError) @@ -1356,9 +1359,9 @@ static int motor_init() if (pvtdata->fwver >= 1.30) { - send_recv_mess(card_index, "LM?", MAXv_axis[motor_index], axis_pos, 1); + send_recv_mess(card_index, "LM?", (char *) MAXv_axis[motor_index], axis_pos, 1); if (strcmp(axis_pos, "=f") == 0) /* If limit mode is set to "Off". */ - send_mess(card_index, "LMH", MAXv_axis[motor_index]); /* Set limit mode to "Hard". */ + send_mess(card_index, "LMH", (char *) MAXv_axis[motor_index]); /* Set limit mode to "Hard". */ } } @@ -1385,7 +1388,7 @@ static int motor_init() set_status(card_index, motor_index); /* Is this needed??? */ - send_recv_mess(card_index, DONE_QUERY, MAXv_axis[motor_index], axis_pos, 1); + send_recv_mess(card_index, DONE_QUERY, (char *) MAXv_axis[motor_index], axis_pos, 1); } Debug(2, "motor_init: Init Address=%p\n", localaddr); diff --git a/motorApp/OmsSrc/drvMAXv.h b/motorApp/OmsSrc/drvMAXv.h index d53e6ee..db648d0 100644 --- a/motorApp/OmsSrc/drvMAXv.h +++ b/motorApp/OmsSrc/drvMAXv.h @@ -3,10 +3,6 @@ FILENAME... drvMAXv.h USAGE... OMS driver level "include" information that is specific to OMS model MAXv. -Version: $Revision: 17212 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2014-02-06 15:16:54 -0600 (Thu, 06 Feb 2014) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/drvMAXv.h $ */ /* diff --git a/motorApp/OmsSrc/drvOms.cc b/motorApp/OmsSrc/drvOms.cc index a213ab2..47e4494 100644 --- a/motorApp/OmsSrc/drvOms.cc +++ b/motorApp/OmsSrc/drvOms.cc @@ -2,10 +2,6 @@ FILENAME... drvOms.cc USAGE... Driver level support for OMS models VME8, VME44, VS4 and VX2. -Version: $Revision: 17104 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2013-11-15 13:44:42 -0600 (Fri, 15 Nov 2013) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/drvOms.cc $ */ /* @@ -114,6 +110,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "drvOms.h" @@ -924,7 +922,7 @@ static int motorIsrEnable(int card) long status; status = pdevLibVirtualOS->pDevConnectInterruptVME( omsInterruptVector + card, -#if LT_EPICSBASE(3,14,8) +#if LT_EPICSBASE(3,14,8,0) (void (*)()) motorIsr, #else (void (*)(void *)) motorIsr, @@ -1013,7 +1011,7 @@ static void motorIsrDisable(int card) /*****************************************************/ RTN_STATUS omsSetup(int num_cards, /* maximum number of cards in rack */ - void *addrs, /* Base Address(0x0-0xb000 on 4K boundary) */ + void *addrs, /* Base Address(see README for details) */ unsigned vector,/* noninterrupting(0), valid vectors(64-255) */ int int_level, /* interrupt level (1-6) */ int scan_rate) /* polling rate - 1-60 Hz */ @@ -1172,16 +1170,16 @@ static int motor_init() irqdata->irqEnable = FALSE; pmotor->control = IRQ_RESET_ID; - send_mess(card_index, "EF", (char) NULL); - send_mess(card_index, ERROR_CLEAR, (char) NULL); - send_mess(card_index, STOP_ALL, (char) NULL); + send_mess(card_index, "EF", (char*) NULL); + send_mess(card_index, ERROR_CLEAR, (char*) NULL); + send_mess(card_index, STOP_ALL, (char*) NULL); - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); recv_mess(card_index, (char *) pmotorState->ident, 1); Debug(3, "Identification = %s\n", pmotorState->ident); - send_mess(card_index, ALL_POS, (char) NULL); + send_mess(card_index, ALL_POS, (char*) NULL); recv_mess(card_index, axis_pos, 1); for (total_axis = 0, pos_ptr = epicsStrtok_r(axis_pos, ",", &tok_save); diff --git a/motorApp/OmsSrc/drvOms.h b/motorApp/OmsSrc/drvOms.h index a4c7b1e..6a86a49 100644 --- a/motorApp/OmsSrc/drvOms.h +++ b/motorApp/OmsSrc/drvOms.h @@ -3,9 +3,6 @@ FILENAME... drvOms.h USAGE... This file contains OMS driver "include" information that is specific to OMS models VME8 and VME44. -Version: $Revision: 14915 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2012-07-26 14:18:18 -0500 (Thu, 26 Jul 2012) $ */ /* diff --git a/motorApp/OmsSrc/drvOms58.cc b/motorApp/OmsSrc/drvOms58.cc index 231f16f..f2d8261 100644 --- a/motorApp/OmsSrc/drvOms58.cc +++ b/motorApp/OmsSrc/drvOms58.cc @@ -2,10 +2,6 @@ FILENAME... drvOms58.cc USAGE... Motor record driver level support for OMS model VME58. -Version: $Revision: 14914 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2012-07-26 14:04:55 -0500 (Thu, 26 Jul 2012) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/drvOms58.cc $ */ /* @@ -115,6 +111,13 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- * .41 10-20-11 rls - Added counter in send_mess() to prevent endless loop * after VME58 reboot. * .42 07-26-12 rls - Added reboot test to send_mess(). + * .43 02-21-16 rls - Added code to send_mess() that test for a VME58 reboot + * after a motion related (ST, MA, MR) command. Found new + * VME58 failure mode where board reboots after the 1st + * motion related command. Since delay between motion + * command and reboot test must be long enough to avoid a + * VMEbus error, delay is excessive for normal operation. + * Hence, the oms58_reboot_test external variable. * */ @@ -129,6 +132,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motorRecord.h" /* For Driver Power Monitor feature only. */ #include "motor.h" @@ -136,6 +141,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include "drvOms58.h" #include "epicsExport.h" +#include "iocsh.h" #define PRIVATE_FUNCTIONS 1 /* normal:1, debug:0 */ @@ -169,6 +175,7 @@ static inline void Debug(int level, const char *format, ...) { /* Global data. */ int oms58_num_cards = 0; +int oms58_reboot_test = 0; /* Local data required for every driver; see "motordrvComCode.h" */ #include "motordrvComCode.h" @@ -722,7 +729,20 @@ static RTN_STATUS send_mess(int card, char const *com, char *name) Debug(4, "send_mess: sent card %d message:", card); Debug(4, "%s\n", outbuf); - pmotor->outPutIndex = putIndex; /* Message Sent */ + pmotor->outPutIndex = putIndex; /* Send message. */ + + if (oms58_reboot_test != 0) /* Test if board has rebooted after sending message. */ + { + epicsThreadSleep(0.300); + if (pmotor->rebootind != 0x4321) + { + errlogPrintf(rebootmsg, card); + /* Disable board. */ + motor_state[card] = (struct controller *)NULL; + epicsThreadSleep(1.0); + return (ERROR); + } + } for (count = 0; (putIndex != pmotor->outGetIndex) && (count < 1000); count++) { @@ -1050,7 +1070,7 @@ static int motorIsrSetup(int card) pmotor = (struct vmex_motor *) (motor_state[card]->localaddr); status = pdevLibVirtualOS->pDevConnectInterruptVME(omsInterruptVector + card, -#if LT_EPICSBASE(3,14,8) +#if LT_EPICSBASE(3,14,8,0) (void (*)()) motorIsr, #else (void (*)(void *)) motorIsr, @@ -1176,15 +1196,15 @@ static int motor_init() pmotor->control.cntrlReg = 0; /* Disable all interrupts */ pmotor->rebootind = 0x4321; /* Set reboot indicator (before send_mess call). */ - send_mess(card_index, "EF", (char) NULL); - send_mess(card_index, ERROR_CLEAR, (char) NULL); - send_mess(card_index, STOP_ALL, (char) NULL); + send_mess(card_index, "EF", (char*) NULL); + send_mess(card_index, ERROR_CLEAR, (char*) NULL); + send_mess(card_index, STOP_ALL, (char*) NULL); - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); recv_mess(card_index, (char *) pmotorState->ident, 1); Debug(3, "Identification = %s\n", pmotorState->ident); - send_mess(card_index, ALL_POS, (char) NULL); + send_mess(card_index, ALL_POS, (char*) NULL); recv_mess(card_index, axis_pos, 1); for (total_axis = 0, pos_ptr = epicsStrtok_r(axis_pos, ",", &tok_save); @@ -1338,4 +1358,30 @@ static void oms_reset(void *arg) } +/* Epics iocsh bindings */ + +static const iocshArg oms58Arg0 = {"num_card", iocshArgInt}; +static const iocshArg oms58Arg1 = {"addrs", iocshArgInt}; +static const iocshArg oms58Arg2 = {"vector", iocshArgInt}; +static const iocshArg oms58Arg3 = {"int_level", iocshArgInt}; +static const iocshArg oms58Arg4 = {"scan_rate", iocshArgInt}; + +static const iocshArg* const oms58Args[5] = {&oms58Arg0, &oms58Arg1, &oms58Arg2, &oms58Arg3, &oms58Arg4}; + +static const iocshFuncDef oms58FuncDef = {"oms58Setup", 5, oms58Args}; + +static void oms58CallFunc(const iocshArgBuf* args) +{ + oms58Setup(args[0].ival, (void*) args[1].ival, (unsigned) args[2].ival, args[3].ival, args[4].ival); +} + +void oms58Registrar(void) +{ + iocshRegister(&oms58FuncDef, &oms58CallFunc); +} + +extern "C"{ +epicsExportRegistrar(oms58Registrar); +} + /*---------------------------------------------------------------------*/ diff --git a/motorApp/OmsSrc/drvOms58.h b/motorApp/OmsSrc/drvOms58.h index 4774bd2..bb1b85a 100644 --- a/motorApp/OmsSrc/drvOms58.h +++ b/motorApp/OmsSrc/drvOms58.h @@ -3,10 +3,6 @@ FILENAME... drvOms58.h USAGE... OMS driver level "include" information that is specific to OMS model VME58. -Version: $Revision: 12209 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-01-26 13:13:47 -0600 (Wed, 26 Jan 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OmsSrc/drvOms58.h $ */ /* diff --git a/motorApp/OmsSrc/drvOmsCom.h b/motorApp/OmsSrc/drvOmsCom.h index f6a3217..6e837de 100644 --- a/motorApp/OmsSrc/drvOmsCom.h +++ b/motorApp/OmsSrc/drvOmsCom.h @@ -3,9 +3,6 @@ FILENAME... drvOmsCom.h USAGE... This file contains OMS driver "include" information that is common to all OMS models. -Version: $Revision: 10834 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-04-29 12:04:39 -0500 (Thu, 29 Apr 2010) $ */ /* diff --git a/motorApp/OmsSrc/drvOmsPC68.cc b/motorApp/OmsSrc/drvOmsPC68.cc index 45b9e05..1582ccd 100644 --- a/motorApp/OmsSrc/drvOmsPC68.cc +++ b/motorApp/OmsSrc/drvOmsPC68.cc @@ -2,9 +2,6 @@ FILENAME... drvOmsPC68.cc USAGE... Motor record driver level support for OMS PC68 serial device. -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ */ /* @@ -75,6 +72,8 @@ Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ #include #include #include +#include +#include #include "motor.h" #include "drvOmsPC68Com.h" @@ -771,7 +770,7 @@ static int motor_init() /* Try 3 times to connect to controller. */ do { - send_mess (card_index, GET_IDENT, (char) NULL); + send_mess (card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, (char *) pmotorState->ident, 1); retry++; } while (status == 0 && retry < 3); @@ -784,11 +783,11 @@ static int motor_init() pmotorState->motor_in_motion = 0; pmotorState->cmnd_response = false; - send_mess (card_index, ECHO_OFF, (char) NULL); - send_mess (card_index, ERROR_CLEAR, (char) NULL); - send_mess (card_index, STOP_ALL, (char) NULL); + send_mess (card_index, ECHO_OFF, (char*) NULL); + send_mess (card_index, ERROR_CLEAR, (char*) NULL); + send_mess (card_index, STOP_ALL, (char*) NULL); - send_mess (card_index, ALL_POS, (char) NULL); + send_mess (card_index, ALL_POS, (char*) NULL); recv_mess (card_index, axis_pos, 1); for (total_axis = 0, pos_ptr = epicsStrtok_r(axis_pos, ",", &tok_save); @@ -823,7 +822,7 @@ static int motor_init() * dummy communication transaction. */ - send_mess (card_index, ALL_POS, (char) NULL); + send_mess (card_index, ALL_POS, (char*) NULL); recv_mess (card_index, axis_pos, 1); for (motor_index=0;motor_index #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -53,7 +51,7 @@ extern struct driver_table EMC18011_access; /* ----------------Create the dsets for devEMC18011----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long EMC18011_init(void *); +STATIC long EMC18011_init(int); STATIC long EMC18011_init_record(void *); STATIC long EMC18011_start_trans(struct motorRecord *); STATIC RTN_STATUS EMC18011_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -107,12 +105,11 @@ static struct board_stat **EMC18011_cards; /* initialize device support for EMC18011 stepper motor */ -STATIC long EMC18011_init(void *arg) +STATIC long EMC18011_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &EMC18011_access; (drvtabptr->init)(); diff --git a/motorApp/OrielSrc/drvEMC18011.cc b/motorApp/OrielSrc/drvEMC18011.cc index 30d731f..ae1313b 100644 --- a/motorApp/OrielSrc/drvEMC18011.cc +++ b/motorApp/OrielSrc/drvEMC18011.cc @@ -3,10 +3,6 @@ FILENAME... drvEMC18011.cc USAGE... Motor record driver level support for Spectra-Physics Encoder Mike Controller (Model: 18011) -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/OrielSrc/drvEMC18011.cc $ */ /* @@ -47,6 +43,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "OrielRegister.h" #include "drvEMC18011.h" @@ -383,7 +381,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strncpy(send_buff, nodeptr->postmsgptr, 80); - send_mess(card, send_buff, (char) NULL); + send_mess(card, send_buff, (char*) NULL); nodeptr->postmsgptr = NULL; } diff --git a/motorApp/OrielSrc/drvEMC18011.h b/motorApp/OrielSrc/drvEMC18011.h index 17b7700..8f0f205 100644 --- a/motorApp/OrielSrc/drvEMC18011.h +++ b/motorApp/OrielSrc/drvEMC18011.h @@ -3,9 +3,6 @@ FILENAME... drvEMC18011.h USAGE... This file contains Parker Compumotor driver "include" information that is specific to the 6K series serial controller -Version: $Revision: 1.3 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-11-02 21:05:56 $ */ /* diff --git a/motorApp/PC6KSrc/ParkerRegister.cc b/motorApp/PC6KSrc/ParkerRegister.cc index c5230ca..4ce21a4 100644 --- a/motorApp/PC6KSrc/ParkerRegister.cc +++ b/motorApp/PC6KSrc/ParkerRegister.cc @@ -2,9 +2,6 @@ FILENAME... ParkerRegister.cc USAGE... Register Parker/Compumotor motor device driver shell commands. -Version: $Revision: 1.2 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-08-31 15:42:31 $ */ /***************************************************************** diff --git a/motorApp/PC6KSrc/devPC6K.cc b/motorApp/PC6KSrc/devPC6K.cc index 963ba02..86d81c8 100644 --- a/motorApp/PC6KSrc/devPC6K.cc +++ b/motorApp/PC6KSrc/devPC6K.cc @@ -2,9 +2,6 @@ FILENAME... devPC6K.cc USAGE... Motor record device level support for Parker Compumotor drivers -Version: $Revision: 1.4 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:19:43 $ */ /* @@ -40,6 +37,7 @@ Last Modified: $Date: 2008-03-14 20:19:43 $ #include #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -52,7 +50,7 @@ extern struct driver_table PC6K_access; /* ----------------Create the dsets for devPC6K----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long PC6K_init(void *); +STATIC long PC6K_init(int); STATIC long PC6K_init_record(void *); STATIC long PC6K_start_trans(struct motorRecord *); STATIC RTN_STATUS PC6K_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -106,12 +104,11 @@ static struct board_stat **PC6K_cards; /* initialize device support for PC6K stepper motor */ -STATIC long PC6K_init(void *arg) +STATIC long PC6K_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PC6K_access; (drvtabptr->init)(); diff --git a/motorApp/PC6KSrc/drvPC6K.cc b/motorApp/PC6KSrc/drvPC6K.cc index cf13507..7da4fb9 100644 --- a/motorApp/PC6KSrc/drvPC6K.cc +++ b/motorApp/PC6KSrc/drvPC6K.cc @@ -3,10 +3,6 @@ FILENAME... drvPC6K.cc USAGE... Motor record driver level support for Parker Computmotor 6K Series motor controllers -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/PC6KSrc/drvPC6K.cc $ */ /* @@ -47,6 +43,8 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#include +#include #include "motor.h" #include "ParkerRegister.h" #include "drvPC6K.h" @@ -433,7 +431,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strncpy(send_buff, nodeptr->postmsgptr, 80); - send_mess(card, send_buff, (char) NULL); + send_mess(card, send_buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -706,12 +704,12 @@ PC6KUpLoad(int card, /* Controller Number */ /* Copy file into PC6K Program */ sprintf(nextLine, "DEL %s", progName); // recvCnt = send_recv_mess(card, nextLine, replyBuff); - send_mess(card, nextLine, (char) NULL); + send_mess(card, nextLine, (char*) NULL); // eos_ptr = eos_str; sprintf(nextLine, "DEF %s", progName); // recvCnt = send_recv_mess(card, nextLine, replyBuff, eos_ptr); // recvCnt = send_recv_mess(card, nextLine, replyBuff); - send_mess(card, nextLine, (char) NULL); + send_mess(card, nextLine, (char*) NULL); } while (fgets(nextLine, BUFF_SIZE, fd) != NULL) @@ -723,7 +721,7 @@ PC6KUpLoad(int card, /* Controller Number */ // recvCnt = send_recv_mess(card, nextLine, replyBuff, eos_ptr); // recvCnt = send_recv_mess(card, nextLine, replyBuff); - send_mess(card, nextLine, (char) NULL); + send_mess(card, nextLine, (char*) NULL); } fclose(fd); @@ -731,7 +729,7 @@ PC6KUpLoad(int card, /* Controller Number */ if (progName && strlen(progName)) /* End PC6K Program */ // recvCnt = send_recv_mess(card, "END", replyBuff); - send_mess(card, "END", (char) NULL); + send_mess(card, "END", (char*) NULL); return(OK); } @@ -834,7 +832,7 @@ static int motor_init() } while (!recvCnt && ++retryCnt < 3); - /* send_mess(card_index, COMEXEC_ENA, (char) NULL); */ /* Enable continuous commands */ + /* send_mess(card_index, COMEXEC_ENA, (char*) NULL); */ /* Enable continuous commands */ send_recv_mess(card_index, COMEXEC_ENA, buff); /* Enable continuous commands */ // send_recv_mess(card_index, CMD_SCALE, buff); /* Enable scaling - unary */ diff --git a/motorApp/PC6KSrc/drvPC6K.h b/motorApp/PC6KSrc/drvPC6K.h index 516b482..fe17cb8 100644 --- a/motorApp/PC6KSrc/drvPC6K.h +++ b/motorApp/PC6KSrc/drvPC6K.h @@ -3,9 +3,6 @@ FILENAME... drvPC6K.h USAGE... This file contains Parker Compumotor driver "include" information that is specific to the 6K series serial controller -Version: $Revision: 1.2 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-08-31 15:42:31 $ */ /* diff --git a/motorApp/PIGCS2Src/PIC702Controller.cpp b/motorApp/PIGCS2Src/PIC702Controller.cpp index 72a65cb..2478cc0 100644 --- a/motorApp/PIGCS2Src/PIC702Controller.cpp +++ b/motorApp/PIGCS2Src/PIC702Controller.cpp @@ -8,10 +8,6 @@ USAGE... * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 2$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau Created: January 2011 diff --git a/motorApp/PIGCS2Src/PIC702Controller.h b/motorApp/PIGCS2Src/PIC702Controller.h index ebcc269..183ce0a 100644 --- a/motorApp/PIGCS2Src/PIC702Controller.h +++ b/motorApp/PIGCS2Src/PIC702Controller.h @@ -7,10 +7,6 @@ FILENAME... PIC702Controller.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 2$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau */ diff --git a/motorApp/PIGCS2Src/PIE517Controller.cpp b/motorApp/PIGCS2Src/PIE517Controller.cpp index 0d9f764..daa59bc 100644 --- a/motorApp/PIGCS2Src/PIE517Controller.cpp +++ b/motorApp/PIGCS2Src/PIE517Controller.cpp @@ -7,10 +7,6 @@ FILENAME... PIGCSPiezoController * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 3$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 diff --git a/motorApp/PIGCS2Src/PIE517Controller.h b/motorApp/PIGCS2Src/PIE517Controller.h index 335af9e..ddcd765 100644 --- a/motorApp/PIGCS2Src/PIE517Controller.h +++ b/motorApp/PIGCS2Src/PIE517Controller.h @@ -7,10 +7,6 @@ FILENAME... PIGCScontroller.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 3$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 diff --git a/motorApp/PIGCS2Src/PIE755Controller.cpp b/motorApp/PIGCS2Src/PIE755Controller.cpp index ec56007..216af21 100644 --- a/motorApp/PIGCS2Src/PIE755Controller.cpp +++ b/motorApp/PIGCS2Src/PIE755Controller.cpp @@ -7,10 +7,6 @@ FILENAME... PIE755Controller.cpp * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 1$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 23.09.2013 14:19:03$ -HeadURL: $URL$ Original Author: Steffen Rau */ diff --git a/motorApp/PIGCS2Src/PIE755Controller.h b/motorApp/PIGCS2Src/PIE755Controller.h index b30db9f..c9caf48 100644 --- a/motorApp/PIGCS2Src/PIE755Controller.h +++ b/motorApp/PIGCS2Src/PIE755Controller.h @@ -7,10 +7,6 @@ FILENAME... PIE755Controller.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 2$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau */ diff --git a/motorApp/PIGCS2Src/PIGCS2_HexapodController.cpp b/motorApp/PIGCS2Src/PIGCS2_HexapodController.cpp index c6e4014..32c018f 100644 --- a/motorApp/PIGCS2Src/PIGCS2_HexapodController.cpp +++ b/motorApp/PIGCS2Src/PIGCS2_HexapodController.cpp @@ -7,10 +7,6 @@ FILENAME... PIHexapodController.cpp * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 1$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 05.11.2013 17:38:06$ -HeadURL: $URL$ Original Author: Steffen Rau */ diff --git a/motorApp/PIGCS2Src/PIGCS2_HexapodController.h b/motorApp/PIGCS2Src/PIGCS2_HexapodController.h index 1bdf38f..b070d24 100644 --- a/motorApp/PIGCS2Src/PIGCS2_HexapodController.h +++ b/motorApp/PIGCS2Src/PIGCS2_HexapodController.h @@ -7,10 +7,6 @@ FILENAME... PIHexapodController.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 1$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 05.11.2013 17:38:06$ -HeadURL: $URL$ Original Author: Steffen Rau */ diff --git a/motorApp/PIGCS2Src/PIGCSController.cpp b/motorApp/PIGCS2Src/PIGCSController.cpp index dfb537e..1184c0a 100644 --- a/motorApp/PIGCS2Src/PIGCSController.cpp +++ b/motorApp/PIGCS2Src/PIGCSController.cpp @@ -7,10 +7,6 @@ FILENAME... PIGCSController.cpp * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 6$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 05.11.2013 17:38:32$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 @@ -48,6 +44,10 @@ PIGCSController* PIGCSController::CreateGCSController(PIInterface* pInterface, c if ( strstr(szIDN, "C-663") != NULL || strstr(szIDN, "C-863") != NULL || strstr(szIDN, "C-867") != NULL + || strstr(szIDN, "C-884") != NULL + || strstr(szIDN, "E-861") != NULL + || strstr(szIDN, "E-871") != NULL + || strstr(szIDN, "E-873") != NULL ) { return new PIGCSMotorController(pInterface, szIDN); @@ -58,7 +58,10 @@ PIGCSController* PIGCSController::CreateGCSController(PIInterface* pInterface, c } else if ( strstr(szIDN, "E-753") != NULL || strstr(szIDN, "E-709") != NULL - ) + || strstr(szIDN, "E-712") != NULL + || strstr(szIDN, "E-725") != NULL + || strstr(szIDN, "E-727") != NULL + ) { return new PIGCSPiezoController(pInterface, szIDN); } @@ -110,6 +113,10 @@ bool PIGCSController::IsGCS2(PIInterface* pInterface) asynStatus PIGCSController::setVelocityCts( PIasynAxis* pAxis, double velocity ) { + if (!m_KnowsVELcommand) + { + return asynSuccess; + } char cmd[100]; velocity = fabs(velocity) * pAxis->m_CPUdenominator / pAxis->m_CPUnumerator; sprintf(cmd,"VEL %s %f", pAxis->m_szAxisName, velocity); @@ -246,17 +253,21 @@ int PIGCSController::getGCSError() if (0 != errorCode) { m_LastError = errorCode; - asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_ERROR|ASYN_TRACE_FLOW, - "PIGCSController::getGCSError() GCS error code = %d\n", - errorCode); - char szErrorMsg[1024]; - if (TranslatePIError(errorCode, szErrorMsg, 1024)) - { - asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_ERROR|ASYN_TRACE_FLOW, - "PIGCSController::getGCSError() GCS error, %s\n", - szErrorMsg); - - } + if (m_pInterface->m_pCurrentLogSink) + { + asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_ERROR|ASYN_TRACE_FLOW, + "PIGCSController::getGCSError() GCS error code = %d\n", + errorCode); + + char szErrorMsg[1024]; + if (TranslatePIError(errorCode, szErrorMsg, 1024)) + { + asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_ERROR|ASYN_TRACE_FLOW, + "PIGCSController::getGCSError() GCS error, %s\n", + szErrorMsg); + + } + } } return errorCode; } @@ -307,6 +318,10 @@ asynStatus PIGCSController::getAxisPosition(PIasynAxis* pAxis, double& position) */ asynStatus PIGCSController::getAxisVelocity(PIasynAxis* pAxis) { + if (!m_KnowsVELcommand) + { + return asynSuccess; + } char cmd[100]; char buf[255]; sprintf(cmd, "VEL? %s", pAxis->m_szAxisName); @@ -442,7 +457,7 @@ asynStatus PIGCSController::getAxisPositionCts(PIasynAxis* pAxis) pAxis->m_position = pos; if (pAxis->m_CPUdenominator==0 || pAxis->m_CPUnumerator==0) { - pAxis->m_positionCts = pos; + pAxis->m_positionCts = int(pos); return status; } @@ -576,7 +591,7 @@ asynStatus PIGCSController::initAxis(PIasynAxis* pAxis) asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_FLOW, "PIGCSController::initAxis() stage configuration: %s\n", buf); } - pAxis->m_movingStateMask = pow(2.0, pAxis->getAxisNo()); + pAxis->m_movingStateMask = int (pow(2.0, pAxis->getAxisNo()) ); return setServo(pAxis, 1); } @@ -584,6 +599,15 @@ asynStatus PIGCSController::initAxis(PIasynAxis* pAxis) asynStatus PIGCSController::init(void) { asynStatus status; + char buffer [1024]; + status = m_pInterface->sendAndReceive("VEL?", buffer, 1023); + m_KnowsVELcommand = ( asynSuccess == status); + if (!m_KnowsVELcommand) + { + (void) getGCSError (); + } + + status = findConnectedAxes(); return status; } diff --git a/motorApp/PIGCS2Src/PIGCSController.h b/motorApp/PIGCS2Src/PIGCSController.h index 433adee..29db5fb 100644 --- a/motorApp/PIGCS2Src/PIGCSController.h +++ b/motorApp/PIGCS2Src/PIGCSController.h @@ -7,10 +7,6 @@ FILENAME... PIGCScontroller.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 5$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 05.11.2013 17:38:32$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 @@ -113,6 +109,8 @@ class PIGCSController size_t m_nrFoundAxes; char m_allAxesIDs[255]; int m_LastError; + + bool m_KnowsVELcommand; }; #endif /* PIGCSCONTROLLER_H_ */ diff --git a/motorApp/PIGCS2Src/PIGCSMotorController.cpp b/motorApp/PIGCS2Src/PIGCSMotorController.cpp index 7bdfd36..78e320f 100644 --- a/motorApp/PIGCS2Src/PIGCSMotorController.cpp +++ b/motorApp/PIGCS2Src/PIGCSMotorController.cpp @@ -7,10 +7,6 @@ FILENAME... PIGCSMotorController.cpp * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 2$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 @@ -28,87 +24,87 @@ Created: 15.12.2010 asynStatus PIGCSMotorController::initAxis(PIasynAxis* pAxis) { - asynStatus status = hasLimitSwitches(pAxis); - if (asynSuccess != status) - { - return status; - } - status = hasReferenceSensor(pAxis); - if (asynSuccess != status) - { - return status; - } - return PIGCSController::initAxis(pAxis); + asynStatus status = hasLimitSwitches(pAxis); + if (asynSuccess != status) + { + return status; + } + status = hasReferenceSensor(pAxis); + if (asynSuccess != status) + { + return status; + } + return PIGCSController::initAxis(pAxis); } asynStatus PIGCSMotorController::setAccelerationCts( PIasynAxis* pAxis, double accelerationCts) { - double acceleration = fabs(accelerationCts) * pAxis->m_CPUdenominator / pAxis->m_CPUnumerator; - if (acceleration == pAxis->m_acceleration) - return asynSuccess; - if (pAxis->m_maxAcceleration < 0) - { - getMaxAcceleration(pAxis); - } - if (acceleration > pAxis->m_maxAcceleration) - acceleration = pAxis->m_maxAcceleration; - - return setAcceleration(pAxis, acceleration); + double acceleration = fabs(accelerationCts) * pAxis->m_CPUdenominator / pAxis->m_CPUnumerator; + if (acceleration == pAxis->m_acceleration) + return asynSuccess; + if (pAxis->m_maxAcceleration < 0) + { + getMaxAcceleration(pAxis); + } + if (acceleration > pAxis->m_maxAcceleration) + acceleration = pAxis->m_maxAcceleration; + + return setAcceleration(pAxis, acceleration); } asynStatus PIGCSMotorController::referenceVelCts( PIasynAxis* pAxis, double velocity, int forwards) { - asynStatus status = setServo(pAxis, 1); + asynStatus status = setServo(pAxis, 1); if (asynSuccess != status) - return status; - - char cmd[100]; - if (velocity != 0) - { - velocity = fabs(velocity) * pAxis->m_CPUdenominator / pAxis->m_CPUnumerator; - sprintf(cmd,"SPA %s 0x50 %f", pAxis->m_szAxisName, velocity); - m_pInterface->sendOnly(cmd); - } - - if (pAxis->m_bHasReference) - { - // call FRF - find reference - sprintf(cmd,"FRF %s", pAxis->m_szAxisName); - } - else if (pAxis->m_bHasLimitSwitches) - { - if (forwards) - { - // call FPL - find positive limit switch - sprintf(cmd,"FPL %s", pAxis->m_szAxisName); - } - else - { - // call FNL - find negative limit switch - sprintf(cmd,"FNL %s", pAxis->m_szAxisName); - } - } - else - { - asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_ERROR, - "PIGCSMotorController::referenceVelCts() failed - axis has no reference/limit switch\n"); - epicsSnprintf(pAxis->m_pasynUser->errorMessage,pAxis->m_pasynUser->errorMessageSize, - "PIGCSMotorController::referenceVelCts() failed - axis has no reference/limit switch\n"); - return asynError; - } - status = m_pInterface->sendOnly(cmd); - if (asynSuccess != status) - return status; - int errorCode = getGCSError(); - if (errorCode == 0) - { - return asynSuccess; - } + return status; + + char cmd[100]; + if (velocity != 0) + { + velocity = fabs(velocity) * pAxis->m_CPUdenominator / pAxis->m_CPUnumerator; + sprintf(cmd,"SPA %s 0x50 %f", pAxis->m_szAxisName, velocity); + m_pInterface->sendOnly(cmd); + } + + if (pAxis->m_bHasReference) + { + // call FRF - find reference + sprintf(cmd,"FRF %s", pAxis->m_szAxisName); + } + else if (pAxis->m_bHasLimitSwitches) + { + if (forwards) + { + // call FPL - find positive limit switch + sprintf(cmd,"FPL %s", pAxis->m_szAxisName); + } + else + { + // call FNL - find negative limit switch + sprintf(cmd,"FNL %s", pAxis->m_szAxisName); + } + } + else + { + asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_ERROR, + "PIGCSMotorController::referenceVelCts() failed - axis has no reference/limit switch\n"); + epicsSnprintf(pAxis->m_pasynUser->errorMessage,pAxis->m_pasynUser->errorMessageSize, + "PIGCSMotorController::referenceVelCts() failed - axis has no reference/limit switch\n"); + return asynError; + } + status = m_pInterface->sendOnly(cmd); + if (asynSuccess != status) + return status; + int errorCode = getGCSError(); + if (errorCode == 0) + { + return asynSuccess; + } asynPrint(m_pInterface->m_pCurrentLogSink, ASYN_TRACE_ERROR, - "PIGCSMotorController::referenceVelCts() failed\n"); - epicsSnprintf(pAxis->m_pasynUser->errorMessage,pAxis->m_pasynUser->errorMessageSize, - "PIGCSMotorController::referenceVelCts() failed - GCS Error %d\n",errorCode); - return asynError; + "PIGCSMotorController::referenceVelCts() failed\n"); + epicsSnprintf(pAxis->m_pasynUser->errorMessage,pAxis->m_pasynUser->errorMessageSize, + "PIGCSMotorController::referenceVelCts() failed - GCS Error %d\n",errorCode); + return asynError; } @@ -117,18 +113,18 @@ asynStatus PIGCSMotorController::referenceVelCts( PIasynAxis* pAxis, double velo */ asynStatus PIGCSMotorController::getResolution(PIasynAxis* pAxis, double& resolution ) { - // CPU is "Counts Per Unit" - // this is stored as two integers in the controller + // CPU is "Counts Per Unit" + // this is stored as two integers in the controller double num, denom; asynStatus status = getGCSParameter(pAxis, PI_PARA_MOT_CPU_Z, num); if (status != asynSuccess) { - return status; + return status; } status = getGCSParameter(pAxis, PI_PARA_MOT_CPU_N, denom); if (status != asynSuccess) { - return status; + return status; } pAxis->m_CPUnumerator = num; pAxis->m_CPUdenominator = denom; @@ -139,11 +135,11 @@ asynStatus PIGCSMotorController::getResolution(PIasynAxis* pAxis, double& resolu asynStatus PIGCSMotorController::getStatus(PIasynAxis* pAxis, int& homing, int& moving, int& negLimit, int& posLimit, int& servoControl) { - char buf[255]; + char buf[255]; asynStatus status = m_pInterface->sendAndReceive(char(4), buf, 99); if (status != asynSuccess) { - return status; + return status; } // TODO this is for a single axis C-863/867 controller!!!! // TODO a) change it to multi-axis code. @@ -167,35 +163,43 @@ asynStatus PIGCSMotorController::getStatus(PIasynAxis* pAxis, int& homing, int& asynStatus PIGCSMotorController::getMaxAcceleration(PIasynAxis* pAxis) { - double maxAcc, maxDec; - asynStatus status = getGCSParameter(pAxis, PI_PARA_MOT_MAX_ACCEL, maxAcc); - if (asynSuccess != status) - return status; - status = getGCSParameter(pAxis, PI_PARA_MOT_MAX_DECEL, maxDec); - if (asynSuccess != status) - return status; - - if (maxAcc < maxDec) - { - pAxis->m_maxAcceleration = maxAcc; - } - else - { - pAxis->m_maxAcceleration = maxDec; - } - return status; + if (!m_KnowsVELcommand) + { + return asynSuccess; + } + double maxAcc, maxDec; + asynStatus status = getGCSParameter(pAxis, PI_PARA_MOT_MAX_ACCEL, maxAcc); + if (asynSuccess != status) + return status; + status = getGCSParameter(pAxis, PI_PARA_MOT_MAX_DECEL, maxDec); + if (asynSuccess != status) + return status; + + if (maxAcc < maxDec) + { + pAxis->m_maxAcceleration = maxAcc; + } + else + { + pAxis->m_maxAcceleration = maxDec; + } + return status; } asynStatus PIGCSMotorController::setAcceleration( PIasynAxis* pAxis, double acceleration) { - asynStatus status = setGCSParameter(pAxis, PI_PARA_MOT_CURR_ACCEL, acceleration); - if (asynSuccess != status) - return status; - status = setGCSParameter(pAxis, PI_PARA_MOT_CURR_DECEL, acceleration); - if (asynSuccess != status) - return status; - pAxis->m_acceleration = acceleration; - return status; + if (!m_KnowsVELcommand) + { + return asynSuccess; + } + asynStatus status = setGCSParameter(pAxis, PI_PARA_MOT_CURR_ACCEL, acceleration); + if (asynSuccess != status) + return status; + status = setGCSParameter(pAxis, PI_PARA_MOT_CURR_DECEL, acceleration); + if (asynSuccess != status) + return status; + pAxis->m_acceleration = acceleration; + return status; } diff --git a/motorApp/PIGCS2Src/PIGCSMotorController.h b/motorApp/PIGCS2Src/PIGCSMotorController.h index 4731a3d..4c8430a 100644 --- a/motorApp/PIGCS2Src/PIGCSMotorController.h +++ b/motorApp/PIGCS2Src/PIGCSMotorController.h @@ -7,10 +7,6 @@ FILENAME... PIGCSMotorController.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 2$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 diff --git a/motorApp/PIGCS2Src/PIGCSPiezoController.cpp b/motorApp/PIGCS2Src/PIGCSPiezoController.cpp index ab486fd..6578462 100644 --- a/motorApp/PIGCS2Src/PIGCSPiezoController.cpp +++ b/motorApp/PIGCS2Src/PIGCSPiezoController.cpp @@ -7,10 +7,6 @@ FILENAME... PIGCSPiezoController.cpp * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 3$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 diff --git a/motorApp/PIGCS2Src/PIGCSPiezoController.h b/motorApp/PIGCS2Src/PIGCSPiezoController.h index b9b343e..19ce655 100644 --- a/motorApp/PIGCS2Src/PIGCSPiezoController.h +++ b/motorApp/PIGCS2Src/PIGCSPiezoController.h @@ -7,10 +7,6 @@ FILENAME... PIGCScontroller.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 3$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 diff --git a/motorApp/PIGCS2Src/PIHexapodController.cpp b/motorApp/PIGCS2Src/PIHexapodController.cpp index 62e450c..a705cae 100644 --- a/motorApp/PIGCS2Src/PIHexapodController.cpp +++ b/motorApp/PIGCS2Src/PIHexapodController.cpp @@ -7,10 +7,6 @@ FILENAME... PIHexapodController.cpp * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 5$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 05.11.2013 17:38:32$ -HeadURL: $URL$ Original Author: Steffen Rau */ diff --git a/motorApp/PIGCS2Src/PIHexapodController.h b/motorApp/PIGCS2Src/PIHexapodController.h index 1dcdb4f..fc11048 100644 --- a/motorApp/PIGCS2Src/PIHexapodController.h +++ b/motorApp/PIGCS2Src/PIHexapodController.h @@ -7,10 +7,6 @@ FILENAME... PIHexapodController.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 3$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 05.11.2013 17:38:32$ -HeadURL: $URL$ Original Author: Steffen Rau */ diff --git a/motorApp/PIGCS2Src/PIInterface.cpp b/motorApp/PIGCS2Src/PIInterface.cpp index dbef790..f4ec484 100644 --- a/motorApp/PIGCS2Src/PIInterface.cpp +++ b/motorApp/PIGCS2Src/PIInterface.cpp @@ -7,10 +7,6 @@ FILENAME... PIInterface.cpp * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 1$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:42:52$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 diff --git a/motorApp/PIGCS2Src/PIInterface.h b/motorApp/PIGCS2Src/PIInterface.h index 659b629..47538d7 100644 --- a/motorApp/PIGCS2Src/PIInterface.h +++ b/motorApp/PIGCS2Src/PIInterface.h @@ -7,10 +7,6 @@ FILENAME... PIInterface.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 1$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:42:52$ -HeadURL: $URL$ Original Author: Steffen Rau Created: 15.12.2010 diff --git a/motorApp/PIGCS2Src/PI_GCS2Support.dbd b/motorApp/PIGCS2Src/PI_GCS2Support.dbd index 0252e01..8d3ca9e 100644 --- a/motorApp/PIGCS2Src/PI_GCS2Support.dbd +++ b/motorApp/PIGCS2Src/PI_GCS2Support.dbd @@ -1,5 +1,3 @@ -include "asyn.dbd" -include "motorRecord.dbd" ##device(motor,VME_IO,devPIasyn,"PI Motor GCS2") ##driver(PIasyn) registrar(PIasynDriverRegister) diff --git a/motorApp/PIGCS2Src/PIasynAxis.cpp b/motorApp/PIGCS2Src/PIasynAxis.cpp index 3dcd191..9539e89 100644 --- a/motorApp/PIGCS2Src/PIasynAxis.cpp +++ b/motorApp/PIGCS2Src/PIasynAxis.cpp @@ -8,10 +8,6 @@ USAGE... * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 4$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau @@ -86,7 +82,7 @@ void PIasynAxis::Init(const char *portName) } m_pGCSController->m_pInterface->m_pCurrentLogSink = logSink; - setIntegerParam(motorAxisHasClosedLoop, 1); + setIntegerParam(pController_->motorStatusGainSupport_, 1); m_pGCSController->initAxis(this); double resolution; diff --git a/motorApp/PIGCS2Src/PIasynAxis.h b/motorApp/PIGCS2Src/PIasynAxis.h index 1e3bc20..41e4fc8 100644 --- a/motorApp/PIGCS2Src/PIasynAxis.h +++ b/motorApp/PIGCS2Src/PIasynAxis.h @@ -8,10 +8,6 @@ USAGE... PI GCS Motor Support. * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 2$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 09.10.2013 16:34:01$ -HeadURL: $URL$ Original Author: Steffen Rau Created: January 2011 diff --git a/motorApp/PIGCS2Src/PIasynController.cpp b/motorApp/PIGCS2Src/PIasynController.cpp index a627876..ca9b0e1 100644 --- a/motorApp/PIGCS2Src/PIasynController.cpp +++ b/motorApp/PIGCS2Src/PIasynController.cpp @@ -8,10 +8,6 @@ USAGE... PI GCS2 Motor Support. * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 4$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 25.10.2013 10:43:08$ -HeadURL: $URL$ Original Author: Steffen Rau Created: January 2011 @@ -401,7 +397,7 @@ asynStatus PIasynController::configAxis(PIasynAxis *pAxis) } m_pGCSController->m_pInterface->m_pCurrentLogSink = logSink; - pAxis->setIntegerParam(motorAxisHasClosedLoop, 1); + pAxis->setIntegerParam(this->motorStatusGainSupport_, 1); pAxis->callParamCallbacks(); m_pGCSController->initAxis(pAxis); diff --git a/motorApp/PIGCS2Src/PIasynController.h b/motorApp/PIGCS2Src/PIasynController.h index 4c80e79..a6961b9 100644 --- a/motorApp/PIGCS2Src/PIasynController.h +++ b/motorApp/PIGCS2Src/PIasynController.h @@ -7,10 +7,6 @@ FILENAME... PIasynController.cpp * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 1$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 23.09.2013 14:19:03$ -HeadURL: $URL$ Based on drvMotorSim.c diff --git a/motorApp/PIGCS2Src/picontrollererrors.h b/motorApp/PIGCS2Src/picontrollererrors.h index 716ba99..c417346 100644 --- a/motorApp/PIGCS2Src/picontrollererrors.h +++ b/motorApp/PIGCS2Src/picontrollererrors.h @@ -7,10 +7,6 @@ FILENAME... picontrollererrors.h * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 1$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 23.09.2013 14:19:03$ -HeadURL: $URL$ Original Author: Steffen Rau, January 2011 */ diff --git a/motorApp/PIGCS2Src/translateerror.c b/motorApp/PIGCS2Src/translateerror.c index 5dee0e7..8c1828d 100644 --- a/motorApp/PIGCS2Src/translateerror.c +++ b/motorApp/PIGCS2Src/translateerror.c @@ -7,10 +7,6 @@ FILENAME... translateerror.c * found in the file LICENSE that is included with this distribution. ************************************************************************* -Version: $Revision: 1$ -Modified By: $Author: Steffen Rau$ -Last Modified: $Date: 23.09.2013 14:19:03$ -HeadURL: $URL$ Original Author: Steffen Rau */ diff --git a/motorApp/PhytronSrc/phytronAxisMotor.cpp b/motorApp/PhytronSrc/phytronAxisMotor.cpp index 95e5f28..3323124 100644 --- a/motorApp/PhytronSrc/phytronAxisMotor.cpp +++ b/motorApp/PhytronSrc/phytronAxisMotor.cpp @@ -5,10 +5,6 @@ USAGE... Motor driver support for Phytron Axis controller. Tom Slejko & Bor Marolt Cosylab d.d. 2014 -Version: $Revision: 18549 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2015-01-07 08:56:44 -0600 (Wed, 07 Jan 2015) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/PhytronSrc/phytronAxisMotor.cpp $ */ #include @@ -19,7 +15,9 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- #include #include #include +#ifndef _WIN32 #include +#endif #include #include diff --git a/motorApp/PhytronSrc/phytronAxisMotor.h b/motorApp/PhytronSrc/phytronAxisMotor.h index d048a1e..7315e69 100644 --- a/motorApp/PhytronSrc/phytronAxisMotor.h +++ b/motorApp/PhytronSrc/phytronAxisMotor.h @@ -5,10 +5,6 @@ USAGE... Motor record support for Phytron Axis controller. Tom Slejko & Bor Marolt Cosylab d.d. 2014 -Version: $Revision: 18549 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2015-01-07 08:56:44 -0600 (Wed, 07 Jan 2015) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/PhytronSrc/phytronAxisMotor.h $ */ #include "asynMotorController.h" diff --git a/motorApp/PiJenaSrc/PIJEDS_Register.cc b/motorApp/PiJenaSrc/PIJEDS_Register.cc index c9a4120..01967de 100644 --- a/motorApp/PiJenaSrc/PIJEDS_Register.cc +++ b/motorApp/PiJenaSrc/PIJEDS_Register.cc @@ -2,9 +2,6 @@ FILENAME... PIJEDS_Register.cc USAGE... Register piezosystem jena motor device driver shell commands. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2007-06-14 15:56:59 $ */ /***************************************************************** diff --git a/motorApp/PiJenaSrc/devPIJEDS.cc b/motorApp/PiJenaSrc/devPIJEDS.cc index c3f79a9..4ceb774 100644 --- a/motorApp/PiJenaSrc/devPIJEDS.cc +++ b/motorApp/PiJenaSrc/devPIJEDS.cc @@ -3,9 +3,6 @@ FILENAME... devPIJEDS.cc USAGE... Motor record device level support for Physik Instrumente (PI) GmbH & Co. E-516 motor controller. -Version: $Revision: 1.2 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:20:03 $ */ /* @@ -40,6 +37,7 @@ Last Modified: $Date: 2008-03-14 20:20:03 $ #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -50,7 +48,7 @@ extern struct driver_table PIJEDS_access; /* ----------------Create the dsets for devPIJEDS----------------- */ static struct driver_table *drvtabptr; -static long PIJEDS_init(void *); +static long PIJEDS_init(int); static long PIJEDS_init_record(void *); static long PIJEDS_start_trans(struct motorRecord *); static RTN_STATUS PIJEDS_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -104,12 +102,11 @@ static struct board_stat **PIJEDS_cards; /* initialize device support for PIJEDS stepper motor */ -static long PIJEDS_init(void *arg) +static long PIJEDS_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIJEDS_access; (drvtabptr->init)(); diff --git a/motorApp/PiJenaSrc/drvPIJEDS.cc b/motorApp/PiJenaSrc/drvPIJEDS.cc index aed0d63..9f18c38 100644 --- a/motorApp/PiJenaSrc/drvPIJEDS.cc +++ b/motorApp/PiJenaSrc/drvPIJEDS.cc @@ -3,10 +3,6 @@ FILENAME... drvPIJEDS.cc USAGE... Motor record driver level support for piezosystem jena GmbH & Co. E-516 motor controller. -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/PiJenaSrc/drvPIJEDS.cc $*/ /* * Original Author: Joe Sullivan @@ -48,6 +44,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "drvPIJEDS.h" @@ -392,7 +390,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -614,7 +612,7 @@ static int motor_init() { online = false; /* Set Controller to ONLINE mode */ - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); if ((status = recv_mess(card_index, buff, 1))) online = (strstr(buff,"DSM")) ? true : false; else diff --git a/motorApp/PiSrc/Makefile b/motorApp/PiSrc/Makefile index b38e4d2..4a380b0 100644 --- a/motorApp/PiSrc/Makefile +++ b/motorApp/PiSrc/Makefile @@ -19,6 +19,7 @@ SRCS += devPIC862.cc drvPIC862.cc PIC862Register.cc SRCS += devPIC663.cc drvPIC663.cc PIC663Register.cc SRCS += devPIE710.cc drvPIE710.cc PIE710Register.cc SRCS += devPIE516.cc drvPIE516.cc PIE516Register.cc +SRCS += devPIE517.cc drvPIE517.cc PIE517Register.cc SRCS += devPIE816.cc drvPIE816.cc PIE816Register.cc diff --git a/motorApp/PiSrc/PIC662Register.cc b/motorApp/PiSrc/PIC662Register.cc index 1622ae1..b6f0a4f 100644 --- a/motorApp/PiSrc/PIC662Register.cc +++ b/motorApp/PiSrc/PIC662Register.cc @@ -2,9 +2,6 @@ FILENAME... PiRegister.cc USAGE... Register IMS motor device driver shell commands. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-04-14 20:34:42 $ */ /***************************************************************** diff --git a/motorApp/PiSrc/PIC848Register.cc b/motorApp/PiSrc/PIC848Register.cc index 92324e2..2f2712e 100644 --- a/motorApp/PiSrc/PIC848Register.cc +++ b/motorApp/PiSrc/PIC848Register.cc @@ -2,9 +2,6 @@ FILENAME... PIC848Register.cc USAGE... Register PI motor device driver shell commands. -Version: $Revision: 1.1 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2005-10-04 19:45:52 $ */ /***************************************************************** diff --git a/motorApp/PiSrc/PIE516Register.cc b/motorApp/PiSrc/PIE516Register.cc index 4ad14a9..8876211 100644 --- a/motorApp/PiSrc/PIE516Register.cc +++ b/motorApp/PiSrc/PIE516Register.cc @@ -2,9 +2,6 @@ FILENAME... PIE516Register.cc USAGE... Register PI motor device driver shell commands. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2007-03-30 20:01:05 $ */ /***************************************************************** diff --git a/motorApp/PiSrc/PIE517Register.cc b/motorApp/PiSrc/PIE517Register.cc new file mode 100755 index 0000000..63ea618 --- /dev/null +++ b/motorApp/PiSrc/PIE517Register.cc @@ -0,0 +1,68 @@ +/* +FILENAME... PIE517Register.cc +USAGE... Register PI motor device driver shell commands. + +Version: $Revision: 1.1 $ +Modified By: $Author: sullivan $ +Last Modified: $Date: 2007-03-30 20:01:05 $ +*/ + +/***************************************************************** + 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 +#include +#include +#include +#include "motor.h" +#include "drvPIE517.h" +#include "epicsExport.h" + +extern "C" +{ + +// Pi Setup arguments +static const iocshArg setupArg0 = {"Max. controller count", iocshArgInt}; +static const iocshArg setupArg1 = {"Polling rate", iocshArgInt}; +// Pi Config arguments +static const iocshArg configArg0 = {"Card being configured", iocshArgInt}; +static const iocshArg configArg1 = {"asyn port name", iocshArgString}; +static const iocshArg configArg2 = {"asyn address (GPIB)", iocshArgInt}; + +static const iocshArg * const PIE517SetupArgs[2] = {&setupArg0, &setupArg1}; +static const iocshArg * const PIE517ConfigArgs[3] = {&configArg0, &configArg1, + &configArg2}; + +static const iocshFuncDef setupPIE517 = {"PIE517Setup", 2, PIE517SetupArgs}; +static const iocshFuncDef configPIE517 = {"PIE517Config", 3, PIE517ConfigArgs}; + +static void setupPIE517CallFunc(const iocshArgBuf *args) +{ + PIE517Setup(args[0].ival, args[1].ival); +} + + +static void configPIE517CallFunc(const iocshArgBuf *args) +{ + PIE517Config(args[0].ival, args[1].sval, args[2].ival); +} + + +static void PIE517motorRegister(void) +{ + iocshRegister(&setupPIE517, setupPIE517CallFunc); + iocshRegister(&configPIE517, configPIE517CallFunc); +} + +epicsExportRegistrar(PIE517motorRegister); + +} // extern "C" diff --git a/motorApp/PiSrc/PIE710Register.cc b/motorApp/PiSrc/PIE710Register.cc index 5e6428a..04c50a7 100644 --- a/motorApp/PiSrc/PIE710Register.cc +++ b/motorApp/PiSrc/PIE710Register.cc @@ -2,9 +2,6 @@ FILENAME... PIE710Register.cc USAGE... Register PI motor device driver shell commands. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-10-06 18:18:21 $ */ /***************************************************************** diff --git a/motorApp/PiSrc/PiRegister.cc b/motorApp/PiSrc/PiRegister.cc index f1d744f..6483940 100644 --- a/motorApp/PiSrc/PiRegister.cc +++ b/motorApp/PiSrc/PiRegister.cc @@ -2,9 +2,6 @@ FILENAME... PiRegister.cc USAGE... Register IMS motor device driver shell commands. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2004-12-20 21:30:38 $ */ /***************************************************************** diff --git a/motorApp/PiSrc/devPIC630.cc b/motorApp/PiSrc/devPIC630.cc index b4b0470..95e7afb 100644 --- a/motorApp/PiSrc/devPIC630.cc +++ b/motorApp/PiSrc/devPIC630.cc @@ -50,7 +50,7 @@ extern struct driver_table PIC630_access; /* ----------------Create the dsets for devPIC630----------------- */ static struct driver_table *drvtabptr; -static long PIC630_init(void *); +static long PIC630_init(int); static long PIC630_init_record(void *); static long PIC630_start_trans(struct motorRecord *); static RTN_STATUS PIC630_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -102,13 +102,12 @@ static struct board_stat **PIC630_cards; /* initialize device support for PIC630 stepper motor */ -static long PIC630_init(void *arg) +static long PIC630_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; Debug(5, "PIC630_init: entry\n"); - if (after == 0) + if (!after) { drvtabptr = &PIC630_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIC662.cc b/motorApp/PiSrc/devPIC662.cc index 713e0ca..9226fc9 100644 --- a/motorApp/PiSrc/devPIC662.cc +++ b/motorApp/PiSrc/devPIC662.cc @@ -3,9 +3,6 @@ FILENAME... devPIC662.cc USAGE... Motor record device level support for Physik Instrumente (PI) GmbH & Co. C-844 motor controller. -Version: $Revision: 1.2 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:21:36 $ */ /* @@ -40,6 +37,7 @@ Last Modified: $Date: 2008-03-14 20:21:36 $ #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -50,7 +48,7 @@ extern struct driver_table PIC662_access; /* ----------------Create the dsets for devPIC662----------------- */ static struct driver_table *drvtabptr; -static long PIC662_init(void *); +static long PIC662_init(int); static long PIC662_init_record(void *); static long PIC662_start_trans(struct motorRecord *); static RTN_STATUS PIC662_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -104,12 +102,11 @@ static struct board_stat **PIC662_cards; /* initialize device support for PIC662 stepper motor */ -static long PIC662_init(void *arg) +static long PIC662_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIC662_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIC663.cc b/motorApp/PiSrc/devPIC663.cc index f85c918..4843a4e 100644 --- a/motorApp/PiSrc/devPIC663.cc +++ b/motorApp/PiSrc/devPIC663.cc @@ -15,6 +15,8 @@ USAGE... Motor record device level support for Physik Instrumente (PI) #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -25,7 +27,7 @@ extern struct driver_table PIC663_access; /* ----------------Create the dsets for devPIC663----------------- */ static struct driver_table *drvtabptr; -static long PIC663_init(void *); +static long PIC663_init(int); static long PIC663_init_record(void *); static long PIC663_start_trans(struct motorRecord *); static RTN_STATUS PIC663_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -79,12 +81,11 @@ static struct board_stat **PIC663_cards; /* initialize device support for PIC663 servo motor */ -static long PIC663_init(void *arg) +static long PIC663_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIC663_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIC844.cc b/motorApp/PiSrc/devPIC844.cc index f566004..429c101 100644 --- a/motorApp/PiSrc/devPIC844.cc +++ b/motorApp/PiSrc/devPIC844.cc @@ -3,9 +3,6 @@ FILENAME... devPIC844.cc USAGE... Motor record device level support for Physik Instrumente (PI) GmbH & Co. C-844 motor controller. -Version: $Revision: 1.6 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:21:36 $ */ /* @@ -41,6 +38,7 @@ Last Modified: $Date: 2008-03-14 20:21:36 $ #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -50,7 +48,7 @@ extern struct driver_table PIC844_access; /* ----------------Create the dsets for devPIC844----------------- */ static struct driver_table *drvtabptr; -static long PIC844_init(void *); +static long PIC844_init(int); static long PIC844_init_record(void *); static long PIC844_start_trans(struct motorRecord *); static RTN_STATUS PIC844_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -104,12 +102,11 @@ static struct board_stat **PIC844_cards; /* initialize device support for PIC844 stepper motor */ -static long PIC844_init(void *arg) +static long PIC844_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIC844_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIC848.cc b/motorApp/PiSrc/devPIC848.cc index e3c62bf..74800db 100644 --- a/motorApp/PiSrc/devPIC848.cc +++ b/motorApp/PiSrc/devPIC848.cc @@ -3,9 +3,6 @@ FILENAME... devPIC848.cc USAGE... Motor record device level support for Physik Instrumente (PI) GmbH & Co. C-848 motor controller. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:21:37 $ */ /* @@ -44,6 +41,7 @@ Last Modified: $Date: 2008-03-14 20:21:37 $ #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -54,7 +52,7 @@ extern struct driver_table PIC848_access; /* ----------------Create the dsets for devPIC848----------------- */ static struct driver_table *drvtabptr; -static long PIC848_init(void *); +static long PIC848_init(int); static long PIC848_init_record(void *); static long PIC848_start_trans(struct motorRecord *); static RTN_STATUS PIC848_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -108,12 +106,11 @@ static struct board_stat **PIC848_cards; /* initialize device support for PIC848 stepper motor */ -static long PIC848_init(void *arg) +static long PIC848_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIC848_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIC862.cc b/motorApp/PiSrc/devPIC862.cc index e4bfa67..bbd9272 100644 --- a/motorApp/PiSrc/devPIC862.cc +++ b/motorApp/PiSrc/devPIC862.cc @@ -19,6 +19,8 @@ USAGE... Motor record device level support for Physik Instrumente (PI) #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -29,7 +31,7 @@ extern struct driver_table PIC862_access; /* ----------------Create the dsets for devPIC862----------------- */ static struct driver_table *drvtabptr; -static long PIC862_init(void *); +static long PIC862_init(int); static long PIC862_init_record(void *); static long PIC862_start_trans(struct motorRecord *); static RTN_STATUS PIC862_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -83,12 +85,11 @@ static struct board_stat **PIC862_cards; /* initialize device support for PIC862 servo motor */ -static long PIC862_init(void *arg) +static long PIC862_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIC862_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIE516.cc b/motorApp/PiSrc/devPIE516.cc index e70afd9..1aef91b 100644 --- a/motorApp/PiSrc/devPIE516.cc +++ b/motorApp/PiSrc/devPIE516.cc @@ -3,9 +3,6 @@ FILENAME... devPIE516.cc USAGE... Motor record device level support for Physik Instrumente (PI) GmbH & Co. E-516 motor controller. -Version: $Revision: 1.2 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:21:37 $ */ /* @@ -41,6 +38,7 @@ Last Modified: $Date: 2008-03-14 20:21:37 $ #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -51,7 +49,7 @@ extern struct driver_table PIE516_access; /* ----------------Create the dsets for devPIE516----------------- */ static struct driver_table *drvtabptr; -static long PIE516_init(void *); +static long PIE516_init(int); static long PIE516_init_record(void *); static long PIE516_start_trans(struct motorRecord *); static RTN_STATUS PIE516_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -105,12 +103,11 @@ static struct board_stat **PIE516_cards; /* initialize device support for PIE516 stepper motor */ -static long PIE516_init(void *arg) +static long PIE516_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIE516_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIE517.cc b/motorApp/PiSrc/devPIE517.cc new file mode 100755 index 0000000..701fd4e --- /dev/null +++ b/motorApp/PiSrc/devPIE517.cc @@ -0,0 +1,317 @@ +/* +FILENAME... devPIE517.cc +USAGE... Motor record device level support for Physik Instrumente (PI) + GmbH & Co. E-516 motor controller. + +Version: $Revision: 1.2 $ +Modified By: $Author: sluiter $ +Last Modified: $Date: 2008-03-14 20:21:37 $ +*/ + +/* + * Original Author: Ron Sluiter + * Date: 12/17/03 + * Current Author: Joe Sullivan + * + * 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: + * ----------------- + * .01 08/10/16 Bruno Luvizotto (brunoluvizotto@gmail.com) - copied from devPIE516.cc + * .02 08/10/16 Bruno Luvizotto (brunoluvizotto@gmail.com) - edited the files for the E517 controller + */ + + +#include +#include +#include +#include "motorRecord.h" +#include "motor.h" +#include "motordevCom.h" +#include "drvPIE517.h" +#include "epicsExport.h" + +extern struct driver_table PIE517_access; + +/* ----------------Create the dsets for devPIE517----------------- */ +static struct driver_table *drvtabptr; +static long PIE517_init(int); +static long PIE517_init_record(void *); +static long PIE517_start_trans(struct motorRecord *); +static RTN_STATUS PIE517_build_trans(motor_cmnd, double *, struct motorRecord *); +static RTN_STATUS PIE517_end_trans(struct motorRecord *); + +struct motor_dset devPIE517 = +{ + {8, NULL, (DEVSUPFUN) PIE517_init, (DEVSUPFUN) PIE517_init_record, NULL}, + motor_update_values, + PIE517_start_trans, + PIE517_build_trans, + PIE517_end_trans +}; + +extern "C" {epicsExportAddress(dset,devPIE517);} + +/* --------------------------- program data --------------------- */ + +/* This table is used to define the command types */ +/* WARNING! this must match "motor_cmnd" in motor.h */ + +static msg_types PIE517_table[] = { + MOTION, /* MOVE_ABS */ + MOTION, /* MOVE_REL */ + MOTION, /* HOME_FOR */ + MOTION, /* HOME_REV */ + IMMEDIATE, /* LOAD_POS */ + IMMEDIATE, /* SET_VEL_BASE */ + IMMEDIATE, /* SET_VELOCITY */ + IMMEDIATE, /* SET_ACCEL */ + IMMEDIATE, /* GO */ + IMMEDIATE, /* SET_ENC_RATIO */ + INFO, /* GET_INFO */ + MOVE_TERM, /* STOP_AXIS */ + VELOCITY, /* JOG */ + IMMEDIATE, /* SET_PGAIN */ + IMMEDIATE, /* SET_IGAIN */ + IMMEDIATE, /* SET_DGAIN */ + IMMEDIATE, /* ENABLE_TORQUE */ + IMMEDIATE, /* DISABL_TORQUE */ + IMMEDIATE, /* PRIMITIVE */ + IMMEDIATE, /* SET_HIGH_LIMIT */ + IMMEDIATE, /* SET_LOW_LIMIT */ + VELOCITY /* JOG_VELOCITY */ +}; + + +static struct board_stat **PIE517_cards; + +/* --------------------------- program data --------------------- */ + + +/* initialize device support for PIE517 stepper motor */ +static long PIE517_init(int after) +{ + long rtnval; + + if (!after) + { + drvtabptr = &PIE517_access; + (drvtabptr->init)(); + } + + rtnval = motor_init_com(after, *drvtabptr->cardcnt_ptr, drvtabptr, &PIE517_cards); + return(rtnval); +} + + +/* initialize a record instance */ +static long PIE517_init_record(void *arg) +{ + struct motorRecord *mr = (struct motorRecord *) arg; + /* Disable change of direction testing in record support */ + /* This is a closed-loop device */ + mr->ntm = menuYesNoNO; + return(motor_init_record_com(mr, *drvtabptr->cardcnt_ptr, drvtabptr, PIE517_cards)); +} + + +/* start building a transaction */ +static long PIE517_start_trans(struct motorRecord *mr) +{ + motor_start_trans_com(mr, PIE517_cards); + return(OK); +} + + +/* end building a transaction */ +static RTN_STATUS PIE517_end_trans(struct motorRecord *mr) +{ + motor_end_trans_com(mr, drvtabptr); + return(OK); +} + + +/* add a part to the transaction */ +static RTN_STATUS PIE517_build_trans(motor_cmnd command, double *parms, struct motorRecord *mr) +{ + struct motor_trans *trans = (struct motor_trans *) mr->dpvt; + struct mess_node *motor_call; + struct controller *brdptr; + struct PIE517controller *cntrl; + char buff[110]; + int card, maxdigits; + unsigned int size; + double dval, cntrl_units, res; + RTN_STATUS rtnval; + bool send; + + send = true; /* Default to send motor command. */ + rtnval = OK; + buff[0] = '\0'; + + /* Protect against NULL pointer with WRTITE_MSG(GO/STOP_AXIS/GET_INFO, NULL). */ + dval = (parms == NULL) ? 0.0 : *parms; + + rtnval = (RTN_STATUS) motor_start_trans_com(mr, PIE517_cards); + + motor_call = &(trans->motor_call); + card = motor_call->card; + brdptr = (*trans->tabptr->card_array)[card]; + if (brdptr == NULL) + return(rtnval = ERROR); + + cntrl = (struct PIE517controller *) brdptr->DevicePrivate; + res = cntrl->drive_resolution[motor_call->signal]; + cntrl_units = dval; + maxdigits = 3; + + if (PIE517_table[command] > motor_call->type) + motor_call->type = PIE517_table[command]; + + if (trans->state != BUILD_STATE) + return(rtnval = ERROR); + + if (command == PRIMITIVE && mr->init != NULL && strlen(mr->init) != 0) + strcat(motor_call->message, mr->init); + + switch (command) + { + case MOVE_ABS: + case MOVE_REL: + case HOME_FOR: + case HOME_REV: + case JOG: + if (strlen(mr->prem) != 0) + { + strcat(motor_call->message, mr->prem); + strcat(motor_call->message, EOL_E517); + } + if (strlen(mr->post) != 0) + motor_call->postmsgptr = (char *) &mr->post; + break; + + default: + break; + } + + + switch (command) + { + case MOVE_ABS: + sprintf(buff, "MOV # %.*f", maxdigits, (cntrl_units * res)); + strcat(buff, EOL_E517); + break; + + case MOVE_REL: + sprintf(buff, "MVR # %.*f", maxdigits, (cntrl_units * res)); + strcat(buff, EOL_E517); + break; + + case HOME_FOR: + case HOME_REV: + rtnval = ERROR; + break; + + case LOAD_POS: + rtnval = ERROR; + break; + + case SET_VEL_BASE: + send = false; /* DC motor; not base velocity. */ + break; + + case SET_VELOCITY: + sprintf(buff, "VEL # %.*f", maxdigits, (cntrl_units * res)); + strcat(buff, EOL_E517); + break; + + case ENABLE_TORQUE: + strcpy(buff, "SVO #1"); + strcat(buff, EOL_E517); + break; + + case DISABL_TORQUE: + strcpy(buff, "SVO #0"); + strcat(buff, EOL_E517); + break; + + case SET_ACCEL: + /* The PIE517 does not support acceleration commands. */ + case GO: + /* The PIE517 starts moving immediately on move commands, GO command + * does nothing. */ + send = false; + break; + + case PRIMITIVE: + case GET_INFO: + /* These commands are not actually done by sending a message, but + rather they will indirectly cause the driver to read the status + of all motors */ + break; + + case STOP_AXIS: + /* No stop command available - use move relative 0 */ + sprintf(buff, "STP #"); + strcat(buff, EOL_E517); + break; + + case JOG_VELOCITY: + case JOG: + sprintf(buff, "VEL # %.*f", maxdigits, cntrl_units); + strcat(buff, EOL_E517); + break; + + case SET_PGAIN: + send = false; + break; + case SET_IGAIN: + send = false; + break; + case SET_DGAIN: + send = false; + break; + + case SET_HIGH_LIMIT: + case SET_LOW_LIMIT: + case SET_ENC_RATIO: + trans->state = IDLE_STATE; /* No command sent to the controller. */ + send = false; + break; + + default: + send = false; + rtnval = ERROR; + } + + size = strlen(buff); + if (send == false) + return(rtnval); + else if (size > sizeof(buff) || (strlen(motor_call->message) + size) > MAX_MSG_SIZE) + errlogMessage("PIE517_build_trans(): buffer overflow.\n"); + else + { + strcat(motor_call->message, buff); + rtnval = motor_end_trans_com(mr, drvtabptr); + } + return(rtnval); +} diff --git a/motorApp/PiSrc/devPIE710.cc b/motorApp/PiSrc/devPIE710.cc index 636eb21..cde406e 100644 --- a/motorApp/PiSrc/devPIE710.cc +++ b/motorApp/PiSrc/devPIE710.cc @@ -3,9 +3,6 @@ FILENAME... devPIE710.cc USAGE... Motor record device level support for Physik Instrumente (PI) GmbH & Co. E-710 motor controller. -Version: $Revision: 1.3 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:21:36 $ */ /* @@ -41,6 +38,7 @@ Last Modified: $Date: 2008-03-14 20:21:36 $ #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -51,7 +49,7 @@ extern struct driver_table PIE710_access; /* ----------------Create the dsets for devPIE710----------------- */ static struct driver_table *drvtabptr; -static long PIE710_init(void *); +static long PIE710_init(int); static long PIE710_init_record(void *); static long PIE710_start_trans(struct motorRecord *); static RTN_STATUS PIE710_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -105,12 +103,11 @@ static struct board_stat **PIE710_cards; /* initialize device support for PIE710 stepper motor */ -static long PIE710_init(void *arg) +static long PIE710_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIE710_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIE816.cc b/motorApp/PiSrc/devPIE816.cc index ff6ca3d..5651251 100644 --- a/motorApp/PiSrc/devPIE816.cc +++ b/motorApp/PiSrc/devPIE816.cc @@ -41,6 +41,7 @@ Last Modified: 2007/03/30 20:01:05 #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -51,7 +52,7 @@ extern struct driver_table PIE816_access; /* ----------------Create the dsets for devPIE816----------------- */ static struct driver_table *drvtabptr; -static long PIE816_init(void *); +static long PIE816_init(int); static long PIE816_init_record(void *); static long PIE816_start_trans(struct motorRecord *); static RTN_STATUS PIE816_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -105,12 +106,11 @@ static struct board_stat **PIE816_cards; /* initialize device support for PIE816 stepper motor */ -static long PIE816_init(void *arg) +static long PIE816_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &PIE816_access; (drvtabptr->init)(); diff --git a/motorApp/PiSrc/devPIMotor.dbd b/motorApp/PiSrc/devPIMotor.dbd index 6758499..04e0c06 100644 --- a/motorApp/PiSrc/devPIMotor.dbd +++ b/motorApp/PiSrc/devPIMotor.dbd @@ -46,6 +46,12 @@ driver(drvPIE516) registrar(PIE516motorRegister) variable(drvPIE516debug) +# Physik Instrumente (PI) GmbH & Co. E-517 driver support. +device(motor,VME_IO,devPIE517,"PIE517") +driver(drvPIE517) +registrar(PIE517motorRegister) +variable(drvPIE517debug) + # Physik Instrumente (PI) GmbH & Co. E-816 driver support. device(motor,VME_IO,devPIE816,"PIE816") driver(drvPIE816) diff --git a/motorApp/PiSrc/drvPI.h b/motorApp/PiSrc/drvPI.h index 947b9e2..0de27ed 100644 --- a/motorApp/PiSrc/drvPI.h +++ b/motorApp/PiSrc/drvPI.h @@ -3,9 +3,6 @@ FILENAME... drvPI.h USAGE... This file contains driver "include" information that is specific to Physik Instrumente (PI) GmbH & Co. motor controller driver support. -Version: $Revision: 1.3 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2004-08-17 21:29:52 $ */ /* diff --git a/motorApp/PiSrc/drvPIC630.cc b/motorApp/PiSrc/drvPIC630.cc index a01bbeb..d222c6e 100644 --- a/motorApp/PiSrc/drvPIC630.cc +++ b/motorApp/PiSrc/drvPIC630.cc @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include "motor.h" #include "drvPIC630.h" #include "asynOctetSyncIO.h" diff --git a/motorApp/PiSrc/drvPIC662.cc b/motorApp/PiSrc/drvPIC662.cc index 1a3b175..9300421 100644 --- a/motorApp/PiSrc/drvPIC662.cc +++ b/motorApp/PiSrc/drvPIC662.cc @@ -3,9 +3,6 @@ FILENAME... drvPIC662.cc USAGE... Motor record driver level support for Physik Instrumente (PI) GmbH & Co. C-844 motor controller. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-04-14 20:34:42 $ */ /* @@ -51,6 +48,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motor.h" #include "drvPIC662.h" #include "epicsExport.h" @@ -232,7 +231,7 @@ static int set_status(int card, int signal) nodeptr = motor_info->motor_motion; status.All = motor_info->status.All; - send_mess(card, GET_STATUS, (char) NULL); + send_mess(card, GET_STATUS, (char*) NULL); comm_status = recv_mess(card, buff, 1); if (comm_status == 0) { @@ -271,7 +270,7 @@ static int set_status(int card, int signal) * Skip to substring for this motor, convert to double */ - send_mess(card, GET_POS, (char) NULL); + send_mess(card, GET_POS, (char*) NULL); recv_mess(card, buff, 1); motorData = NINT (atof(buff) / cntrl->drive_resolution); @@ -340,7 +339,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -539,7 +538,7 @@ static int motor_init() do { - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, buff, 1); retry++; } while (status == 0 && retry < 3); @@ -558,7 +557,7 @@ static int motor_init() /* Set Controller to REMOTE mode */ - send_mess(card_index, REMOTE_MODE, (char) NULL); + send_mess(card_index, REMOTE_MODE, (char*) NULL); { struct mess_info *motor_info = &brdptr->motor_info[0]; diff --git a/motorApp/PiSrc/drvPIC662.h b/motorApp/PiSrc/drvPIC662.h index f45d40c..1d67e9d 100644 --- a/motorApp/PiSrc/drvPIC662.h +++ b/motorApp/PiSrc/drvPIC662.h @@ -3,9 +3,6 @@ FILENAME... drvPIC662.h USAGE... This file contains driver "include" information that is specific to Physik Instrumente (PI) GmbH & Co. motor controller driver support. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-04-14 20:34:42 $ */ /* diff --git a/motorApp/PiSrc/drvPIC663.cc b/motorApp/PiSrc/drvPIC663.cc index 666130f..532494f 100644 --- a/motorApp/PiSrc/drvPIC663.cc +++ b/motorApp/PiSrc/drvPIC663.cc @@ -22,6 +22,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "drvPIC663.h" @@ -212,7 +214,7 @@ static int set_status(int card, int signal) if (cntrl->status != NORMAL) charcnt = recv_mess(card, buff, FLUSH); - send_mess(card, "TS", (char) NULL); /* Tell Status */ + send_mess(card, "TS", (char*) NULL); /* Tell Status */ charcnt = recv_mess(card, buff, 1); if (charcnt > 9) convert_cnt = sscanf(buff, "S:%2hx %2hx %2hx\n", @@ -253,7 +255,7 @@ static int set_status(int card, int signal) minusLS = mstat2.Bits.lo_limit ? 0 : 1; /* Parse motor position */ - send_mess(card, "TP", (char) NULL); /* Tell Position */ + send_mess(card, "TP", (char*) NULL); /* Tell Position */ recv_mess(card, buff, 1); motorData = NINT(atof(&buff[2])); @@ -307,7 +309,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -519,7 +521,7 @@ static int motor_init() do { sprintf(buff,"\001%1XVE", cntrl->asyn_address); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); status = recv_mess(card_index, buff, 1); retry++; } while (status == 0 && retry < 3); diff --git a/motorApp/PiSrc/drvPIC844.cc b/motorApp/PiSrc/drvPIC844.cc index 0de16ba..ae87380 100644 --- a/motorApp/PiSrc/drvPIC844.cc +++ b/motorApp/PiSrc/drvPIC844.cc @@ -3,9 +3,6 @@ FILENAME... drvPIC844.cc USAGE... Motor record driver level support for Physik Instrumente (PI) GmbH & Co. C-844 motor controller. -Version: $Revision: 1.15 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2006-01-31 22:10:04 $ */ /* @@ -61,6 +58,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motor.h" #include "drvPI.h" #include "epicsExport.h" @@ -265,7 +264,7 @@ static int set_status(int card, int signal) cntrl->status = NORMAL; status.Bits.CNTRL_COMM_ERR = 0; - send_mess(card, "MOT:COND?", (char) NULL); + send_mess(card, "MOT:COND?", (char*) NULL); recv_mess(card, buff, 1); mstat.All = atoi(&buff[0]); @@ -296,7 +295,7 @@ static int set_status(int card, int signal) * Skip to substring for this motor, convert to double */ - send_mess(card, "CURR:TPOS?", (char) NULL); + send_mess(card, "CURR:TPOS?", (char*) NULL); recv_mess(card, buff, 1); motorData = atof(buff); @@ -365,7 +364,7 @@ static int set_status(int card, int signal) status.Bits.EA_SLIP_STALL = 0; status.Bits.EA_HOME = 0; - send_mess(card, "AXIS:POS?", (char) NULL); + send_mess(card, "AXIS:POS?", (char*) NULL); recv_mess(card, buff, 1); motorData = atof(buff); motor_info->encoder_position = (epicsInt32) motorData; @@ -388,7 +387,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -597,7 +596,7 @@ static int motor_init() do { - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, buff, 1); retry++; } while (status == 0 && retry < 3); diff --git a/motorApp/PiSrc/drvPIC848.cc b/motorApp/PiSrc/drvPIC848.cc index 86a8952..8aba08c 100644 --- a/motorApp/PiSrc/drvPIC848.cc +++ b/motorApp/PiSrc/drvPIC848.cc @@ -3,10 +3,6 @@ FILENAME... drvPIC848.cc USAGE... Motor record driver level support for Physik Instrumente (PI) GmbH & Co. C-848 motor controller. -Version: $Revision: 14157 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 15:52:25 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/PiSrc/drvPIC848.cc $ */ /* @@ -50,6 +46,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "drvPIC848.h" @@ -343,7 +341,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -550,7 +548,7 @@ static int motor_init() do { - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, buff, 1); retry++; } while (status == 0 && retry < 3); diff --git a/motorApp/PiSrc/drvPIC862.cc b/motorApp/PiSrc/drvPIC862.cc index a650f4e..241e008 100644 --- a/motorApp/PiSrc/drvPIC862.cc +++ b/motorApp/PiSrc/drvPIC862.cc @@ -31,6 +31,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "drvPIC862.h" @@ -223,7 +225,7 @@ static int set_status(int card, int signal) if (cntrl->status != NORMAL) charcnt = recv_mess(card, buff, FLUSH); - send_mess(card, "TS", (char) NULL); /* Tell Status */ + send_mess(card, "TS", (char*) NULL); /* Tell Status */ charcnt = recv_mess(card, buff, 1); if (charcnt > 18) convert_cnt = sscanf(buff, "S:%2hx %2hx %2hx %2hx %2hx %2hx\n", @@ -279,7 +281,7 @@ static int set_status(int card, int signal) /* Parse motor position */ - send_mess(card, "TP", (char) NULL); /* Tell Position */ + send_mess(card, "TP", (char*) NULL); /* Tell Position */ recv_mess(card, buff, 1); motorData = NINT(atof(&buff[2])); @@ -333,7 +335,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -545,7 +547,7 @@ static int motor_init() do { sprintf(buff,"\001%1XVE", cntrl->asyn_address); - send_mess(card_index, buff, (char) NULL); + send_mess(card_index, buff, (char*) NULL); status = recv_mess(card_index, buff, 1); retry++; } while (status == 0 && retry < 3); diff --git a/motorApp/PiSrc/drvPIE516.cc b/motorApp/PiSrc/drvPIE516.cc index d8f8be5..847db29 100644 --- a/motorApp/PiSrc/drvPIE516.cc +++ b/motorApp/PiSrc/drvPIE516.cc @@ -3,9 +3,6 @@ FILENAME... drvPIE516.cc USAGE... Motor record driver level support for Physik Instrumente (PI) GmbH & Co. E-516 motor controller. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2007-03-30 20:01:05 $ */ /* @@ -48,6 +45,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "drvPIE516.h" @@ -244,14 +243,14 @@ static int set_status(int card, int signal) recv_mess(card, buff, FLUSH); readOK = false; - send_mess(card, READ_ONLINE, (char) NULL); + send_mess(card, READ_ONLINE, (char*) NULL); if (recv_mess(card, buff, 1) && sscanf(buff, "%d", &online_status)) { if (!online_status) { /* Assume Controller Reboot - Set ONLINE and Velocity Control ON */ - send_mess(card, SET_ONLINE, (char) NULL); - send_mess(card, SET_VELCTRL, (char) NULL); + send_mess(card, SET_ONLINE, (char*) NULL); + send_mess(card, SET_VELCTRL, (char*) NULL); } send_mess(card, READ_ONTARGET, PIE516_axis[signal]); @@ -368,7 +367,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -586,15 +585,15 @@ static int motor_init() { online = false; /* Set Controller to ONLINE mode */ - send_mess(card_index, SET_ONLINE, (char) NULL); - send_mess(card_index, READ_ONLINE, (char) NULL); + send_mess(card_index, SET_ONLINE, (char*) NULL); + send_mess(card_index, READ_ONLINE, (char*) NULL); if ((status = recv_mess(card_index, buff, 1))) online = (atoi(buff)==1) ? true : false; else retry++; } while (online == false && retry < 3); - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, buff, 1); /* Parse out E516 revision (2 decimal places) and convert to int */ @@ -627,7 +626,7 @@ static int motor_init() brdptr->total_axis = total_axis; /* Turn ON velocity control mode - All axis */ - send_mess(card_index, SET_VELCTRL, (char) NULL); + send_mess(card_index, SET_VELCTRL, (char*) NULL); for (motor_index = 0; motor_index < total_axis; motor_index++) { diff --git a/motorApp/PiSrc/drvPIE517.cc b/motorApp/PiSrc/drvPIE517.cc new file mode 100755 index 0000000..c82b3d9 --- /dev/null +++ b/motorApp/PiSrc/drvPIE517.cc @@ -0,0 +1,682 @@ +/* +FILENAME... drvPIE517.cc +USAGE... Motor record driver level support for Physik Instrumente (PI) + GmbH & Co. E-516 motor controller. + +Version: $Revision: 1.1 $ +Modified By: $Author: sullivan $ +Last Modified: $Date: 2007-03-30 20:01:05 $ +*/ + +/* + * Original Author: Ron Sluiter + * Date: 10/18/05 + * Current Author: Joe Sullivan + * + * 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: + * ----------------- + * .01 08/10/16 Bruno Luvizotto (brunoluvizotto@gmail.com) - copied from devPIE516.cc. + * .02 08/10/16 Bruno Luvizotto (brunoluvizotto@gmail.com) - edited the files for the E517 controller. + * Tested on PI VER: + * FW_DSP: 02.034 + * FW_FPGA: 02.040 + * FW_MCU: 1.22.6 + */ + +/* +DESIGN LIMITATIONS... + 1 - Like all controllers, the PIE517 must be powered-on when EPICS is first + booted up. +*/ + +#include +#include +#include +#include +#include +#include "motorRecord.h" +#include "motor.h" +#include "drvPIE517.h" +#include "epicsExport.h" + +#define GET_IDENT "VER?" +#define SET_ONLINE "ONL # 1" /* Set Online Mode ON */ +#define SET_VELCTRL "VCO # 1" /* Set Velocity Control Mode - Required for DONE */ +#define READ_ONLINE "ONL? #" /* Read Online Mode */ +#define READ_POS "POS? #" /* Read position */ +#define READ_OVERFLOW "OVF? #" /* Read Servo Overflow Status */ +#define READ_ONTARGET "ONT? #" /* Read Position ON Target */ +#define READ_SERVO "SVO? #" /* Read Servo Enable Status */ + + +#define PIE517_NUM_CARDS 10 +#define MAX_AXES 3 +#define BUFF_SIZE 100 /* Maximum length of string to/from PIE517 */ + +/*----------------debugging-----------------*/ +volatile int drvPIE517debug = 0; +extern "C" {epicsExportAddress(int, drvPIE517debug);} +static inline void Debug(int level, const char *format, ...) { + #ifdef DEBUG + if (level < drvPIE517debug) { + va_list pVar; + va_start(pVar, format); + vprintf(format, pVar); + va_end(pVar); + } + #endif +} + +/* --- Local data. --- */ +int PIE517_num_cards = 0; +static char *PIE517_axis[] = {"1 ", "2 ", "3 "}; //{"A", "B", "C"}; + +/* 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 *); +static int set_status(int, int); +static long report(int); +static long init(); +static int motor_init(); +static void query_done(int, int, struct mess_node *); + +/*----------------functions-----------------*/ + +struct driver_table PIE517_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, + PIE517_axis +}; + +struct +{ + long number; + long (*report) (int); + long (*init) (void); +} drvPIE517 = {2, report, init}; + +extern "C" {epicsExportAddress(drvet, drvPIE517);} + +static struct thread_args targs = {SCAN_RATE, &PIE517_access, 0.0}; + +/********************************************************* + * Print out driver status report + *********************************************************/ +static long report(int level) +{ + int card; + + if (PIE517_num_cards <=0) + printf(" No PIE517 controllers configured.\n"); + else + { + for (card = 0; card < PIE517_num_cards; card++) + { + struct controller *brdptr = motor_state[card]; + + if (brdptr == NULL) + printf(" PIE517 controller %d connection failed.\n", card); + else + { + struct PIE517controller *cntrl; + + cntrl = (struct PIE517controller *) brdptr->DevicePrivate; + printf(" PIE517 controller #%d, port=%s, id: %s \n", card, + cntrl->asyn_port, 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 (PIE517_num_cards <= 0) + { + Debug(1, "init(): PIE517 driver disabled. PIE517Setup() missing from startup script.\n"); + } + return((long) 0); +} + + +static void query_done(int card, int axis, struct mess_node *nodeptr) +{ +} + + +/******************************************************************************** +* * +* FUNCTION NAME: set_status * +* * +* LOGIC: * +* Initialize. * +* Send "Moving Status" query. * +* Read response. * +* IF normal response to query. * +* Set communication status to NORMAL. * +* ELSE * +* IF communication status is NORMAL. * +* Set communication status to RETRY. * +* NORMAL EXIT. * +* ELSE * +* Set communication status error. * +* ERROR EXIT. * +* ENDIF * +* ENDIF * +* * +* IF "Moving Status" indicates any motion (i.e. status != 0). * +* Clear "Done Moving" status bit. * +* ELSE * +* Set "Done Moving" status bit. * +* ENDIF * +* * +* * +********************************************************************************/ + +static int set_status(int card, int signal) +{ + struct PIE517controller *cntrl; + struct mess_node *nodeptr; + struct mess_info *motor_info; + struct motorRecord *mr; + /* Message parsing variables */ + char buff[BUFF_SIZE]; + int rtn_state; + unsigned int overflow_status, ontarget_status, servo_status, online_status; + epicsInt32 motorData; + bool plusdir, ls_active, plusLS, minusLS; + bool readOK; + msta_field status; + + cntrl = (struct PIE517controller *) motor_state[card]->DevicePrivate; + motor_info = &(motor_state[card]->motor_info[signal]); + nodeptr = motor_info->motor_motion; + if (nodeptr != NULL) + mr = (struct motorRecord *) nodeptr->mrecord; + else + mr = NULL; + status.All = motor_info->status.All; + + recv_mess(card, buff, FLUSH); + + readOK = false; +// send_mess(card, READ_ONLINE, PIE517_axis[signal]); +// if (recv_mess(card, buff, 1) && sscanf(buff, "%d", &online_status)) +// { +// if (!online_status) +// { +// /* Assume Controller Reboot - Set ONLINE and Velocity Control ON */ +// send_mess(card, SET_ONLINE, PIE517_axis[signal]); +// //send_mess(card, SET_VELCTRL, (char*) NULL); +// } + + send_mess(card, READ_ONTARGET, PIE517_axis[signal]); + if (recv_mess(card, buff, 1) && sscanf(buff, "%d", &ontarget_status)) + { + send_mess(card, READ_OVERFLOW, PIE517_axis[signal]); + if (recv_mess(card, buff, 1) && sscanf(buff, "%d", &overflow_status)) + { + send_mess(card, READ_SERVO, PIE517_axis[signal]); + if (recv_mess(card, buff, 1) && sscanf(buff, "%d", &servo_status)) + { + send_mess(card, READ_POS, PIE517_axis[signal]); + if (recv_mess(card, buff, 1)) + { + motorData = NINT(atof(buff) / cntrl->drive_resolution[signal]); + readOK = true; + } + } + } + } +// } + + if (readOK) + { + cntrl->status = NORMAL; + status.Bits.CNTRL_COMM_ERR = 0; + } + else + { + if (cntrl->status == NORMAL) + { + cntrl->status = RETRY; + rtn_state = OK; + goto exit; + } + else + { + cntrl->status = COMM_ERR; + status.Bits.CNTRL_COMM_ERR = 1; + status.Bits.RA_PROBLEM = 1; + rtn_state = 1; + goto exit; + } + } + + + /* Always DONE if torque disabled */ + status.Bits.RA_DONE = (ontarget_status) ? 1 : 0; + status.Bits.RA_HOME = status.Bits.RA_DONE; + + status.Bits.EA_POSITION = (servo_status) ? 1 : 0; /* Torgue disabled flag */ + + ls_active = plusLS = minusLS = false; + + /* LS status may be true but servo is not within position error - keep updating */ + /* No Limit switches but if the Servo Controller overflows indicate with a + LS */ + if (status.Bits.RA_DONE) + plusLS = overflow_status ? true : false; + + if (motorData == motor_info->position) + { + if (nodeptr != 0) /* Increment counter only if motor is moving. */ + motor_info->no_motion_count++; + } + else + { + status.Bits.RA_DIRECTION = (motorData >= motor_info->position) ? 1 : 0; + motor_info->position = motor_info->encoder_position = motorData; + motor_info->no_motion_count = 0; + } + + plusdir = (status.Bits.RA_DIRECTION) ? true : false; + + /* Set limit switch error indicators. */ + if (plusLS == true) + { + status.Bits.RA_PLUS_LS = 1; + if (plusdir == true) + ls_active = true; + } + else + status.Bits.RA_PLUS_LS = 0; + + if (minusLS == true) + { + status.Bits.RA_MINUS_LS = 1; + if (plusdir == false) + ls_active = true; + } + else + status.Bits.RA_MINUS_LS = 0; + + /* encoder status */ + status.Bits.EA_SLIP = 0; + status.Bits.EA_SLIP_STALL = 0; + status.Bits.EA_HOME = 0; + + status.Bits.RA_PROBLEM = 0; + + /* Parse motor velocity? */ + /* NEEDS WORK */ + + motor_info->velocity = 0; + + if (!status.Bits.RA_DIRECTION) + motor_info->velocity *= -1; + + rtn_state = (!motor_info->no_motion_count || ls_active == true || + status.Bits.RA_DONE | status.Bits.RA_PROBLEM) ? 1 : 0; + + /* Test for post-move string. */ + if ((status.Bits.RA_DONE || ls_active == true) && 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 PIE517 board */ +/* send_mess() */ +/*****************************************************/ +static RTN_STATUS send_mess(int card, char const *com, char *name) +{ + char local_buff[MAX_MSG_SIZE]; + char *pbuff; + struct PIE517controller *cntrl; + int comsize, namesize; + size_t nwrite; + + comsize = (com == NULL) ? 0 : strlen(com); + namesize = (name == NULL) ? 0 : strlen(name); + + if ((comsize + namesize) > MAX_MSG_SIZE) + { + errlogMessage("drvPIE517.cc:send_mess(); message size violation.\n"); + return(ERROR); + } + else if (comsize == 0) /* Normal exit on empty input message. */ + return(OK); + + if (!motor_state[card]) + { + errlogPrintf("drvPIE517.cc:send_mess() - invalid card #%d\n", card); + return(ERROR); + } + + local_buff[0] = (char) NULL; /* Terminate local buffer. */ + + if (name == NULL) + strcat(local_buff, com); /* Make a local copy of the string. */ + else + { + strcpy(local_buff, com); + pbuff = strchr(local_buff, '#'); + if (pbuff != NULL) + *pbuff = *name; + else + Debug(1, "send_mess(): NAME ERROR: message = %s\n", local_buff); + } + + Debug(2, "send_mess(): message = %s\n", local_buff); + + cntrl = (struct PIE517controller *) motor_state[card]->DevicePrivate; + pasynOctetSyncIO->write(cntrl->pasynUser, local_buff, strlen(local_buff), + COMM_TIMEOUT, &nwrite); + + return(OK); +} + + +/*****************************************************/ +/* receive a message from the PIE517 board */ +/* recv_mess() */ +/*****************************************************/ +static int recv_mess(int card, char *com, int flag) +{ + struct PIE517controller *cntrl; + size_t nread = 0; + asynStatus status = asynError; + int eomReason; + char *pos; + + /* Check that card exists */ + if (!motor_state[card]) + return(ERROR); + + cntrl = (struct PIE517controller *) motor_state[card]->DevicePrivate; + + if (flag == FLUSH) + pasynOctetSyncIO->flush(cntrl->pasynUser); + else + status = pasynOctetSyncIO->read(cntrl->pasynUser, com, BUFF_SIZE, + COMM_TIMEOUT, &nread, &eomReason); + pos=strchr(com,'='); + if(pos != NULL) + strcpy(com,&pos[1]); + + if ((status != asynSuccess) || (nread <= 0)) + { + com[0] = '\0'; + nread = 0; + } + + Debug(2, "recv_mess(): message = \"%s\"\n", com); + return(nread); +} + + +/*****************************************************/ +/* Setup system configuration */ +/* PIE517Setup() */ +/*****************************************************/ +RTN_STATUS +PIE517Setup(int num_cards, /* maximum number of controllers in system. */ + int scan_rate) /* polling rate - 1/60 sec units. */ +{ + int itera; + + if (num_cards < 1 || num_cards > PIE517_NUM_CARDS) + PIE517_num_cards = PIE517_NUM_CARDS; + else + PIE517_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 PIE517Config 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(PIE517_num_cards * + sizeof(struct controller *)); + + for (itera = 0; itera < PIE517_num_cards; itera++) + motor_state[itera] = (struct controller *) NULL; + + return(OK); +} + + +/*****************************************************/ +/* Configure a controller */ +/* PIE517Config() */ +/*****************************************************/ +RTN_STATUS +PIE517Config(int card, /* card being configured */ + const char *name, /* asyn port name */ + int addr) /* asyn address (GPIB) */ +{ + struct PIE517controller *cntrl; + + if (card < 0 || card >= PIE517_num_cards) + return(ERROR); + + motor_state[card] = (struct controller *) malloc(sizeof(struct controller)); + motor_state[card]->DevicePrivate = malloc(sizeof(struct PIE517controller)); + cntrl = (struct PIE517controller *) 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 PIE517controller *cntrl; + int card_index, motor_index; + char buff[BUFF_SIZE], *pbuff; + int total_axis; + int status; + int version; + bool online; + asynStatus success_rtn; + static const char output_terminator[] = EOL_E517; + static const char input_terminator[] = EOL_E517; + + initialized = true; /* Indicate that driver is initialized. */ + + /* Check for setup */ + if (PIE517_num_cards <= 0) + return(ERROR); + + for (card_index = 0; card_index < PIE517_num_cards; card_index++) + { + if (!motor_state[card_index]) + continue; + + brdptr = motor_state[card_index]; + brdptr->ident[0] = (char) NULL; /* No controller identification message. */ + brdptr->cmnd_response = false; + total_cards = card_index + 1; + cntrl = (struct PIE517controller *) brdptr->DevicePrivate; + + status = version = 0; + + /* Initialize communications channel */ + success_rtn = pasynOctetSyncIO->connect(cntrl->asyn_port, 0, + &cntrl->pasynUser, NULL); + if (success_rtn == asynSuccess) + { + //int retry = 0; + + pasynOctetSyncIO->setOutputEos(cntrl->pasynUser, output_terminator, + strlen(output_terminator)); + pasynOctetSyncIO->setInputEos(cntrl->pasynUser, input_terminator, + strlen(input_terminator)); + + /* Send a message to the board, see if it exists */ + /* flush any junk at input port - should not be any data available */ + pasynOctetSyncIO->flush(cntrl->pasynUser); + + /* Assure that Controller is ONLINE */ + online = true; + //do + //{ + // online = false; + // /* Set Controller to ONLINE mode */ + // send_mess(card_index, SET_ONLINE, (char*) NULL); + // send_mess(card_index, READ_ONLINE, (char*) NULL); + // if ((status = recv_mess(card_index, buff, 1))) + //online = (atoi(buff)==1) ? true : false; + // else + //retry++; + //} while (online == false && retry < 3); + + //send_mess(card_index, GET_IDENT, (char*) NULL); + //status = recv_mess(card_index, buff, 1); + + /* Parse out E517 revision (2 decimal places) and convert to int */ + if ((pbuff = strchr(buff, 'V'))) + version = NINT(atof(pbuff+1) * 100); + else + version = 0; + } + + if (success_rtn == asynSuccess && online == true) + { + strcpy(brdptr->ident, buff); + brdptr->localaddr = (char *) NULL; + brdptr->motor_in_motion = 0; + + /* Check for E517 versions that need the status word shifted up 8 bits */ + /*if (version >= 311) + cntrl->versionSupport = true; + else + cntrl->versionSupport = false;*/ + + /* Determine # of axes. Request stage name. See if it responds */ + for (total_axis = 0; total_axis < MAX_AXES; total_axis++) + { + send_mess(card_index, READ_POS, PIE517_axis[total_axis]); + status = recv_mess(card_index, buff, 1); + if (!status) + break; + } + brdptr->total_axis = total_axis; + + /* Turn ON velocity control mode - All axis */ + //send_mess(card_index, SET_VELCTRL, (char*) NULL); + + for (motor_index = 0; motor_index < total_axis; 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; + /* PIE517 has DC motor support only */ + motor_info->encoder_present = YES; + motor_info->status.Bits.EA_PRESENT = 1; + motor_info->pid_present = NO; + motor_info->status.Bits.GAIN_SUPPORT = 1; + + cntrl->drive_resolution[motor_index] = POS_RES; + + set_status(card_index, motor_index); /* Read status of each motor */ + } + } + 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 *) "PIE517_motor", epicsThreadPriorityMedium, + epicsThreadGetStackSize(epicsThreadStackMedium), + (EPICSTHREADFUNC) motor_task, (void *) &targs); + + return(OK); +} + + diff --git a/motorApp/PiSrc/drvPIE517.h b/motorApp/PiSrc/drvPIE517.h new file mode 100755 index 0000000..3d1c942 --- /dev/null +++ b/motorApp/PiSrc/drvPIE517.h @@ -0,0 +1,75 @@ +/* File: drvPIE516.h */ + + +/* Device Driver Support definitions for motor */ +/* + * Original Author: Ron Sluiter + * Current Author: Joe Sullivan + * Date: 09/20/2005 + * + * Modification Log: + * ----------------- + * .01 08/10/16 Bruno Luvizotto (brunoluvizotto@gmail.com) - copied from drvPIE516.h + * .02 08/10/16 Bruno Luvizotto (brunoluvizotto@gmail.com) - edited the files for the E517 controller + */ + +#ifndef INCdrvPIE517h +#define INCdrvPIE517h 1 + +#include "motordrvCom.h" +#include "asynDriver.h" +#include "asynDriver.h" +#include "asynOctetSyncIO.h" + +#define COMM_TIMEOUT 2 /* Timeout in seconds. */ +#define POS_RES 0.001 /* Position resolution. */ + +#define EOL_E517 "\n" /* Command End-Of-Line = LF (0x10) */ + +struct PIE517controller +{ + asynUser *pasynUser; /* asynUser structure */ + int asyn_address; /* Use for GPIB or other address with asyn */ + CommStatus status; /* Controller communication status. */ + double drive_resolution[4]; + bool versionSupport; /* Track supported Versions - include in Report */ + char asyn_port[80]; /* asyn port name */ +}; + + +typedef union +{ + epicsUInt16 All; + struct + { +#ifdef MSB_First + unsigned int cmnd_err :1; /* 15 - Command Error */ + unsigned int na6 :1; /* 14 - */ + unsigned int autozero :1; /* 13 - AutoZero function is running */ + unsigned int plus_ls :1; /* 12 - Positive limit switch flag. */ + unsigned int minus_ls :1; /* 11 - Negative limit switch flag. */ + unsigned int moving :1; /* 10 - Moving indicator - position error outside tolerance */ + unsigned int volt_limit :1; /* 9 - piezo voltage limit reached */ + unsigned int torque :1; /* 8 - Servo-control status */ + unsigned int nabyte :8; + +#else + unsigned int nabyte :8; + unsigned int torque :1; /* 8 - Servo-control status */ + unsigned int volt_limit :1; /* 9 - piezo voltage limit reached */ + unsigned int moving :1; /* 10 - Moving indicator - position error outside tolerance */ + unsigned int minus_ls :1; /* 11 - Negative limit switch flag. */ + unsigned int plus_ls :1; /* 12 - Positive limit switch flag. */ + unsigned int autozero :1; /* 13 - AutoZero function is running */ + unsigned int na6 :1; /* 14 - */ + unsigned int cmnd_err :1; /* 15 - Command Error */ +#endif + } Bits; +} E517_Status_Reg; + + +/* Function prototypes. */ +extern RTN_STATUS PIE517Setup(int, int); +extern RTN_STATUS PIE517Config(int, const char *, int); + +#endif /* INCdrvPIE517h */ diff --git a/motorApp/PiSrc/drvPIE710.cc b/motorApp/PiSrc/drvPIE710.cc index 3fd920c..d5221b4 100644 --- a/motorApp/PiSrc/drvPIE710.cc +++ b/motorApp/PiSrc/drvPIE710.cc @@ -3,9 +3,6 @@ FILENAME... drvPIE710.cc USAGE... Motor record driver level support for Physik Instrumente (PI) GmbH & Co. E-710 motor controller. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-10-06 18:18:22 $ */ /* @@ -48,6 +45,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "drvPIE710.h" @@ -352,7 +351,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -561,7 +560,7 @@ static int motor_init() do { - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, buff[0], 1); /* Parse out E710 revision (3 decimal places) and convert to int */ diff --git a/motorApp/PiSrc/drvPIE816.cc b/motorApp/PiSrc/drvPIE816.cc index 185a81b..d08d011 100644 --- a/motorApp/PiSrc/drvPIE816.cc +++ b/motorApp/PiSrc/drvPIE816.cc @@ -53,6 +53,8 @@ DESIGN LIMITATIONS... #include #include #include +#include +#include #include "motorRecord.h" #include "motor.h" #include "drvPIE816.h" @@ -250,14 +252,14 @@ static int set_status(int card, int signal) recv_mess(card, buff, FLUSH); readOK = false; - //send_mess(card, READ_ONLINE, (char) NULL); + //send_mess(card, READ_ONLINE, (char*) NULL); /* if (recv_mess(card, buff, 1) && sscanf(buff, "%d", &online_status)) { if (!online_status) { *//* Assume Controller Reboot - Set ONLINE and Velocity Control ON */ - /*send_mess(card, SET_ONLINE, (char) NULL); - send_mess(card, SET_VELCTRL, (char) NULL); + /*send_mess(card, SET_ONLINE, (char*) NULL); + send_mess(card, SET_VELCTRL, (char*) NULL); } */ send_mess(card, READ_ONTARGET, PIE816_axis[signal]); @@ -375,7 +377,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char) NULL); + send_mess(card, buff, (char*) NULL); nodeptr->postmsgptr = NULL; } @@ -595,15 +597,15 @@ static int motor_init() online = false; */ /* Set Controller to ONLINE mode */ -/* send_mess(card_index, SET_ONLINE, (char) NULL); - send_mess(card_index, READ_ONLINE, (char) NULL); +/* send_mess(card_index, SET_ONLINE, (char*) NULL); + send_mess(card_index, READ_ONLINE, (char*) NULL); if ((status = recv_mess(card_index, buff, 1))) online = (atoi(buff)==1) ? true : false; else retry++; } while (online == false && retry < 3); */ - send_mess(card_index, GET_IDENT, (char) NULL); + send_mess(card_index, GET_IDENT, (char*) NULL); status = recv_mess(card_index, buff, 1); /* Parse out E816 revision (2 decimal places) and convert to int */ @@ -637,7 +639,7 @@ static int motor_init() brdptr->total_axis = total_axis; /* Turn ON velocity control mode - All axis */ - /*send_mess(card_index, SET_VELCTRL, (char) NULL);*/ + /*send_mess(card_index, SET_VELCTRL, (char*) NULL);*/ for (motor_index = 0; motor_index < total_axis; motor_index++) { diff --git a/motorApp/ScriptMotorSrc/Makefile b/motorApp/ScriptMotorSrc/Makefile new file mode 100644 index 0000000..37157cf --- /dev/null +++ b/motorApp/ScriptMotorSrc/Makefile @@ -0,0 +1,30 @@ +# Makefile +TOP=../.. + +include $(TOP)/configure/CONFIG +#---------------------------------------- +# ADD MACRO DEFINITIONS AFTER THIS LINE +#============================= + +#================================================== +# Build an IOC support library +LIBRARY_IOC = ScriptMotor + +# motorRecord.h will be created from motorRecord.dbd +# install devMotorSoft.dbd into /dbd +DBD += ScriptMotorDriver.dbd + +INC += ScriptMotorDriver.h + +# The following are compiled and added to the Support library +ScriptMotor_SRCS += ScriptMotorDriver.cpp + +ScriptMotor_LIBS += motor +ScriptMotor_LIBS += asyn +ScriptMotor_LIBS += lua +ScriptMotor_LIBS += $(EPICS_BASE_IOC_LIBS) + +include $(TOP)/configure/RULES +#---------------------------------------- +# ADD RULES AFTER THIS LINE + diff --git a/motorApp/ScriptMotorSrc/ScriptMotorDriver.cpp b/motorApp/ScriptMotorSrc/ScriptMotorDriver.cpp new file mode 100644 index 0000000..93b8e3d --- /dev/null +++ b/motorApp/ScriptMotorSrc/ScriptMotorDriver.cpp @@ -0,0 +1,859 @@ +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include "asynMotorController.h" +#include "asynMotorAxis.h" + +#include +#include "ScriptMotorDriver.h" + +#define NINT(f) (int)((f)>0 ? (f)+0.5 : (f)-0.5) + + +/************************************************ + * These are the ScriptMotorController methods * + ************************************************/ + + +/** Creates a new ScriptMotorController object. + * \param[in] asyn_port The name of the asyn port that will be created for this driver + * \param[in] serial_port The name of the drvAsynSerialPort that was created previously to connect to the VirtualMotor controller + * \param[in] max_axes The number of axes that this controller supports + * \param[in] script_file + * \param[in] params + */ +ScriptMotorController::ScriptMotorController(const char* asyn_port, + int max_axes, + const char* script_file, + const char* params) + : asynMotorController(asyn_port, + max_axes, + 1, // No. ScriptMotorController asyn parameters + 0, // No. additional interfaces beyond those in base class + 0, // No. additional callback interfaces beyond those in base class + ASYN_CANBLOCK | ASYN_MULTIDEVICE, + 1, // autoconnect + 0, // Default priority + 0) // Default stack size +{ + this->script = std::string(script_file); + + if (params) { this->init_params = std::string(params); } + else { this->init_params = std::string(""); } + + this->createParam("RELOAD_SCRIPT", asynParamInt32, &this->ScriptMotorReload); + + for (int axis = 0; axis < max_axes; axis += 1) + { + new ScriptMotorAxis(this, axis, script_file, params); + } + + this->startPoller(this->movingPollPeriod_, this->idlePollPeriod_, this->forcedFastPolls_); +} + +void ScriptMotorController::reload() +{ + this->lock(); + for (int index = 0; index < this->numAxes_; index += 1) + { + ScriptMotorAxis* axis = this->getAxis(index); + axis->reload(this->script.c_str(), this->init_params.c_str()); + } + this->unlock(); + + printf("Controller %s reloaded %s.\n", this->portName, this->script.c_str()); +} + +/** Creates a new ScriptMotorController object. + * Configuration command, called directly or from iocsh + * \param[in] asyn_port The name of the asyn port that will be created for this driver + * \param[in] max_axes The number of axes that this controller supports + * \param[in] script_file + * \param[in] params + */ +extern "C" int ScriptControllerConfig(const char* asyn_port, + int max_axes, + const char* script_file, + const char* params) +{ + new ScriptMotorController(asyn_port, max_axes, script_file, params); + return(asynSuccess); +} + + +/** Reports on status of the driver + * \param[in] fp The file pointer on which report information will be written + * \param[in] level The level of report detail desired + * + * If details > 0 then information is printed about each axis. + * After printing controller-specific information it calls asynMotorController::report() + */ +void ScriptMotorController::report(FILE *fp, int level) +{ + fprintf(fp, "Script Motor Controller driver %s\n", this->portName); + fprintf(fp, " numAxes=%d\n", numAxes_); + fprintf(fp, " moving poll period=%f\n", movingPollPeriod_); + fprintf(fp, " idle poll period=%f\n", idlePollPeriod_); + + // Call the base class method + asynMotorController::report(fp, level); +} + +asynStatus ScriptMotorController::writeInt32(asynUser *pasynUser, epicsInt32 value) +{ + int function = pasynUser->reason; + + if (function == this->ScriptMotorReload) + { + if (value == 1) { this->reload(); } + return asynSuccess; + } + else + { + return asynMotorController::writeInt32(pasynUser, value); + } +} + +asynStatus ScriptMotorController::setIntegerParam(int list, int function, int value) +{ + if (function >= this->motorStatusDirection_ && function <= this->motorStatusHomed_) + { + ScriptMotorAxis* axis = (ScriptMotorAxis*) this->getAxis(list); + epicsUInt32 status = axis->setStatusParam(function, value); + asynMotorController::setIntegerParam(list, this->motorStatus_, status); + } + + return asynMotorController::setIntegerParam(list, function, value); +} + +asynStatus ScriptMotorController::setDoubleParam(int list, int function, double value) +{ + if (function == this->motorPosition_ || function == this->motorEncoderPosition_) + { + ScriptMotorAxis* axis = (ScriptMotorAxis*) this->getAxis(list); + axis->setPositionParam(function, value); + } + + return asynMotorController::setDoubleParam(list, function, value); +} + +void ScriptMotorController::configAxis(int axisNo, const char* params) +{ + ScriptMotorAxis* axis = this->getAxis(axisNo); + + if (params) { axis->params = std::string(params); } + else { axis->params = std::string(""); } + + axis->config(params); +} + +/** Returns a pointer to an ScriptMotorAxis object. + * Returns NULL if the axis number encoded in pasynUser is invalid. + * \param[in] pasynUser asynUser structure that encodes the axis index number. */ +ScriptMotorAxis* ScriptMotorController::getAxis(asynUser *pasynUser) +{ + return static_cast(asynMotorController::getAxis(pasynUser)); +} + + +/** Returns a pointer to an ScriptMotorAxis object. + * Returns NULL if the axis number encoded in pasynUser is invalid. + * \param[in] axisNo Axis index number. */ +ScriptMotorAxis* ScriptMotorController::getAxis(int axisNo) +{ + return static_cast(asynMotorController::getAxis(axisNo)); +} + + +/****************************************** + * These are the ScriptMotorAxis methods * + ******************************************/ + + +/** Creates a new ScriptMotorAxis object. + * \param[in] pC Pointer to the ScriptMotorController to which this axis belongs. + * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1. + * + * Initializes register numbers, etc. + */ +ScriptMotorAxis::ScriptMotorAxis(ScriptMotorController *pC, int axisNo, const char* script_file, const char* params) + : asynMotorAxis(pC, axisNo), + pC_(pC) +{ + this->initState(script_file); + this->config(params); + + int isnum; + + lua_getglobal(this->state, "MovingPollPeriod"); + double MovingPollPeriod = lua_tonumberx(this->state, -1, &isnum); + if (isnum) { pC->movingPollPeriod_ = MovingPollPeriod; } + lua_remove(this->state, -1); + + lua_getglobal(this->state, "IdlePollPeriod"); + double IdlePollPeriod = lua_tonumberx(this->state, -1, &isnum); + if (isnum) { pC->idlePollPeriod_ = IdlePollPeriod; } + lua_remove(this->state, -1); + + lua_getglobal(this->state, "ForcedFastPolls"); + double ForcedFastPolls = lua_tonumberx(this->state, -1, &isnum); + if (isnum) { pC->forcedFastPolls_ = ForcedFastPolls; } + lua_remove(this->state, -1); + + // Zero the encoder position (this only appears to be a problem on windows) + setDoubleParam(pC_->motorEncoderPosition_, 0.0); + + // Make the changed parameters take effect + callParamCallbacks(); +} + +void ScriptMotorAxis::initState(const char* script_file) +{ + this->state = luaL_newstate(); + int status = luaLoadScript(this->state, script_file); + + if (status) { printf("Error compiling script file: %s\n", script_file); } + + lua_pushstring(this->state, (const char*) this->pC_->portName); + lua_setglobal(this->state, "DRIVER"); + + lua_pushnumber(this->state, axisNo_); + lua_setglobal(this->state, "AXIS"); +} + +void ScriptMotorAxis::reload(const char* script_file, const char* controller_params) +{ + this->initState(script_file); + this->config(controller_params); + this->config(this->params.c_str()); +} + +epicsUInt32 ScriptMotorAxis::setStatusParam(int index, int value) +{ + if (index >= pC_->motorStatusDirection_ && index <= pC_->motorStatusHomed_) + { + epicsUInt32 status = status_.status; + int mask = 1 << (index - pC_->motorStatusDirection_); + + if (value) { status |= mask; } + else { status &= ~mask; } + + if (status != status_.status) + { + status_.status = status; + statusChanged_ = 1; + } + + return status; + } + + return 0; +} + +void ScriptMotorAxis::setPositionParam(int index, double value) +{ + if (index == pC_->motorPosition_) + { + if (value != status_.position) + { + statusChanged_ = 1; + status_.position = value; + } + } + else if (index == pC_->motorEncoderPosition_) + { + if (value != status_.encoderPosition) + { + statusChanged_ = 1; + status_.encoderPosition = value; + } + } +} + + +/* + * + */ +extern "C" int ScriptAxisConfig(const char* ScriptMotorName, int axisNo, const char* params) +{ + static const char *functionName = "VirtualMotorCreateAxis"; + + ScriptMotorController *pC = (ScriptMotorController*) findAsynPortDriver(ScriptMotorName); + if (!pC) + { + printf("Error port %s not found\n", ScriptMotorName); + return asynError; + } + + pC->lock(); + pC->configAxis(axisNo, params); + pC->unlock(); + + return asynSuccess; +} + + +/** Reports on status of the axis + * \param[in] fp The file pointer on which report information will be written + * \param[in] level The level of report detail desired + * + * After printing device-specific information calls asynMotorAxis::report() + */ +void ScriptMotorAxis::report(FILE *fp, int level) +{ + if (level > 0) { + fprintf(fp, " Axis #%d\n", axisNo_); + fprintf(fp, " axisIndex_=%d\n", axisIndex_); + } + + // Call the base class method + asynMotorAxis::report(fp, level); +} + + +/* + * move() is called by asynMotor device support when an absolute or a relative move is requested. + * It can be called multiple times if BDST > 0 or RTRY > 0. + * + * Arguments in terms of motor record fields: + * position (steps) = RVAL = DVAL / MRES + * baseVelocity (steps/s) = VBAS / abs(MRES) + * velocity (step/s) = VELO / abs(MRES) + * acceleration (step/s/s) = (velocity - baseVelocity) / ACCL + */ +asynStatus ScriptMotorAxis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration) +{ + asynStatus status; + // static const char *functionName = "ScriptMotorAxis::move"; + + int result = lua_getglobal(this->state, "move"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, position); + lua_pushboolean(this->state, relative); + lua_pushnumber(this->state, minVelocity); + lua_pushnumber(this->state, maxVelocity); + lua_pushnumber(this->state, acceleration); + + if (lua_pcall(this->state, 5, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + + +/* + * home() is called by asynMotor device support when a home is requested. + * Note: forwards is set by device support, NOT by the motor record. + * + * Arguments in terms of motor record fields: + * minVelocity (steps/s) = VBAS / abs(MRES) + * maxVelocity (step/s) = HVEL / abs(MRES) + * acceleration (step/s/s) = (maxVelocity - minVelocity) / ACCL + * forwards = 1 if HOMF was pressed, 0 if HOMR was pressed + */ + +asynStatus ScriptMotorAxis::home(double minVelocity, double maxVelocity, double acceleration, int forwards) +{ + int result = lua_getglobal(this->state, "home"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, minVelocity); + lua_pushnumber(this->state, maxVelocity); + lua_pushnumber(this->state, acceleration); + lua_pushboolean(this->state, forwards); + + if (lua_pcall(this->state, 4, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + + + +/* + * moveVelocity() is called by asynMotor device support when a jog is requested. + * If a controller doesn't have a jog command (or jog commands), this a jog can be simulated here. + * + * Arguments in terms of motor record fields: + * minVelocity (steps/s) = VBAS / abs(MRES) + * maxVelocity (step/s) = (jog_direction == forward) ? JVEL * DIR / MRES : -1 * JVEL * DIR / MRES + * acceleration (step/s/s) = JAR / abs(EGU) + */ +asynStatus ScriptMotorAxis::moveVelocity(double minVelocity, double maxVelocity, double acceleration) +{ + int result = lua_getglobal(this->state, "moveVelocity"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, minVelocity); + lua_pushnumber(this->state, maxVelocity); + lua_pushnumber(this->state, acceleration); + + if (lua_pcall(this->state, 3, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + + +/* + * stop() is called by asynMotor device support whenever a user presses the stop button. + * It is also called when the jog button is released. + * + * Arguments in terms of motor record fields: + * acceleration = ??? + */ +asynStatus ScriptMotorAxis::stop(double acceleration) +{ + int result = lua_getglobal(this->state, "stop"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, acceleration); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + + +/* + * setPosition() is called by asynMotor device support when a position is redefined. + * It is also required for autosave to restore a position to the controller at iocInit. + * + * Arguments in terms of motor record fields: + * position (steps) = DVAL / MRES = RVAL + */ +asynStatus ScriptMotorAxis::setPosition(double position) +{ + int result = lua_getglobal(this->state, "setPosition"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, position); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + +asynStatus ScriptMotorAxis::setEncoderPosition(double position) +{ + int result = lua_getglobal(this->state, "setEncoderPosition"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, position); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + +asynStatus ScriptMotorAxis::setHighLimit(double highLimit) +{ + int result = lua_getglobal(this->state, "setHighLimit"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, highLimit); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + +asynStatus ScriptMotorAxis::setLowLimit(double lowLimit) +{ + int result = lua_getglobal(this->state, "setLowLimit"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, lowLimit); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + + +asynStatus ScriptMotorAxis::setPGain(double PGain) +{ + int result = lua_getglobal(this->state, "setPGain"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, PGain); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + +asynStatus ScriptMotorAxis::setIGain(double IGain) +{ + int result = lua_getglobal(this->state, "setIGain"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, IGain); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + +asynStatus ScriptMotorAxis::setDGain(double DGain) +{ + int result = lua_getglobal(this->state, "setDGain"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, DGain); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + +/* + * setClosedLoop() is called by asynMotor device support when a user enables or disables torque, + * usually from the motorx_all.adl, but only for drivers that set the following params to 1: + * pC->motorStatusGainSupport_ + * pC->motorStatusHasEncoder_ + * What is actually implemented here varies greatly based on the specfics of the controller. + * + * Arguments in terms of motor record fields: + * closedLoop = CNEN + */ + +asynStatus ScriptMotorAxis::setClosedLoop(bool closedLoop) +{ + int result = lua_getglobal(this->state, "setClosedLoop"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushboolean(this->state, (int) closedLoop); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + +asynStatus ScriptMotorAxis::setEncoderRatio(double EncoderRatio) +{ + int result = lua_getglobal(this->state, "setEncoderRatio"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + lua_pushnumber(this->state, EncoderRatio); + + if (lua_pcall(this->state, 1, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + // Do something with returned value + + lua_pop(this->state, 1); + } + + return asynSuccess; +} + + + +/** Polls the axis. + * This function reads the motor position, the limit status, the home status, the moving status, + * and the drive power-on status. + * It calls setIntegerParam() and setDoubleParam() for each item that it polls, + * and then calls callParamCallbacks() at the end. + * \param[out] moving A flag that is set indicating that the axis is moving (true) or done (false). */ +asynStatus ScriptMotorAxis::poll(bool *moving) +{ + int result = lua_getglobal(this->state, "poll"); + if (result != LUA_TFUNCTION) + { + // No function in script + } + else + { + if (lua_pcall(this->state, 0, 1, 0)) + { + this->logError(); + return asynError; + } + + int rettype = lua_type(this->state, -1); + + if (rettype == LUA_TBOOLEAN) + { + if (lua_toboolean(this->state, -1)) { *moving = true; } + else { *moving = false; } + } + + lua_pop(this->state, 1); + } + + this->callParamCallbacks(); + return asynSuccess; +} + +void ScriptMotorAxis::config(const char* params) +{ + luaLoadMacros(this->state, params); +} + +void ScriptMotorAxis::logError() +{ + std::string err(lua_tostring(this->state, -1)); + lua_pop(this->state, 1); + + printf("%s\n", err.c_str()); +} + +void ScriptMotorReload(const char* port) +{ + ScriptMotorController* controller = (ScriptMotorController*) findAsynPortDriver(port); + + if (controller != NULL) { controller->reload(); } +} + + +/** Code for iocsh registration */ +static const iocshArg ScriptMotorReloadArg0 = {"Motor Port name", iocshArgString}; + +static const iocshArg* const ScriptMotorReloadArgs[] = {&ScriptMotorReloadArg0}; + +static const iocshFuncDef ScriptMotorReloadDef = {"ScriptMotorReload", 1, ScriptMotorReloadArgs}; + +static void ScriptMotorReloadCallFunc(const iocshArgBuf *args) +{ + ScriptMotorReload(args[0].sval); +} + + +static const iocshArg ScriptMotorCreateControllerArg0 = {"Motor Port name", iocshArgString}; +static const iocshArg ScriptMotorCreateControllerArg1 = {"Number of axes", iocshArgInt}; +static const iocshArg ScriptMotorCreateControllerArg2 = {"Control Script", iocshArgString}; +static const iocshArg ScriptMotorCreateControllerArg3 = {"Parameters", iocshArgString}; +static const iocshArg * const ScriptMotorCreateControllerArgs[] = {&ScriptMotorCreateControllerArg0, + &ScriptMotorCreateControllerArg1, + &ScriptMotorCreateControllerArg2, + &ScriptMotorCreateControllerArg3}; +static const iocshFuncDef ScriptMotorCreateControllerDef = {"ScriptControllerConfig", 4, ScriptMotorCreateControllerArgs}; +static void ScriptMotorCreateContollerCallFunc(const iocshArgBuf *args) +{ + ScriptControllerConfig(args[0].sval, args[1].ival, args[2].sval, args[3].sval); +} + + +static const iocshArg ScriptMotorCreateAxisArg0 = {"Controller port name", iocshArgString}; +static const iocshArg ScriptMotorCreateAxisArg1 = {"Axis number", iocshArgInt}; +static const iocshArg ScriptMotorCreateAxisArg2 = {"Parameters", iocshArgString}; + +static const iocshArg * const ScriptMotorCreateAxisArgs[] = {&ScriptMotorCreateAxisArg0, + &ScriptMotorCreateAxisArg1, + &ScriptMotorCreateAxisArg2}; + +static const iocshFuncDef ScriptMotorCreateAxisDef = {"ScriptAxisConfig", 3, ScriptMotorCreateAxisArgs}; +static void ScriptMotorCreateAxisCallFunc(const iocshArgBuf *args) +{ + ScriptAxisConfig(args[0].sval, args[1].ival, args[2].sval); +} + + + +static void ScriptMotorRegister(void) +{ + iocshRegister(&ScriptMotorReloadDef, ScriptMotorReloadCallFunc); + iocshRegister(&ScriptMotorCreateControllerDef, ScriptMotorCreateContollerCallFunc); + iocshRegister(&ScriptMotorCreateAxisDef, ScriptMotorCreateAxisCallFunc); +} + + +extern "C" { +epicsExportRegistrar(ScriptMotorRegister); +} diff --git a/motorApp/ScriptMotorSrc/ScriptMotorDriver.dbd b/motorApp/ScriptMotorSrc/ScriptMotorDriver.dbd new file mode 100644 index 0000000..8f5bbc2 --- /dev/null +++ b/motorApp/ScriptMotorSrc/ScriptMotorDriver.dbd @@ -0,0 +1 @@ +registrar(ScriptMotorRegister) diff --git a/motorApp/ScriptMotorSrc/ScriptMotorDriver.h b/motorApp/ScriptMotorSrc/ScriptMotorDriver.h new file mode 100644 index 0000000..f3b8461 --- /dev/null +++ b/motorApp/ScriptMotorSrc/ScriptMotorDriver.h @@ -0,0 +1,76 @@ +#include "asynMotorController.h" +#include "asynMotorAxis.h" + +#include +#include "luaEpics.h" + +class epicsShareClass ScriptMotorAxis : public asynMotorAxis +{ +public: + /* These are the methods we override from the base class */ + ScriptMotorAxis(class ScriptMotorController *pC, int axisNo, const char* script_file, const char* params); + + void reload(const char* script, const char* params); + + void report(FILE *fp, int level); + + asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); + asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration); + asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); + asynStatus stop(double acceleration); + asynStatus poll(bool *moving); + asynStatus setPosition(double position); + asynStatus setEncoderPosition(double position); + asynStatus setHighLimit(double highLimit); + asynStatus setLowLimit(double lowLimit); + asynStatus setPGain(double pGain); + asynStatus setIGain(double iGain); + asynStatus setDGain(double dGain); + asynStatus setClosedLoop(bool closedLoop); + asynStatus setEncoderRatio(double ratio); + + virtual epicsUInt32 setStatusParam(int index, int value); + virtual void setPositionParam(int index, double value); + +private: + ScriptMotorController *pC_; /**< Pointer to the asynMotorController to which this axis belongs. + * Abbreviated because it is used very frequently */ + int axisIndex_; + + std::string params; + + lua_State* state; + + void initState(const char* script_file); + void config(const char* params); + void logError(); + +friend class ScriptMotorController; +}; + +class epicsShareClass ScriptMotorController : public asynMotorController { +public: + ScriptMotorController(const char *asyn_port, int max_axes, const char* script_file, const char* params); + + virtual asynStatus setIntegerParam(int list, int function, int value); + virtual asynStatus setDoubleParam(int list, int function, double value); + + virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); + + void report(FILE *fp, int level); + ScriptMotorAxis* getAxis(asynUser *pasynUser); + ScriptMotorAxis* getAxis(int axisNo); + + void configAxis(int axisNo, const char* params); + + void reload(); + +protected: + int ScriptMotorReload; + +private: + std::string script; + std::string init_params; + +friend class ScriptMotorAxis; +}; diff --git a/motorApp/SmarActMCSSrc/smarActMCSMotorDriver.cpp b/motorApp/SmarActMCSSrc/smarActMCSMotorDriver.cpp index 4ef9676..bf35d6b 100644 --- a/motorApp/SmarActMCSSrc/smarActMCSMotorDriver.cpp +++ b/motorApp/SmarActMCSSrc/smarActMCSMotorDriver.cpp @@ -35,8 +35,9 @@ #define FAR_AWAY 1000000000 /*nm*/ #define UDEG_PER_REV 360000000 -// Windows does not have rint() -#ifdef _WIN32 +// Windows and vxWorks do not have rint(), but minGW does +#if defined __MINGW32__ || defined __MINGW64__ +#elif defined _WIN32 || defined vxWorks double rint(double x) { //middle value point test diff --git a/motorApp/SmartMotorSrc/devSmartMotor.cc b/motorApp/SmartMotorSrc/devSmartMotor.cc index 919340d..7a0ce98 100644 --- a/motorApp/SmartMotorSrc/devSmartMotor.cc +++ b/motorApp/SmartMotorSrc/devSmartMotor.cc @@ -2,9 +2,6 @@ FILENAME... devSmartMotor.cc USAGE... Motor record driver level support for Animatics Corporation SmartMotors. -Version: $Revision: 1.2 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:21:56 $ */ /* @@ -44,6 +41,7 @@ Last Modified: $Date: 2008-03-14 20:21:56 $ */ #include +#include #include "motorRecord.h" #include "motor.h" @@ -72,7 +70,7 @@ extern struct driver_table SmartMotor_access; /* ----------------Create the dsets for devSmartMotor----------------- */ static struct driver_table *drvtabptr; -static long SmartMotor_init(void *); +static long SmartMotor_init(int); static long SmartMotor_init_record(void *); static long SmartMotor_start_trans(struct motorRecord *); static RTN_STATUS SmartMotor_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -129,12 +127,11 @@ static struct board_stat **SmartMotor_cards; /* initialize device support for SmartMotor stepper motor */ -static long SmartMotor_init(void *arg) +static long SmartMotor_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &SmartMotor_access; (drvtabptr->init) (); diff --git a/motorApp/SmartMotorSrc/drvSmartMotor.cc b/motorApp/SmartMotorSrc/drvSmartMotor.cc index acfbebf..bffe4b0 100644 --- a/motorApp/SmartMotorSrc/drvSmartMotor.cc +++ b/motorApp/SmartMotorSrc/drvSmartMotor.cc @@ -2,9 +2,6 @@ FILENAME... drvSmartMotor.cc USAGE... Motor record driver level support for Animatics Corporation SmartMotors. -Version: $Revision: 1.3 $ -Modified By: $Author: rivers $ -Last Modified: $Date: 2007-09-13 16:36:38 $ */ /* @@ -47,6 +44,8 @@ Last Modified: $Date: 2007-09-13 16:36:38 $ #include #include #include +#include +#include #include "motor.h" #include "motorRecord.h" #include "drvSmartMotor.h" diff --git a/motorApp/SoftMotorSrc/devSoft.cc b/motorApp/SoftMotorSrc/devSoft.cc index 77b0bdd..55d2913 100644 --- a/motorApp/SoftMotorSrc/devSoft.cc +++ b/motorApp/SoftMotorSrc/devSoft.cc @@ -1,11 +1,7 @@ /* -FILENAME... devSoft.cc -USAGE... Motor record device level support for Soft channel. +FILENAME... devSoft.cc +USAGE... Motor record device level support for Soft channel. -Version: $Revision: 14155 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2011-11-29 14:50:00 -0600 (Tue, 29 Nov 2011) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/SoftMotorSrc/devSoft.cc $ */ /* @@ -28,55 +24,60 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- * ----------------- * * .00 02-06-02 rls - Don't process from events unless interruptAccept is TRUE. - * - When done transitions from false to true it is not - * communicated to the motor record until after the last - * readback update. - * - In soft_process(), call dbProcess() instead of directly - * calling motor record's process(). - * - In soft_rdbl_func(), reset motor record's target to actual - * position after last readback if motion was not initiated - * by this record. + * - When done transitions from false to true it is not + * communicated to the motor record until after the last + * readback update. + * - In soft_process(), call dbProcess() instead of directly + * calling motor record's process(). + * - In soft_rdbl_func(), reset motor record's target to actual + * position after last readback if motion was not initiated + * by this record. * .01 10-29-02 rls - LOCK field added to prevent synchronization due to - * changing readback. + * changing readback. * .02 06-16-03 rls Convert to R3.14.x. * .03 08-03-05 rls - Added debug messages. - * - Fix compiler error with "gcc version 3.4.2 20041017 (Red - * Hat 3.4.2-6.fc3)". + * - Fix compiler error with "gcc version 3.4.2 20041017 (Red + * Hat 3.4.2-6.fc3)". */ /* NOTES... -- Can't call CA functions until after dbLockInitRecords() has - been called and initialized lock sets. +- Can't call CA functions until after dbLockInitRecords() has been called and initialized lock sets. */ +/* The following is needed to compile against Base R3.16.1 without a warning */ +#define USE_TYPED_RSET -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include "motorRecord.h" -#include "motor.h" -#include "devSoft.h" +#include "motorRecord.h" +#include "motor.h" +#include "devSoft.h" -#include "epicsExport.h" -#include "errlog.h" +#include "epicsExport.h" +#include "errlog.h" /*----------------debugging-----------------*/ volatile int devSoftdebug = 0; -extern "C" {epicsExportAddress(int, devSoftdebug);} -static inline void Debug(int level, const char *format, ...) { - #ifdef DEBUG - if (level < devSoftdebug) { - va_list pVar; - va_start(pVar, format); - vprintf(format, pVar); - va_end(pVar); +extern "C" +{epicsExportAddress(int, devSoftdebug);} +static inline void Debug(int level, const char *format, ...) +{ +#ifdef DEBUG + if (level < devSoftdebug) + { + va_list pVar; + va_start(pVar, format); + vprintf(format, pVar); + va_end(pVar); } - #endif +#endif } static CALLBACK_VALUE update(struct motorRecord *); @@ -95,7 +96,7 @@ struct motor_dset devMotorSoft = end }; -extern "C" {epicsExportAddress(dset,devMotorSoft);} +extern "C" {epicsExportAddress(dset, devMotorSoft);} static CALLBACK_VALUE update(struct motorRecord *mr) { @@ -105,9 +106,9 @@ static CALLBACK_VALUE update(struct motorRecord *mr) #ifdef DMR_SOFTMOTOR_MODS if (ptr->load_position) { - mr->rmp = ptr->new_position; - mr->rep = ptr->new_position; - ptr->load_position = FALSE; + mr->rmp = ptr->new_position; + mr->rep = ptr->new_position; + ptr->load_position = FALSE; } #endif @@ -117,13 +118,13 @@ static CALLBACK_VALUE update(struct motorRecord *mr) if (ptr->dinp_value == SOFTMOVE || ptr->dinp_value == HARDMOVE) { - Debug(5, "update(): DMOV=0 for %s.\n", mr->name); - status.Bits.RA_DONE = 0; + Debug(5, "update(): DMOV=0 for %s.\n", mr->name); + status.Bits.RA_DONE = 0; } else { - Debug(5, "update(): DMOV=1 for %s.\n", mr->name); - status.Bits.RA_DONE = 1; + Debug(5, "update(): DMOV=1 for %s.\n", mr->name); + status.Bits.RA_DONE = 1; } mr->msta = status.All; return(ptr->callback_flag); @@ -142,11 +143,11 @@ static RTN_STATUS end(struct motorRecord *mr) if (ptr->default_done_behavior == YES) { - msta_field status; + msta_field status; - status.All = 0; - status.Bits.RA_DONE = 1; - mr->msta = status.All; + status.All = 0; + status.Bits.RA_DONE = 1; + mr->msta = status.All; } return(OK); } @@ -159,38 +160,38 @@ static RTN_STATUS build(motor_cmnd command, double *parms, struct motorRecord *m switch (command) { - case MOVE_ABS: - case MOVE_REL: - status = dbPutLink(&mr->out, DBR_DOUBLE, &mr->dval, 1); - break; - - case STOP_AXIS: - status = dbPutLink(&mr->stoo, DBR_SHORT, &stop, 1); - break; - - case SET_HIGH_LIMIT: - case SET_LOW_LIMIT: - status = OK; - break; - - case LOAD_POS: - { - struct soft_private *ptr = (struct soft_private *) mr->dpvt; - msta_field msta; - + case MOVE_ABS: + case MOVE_REL: + status = dbPutLink(&mr->out, DBR_DOUBLE, &mr->dval, 1); + break; + + case STOP_AXIS: + status = dbPutLink(&mr->stoo, DBR_SHORT, &stop, 1); + break; + + case SET_HIGH_LIMIT: + case SET_LOW_LIMIT: + status = OK; + break; + + case LOAD_POS: + { + struct soft_private *ptr = (struct soft_private *) mr->dpvt; + msta_field msta; + #ifdef DMR_SOFTMOTOR_MODS - ptr->load_position = TRUE; - ptr->new_position = *parms; + ptr->load_position = TRUE; + ptr->new_position = *parms; #endif - msta.All = 0; - msta.Bits.RA_DONE = 1; - mr->msta = msta.All; - callbackRequest(&ptr->callback); - } - break; - - default: - status = ERROR; + msta.All = 0; + msta.Bits.RA_DONE = 1; + mr->msta = msta.All; + callbackRequest(&ptr->callback); + } + break; + + default: + status = ERROR; } return(status == 0 ? OK : ERROR); } @@ -198,24 +199,24 @@ static RTN_STATUS build(motor_cmnd command, double *parms, struct motorRecord *m /* FUNCTION... void soft_dinp_func(struct motorRecord *, short) -USAGE... Update soft channel device input links and +USAGE... Update soft channel device input links and process soft channel motor record when done moving. LOGIC... IF DINP link value is FALSE. - IF this soft motor's DMOV is FALSE. - This is a soft motor initiated move. - Set SOFTMOVE indicator. - ELSE IF LOCK field set to NO. - This is NOT a soft motor initiated move. - Set HARDMOVE indicator. - Set soft motor's DMOV FALSE. - Set PostProcess (PP) TRUE. - ENDIF + IF this soft motor's DMOV is FALSE. + This is a soft motor initiated move. + Set SOFTMOVE indicator. + ELSE IF LOCK field set to NO. + This is NOT a soft motor initiated move. + Set HARDMOVE indicator. + Set soft motor's DMOV FALSE. + Set PostProcess (PP) TRUE. + ENDIF ELSE - IF DINP state is HARDMOVE. - Set PostProcess (PP) True. - Set DINP state to DONE. - Process soft channel record. + IF DINP state is HARDMOVE. + Set PostProcess (PP) True. + Set DINP state to DONE. + Process soft channel record. ENDIF */ void soft_dinp_func(struct motorRecord *mr, short newdinp) @@ -223,33 +224,33 @@ void soft_dinp_func(struct motorRecord *mr, short newdinp) struct soft_private *ptr = (struct soft_private *) mr->dpvt; if (interruptAccept != TRUE) - return; - + return; + /* Test for hard motor started moving or initialization. */ if (newdinp == 0) { - if (mr->dmov == FALSE) - { - Debug(5, "soft_dinp_func(): SOFTMOVE set for %s.\n", mr->name); - ptr->dinp_value = SOFTMOVE; - } - else if (mr->lock == menuYesNoNO) - { /* Hard motor is moving independent of soft motor. */ - Debug(5, "soft_dinp_func(): HARDMOVE set for %s.\n", mr->name); - ptr->dinp_value = HARDMOVE; - mr->dmov = FALSE; - db_post_events(mr, &mr->dmov, DBE_VAL_LOG); - mr->pp = TRUE; - db_post_events(mr, &mr->pp, DBE_VAL_LOG); - } + if (mr->dmov == FALSE) + { + Debug(5, "soft_dinp_func(): SOFTMOVE set for %s.\n", mr->name); + ptr->dinp_value = SOFTMOVE; + } + else if (mr->lock == menuYesNoNO) + { /* Hard motor is moving independent of soft motor. */ + Debug(5, "soft_dinp_func(): HARDMOVE set for %s.\n", mr->name); + ptr->dinp_value = HARDMOVE; + mr->dmov = FALSE; + db_post_events(mr, &mr->dmov, DBE_VAL_LOG); + mr->pp = TRUE; + db_post_events(mr, &mr->pp, DBE_VAL_LOG); + } } - else /* Hard motor is done moving. */ + else /* Hard motor is done moving. */ { - if (ptr->dinp_value == HARDMOVE) - mr->pp = TRUE; - ptr->dinp_value = DONE; - Debug(5, "soft_dinp_func(): Done moving set for %s.\n", mr->name); - soft_process(mr); /* Process in case there is no readback callback. */ + if (ptr->dinp_value == HARDMOVE) + mr->pp = TRUE; + ptr->dinp_value = DONE; + Debug(5, "soft_dinp_func(): Done moving set for %s.\n", mr->name); + soft_process(mr); /* Process in case there is no readback callback. */ } } @@ -257,50 +258,50 @@ void soft_dinp_func(struct motorRecord *mr, short newdinp) void soft_rinp_func(struct motorRecord *mr, long newrinp) { if (interruptAccept != TRUE) - return; - + return; + mr->rmp = newrinp; soft_process(mr); } void soft_rdbl_func(struct motorRecord *mr, double newrdbl) -{ +{ struct soft_private *ptr = (struct soft_private *) mr->dpvt; if (interruptAccept != TRUE) - return; + return; newrdbl = newrdbl / mr->mres; mr->rmp = NINT(newrdbl); Debug(5, "soft_rdbl_func(): updated RMP = %d for %s.\n", mr->rmp, mr->name); - + if (ptr->initialized == false) { - /* Reset Target to Actual position. */ - unsigned short mask = (DBE_VALUE | DBE_LOG); + /* Reset Target to Actual position. */ + unsigned short mask = (DBE_VALUE | DBE_LOG); - mr->dmov = FALSE; - db_post_events(mr, &mr->dmov, mask); - mr->pp = TRUE; - db_post_events(mr, &mr->pp, mask); + mr->dmov = FALSE; + db_post_events(mr, &mr->dmov, mask); + mr->pp = TRUE; + db_post_events(mr, &mr->pp, mask); - ptr->dinp_value = DONE; - ptr->initialized = true; - } + ptr->dinp_value = DONE; + ptr->initialized = true; + } soft_process(mr); } /* FUNCTION... static void soft_process(struct motorRecord *) -USAGE... Process the soft channel motor record. +USAGE... Process the soft channel motor record. LOGIC... - Lock soft channel record - call dbScanLock(). - Set call back flag to CALLBACK_DATA so readback will get updated. - Process soft channel record - call process(). - Unlock soft channel record - call dbScanUnlock(). + Lock soft channel record - call dbScanLock(). + Set call back flag to CALLBACK_DATA so readback will get updated. + Process soft channel record - call process(). + Unlock soft channel record - call dbScanUnlock(). */ static void soft_process(struct motorRecord *mr) @@ -309,7 +310,7 @@ static void soft_process(struct motorRecord *mr) dbScanLock((struct dbCommon *) mr); ptr->callback_flag = CALLBACK_DATA; - dbProcess((struct dbCommon *) mr); /* Process the soft channel record. */ + dbProcess((struct dbCommon *) mr); /* Process the soft channel record. */ ptr->callback_flag = NOTHING_DONE; dbScanUnlock((struct dbCommon *) mr); } @@ -317,8 +318,8 @@ static void soft_process(struct motorRecord *mr) /* FUNCTION... void soft_motor_callback(CALLBACK *) -USAGE... Process motor record after the following events: - - LOAD_POS motor command. +USAGE... Process motor record after the following events: + - LOAD_POS motor command. LOGIC... */ diff --git a/motorApp/SoftMotorSrc/devSoft.h b/motorApp/SoftMotorSrc/devSoft.h index e59d465..470091c 100644 --- a/motorApp/SoftMotorSrc/devSoft.h +++ b/motorApp/SoftMotorSrc/devSoft.h @@ -4,10 +4,6 @@ FILENAME.. devSoft.h USAGE... This file contains information that is common to all Soft channel device support modules. -Version: $Revision: 10365 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-03-25 12:12:41 -0500 (Thu, 25 Mar 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/SoftMotorSrc/devSoft.h $ */ /* @@ -58,7 +54,7 @@ struct motor_node { struct motorRecord *pmr; }; -extern long soft_init(void *); +extern long soft_init(int); extern long soft_init_record(void *); extern void soft_dinp_func(struct motorRecord *, short); extern void soft_rdbl_func(struct motorRecord *, double); diff --git a/motorApp/SoftMotorSrc/devSoftAux.cc b/motorApp/SoftMotorSrc/devSoftAux.cc index e61b9b6..05a0496 100644 --- a/motorApp/SoftMotorSrc/devSoftAux.cc +++ b/motorApp/SoftMotorSrc/devSoftAux.cc @@ -1,11 +1,7 @@ /* -FILENAME... devSoftAux.cc -USAGE... Motor record device level support for Soft channel. +FILENAME... devSoftAux.cc +USAGE... Motor record device level support for Soft channel. -Version: $Revision: 10365 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2010-03-25 12:12:41 -0500 (Thu, 25 Mar 2010) $ -HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorApp/SoftMotorSrc/devSoftAux.cc $ */ /* @@ -28,7 +24,7 @@ HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6- * ----------------- * .01 06-16-03 rls Convert to R3.14.x. * .02 12-14-04 rls With EPICS R3.14.7 changes to epicsThread.h, need explicit - * #include + * #include * .03 2006-04-10 pnd Convert to linked lists to remove arbitrary maximum */ @@ -45,6 +41,7 @@ in the same file; each defines (redefines) the DBR's. #include #include #include +#include #include #include @@ -52,7 +49,21 @@ in the same file; each defines (redefines) the DBR's. #include "motor.h" #include "devSoft.h" -#define STATIC static +#define STATIC static + +extern volatile int devSoftdebug; +static inline void Debug(int level, const char *format, ...) +{ +#ifdef DEBUG + if (level < devSoftdebug) + { + va_list pVar; + va_start(pVar, format); + vprintf(format, pVar); + va_end(pVar); + } +#endif +} STATIC void soft_dinp(struct event_handler_args); STATIC void soft_rdbl(struct event_handler_args); @@ -78,44 +89,42 @@ STATIC void soft_rinp(struct event_handler_args args) soft_rinp_func((struct motorRecord *) args.usr, *((long *) args.dbr)); } -long soft_init(void *after) +long soft_init(int after) { - int before_after = (after == 0) ? 0 : 1; - - if (before_after == 0) + if (!after) { - epicsThreadId dbCaTask_tid; - unsigned int soft_motor_priority; - int retry = 0; + epicsThreadId dbCaTask_tid; + unsigned int soft_motor_priority; + int retry = 0; soft_motor_sem = epicsEventCreate(epicsEventEmpty); - ellInit(&soft_motor_list); - - /* - * Fix for DMOV processing before the last DRBV update; i.e., lower - * the priority of the "soft_motor" task below the priority of the - * "dbCaLink" task. - */ - while((dbCaTask_tid = epicsThreadGetId("dbCaLink")) == 0 && retry < 10) - { - epicsThreadSleep(0.1); - retry++; - } - - if (dbCaTask_tid == 0) - { - errMessage(0, "cannot find dbCaLink task."); - return(ERROR); - } - soft_motor_priority = epicsThreadGetPriority(dbCaTask_tid); - soft_motor_priority -= 1; - - soft_motor_id = epicsThreadCreate((char *) "soft_motor", soft_motor_priority, + ellInit(&soft_motor_list); + + /* + * Fix for DMOV processing before the last DRBV update; i.e., lower + * the priority of the "soft_motor" task below the priority of the + * "dbCaLink" task. + */ + while((dbCaTask_tid = epicsThreadGetId("dbCaLink")) == 0 && retry < 10) + { + epicsThreadSleep(0.1); + retry++; + } + + if (dbCaTask_tid == 0) + { + errMessage(0, "cannot find dbCaLink task."); + return(ERROR); + } + soft_motor_priority = epicsThreadGetPriority(dbCaTask_tid); + soft_motor_priority -= 1; + + soft_motor_id = epicsThreadCreate((char *) "soft_motor", soft_motor_priority, epicsThreadGetStackSize(epicsThreadStackBig), - (EPICSTHREADFUNC) soft_motor_task, NULL); + (EPICSTHREADFUNC) soft_motor_task, NULL); } else - epicsEventSignal(soft_motor_sem); /* Start soft_motor_task(). */ + epicsEventSignal(soft_motor_sem); /* Start soft_motor_task(). */ return(OK); } @@ -129,12 +138,11 @@ long soft_init_record(void *arg) int status = 0; list_entry = (struct motor_node *) malloc(sizeof(struct motor_node)); - if (!list_entry) { - return(ERROR); - } + if (!list_entry) + return(ERROR); list_entry->pmr = mr; - ellAdd(&soft_motor_list, (ELLNODE*)list_entry); + ellAdd(&soft_motor_list, (ELLNODE*) list_entry); /* Allocate space for private field. */ mr->dpvt = (struct soft_private *) malloc(sizeof(struct soft_private)); @@ -143,8 +151,7 @@ long soft_init_record(void *arg) ptr->initialized = false; cbptr = &ptr->callback; - callbackSetCallback((void (*)(struct callbackPvt *)) soft_motor_callback, - cbptr); + callbackSetCallback((void (*)(struct callbackPvt *)) soft_motor_callback, cbptr); callbackSetPriority(priorityMedium, cbptr); callbackSetUser(mr, cbptr); return ((long) status); @@ -158,44 +165,60 @@ STATIC EPICSTHREADFUNC soft_motor_task(void *parm) chid dinp, rdbl, rinp; epicsEventId wait_forever; - epicsEventWait(soft_motor_sem); /* Wait for dbLockInitRecords() to execute. */ - SEVCHK(ca_context_create(ca_enable_preemptive_callback), - "soft_motor_task: ca_context_create() error"); + epicsEventWait(soft_motor_sem); /* Wait for dbLockInitRecords() to execute. */ + SEVCHK(ca_context_create(ca_enable_preemptive_callback), "soft_motor_task: ca_context_create() error"); - while ((node = (struct motor_node *)ellGet(&soft_motor_list))) + while ((node = (struct motor_node *) ellGet(&soft_motor_list))) { - struct soft_private *ptr; - - mr = node->pmr; - free(node); - - ptr = (struct soft_private *) mr->dpvt; - if (mr->dinp.value.constantStr == NULL) - { - ptr->default_done_behavior = true; - } - else - { - ptr->default_done_behavior = false; - SEVCHK(ca_search(mr->dinp.value.pv_link.pvname, &dinp), - "ca_search() failure"); - SEVCHK(ca_add_event(DBR_SHORT, dinp, soft_dinp, mr, NULL),"ca_add_event() failure"); - SEVCHK(ca_pend_io((float) 5.0), "DINP link failure"); - } + struct soft_private *ptr; + + mr = node->pmr; + free(node); + dbScanLock((dbCommon *)mr); + + ptr = (struct soft_private *) mr->dpvt; + Debug(5, "devSoftAux::soft_motor_task: motor %s link type=%d\n", mr->name, mr->dinp.type); + Debug(5, "devSoftAux::soft_motor_task: motor %s constantStr=%s dinp link=%s\n", mr->name, mr->dinp.value.constantStr, mr->dinp.value.pv_link.pvname); + if (((mr->dinp.type == PV_LINK) || + (mr->dinp.type == CA_LINK) || + (mr->dinp.type == DB_LINK)) && + (mr->dinp.value.pv_link.pvname != NULL)) + { + ptr->default_done_behavior = false; + Debug(5, "devSoftAux::soft_motor_task: adding dinp link for motor %s link=%s\n", mr->name, mr->dinp.value.pv_link.pvname); + SEVCHK(ca_search(mr->dinp.value.pv_link.pvname, &dinp), + "ca_search() failure"); + SEVCHK(ca_add_event(DBR_SHORT, dinp, soft_dinp, mr, NULL),"ca_add_event() failure"); + SEVCHK(ca_pend_io((float) 5.0), "DINP link failure"); + } + else + { + ptr->default_done_behavior = true; + } - if (mr->urip != 0) - { - SEVCHK(ca_search(mr->rdbl.value.pv_link.pvname, &rdbl),"ca_search() failure"); - SEVCHK(ca_add_event(DBR_DOUBLE, rdbl, soft_rdbl, mr, NULL),"ca_add_event() failure"); - SEVCHK(ca_pend_io((float) 5.0), "RDBL link failure"); - } - - if (mr->rinp.value.constantStr != NULL) - { - SEVCHK(ca_search(mr->rinp.value.pv_link.pvname, &rinp),"ca_search() failure"); - SEVCHK(ca_add_event(DBR_LONG, rinp, soft_rinp, mr, NULL),"ca_add_event() failure"); - SEVCHK(ca_pend_io((float) 5.0), "RINP link failure"); - } + if ((mr->urip != 0) && + ((mr->rdbl.type == PV_LINK) || + (mr->rdbl.type == CA_LINK) || + (mr->rdbl.type == DB_LINK)) && + (mr->rdbl.value.pv_link.pvname != NULL)) + { + Debug(5, "devSoftAux::soft_motor_task: adding rdbl link for motor %s link=%s\n", mr->name, mr->rdbl.value.pv_link.pvname); + SEVCHK(ca_search(mr->rdbl.value.pv_link.pvname, &rdbl),"ca_search() failure"); + SEVCHK(ca_add_event(DBR_DOUBLE, rdbl, soft_rdbl, mr, NULL),"ca_add_event() failure"); + SEVCHK(ca_pend_io((float) 5.0), "RDBL link failure"); + } + + if (((mr->rinp.type == PV_LINK) || + (mr->rinp.type == CA_LINK) || + (mr->rinp.type == DB_LINK)) && + (mr->rinp.value.pv_link.pvname != NULL)) + { + Debug(5, "devSoftAux::soft_motor_task: adding rinp link for motor %s link=%s\n", mr->name, mr->rinp.value.pv_link.pvname); + SEVCHK(ca_search(mr->rinp.value.pv_link.pvname, &rinp),"ca_search() failure"); + SEVCHK(ca_add_event(DBR_LONG, rinp, soft_rinp, mr, NULL),"ca_add_event() failure"); + SEVCHK(ca_pend_io((float) 5.0), "RINP link failure"); + } + dbScanUnlock((dbCommon *)mr); } ellFree(&soft_motor_list); @@ -203,9 +226,9 @@ STATIC EPICSTHREADFUNC soft_motor_task(void *parm) thread, so as not to show up in the thread list as "SUSPENDED", which is usually a sign of a fault. */ wait_forever = epicsEventCreate(epicsEventEmpty); - if (wait_forever) { - epicsEventMustWait(wait_forever); - } + if (wait_forever) + epicsEventMustWait(wait_forever); + return(NULL); } diff --git a/motorApp/ThorLabsSrc/ThorLabsRegister.cc b/motorApp/ThorLabsSrc/ThorLabsRegister.cc index a9939a1..457af50 100644 --- a/motorApp/ThorLabsSrc/ThorLabsRegister.cc +++ b/motorApp/ThorLabsSrc/ThorLabsRegister.cc @@ -2,9 +2,6 @@ FILENAME... ThorLabslRegister.cc USAGE... Register ThorLabs motor device driver shell commands. -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-09-27 20:32:37 $ */ /***************************************************************** diff --git a/motorApp/ThorLabsSrc/devMDT695.cc b/motorApp/ThorLabsSrc/devMDT695.cc index c46b339..86d1f7d 100644 --- a/motorApp/ThorLabsSrc/devMDT695.cc +++ b/motorApp/ThorLabsSrc/devMDT695.cc @@ -3,9 +3,6 @@ FILENAME... devMDT695.cc USAGE... Motor record device level support for ThorLabs Piezo Control Module (MDT695) -Version: $Revision: 1.2 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2008-03-14 20:23:45 $ */ /* @@ -41,6 +38,7 @@ Last Modified: $Date: 2008-03-14 20:23:45 $ #include #include +#include #include "motorRecord.h" #include "motor.h" #include "motordevCom.h" @@ -53,7 +51,7 @@ extern struct driver_table MDT695_access; /* ----------------Create the dsets for devMDT695----------------- */ STATIC struct driver_table *drvtabptr; -STATIC long MDT695_init(void *); +STATIC long MDT695_init(int); STATIC long MDT695_init_record(void *); STATIC long MDT695_start_trans(struct motorRecord *); STATIC RTN_STATUS MDT695_build_trans(motor_cmnd, double *, struct motorRecord *); @@ -107,12 +105,11 @@ static struct board_stat **MDT695_cards; /* initialize device support for MDT695 stepper motor */ -STATIC long MDT695_init(void *arg) +STATIC long MDT695_init(int after) { long rtnval; - int after = (arg == 0) ? 0 : 1; - if (after == 0) + if (!after) { drvtabptr = &MDT695_access; (drvtabptr->init)(); diff --git a/motorApp/ThorLabsSrc/drvMDT695.cc b/motorApp/ThorLabsSrc/drvMDT695.cc index ad9c7ab..ab2c801 100644 --- a/motorApp/ThorLabsSrc/drvMDT695.cc +++ b/motorApp/ThorLabsSrc/drvMDT695.cc @@ -4,9 +4,6 @@ USAGE... Motor record driver level support for ThorLabs Piezo Control Module (Model: MDT695) Compatable with MDT694, MDT693 -Version: $Revision: 1.4 $ -Modified By: $Author: sluiter $ -Last Modified: $Date: 2009-09-08 18:36:20 $ */ @@ -47,6 +44,8 @@ Last Modified: $Date: 2009-09-08 18:36:20 $ #include #include #include +#include +#include #include "motor.h" #include "ThorLabsRegister.h" #include "drvMDT695.h" @@ -335,7 +334,7 @@ static int set_status(int card, int signal) nodeptr->postmsgptr != 0) { strncpy(send_buff, nodeptr->postmsgptr, 80); - send_mess(card, send_buff, (char) NULL); + send_mess(card, send_buff, (char*) NULL); nodeptr->postmsgptr = NULL; } diff --git a/motorApp/ThorLabsSrc/drvMDT695.h b/motorApp/ThorLabsSrc/drvMDT695.h index 8ebf6ee..fc52029 100644 --- a/motorApp/ThorLabsSrc/drvMDT695.h +++ b/motorApp/ThorLabsSrc/drvMDT695.h @@ -3,9 +3,6 @@ FILENAME... drvMDT695.h USAGE... This file contains ThorLabs Piezo Control Module (MDT695) motorRecord driver information . -Version: $Revision: 1.1 $ -Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-09-27 20:32:37 $ */ /* diff --git a/motorApp/op/adl/4motor_form.adl b/motorApp/op/adl/4motor_form.adl index 195997f..834de3b 100644 --- a/motorApp/op/adl/4motor_form.adl +++ b/motorApp/op/adl/4motor_form.adl @@ -240,58 +240,6 @@ text { textix="(SECONDS)" align="horiz. centered" } -"text entry" { - object { - x=1000 - y=113 - width=50 - height=16 - } - control { - chan="$(P)$(M5).BACC" - clr=14 - bclr=2 - } -} -"text entry" { - object { - x=1000 - y=128 - width=50 - height=16 - } - control { - chan="$(P)$(M6).BACC" - clr=14 - bclr=2 - } -} -"text entry" { - object { - x=1000 - y=143 - width=50 - height=16 - } - control { - chan="$(P)$(M7).BACC" - clr=14 - bclr=2 - } -} -"text entry" { - object { - x=1000 - y=158 - width=50 - height=16 - } - control { - chan="$(P)$(M8).BACC" - clr=14 - bclr=2 - } -} "text entry" { object { x=1000 diff --git a/motorApp/op/adl/ScriptMotorReload.adl b/motorApp/op/adl/ScriptMotorReload.adl new file mode 100644 index 0000000..6f76c4a --- /dev/null +++ b/motorApp/op/adl/ScriptMotorReload.adl @@ -0,0 +1,140 @@ + +file { + name="/home/oxygen40/KLANG/Documents/Projects/Repository/git/motor/motorApp/op/adl/ScriptMotorReload.adl" + version=030107 +} +display { + object { + x=663 + y=227 + width=220 + height=75 + } + 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=0 + y=0 + width=250 + height=25 + } + "basic attribute" { + clr=29 + } +} +"message button" { + object { + x=10 + y=35 + width=200 + height=30 + } + control { + chan="$(P)$(PORT):ScriptReload" + clr=14 + bclr=62 + } + label="Reload $(PORT)" + press_msg="1" +} +rectangle { + object { + x=-7 + y=-7 + width=257 + height=32 + } + "basic attribute" { + clr=14 + fill="outline" + width=3 + } +} +text { + object { + x=5 + y=3 + width=200 + height=20 + } + "basic attribute" { + clr=0 + } + textix="Script Motor Reload" +} diff --git a/motorApp/op/adl/XPSPositionCompare.adl b/motorApp/op/adl/XPSPositionCompare.adl new file mode 100644 index 0000000..4823ea3 --- /dev/null +++ b/motorApp/op/adl/XPSPositionCompare.adl @@ -0,0 +1,522 @@ + +file { + name="/home/epics/devel/motor/motorApp/op/adl/XPSPositionCompare.adl" + version=030107 +} +display { + object { + x=428 + y=115 + width=880 + height=140 + } + 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=33 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Description" + align="horiz. centered" +} +text { + object { + x=38 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Motor" + align="horiz. centered" +} +text { + object { + x=282 + y=5 + width=286 + height=26 + } + "basic attribute" { + clr=14 + fill="outline" + } + textix="XPS Position Compare" + align="horiz. centered" +} +polyline { + object { + x=2 + y=34 + width=880 + height=0 + } + "basic attribute" { + clr=14 + fill="outline" + } + points { + (2,34) + (882,34) + } +} +text { + object { + x=215 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Enable" + align="horiz. centered" +} +rectangle { + object { + x=5 + y=80 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=10 + y=110 + width=200 + height=20 + } + monitor { + chan="$(P)$(M1).DESC" + clr=14 + bclr=45 + } + limits { + } +} +menu { + object { + x=215 + y=110 + width=130 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=88 + width=130 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=560 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=560 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=350 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text update" { + object { + x=350 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=455 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text update" { + object { + x=455 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +composite { + object { + x=350 + y=40 + width=520 + height=36 + } + "composite name"="" + children { + text { + object { + x=350 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Mode" + align="horiz. centered" + } + text { + object { + x=455 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Position" + align="horiz. centered" + } + text { + object { + x=560 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Size" + align="horiz. centered" + } + text { + object { + x=350 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Minimum" + align="horiz. centered" + } + text { + object { + x=455 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Maximum" + align="horiz. centered" + } + text { + object { + x=560 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Step" + align="horiz. centered" + } + text { + object { + x=665 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Width (us)" + align="horiz. centered" + } + text { + object { + x=665 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Pulse" + align="horiz. centered" + } + text { + object { + x=770 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Time (us)" + align="horiz. centered" + } + text { + object { + x=770 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Settling" + align="horiz. centered" + } + } +} diff --git a/motorApp/op/adl/XPSPositionCompare8.adl b/motorApp/op/adl/XPSPositionCompare8.adl new file mode 100644 index 0000000..c21af6b --- /dev/null +++ b/motorApp/op/adl/XPSPositionCompare8.adl @@ -0,0 +1,2191 @@ + +file { + name="/home/epics/devel/motor/motorApp/op/adl/XPSPositionCompare8.adl" + version=030107 +} +display { + object { + x=428 + y=115 + width=880 + height=560 + } + 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=33 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Description" + align="horiz. centered" +} +text { + object { + x=38 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Motor" + align="horiz. centered" +} +text { + object { + x=282 + y=5 + width=286 + height=26 + } + "basic attribute" { + clr=14 + fill="outline" + } + textix="XPS Position Compare" + align="horiz. centered" +} +polyline { + object { + x=2 + y=34 + width=880 + height=0 + } + "basic attribute" { + clr=14 + fill="outline" + } + points { + (2,34) + (882,34) + } +} +"text update" { + object { + x=10 + y=110 + width=200 + height=20 + } + monitor { + chan="$(P)$(M1).DESC" + clr=14 + bclr=45 + } + limits { + } +} +rectangle { + object { + x=4 + y=140 + width=840 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=9 + y=170 + width=200 + height=20 + } + monitor { + chan="$(P)$(M1).DESC" + clr=14 + bclr=45 + } + limits { + } +} +"text update" { + object { + x=10 + y=170 + width=200 + height=20 + } + monitor { + chan="$(P)$(M2).DESC" + clr=14 + bclr=45 + } + limits { + } +} +"text update" { + object { + x=10 + y=230 + width=200 + height=20 + } + monitor { + chan="$(P)$(M3).DESC" + clr=14 + bclr=45 + } + limits { + } +} +"text update" { + object { + x=10 + y=290 + width=200 + height=20 + } + monitor { + chan="$(P)$(M4).DESC" + clr=14 + bclr=45 + } + limits { + } +} +"text update" { + object { + x=10 + y=350 + width=200 + height=20 + } + monitor { + chan="$(P)$(M5).DESC" + clr=14 + bclr=45 + } + limits { + } +} +"text update" { + object { + x=10 + y=410 + width=200 + height=20 + } + monitor { + chan="$(P)$(M6).DESC" + clr=14 + bclr=45 + } + limits { + } +} +"text update" { + object { + x=10 + y=470 + width=200 + height=20 + } + monitor { + chan="$(P)$(M7).DESC" + clr=14 + bclr=45 + } + limits { + } +} +"text update" { + object { + x=10 + y=530 + width=200 + height=20 + } + monitor { + chan="$(P)$(M8).DESC" + clr=14 + bclr=45 + } + limits { + } +} +text { + object { + x=215 + y=56 + width=129 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Mode" + align="horiz. centered" +} +menu { + object { + x=215 + y=110 + width=129 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=88 + width=129 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +menu { + object { + x=214 + y=170 + width=129 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=214 + y=148 + width=129 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +menu { + object { + x=215 + y=170 + width=129 + height=20 + } + control { + chan="$(P)$(M2)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=148 + width=129 + height=18 + } + monitor { + chan="$(P)$(M2)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +menu { + object { + x=215 + y=230 + width=129 + height=20 + } + control { + chan="$(P)$(M3)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=208 + width=129 + height=18 + } + monitor { + chan="$(P)$(M3)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +menu { + object { + x=215 + y=290 + width=129 + height=20 + } + control { + chan="$(P)$(M4)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=268 + width=129 + height=18 + } + monitor { + chan="$(P)$(M4)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +menu { + object { + x=215 + y=350 + width=129 + height=20 + } + control { + chan="$(P)$(M5)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=328 + width=129 + height=18 + } + monitor { + chan="$(P)$(M5)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +menu { + object { + x=215 + y=410 + width=129 + height=20 + } + control { + chan="$(P)$(M6)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=388 + width=129 + height=18 + } + monitor { + chan="$(P)$(M6)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +menu { + object { + x=215 + y=470 + width=129 + height=20 + } + control { + chan="$(P)$(M7)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=448 + width=129 + height=18 + } + monitor { + chan="$(P)$(M7)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +menu { + object { + x=215 + y=530 + width=129 + height=20 + } + control { + chan="$(P)$(M8)PositionCompareMode" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=215 + y=508 + width=129 + height=18 + } + monitor { + chan="$(P)$(M8)PositionCompareMode_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +text { + object { + x=350 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Position" + align="horiz. centered" +} +text { + object { + x=455 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Position" + align="horiz. centered" +} +text { + object { + x=560 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Size" + align="horiz. centered" +} +text { + object { + x=350 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Minimum" + align="horiz. centered" +} +text { + object { + x=455 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Maximum" + align="horiz. centered" +} +text { + object { + x=560 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Step" + align="horiz. centered" +} +text { + object { + x=665 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Width (us)" + align="horiz. centered" +} +text { + object { + x=665 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Pulse" + align="horiz. centered" +} +text { + object { + x=770 + y=56 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Time (us)" + align="horiz. centered" +} +text { + object { + x=770 + y=40 + width=100 + height=20 + } + "basic attribute" { + clr=54 + fill="outline" + } + textix="Settling" + align="horiz. centered" +} +"text entry" { + object { + x=350 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=455 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=560 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=110 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=350 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=455 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=560 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=88 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=349 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=454 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=559 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=664 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=769 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M1)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=349 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=454 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=559 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=664 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=769 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M1)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=350 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M2)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=455 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M2)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=560 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M2)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M2)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=170 + width=100 + height=20 + } + control { + chan="$(P)$(M2)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=350 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M2)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=455 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M2)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=560 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M2)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M2)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=148 + width=100 + height=18 + } + monitor { + chan="$(P)$(M2)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=350 + y=230 + width=100 + height=20 + } + control { + chan="$(P)$(M3)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=455 + y=230 + width=100 + height=20 + } + control { + chan="$(P)$(M3)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=560 + y=230 + width=100 + height=20 + } + control { + chan="$(P)$(M3)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=230 + width=100 + height=20 + } + control { + chan="$(P)$(M3)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=230 + width=100 + height=20 + } + control { + chan="$(P)$(M3)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=350 + y=208 + width=100 + height=18 + } + monitor { + chan="$(P)$(M3)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=455 + y=208 + width=100 + height=18 + } + monitor { + chan="$(P)$(M3)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=560 + y=208 + width=100 + height=18 + } + monitor { + chan="$(P)$(M3)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=208 + width=100 + height=18 + } + monitor { + chan="$(P)$(M3)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=208 + width=100 + height=18 + } + monitor { + chan="$(P)$(M3)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=350 + y=290 + width=100 + height=20 + } + control { + chan="$(P)$(M4)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=455 + y=290 + width=100 + height=20 + } + control { + chan="$(P)$(M4)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=560 + y=290 + width=100 + height=20 + } + control { + chan="$(P)$(M4)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=290 + width=100 + height=20 + } + control { + chan="$(P)$(M4)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=290 + width=100 + height=20 + } + control { + chan="$(P)$(M4)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=350 + y=268 + width=100 + height=18 + } + monitor { + chan="$(P)$(M4)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=455 + y=268 + width=100 + height=18 + } + monitor { + chan="$(P)$(M4)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=560 + y=268 + width=100 + height=18 + } + monitor { + chan="$(P)$(M4)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=268 + width=100 + height=18 + } + monitor { + chan="$(P)$(M4)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=268 + width=100 + height=18 + } + monitor { + chan="$(P)$(M4)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=350 + y=350 + width=100 + height=20 + } + control { + chan="$(P)$(M5)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=455 + y=350 + width=100 + height=20 + } + control { + chan="$(P)$(M5)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=560 + y=350 + width=100 + height=20 + } + control { + chan="$(P)$(M5)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=350 + width=100 + height=20 + } + control { + chan="$(P)$(M5)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=350 + width=100 + height=20 + } + control { + chan="$(P)$(M5)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=350 + y=328 + width=100 + height=18 + } + monitor { + chan="$(P)$(M5)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=455 + y=328 + width=100 + height=18 + } + monitor { + chan="$(P)$(M5)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=560 + y=328 + width=100 + height=18 + } + monitor { + chan="$(P)$(M5)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=328 + width=100 + height=18 + } + monitor { + chan="$(P)$(M5)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=328 + width=100 + height=18 + } + monitor { + chan="$(P)$(M5)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=350 + y=410 + width=100 + height=20 + } + control { + chan="$(P)$(M6)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=455 + y=410 + width=100 + height=20 + } + control { + chan="$(P)$(M6)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=560 + y=410 + width=100 + height=20 + } + control { + chan="$(P)$(M6)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=410 + width=100 + height=20 + } + control { + chan="$(P)$(M6)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=410 + width=100 + height=20 + } + control { + chan="$(P)$(M6)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=350 + y=388 + width=100 + height=18 + } + monitor { + chan="$(P)$(M6)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=455 + y=388 + width=100 + height=18 + } + monitor { + chan="$(P)$(M6)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=560 + y=388 + width=100 + height=18 + } + monitor { + chan="$(P)$(M6)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=388 + width=100 + height=18 + } + monitor { + chan="$(P)$(M6)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=388 + width=100 + height=18 + } + monitor { + chan="$(P)$(M6)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=350 + y=470 + width=100 + height=20 + } + control { + chan="$(P)$(M7)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=455 + y=470 + width=100 + height=20 + } + control { + chan="$(P)$(M7)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=560 + y=470 + width=100 + height=20 + } + control { + chan="$(P)$(M7)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=470 + width=100 + height=20 + } + control { + chan="$(P)$(M7)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=470 + width=100 + height=20 + } + control { + chan="$(P)$(M7)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=350 + y=448 + width=100 + height=18 + } + monitor { + chan="$(P)$(M7)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=455 + y=448 + width=100 + height=18 + } + monitor { + chan="$(P)$(M7)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=560 + y=448 + width=100 + height=18 + } + monitor { + chan="$(P)$(M7)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=448 + width=100 + height=18 + } + monitor { + chan="$(P)$(M7)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=448 + width=100 + height=18 + } + monitor { + chan="$(P)$(M7)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text entry" { + object { + x=350 + y=530 + width=100 + height=20 + } + control { + chan="$(P)$(M8)PositionCompareMinPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=455 + y=530 + width=100 + height=20 + } + control { + chan="$(P)$(M8)PositionCompareMaxPosition" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +"text entry" { + object { + x=560 + y=530 + width=100 + height=20 + } + control { + chan="$(P)$(M8)PositionCompareStepSize" + clr=14 + bclr=51 + } + clrmod="discrete" + limits { + } +} +menu { + object { + x=665 + y=530 + width=100 + height=20 + } + control { + chan="$(P)$(M8)PositionComparePulseWidth" + clr=14 + bclr=51 + } +} +menu { + object { + x=770 + y=530 + width=100 + height=20 + } + control { + chan="$(P)$(M8)PositionCompareSettlingTime" + clr=14 + bclr=51 + } +} +"text update" { + object { + x=350 + y=508 + width=100 + height=18 + } + monitor { + chan="$(P)$(M8)PositionCompareMinPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=455 + y=508 + width=100 + height=18 + } + monitor { + chan="$(P)$(M8)PositionCompareMaxPosition_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=560 + y=508 + width=100 + height=18 + } + monitor { + chan="$(P)$(M8)PositionCompareStepSize_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=665 + y=508 + width=100 + height=18 + } + monitor { + chan="$(P)$(M8)PositionComparePulseWidth_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"text update" { + object { + x=770 + y=508 + width=100 + height=18 + } + monitor { + chan="$(P)$(M8)PositionCompareSettlingTime_RBV" + clr=54 + bclr=4 + } + align="horiz. centered" + limits { + } +} +rectangle { + object { + x=5 + y=80 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +rectangle { + object { + x=5 + y=140 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +rectangle { + object { + x=5 + y=200 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +rectangle { + object { + x=5 + y=260 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +rectangle { + object { + x=5 + y=320 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +rectangle { + object { + x=5 + y=380 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +rectangle { + object { + x=5 + y=440 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +rectangle { + object { + x=5 + y=500 + width=870 + height=55 + } + "basic attribute" { + clr=14 + fill="outline" + } +} diff --git a/motorApp/op/adl/XPSTest.adl b/motorApp/op/adl/XPSTest.adl deleted file mode 100644 index d1087f4..0000000 --- a/motorApp/op/adl/XPSTest.adl +++ /dev/null @@ -1,170 +0,0 @@ - -file { - name="/home/epics/devel/motor/5-9beta/motorApp/op/adl/XPSTest.adl" - version=030000 -} -display { - object { - x=537 - y=30 - width=200 - height=175 - } - 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, - } -} -"related display" { - object { - x=25 - y=104 - width=150 - height=25 - } - display[0] { - label="Motor 1" - name="XPSExtra.adl" - args="P=IOC:, M1=m1" - } - display[1] { - label="Motor 2" - name="XPSExtra.adl" - args="P=IOC:, M1=m2" - } - clr=14 - bclr=4 - label="Extra motor PVs" -} -"related display" { - object { - x=25 - y=134 - width=150 - height=25 - } - display[0] { - label="XPS Trajectory Scan" - name="trajectoryScan.adl" - args="P=IOC:, R=traj1, TITLE=XPS_trajectory,M1=m1,M2=m2" - } - clr=14 - bclr=4 - label="Trajectory scan" -} -"related display" { - object { - x=25 - y=74 - width=150 - height=25 - } - display[0] { - label="XPS Auxilliary" - name="XPSAux.adl" - args="P=IOC:, R=XPSAux" - } - clr=14 - bclr=4 - label="Auxilliary I/O" -} -text { - object { - x=6 - y=11 - width=150 - height=25 - } - "basic attribute" { - clr=14 - } - textix="Newport XPS Test" -} -"related display" { - object { - x=25 - y=44 - width=150 - height=25 - } - display[0] { - label="Motors" - name="motor3x.adl" - args="P=IOC:, M1=m1, M2=m2, M3=m3" - } - clr=14 - bclr=4 - label="Motors" -} diff --git a/motorApp/op/adl/XPSTop.adl b/motorApp/op/adl/XPSTop.adl index 0f6e8d0..094c1e5 100644 --- a/motorApp/op/adl/XPSTop.adl +++ b/motorApp/op/adl/XPSTop.adl @@ -1,14 +1,14 @@ file { name="/home/epics/devel/motor/motorApp/op/adl/XPSTop.adl" - version=030102 + version=030107 } display { object { x=833 y=53 width=200 - height=175 + height=205 } clr=14 bclr=4 @@ -168,3 +168,19 @@ text { bclr=4 label="Motors" } +"related display" { + object { + x=25 + y=164 + width=150 + height=25 + } + display[0] { + label="XPS Position Compare" + name="XPSPositionCompare8.adl" + args="P=IOC:, R=PC1:, TITLE=XPSProfileMove, M1=m1,M2=m2,M3=m3,M4=m4,M5=m5,M6=m6,M7=m7,M8=m8" + } + clr=14 + bclr=4 + label="Position compare" +} diff --git a/motorApp/op/adl/motorStatus120.adl b/motorApp/op/adl/motorStatus120.adl new file mode 100644 index 0000000..e6ce52e --- /dev/null +++ b/motorApp/op/adl/motorStatus120.adl @@ -0,0 +1,20891 @@ + +file { + name="/home/oxygen/GOETZE/epics/synAppsSVN/support/motor/motorApp/op/adl/motorStatus120.adl" + version=030107 +} +display { + object { + x=697 + y=519 + width=680 + height=310 + } + clr=7 + bclr=2 + cmap="" + gridSpacing=5 + gridOn=0 + snapToGrid=1 +} +"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=38 + y=0 + width=590 + height=20 + } + "basic attribute" { + clr=14 + } + textix=" $(P) motor status" + align="horiz. centered" +} +composite { + object { + x=364 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=364 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=365 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m68.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=399 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m68_able.VAL" + } + } + rectangle { + object { + x=389 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m68.LLS" + } + } + rectangle { + object { + x=389 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m68.LVIO" + } + } + rectangle { + object { + x=389 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m68.HLS" + } + } + composite { + object { + x=365 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=365 + y=139 + width=24 + height=12 + } + display[0] { + label="m68" + name="motorx_more.adl" + args="P=$(P),M=m68" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=365 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m68.DMOV" + } + } + rectangle { + object { + x=365 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=365 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="68" + align="horiz. centered" + } + } + } + "text update" { + object { + x=365 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m68.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=319 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=319 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=320 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m60.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=354 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m60_able.VAL" + } + } + rectangle { + object { + x=344 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m60.LLS" + } + } + rectangle { + object { + x=344 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m60.LVIO" + } + } + rectangle { + object { + x=344 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m60.HLS" + } + } + composite { + object { + x=320 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=320 + y=139 + width=24 + height=12 + } + display[0] { + label="m60" + name="motorx_more.adl" + args="P=$(P),M=m60" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=320 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m60.DMOV" + } + } + rectangle { + object { + x=320 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=320 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="60" + align="horiz. centered" + } + } + } + "text update" { + object { + x=320 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m60.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=364 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=364 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=365 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m65.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=399 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m65_able.VAL" + } + } + rectangle { + object { + x=389 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m65.LLS" + } + } + rectangle { + object { + x=389 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m65.LVIO" + } + } + rectangle { + object { + x=389 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m65.HLS" + } + } + composite { + object { + x=365 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=365 + y=31 + width=24 + height=12 + } + display[0] { + label="m65" + name="motorx_more.adl" + args="P=$(P),M=m65" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=365 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m65.DMOV" + } + } + rectangle { + object { + x=365 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=365 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="65" + align="horiz. centered" + } + } + } + "text update" { + object { + x=365 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m65.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=364 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=364 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=365 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m66.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=399 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m66_able.VAL" + } + } + rectangle { + object { + x=389 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m66.LLS" + } + } + rectangle { + object { + x=389 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m66.LVIO" + } + } + rectangle { + object { + x=389 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m66.HLS" + } + } + composite { + object { + x=365 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=365 + y=67 + width=24 + height=12 + } + display[0] { + label="m66" + name="motorx_more.adl" + args="P=$(P),M=m66" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=365 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m66.DMOV" + } + } + rectangle { + object { + x=365 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=365 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="66" + align="horiz. centered" + } + } + } + "text update" { + object { + x=365 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m66.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=364 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=364 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=365 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m67.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=399 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m67_able.VAL" + } + } + rectangle { + object { + x=389 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m67.LLS" + } + } + rectangle { + object { + x=389 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m67.LVIO" + } + } + rectangle { + object { + x=389 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m67.HLS" + } + } + composite { + object { + x=365 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=365 + y=103 + width=24 + height=12 + } + display[0] { + label="m67" + name="motorx_more.adl" + args="P=$(P),M=m67" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=365 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m67.DMOV" + } + } + rectangle { + object { + x=365 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=365 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="67" + align="horiz. centered" + } + } + } + "text update" { + object { + x=365 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m67.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=319 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=319 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=320 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m57.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=354 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m57_able.VAL" + } + } + rectangle { + object { + x=344 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m57.LLS" + } + } + rectangle { + object { + x=344 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m57.LVIO" + } + } + rectangle { + object { + x=344 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m57.HLS" + } + } + composite { + object { + x=320 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=320 + y=31 + width=24 + height=12 + } + display[0] { + label="m57" + name="motorx_more.adl" + args="P=$(P),M=m57" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=320 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m57.DMOV" + } + } + rectangle { + object { + x=320 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=320 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="57" + align="horiz. centered" + } + } + } + "text update" { + object { + x=320 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m57.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=319 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=319 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=320 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m58.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=354 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m58_able.VAL" + } + } + rectangle { + object { + x=344 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m58.LLS" + } + } + rectangle { + object { + x=344 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m58.LVIO" + } + } + rectangle { + object { + x=344 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m58.HLS" + } + } + composite { + object { + x=320 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=320 + y=67 + width=24 + height=12 + } + display[0] { + label="m58" + name="motorx_more.adl" + args="P=$(P),M=m58" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=320 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m58.DMOV" + } + } + rectangle { + object { + x=320 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=320 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="58" + align="horiz. centered" + } + } + } + "text update" { + object { + x=320 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m58.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=319 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=319 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=320 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m59.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=354 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m59_able.VAL" + } + } + rectangle { + object { + x=344 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m59.LLS" + } + } + rectangle { + object { + x=344 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m59.LVIO" + } + } + rectangle { + object { + x=344 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m59.HLS" + } + } + composite { + object { + x=320 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=320 + y=103 + width=24 + height=12 + } + display[0] { + label="m59" + name="motorx_more.adl" + args="P=$(P),M=m59" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=320 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m59.DMOV" + } + } + rectangle { + object { + x=320 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=320 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="59" + align="horiz. centered" + } + } + } + "text update" { + object { + x=320 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m59.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=319 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=319 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=320 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m61.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=354 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m61_able.VAL" + } + } + rectangle { + object { + x=344 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m61.LLS" + } + } + rectangle { + object { + x=344 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m61.LVIO" + } + } + rectangle { + object { + x=344 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m61.HLS" + } + } + composite { + object { + x=320 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=320 + y=175 + width=24 + height=12 + } + display[0] { + label="m61" + name="motorx_more.adl" + args="P=$(P),M=m61" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=320 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m61.DMOV" + } + } + rectangle { + object { + x=320 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=320 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="61" + align="horiz. centered" + } + } + } + "text update" { + object { + x=320 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m61.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=364 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=364 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=365 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m69.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=399 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m69_able.VAL" + } + } + rectangle { + object { + x=389 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m69.LLS" + } + } + rectangle { + object { + x=389 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m69.LVIO" + } + } + rectangle { + object { + x=389 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m69.HLS" + } + } + composite { + object { + x=365 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=365 + y=175 + width=24 + height=12 + } + display[0] { + label="m69" + name="motorx_more.adl" + args="P=$(P),M=m69" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=365 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m69.DMOV" + } + } + rectangle { + object { + x=365 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=365 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="69" + align="horiz. centered" + } + } + } + "text update" { + object { + x=365 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m69.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=364 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=364 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=365 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m70.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=399 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m70_able.VAL" + } + } + rectangle { + object { + x=389 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m70.LLS" + } + } + rectangle { + object { + x=389 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m70.LVIO" + } + } + rectangle { + object { + x=389 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m70.HLS" + } + } + composite { + object { + x=365 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=365 + y=211 + width=24 + height=12 + } + display[0] { + label="m70" + name="motorx_more.adl" + args="P=$(P),M=m70" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=365 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m70.DMOV" + } + } + rectangle { + object { + x=365 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=365 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="70" + align="horiz. centered" + } + } + } + "text update" { + object { + x=365 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m70.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=319 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=319 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=320 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m62.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=354 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m62_able.VAL" + } + } + rectangle { + object { + x=344 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m62.LLS" + } + } + rectangle { + object { + x=344 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m62.LVIO" + } + } + rectangle { + object { + x=344 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m62.HLS" + } + } + composite { + object { + x=320 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=320 + y=211 + width=24 + height=12 + } + display[0] { + label="m62" + name="motorx_more.adl" + args="P=$(P),M=m62" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=320 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m62.DMOV" + } + } + rectangle { + object { + x=320 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=320 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="62" + align="horiz. centered" + } + } + } + "text update" { + object { + x=320 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m62.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=319 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=319 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=320 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m63.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=354 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m63_able.VAL" + } + } + rectangle { + object { + x=344 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m63.LLS" + } + } + rectangle { + object { + x=344 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m63.LVIO" + } + } + rectangle { + object { + x=344 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m63.HLS" + } + } + composite { + object { + x=320 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=320 + y=247 + width=24 + height=12 + } + display[0] { + label="m63" + name="motorx_more.adl" + args="P=$(P),M=m63" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=320 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m63.DMOV" + } + } + rectangle { + object { + x=320 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=320 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="63" + align="horiz. centered" + } + } + } + "text update" { + object { + x=320 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m63.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=364 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=364 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=365 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m71.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=399 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m71_able.VAL" + } + } + rectangle { + object { + x=389 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m71.LLS" + } + } + rectangle { + object { + x=389 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m71.LVIO" + } + } + rectangle { + object { + x=389 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m71.HLS" + } + } + composite { + object { + x=365 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=365 + y=247 + width=24 + height=12 + } + display[0] { + label="m71" + name="motorx_more.adl" + args="P=$(P),M=m71" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=365 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m71.DMOV" + } + } + rectangle { + object { + x=365 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=365 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="71" + align="horiz. centered" + } + } + } + "text update" { + object { + x=365 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m71.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=364 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=365 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m72.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=399 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m72_able.VAL" + } +} +rectangle { + object { + x=389 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m72.LLS" + } +} +rectangle { + object { + x=389 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m72.LVIO" + } +} +rectangle { + object { + x=389 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m72.HLS" + } +} +composite { + object { + x=365 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=365 + y=283 + width=24 + height=12 + } + display[0] { + label="m72" + name="motorx_more.adl" + args="P=$(P),M=m72" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=365 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m72.DMOV" + } + } + rectangle { + object { + x=365 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=365 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="72" + align="horiz. centered" + } + } +} +"text update" { + object { + x=365 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m72.RBV" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=319 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=320 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m64.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=354 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m64_able.VAL" + } +} +rectangle { + object { + x=344 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m64.LLS" + } +} +rectangle { + object { + x=344 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m64.LVIO" + } +} +rectangle { + object { + x=344 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m64.HLS" + } +} +composite { + object { + x=320 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=320 + y=283 + width=24 + height=12 + } + display[0] { + label="m64" + name="motorx_more.adl" + args="P=$(P),M=m64" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=320 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m64.DMOV" + } + } + rectangle { + object { + x=320 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=320 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="64" + align="horiz. centered" + } + } +} +"text update" { + object { + x=320 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m64.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=274 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=274 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=275 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m49.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=309 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m49_able.VAL" + } + } + rectangle { + object { + x=299 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m49.LLS" + } + } + rectangle { + object { + x=299 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m49.LVIO" + } + } + rectangle { + object { + x=299 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m49.HLS" + } + } + composite { + object { + x=275 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=275 + y=31 + width=24 + height=12 + } + display[0] { + label="m49" + name="motorx_more.adl" + args="P=$(P),M=m49" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=275 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m49.DMOV" + } + } + rectangle { + object { + x=275 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=275 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="49" + align="horiz. centered" + } + } + } + "text update" { + object { + x=275 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m49.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=274 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=274 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=275 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m50.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=309 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m50_able.VAL" + } + } + rectangle { + object { + x=299 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m50.LLS" + } + } + rectangle { + object { + x=299 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m50.LVIO" + } + } + rectangle { + object { + x=299 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m50.HLS" + } + } + composite { + object { + x=275 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=275 + y=67 + width=24 + height=12 + } + display[0] { + label="m50" + name="motorx_more.adl" + args="P=$(P),M=m50" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=275 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m50.DMOV" + } + } + rectangle { + object { + x=275 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=275 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="50" + align="horiz. centered" + } + } + } + "text update" { + object { + x=275 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m50.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=274 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=274 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=275 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m51.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=309 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m51_able.VAL" + } + } + rectangle { + object { + x=299 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m51.LLS" + } + } + rectangle { + object { + x=299 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m51.LVIO" + } + } + rectangle { + object { + x=299 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m51.HLS" + } + } + composite { + object { + x=275 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=275 + y=103 + width=24 + height=12 + } + display[0] { + label="m51" + name="motorx_more.adl" + args="P=$(P),M=m51" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=275 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m51.DMOV" + } + } + rectangle { + object { + x=275 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=275 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="51" + align="horiz. centered" + } + } + } + "text update" { + object { + x=275 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m51.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=274 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=274 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=275 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m52.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=309 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m52_able.VAL" + } + } + rectangle { + object { + x=299 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m52.LLS" + } + } + rectangle { + object { + x=299 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m52.LVIO" + } + } + rectangle { + object { + x=299 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m52.HLS" + } + } + composite { + object { + x=275 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=275 + y=139 + width=24 + height=12 + } + display[0] { + label="m52" + name="motorx_more.adl" + args="P=$(P),M=m52" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=275 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m52.DMOV" + } + } + rectangle { + object { + x=275 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=275 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="52" + align="horiz. centered" + } + } + } + "text update" { + object { + x=275 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m52.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=274 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=274 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=275 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m53.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=309 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m53_able.VAL" + } + } + rectangle { + object { + x=299 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m53.LLS" + } + } + rectangle { + object { + x=299 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m53.LVIO" + } + } + rectangle { + object { + x=299 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m53.HLS" + } + } + composite { + object { + x=275 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=275 + y=175 + width=24 + height=12 + } + display[0] { + label="m53" + name="motorx_more.adl" + args="P=$(P),M=m53" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=275 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m53.DMOV" + } + } + rectangle { + object { + x=275 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=275 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="53" + align="horiz. centered" + } + } + } + "text update" { + object { + x=275 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m53.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=274 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=274 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=275 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m54.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=309 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m54_able.VAL" + } + } + rectangle { + object { + x=299 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m54.LLS" + } + } + rectangle { + object { + x=299 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m54.LVIO" + } + } + rectangle { + object { + x=299 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m54.HLS" + } + } + composite { + object { + x=275 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=275 + y=211 + width=24 + height=12 + } + display[0] { + label="m54" + name="motorx_more.adl" + args="P=$(P),M=m54" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=275 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m54.DMOV" + } + } + rectangle { + object { + x=275 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=275 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="54" + align="horiz. centered" + } + } + } + "text update" { + object { + x=275 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m54.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=274 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=274 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=275 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m55.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=309 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m55_able.VAL" + } + } + rectangle { + object { + x=299 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m55.LLS" + } + } + rectangle { + object { + x=299 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m55.LVIO" + } + } + rectangle { + object { + x=299 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m55.HLS" + } + } + composite { + object { + x=275 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=275 + y=247 + width=24 + height=12 + } + display[0] { + label="m55" + name="motorx_more.adl" + args="P=$(P),M=m55" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=275 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m55.DMOV" + } + } + rectangle { + object { + x=275 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=275 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="55" + align="horiz. centered" + } + } + } + "text update" { + object { + x=275 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m55.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=274 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=275 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m56.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=309 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m56_able.VAL" + } +} +rectangle { + object { + x=299 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m56.LLS" + } +} +rectangle { + object { + x=299 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m56.LVIO" + } +} +rectangle { + object { + x=299 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m56.HLS" + } +} +composite { + object { + x=275 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=275 + y=283 + width=24 + height=12 + } + display[0] { + label="m56" + name="motorx_more.adl" + args="P=$(P),M=m56" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=275 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m56.DMOV" + } + } + rectangle { + object { + x=275 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=275 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="56" + align="horiz. centered" + } + } +} +"text update" { + object { + x=275 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m56.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=229 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=229 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=230 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m41.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=264 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m41_able.VAL" + } + } + rectangle { + object { + x=254 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m41.LLS" + } + } + rectangle { + object { + x=254 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m41.LVIO" + } + } + rectangle { + object { + x=254 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m41.HLS" + } + } + composite { + object { + x=230 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=230 + y=31 + width=24 + height=12 + } + display[0] { + label="m41" + name="motorx_more.adl" + args="P=$(P),M=m41" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=230 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m41.DMOV" + } + } + rectangle { + object { + x=230 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=230 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="41" + align="horiz. centered" + } + } + } + "text update" { + object { + x=230 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m41.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=229 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=229 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=230 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m42.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=264 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m42_able.VAL" + } + } + rectangle { + object { + x=254 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m42.LLS" + } + } + rectangle { + object { + x=254 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m42.LVIO" + } + } + rectangle { + object { + x=254 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m42.HLS" + } + } + composite { + object { + x=230 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=230 + y=67 + width=24 + height=12 + } + display[0] { + label="m42" + name="motorx_more.adl" + args="P=$(P),M=m42" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=230 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m42.DMOV" + } + } + rectangle { + object { + x=230 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=230 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="42" + align="horiz. centered" + } + } + } + "text update" { + object { + x=230 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m42.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=229 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=229 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=230 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m43.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=264 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m43_able.VAL" + } + } + rectangle { + object { + x=254 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m43.LLS" + } + } + rectangle { + object { + x=254 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m43.LVIO" + } + } + rectangle { + object { + x=254 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m43.HLS" + } + } + composite { + object { + x=230 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=230 + y=103 + width=24 + height=12 + } + display[0] { + label="m43" + name="motorx_more.adl" + args="P=$(P),M=m43" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=230 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m43.DMOV" + } + } + rectangle { + object { + x=230 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=230 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="43" + align="horiz. centered" + } + } + } + "text update" { + object { + x=230 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m43.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=229 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=229 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=230 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m44.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=264 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m44_able.VAL" + } + } + rectangle { + object { + x=254 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m44.LLS" + } + } + rectangle { + object { + x=254 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m44.LVIO" + } + } + rectangle { + object { + x=254 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m44.HLS" + } + } + composite { + object { + x=230 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=230 + y=139 + width=24 + height=12 + } + display[0] { + label="m44" + name="motorx_more.adl" + args="P=$(P),M=m44" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=230 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m44.DMOV" + } + } + rectangle { + object { + x=230 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=230 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="44" + align="horiz. centered" + } + } + } + "text update" { + object { + x=230 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m44.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=229 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=229 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=230 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m45.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=264 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m45_able.VAL" + } + } + rectangle { + object { + x=254 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m45.LLS" + } + } + rectangle { + object { + x=254 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m45.LVIO" + } + } + rectangle { + object { + x=254 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m45.HLS" + } + } + composite { + object { + x=230 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=230 + y=175 + width=24 + height=12 + } + display[0] { + label="m45" + name="motorx_more.adl" + args="P=$(P),M=m45" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=230 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m45.DMOV" + } + } + rectangle { + object { + x=230 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=230 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="45" + align="horiz. centered" + } + } + } + "text update" { + object { + x=230 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m45.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=229 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=229 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=230 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m46.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=264 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m46_able.VAL" + } + } + rectangle { + object { + x=254 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m46.LLS" + } + } + rectangle { + object { + x=254 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m46.LVIO" + } + } + rectangle { + object { + x=254 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m46.HLS" + } + } + composite { + object { + x=230 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=230 + y=211 + width=24 + height=12 + } + display[0] { + label="m46" + name="motorx_more.adl" + args="P=$(P),M=m46" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=230 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m46.DMOV" + } + } + rectangle { + object { + x=230 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=230 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="46" + align="horiz. centered" + } + } + } + "text update" { + object { + x=230 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m46.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=229 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=229 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=230 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m47.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=264 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m47_able.VAL" + } + } + rectangle { + object { + x=254 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m47.LLS" + } + } + rectangle { + object { + x=254 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m47.LVIO" + } + } + rectangle { + object { + x=254 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m47.HLS" + } + } + composite { + object { + x=230 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=230 + y=247 + width=24 + height=12 + } + display[0] { + label="m47" + name="motorx_more.adl" + args="P=$(P),M=m47" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=230 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m47.DMOV" + } + } + rectangle { + object { + x=230 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=230 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="47" + align="horiz. centered" + } + } + } + "text update" { + object { + x=230 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m47.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=229 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=230 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m48.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=264 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m48_able.VAL" + } +} +rectangle { + object { + x=254 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m48.LLS" + } +} +rectangle { + object { + x=254 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m48.LVIO" + } +} +rectangle { + object { + x=254 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m48.HLS" + } +} +composite { + object { + x=230 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=230 + y=283 + width=24 + height=12 + } + display[0] { + label="m48" + name="motorx_more.adl" + args="P=$(P),M=m48" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=230 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m48.DMOV" + } + } + rectangle { + object { + x=230 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=230 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="48" + align="horiz. centered" + } + } +} +"text update" { + object { + x=230 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m48.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=184 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=184 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=185 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m33.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=219 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m33_able.VAL" + } + } + rectangle { + object { + x=209 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m33.LLS" + } + } + rectangle { + object { + x=209 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m33.LVIO" + } + } + rectangle { + object { + x=209 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m33.HLS" + } + } + composite { + object { + x=185 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=185 + y=31 + width=24 + height=12 + } + display[0] { + label="m33" + name="motorx_more.adl" + args="P=$(P),M=m33" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=185 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m33.DMOV" + } + } + rectangle { + object { + x=185 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=185 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="33" + align="horiz. centered" + } + } + } + "text update" { + object { + x=185 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m33.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=184 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=184 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=185 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m34.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=219 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m34_able.VAL" + } + } + rectangle { + object { + x=209 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m34.LLS" + } + } + rectangle { + object { + x=209 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m34.LVIO" + } + } + rectangle { + object { + x=209 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m34.HLS" + } + } + composite { + object { + x=185 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=185 + y=67 + width=24 + height=12 + } + display[0] { + label="m34" + name="motorx_more.adl" + args="P=$(P),M=m34" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=185 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m34.DMOV" + } + } + rectangle { + object { + x=185 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=185 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="34" + align="horiz. centered" + } + } + } + "text update" { + object { + x=185 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m34.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=184 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=184 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=185 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m35.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=219 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m35_able.VAL" + } + } + rectangle { + object { + x=209 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m35.LLS" + } + } + rectangle { + object { + x=209 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m35.LVIO" + } + } + rectangle { + object { + x=209 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m35.HLS" + } + } + composite { + object { + x=185 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=185 + y=103 + width=24 + height=12 + } + display[0] { + label="m35" + name="motorx_more.adl" + args="P=$(P),M=m35" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=185 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m35.DMOV" + } + } + rectangle { + object { + x=185 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=185 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="35" + align="horiz. centered" + } + } + } + "text update" { + object { + x=185 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m35.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=184 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=184 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=185 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m36.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=219 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m36_able.VAL" + } + } + rectangle { + object { + x=209 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m36.LLS" + } + } + rectangle { + object { + x=209 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m36.LVIO" + } + } + rectangle { + object { + x=209 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m36.HLS" + } + } + composite { + object { + x=185 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=185 + y=139 + width=24 + height=12 + } + display[0] { + label="m36" + name="motorx_more.adl" + args="P=$(P),M=m36" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=185 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m36.DMOV" + } + } + rectangle { + object { + x=185 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=185 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="36" + align="horiz. centered" + } + } + } + "text update" { + object { + x=185 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m36.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=184 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=184 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=185 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m37.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=219 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m37_able.VAL" + } + } + rectangle { + object { + x=209 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m37.LLS" + } + } + rectangle { + object { + x=209 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m37.LVIO" + } + } + rectangle { + object { + x=209 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m37.HLS" + } + } + composite { + object { + x=185 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=185 + y=175 + width=24 + height=12 + } + display[0] { + label="m37" + name="motorx_more.adl" + args="P=$(P),M=m37" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=185 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m37.DMOV" + } + } + rectangle { + object { + x=185 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=185 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="37" + align="horiz. centered" + } + } + } + "text update" { + object { + x=185 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m37.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=184 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=184 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=185 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m38.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=219 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m38_able.VAL" + } + } + rectangle { + object { + x=209 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m38.LLS" + } + } + rectangle { + object { + x=209 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m38.LVIO" + } + } + rectangle { + object { + x=209 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m38.HLS" + } + } + composite { + object { + x=185 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=185 + y=211 + width=24 + height=12 + } + display[0] { + label="m38" + name="motorx_more.adl" + args="P=$(P),M=m38" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=185 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m38.DMOV" + } + } + rectangle { + object { + x=185 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=185 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="38" + align="horiz. centered" + } + } + } + "text update" { + object { + x=185 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m38.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=184 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=184 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=185 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m39.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=219 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m39_able.VAL" + } + } + rectangle { + object { + x=209 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m39.LLS" + } + } + rectangle { + object { + x=209 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m39.LVIO" + } + } + rectangle { + object { + x=209 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m39.HLS" + } + } + composite { + object { + x=185 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=185 + y=247 + width=24 + height=12 + } + display[0] { + label="m39" + name="motorx_more.adl" + args="P=$(P),M=m39" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=185 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m39.DMOV" + } + } + rectangle { + object { + x=185 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=185 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="39" + align="horiz. centered" + } + } + } + "text update" { + object { + x=185 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m39.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=184 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=185 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m40.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=219 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m40_able.VAL" + } +} +rectangle { + object { + x=209 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m40.LLS" + } +} +rectangle { + object { + x=209 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m40.LVIO" + } +} +rectangle { + object { + x=209 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m40.HLS" + } +} +composite { + object { + x=185 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=185 + y=283 + width=24 + height=12 + } + display[0] { + label="m40" + name="motorx_more.adl" + args="P=$(P),M=m40" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=185 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m40.DMOV" + } + } + rectangle { + object { + x=185 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=185 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="40" + align="horiz. centered" + } + } +} +"text update" { + object { + x=185 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m40.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=139 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=139 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=140 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m25.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=174 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m25_able.VAL" + } + } + rectangle { + object { + x=164 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m25.LLS" + } + } + rectangle { + object { + x=164 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m25.LVIO" + } + } + rectangle { + object { + x=164 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m25.HLS" + } + } + composite { + object { + x=140 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=140 + y=31 + width=24 + height=12 + } + display[0] { + label="m25" + name="motorx_more.adl" + args="P=$(P),M=m25" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=140 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m25.DMOV" + } + } + rectangle { + object { + x=140 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=140 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="25" + align="horiz. centered" + } + } + } + "text update" { + object { + x=140 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m25.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=139 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=139 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=140 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m26.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=174 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m26_able.VAL" + } + } + rectangle { + object { + x=164 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m26.LLS" + } + } + rectangle { + object { + x=164 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m26.LVIO" + } + } + rectangle { + object { + x=164 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m26.HLS" + } + } + composite { + object { + x=140 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=140 + y=67 + width=24 + height=12 + } + display[0] { + label="m26" + name="motorx_more.adl" + args="P=$(P),M=m26" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=140 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m26.DMOV" + } + } + rectangle { + object { + x=140 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=140 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="26" + align="horiz. centered" + } + } + } + "text update" { + object { + x=140 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m26.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=139 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=139 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=140 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m27.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=174 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m27_able.VAL" + } + } + rectangle { + object { + x=164 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m27.LLS" + } + } + rectangle { + object { + x=164 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m27.LVIO" + } + } + rectangle { + object { + x=164 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m27.HLS" + } + } + composite { + object { + x=140 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=140 + y=103 + width=24 + height=12 + } + display[0] { + label="m27" + name="motorx_more.adl" + args="P=$(P),M=m27" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=140 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m27.DMOV" + } + } + rectangle { + object { + x=140 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=140 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="27" + align="horiz. centered" + } + } + } + "text update" { + object { + x=140 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m27.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=139 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=139 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=140 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m28.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=174 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m28_able.VAL" + } + } + rectangle { + object { + x=164 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m28.LLS" + } + } + rectangle { + object { + x=164 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m28.LVIO" + } + } + rectangle { + object { + x=164 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m28.HLS" + } + } + composite { + object { + x=140 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=140 + y=139 + width=24 + height=12 + } + display[0] { + label="m28" + name="motorx_more.adl" + args="P=$(P),M=m28" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=140 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m28.DMOV" + } + } + rectangle { + object { + x=140 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=140 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="28" + align="horiz. centered" + } + } + } + "text update" { + object { + x=140 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m28.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=139 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=139 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=140 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m29.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=174 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m29_able.VAL" + } + } + rectangle { + object { + x=164 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m29.LLS" + } + } + rectangle { + object { + x=164 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m29.LVIO" + } + } + rectangle { + object { + x=164 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m29.HLS" + } + } + composite { + object { + x=140 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=140 + y=175 + width=24 + height=12 + } + display[0] { + label="m29" + name="motorx_more.adl" + args="P=$(P),M=m29" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=140 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m29.DMOV" + } + } + rectangle { + object { + x=140 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=140 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="29" + align="horiz. centered" + } + } + } + "text update" { + object { + x=140 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m29.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=139 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=139 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=140 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m30.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=174 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m30_able.VAL" + } + } + rectangle { + object { + x=164 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m30.LLS" + } + } + rectangle { + object { + x=164 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m30.LVIO" + } + } + rectangle { + object { + x=164 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m30.HLS" + } + } + composite { + object { + x=140 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=140 + y=211 + width=24 + height=12 + } + display[0] { + label="m30" + name="motorx_more.adl" + args="P=$(P),M=m30" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=140 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m30.DMOV" + } + } + rectangle { + object { + x=140 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=140 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="30" + align="horiz. centered" + } + } + } + "text update" { + object { + x=140 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m30.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=139 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=139 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=140 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m31.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=174 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m31_able.VAL" + } + } + rectangle { + object { + x=164 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m31.LLS" + } + } + rectangle { + object { + x=164 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m31.LVIO" + } + } + rectangle { + object { + x=164 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m31.HLS" + } + } + composite { + object { + x=140 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=140 + y=247 + width=24 + height=12 + } + display[0] { + label="m31" + name="motorx_more.adl" + args="P=$(P),M=m31" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=140 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m31.DMOV" + } + } + rectangle { + object { + x=140 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=140 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="31" + align="horiz. centered" + } + } + } + "text update" { + object { + x=140 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m31.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=139 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=140 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m32.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=174 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m32_able.VAL" + } +} +rectangle { + object { + x=164 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m32.LLS" + } +} +rectangle { + object { + x=164 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m32.LVIO" + } +} +rectangle { + object { + x=164 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m32.HLS" + } +} +composite { + object { + x=140 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=140 + y=283 + width=24 + height=12 + } + display[0] { + label="m32" + name="motorx_more.adl" + args="P=$(P),M=m32" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=140 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m32.DMOV" + } + } + rectangle { + object { + x=140 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=140 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="32" + align="horiz. centered" + } + } +} +"text update" { + object { + x=140 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m32.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=94 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=94 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=95 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m17.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=129 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m17_able.VAL" + } + } + rectangle { + object { + x=119 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m17.LLS" + } + } + rectangle { + object { + x=119 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m17.LVIO" + } + } + rectangle { + object { + x=119 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m17.HLS" + } + } + composite { + object { + x=95 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=95 + y=31 + width=24 + height=12 + } + display[0] { + label="m17" + name="motorx_more.adl" + args="P=$(P),M=m17" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=95 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m17.DMOV" + } + } + rectangle { + object { + x=95 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=95 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="17" + align="horiz. centered" + } + } + } + "text update" { + object { + x=95 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m17.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=94 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=94 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=95 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m18.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=129 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m18_able.VAL" + } + } + rectangle { + object { + x=119 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m18.LLS" + } + } + rectangle { + object { + x=119 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m18.LVIO" + } + } + rectangle { + object { + x=119 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m18.HLS" + } + } + composite { + object { + x=95 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=95 + y=67 + width=24 + height=12 + } + display[0] { + label="m18" + name="motorx_more.adl" + args="P=$(P),M=m18" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=95 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m18.DMOV" + } + } + rectangle { + object { + x=95 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=95 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="18" + align="horiz. centered" + } + } + } + "text update" { + object { + x=95 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m18.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=94 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=94 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=95 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m19.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=129 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m19_able.VAL" + } + } + rectangle { + object { + x=119 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m19.LLS" + } + } + rectangle { + object { + x=119 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m19.LVIO" + } + } + rectangle { + object { + x=119 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m19.HLS" + } + } + composite { + object { + x=95 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=95 + y=103 + width=24 + height=12 + } + display[0] { + label="m19" + name="motorx_more.adl" + args="P=$(P),M=m19" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=95 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m19.DMOV" + } + } + rectangle { + object { + x=95 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=95 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="19" + align="horiz. centered" + } + } + } + "text update" { + object { + x=95 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m19.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=94 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=94 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=95 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m20.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=129 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m20_able.VAL" + } + } + rectangle { + object { + x=119 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m20.LLS" + } + } + rectangle { + object { + x=119 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m20.LVIO" + } + } + rectangle { + object { + x=119 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m20.HLS" + } + } + composite { + object { + x=95 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=95 + y=139 + width=24 + height=12 + } + display[0] { + label="m20" + name="motorx_more.adl" + args="P=$(P),M=m20" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=95 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m20.DMOV" + } + } + rectangle { + object { + x=95 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=95 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="20" + align="horiz. centered" + } + } + } + "text update" { + object { + x=95 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m20.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=94 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=94 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=95 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m21.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=129 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m21_able.VAL" + } + } + rectangle { + object { + x=119 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m21.LLS" + } + } + rectangle { + object { + x=119 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m21.LVIO" + } + } + rectangle { + object { + x=119 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m21.HLS" + } + } + composite { + object { + x=95 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=95 + y=175 + width=24 + height=12 + } + display[0] { + label="m21" + name="motorx_more.adl" + args="P=$(P),M=m21" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=95 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m21.DMOV" + } + } + rectangle { + object { + x=95 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=95 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="21" + align="horiz. centered" + } + } + } + "text update" { + object { + x=95 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m21.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=94 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=94 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=95 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m22.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=129 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m22_able.VAL" + } + } + rectangle { + object { + x=119 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m22.LLS" + } + } + rectangle { + object { + x=119 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m22.LVIO" + } + } + rectangle { + object { + x=119 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m22.HLS" + } + } + composite { + object { + x=95 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=95 + y=211 + width=24 + height=12 + } + display[0] { + label="m22" + name="motorx_more.adl" + args="P=$(P),M=m22" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=95 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m22.DMOV" + } + } + rectangle { + object { + x=95 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=95 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="22" + align="horiz. centered" + } + } + } + "text update" { + object { + x=95 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m22.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=94 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=94 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=95 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m23.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=129 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m23_able.VAL" + } + } + rectangle { + object { + x=119 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m23.LLS" + } + } + rectangle { + object { + x=119 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m23.LVIO" + } + } + rectangle { + object { + x=119 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m23.HLS" + } + } + composite { + object { + x=95 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=95 + y=247 + width=24 + height=12 + } + display[0] { + label="m23" + name="motorx_more.adl" + args="P=$(P),M=m23" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=95 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m23.DMOV" + } + } + rectangle { + object { + x=95 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=95 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="23" + align="horiz. centered" + } + } + } + "text update" { + object { + x=95 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m23.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=94 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=95 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m24.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=129 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m24_able.VAL" + } +} +rectangle { + object { + x=119 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m24.LLS" + } +} +rectangle { + object { + x=119 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m24.LVIO" + } +} +rectangle { + object { + x=119 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m24.HLS" + } +} +composite { + object { + x=95 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=95 + y=283 + width=24 + height=12 + } + display[0] { + label="m24" + name="motorx_more.adl" + args="P=$(P),M=m24" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=95 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m24.DMOV" + } + } + rectangle { + object { + x=95 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=95 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="24" + align="horiz. centered" + } + } +} +"text update" { + object { + x=95 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m24.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=49 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=49 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=50 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m9.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=84 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m9_able.VAL" + } + } + rectangle { + object { + x=74 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m9.LLS" + } + } + rectangle { + object { + x=74 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m9.LVIO" + } + } + rectangle { + object { + x=74 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m9.HLS" + } + } + composite { + object { + x=50 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=50 + y=31 + width=24 + height=12 + } + display[0] { + label="m9" + name="motorx_more.adl" + args="P=$(P),M=m9" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=50 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m9.DMOV" + } + } + rectangle { + object { + x=50 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=50 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="9" + align="horiz. centered" + } + } + } + "text update" { + object { + x=50 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m9.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=49 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=49 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=50 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m10.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=84 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m10_able.VAL" + } + } + rectangle { + object { + x=74 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m10.LLS" + } + } + rectangle { + object { + x=74 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m10.LVIO" + } + } + rectangle { + object { + x=74 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m10.HLS" + } + } + composite { + object { + x=50 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=50 + y=67 + width=24 + height=12 + } + display[0] { + label="m10" + name="motorx_more.adl" + args="P=$(P),M=m10" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=50 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m10.DMOV" + } + } + rectangle { + object { + x=50 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=50 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="10" + align="horiz. centered" + } + } + } + "text update" { + object { + x=50 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m10.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=49 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=49 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=50 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m11.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=84 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m11_able.VAL" + } + } + rectangle { + object { + x=74 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m11.LLS" + } + } + rectangle { + object { + x=74 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m11.LVIO" + } + } + rectangle { + object { + x=74 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m11.HLS" + } + } + composite { + object { + x=50 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=50 + y=103 + width=24 + height=12 + } + display[0] { + label="m11" + name="motorx_more.adl" + args="P=$(P),M=m11" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=50 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m11.DMOV" + } + } + rectangle { + object { + x=50 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=50 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="11" + align="horiz. centered" + } + } + } + "text update" { + object { + x=50 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m11.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=49 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=49 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=50 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m12.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=84 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m12_able.VAL" + } + } + rectangle { + object { + x=74 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m12.LLS" + } + } + rectangle { + object { + x=74 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m12.LVIO" + } + } + rectangle { + object { + x=74 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m12.HLS" + } + } + composite { + object { + x=50 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=50 + y=139 + width=24 + height=12 + } + display[0] { + label="m12" + name="motorx_more.adl" + args="P=$(P),M=m12" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=50 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m12.DMOV" + } + } + rectangle { + object { + x=50 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=50 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="12" + align="horiz. centered" + } + } + } + "text update" { + object { + x=50 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m12.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=49 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=49 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=50 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m13.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=84 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m13_able.VAL" + } + } + rectangle { + object { + x=74 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m13.LLS" + } + } + rectangle { + object { + x=74 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m13.LVIO" + } + } + rectangle { + object { + x=74 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m13.HLS" + } + } + composite { + object { + x=50 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=50 + y=175 + width=24 + height=12 + } + display[0] { + label="m13" + name="motorx_more.adl" + args="P=$(P),M=m13" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=50 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m13.DMOV" + } + } + rectangle { + object { + x=50 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=50 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="13" + align="horiz. centered" + } + } + } + "text update" { + object { + x=50 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m13.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=49 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=49 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=50 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m14.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=84 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m14_able.VAL" + } + } + rectangle { + object { + x=74 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m14.LLS" + } + } + rectangle { + object { + x=74 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m14.LVIO" + } + } + rectangle { + object { + x=74 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m14.HLS" + } + } + composite { + object { + x=50 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=50 + y=211 + width=24 + height=12 + } + display[0] { + label="m14" + name="motorx_more.adl" + args="P=$(P),M=m14" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=50 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m14.DMOV" + } + } + rectangle { + object { + x=50 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=50 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="14" + align="horiz. centered" + } + } + } + "text update" { + object { + x=50 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m14.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=49 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=49 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=50 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m15.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=84 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m15_able.VAL" + } + } + rectangle { + object { + x=74 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m15.LLS" + } + } + rectangle { + object { + x=74 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m15.LVIO" + } + } + rectangle { + object { + x=74 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m15.HLS" + } + } + composite { + object { + x=50 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=50 + y=247 + width=24 + height=12 + } + display[0] { + label="m15" + name="motorx_more.adl" + args="P=$(P),M=m15" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=50 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m15.DMOV" + } + } + rectangle { + object { + x=50 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=50 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="15" + align="horiz. centered" + } + } + } + "text update" { + object { + x=50 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m15.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=49 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=50 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m16.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=84 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m16_able.VAL" + } +} +rectangle { + object { + x=74 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m16.LLS" + } +} +rectangle { + object { + x=74 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m16.LVIO" + } +} +rectangle { + object { + x=74 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m16.HLS" + } +} +composite { + object { + x=50 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=50 + y=283 + width=24 + height=12 + } + display[0] { + label="m16" + name="motorx_more.adl" + args="P=$(P),M=m16" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=50 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m16.DMOV" + } + } + rectangle { + object { + x=50 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=50 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="16" + align="horiz. centered" + } + } +} +"text update" { + object { + x=50 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m16.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=4 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=4 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=5 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m1.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=39 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m1_able.VAL" + } + } + rectangle { + object { + x=29 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m1.LLS" + } + } + rectangle { + object { + x=29 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m1.LVIO" + } + } + rectangle { + object { + x=29 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m1.HLS" + } + } + composite { + object { + x=5 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=5 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m1" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=5 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m1.DMOV" + } + } + rectangle { + object { + x=5 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=5 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="1" + align="horiz. centered" + } + } + } + "text update" { + object { + x=5 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m1.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=4 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=4 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=5 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m2.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=39 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m2_able.VAL" + } + } + rectangle { + object { + x=29 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m2.LLS" + } + } + rectangle { + object { + x=29 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m2.LVIO" + } + } + rectangle { + object { + x=29 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m2.HLS" + } + } + composite { + object { + x=5 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=5 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m2" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=5 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m2.DMOV" + } + } + rectangle { + object { + x=5 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=5 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="2" + align="horiz. centered" + } + } + } + "text update" { + object { + x=5 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m2.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=4 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=4 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=5 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m3.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=39 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m3_able.VAL" + } + } + rectangle { + object { + x=29 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m3.LLS" + } + } + rectangle { + object { + x=29 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m3.LVIO" + } + } + rectangle { + object { + x=29 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m3.HLS" + } + } + composite { + object { + x=5 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=5 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m3" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=5 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m3.DMOV" + } + } + rectangle { + object { + x=5 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=5 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="3" + align="horiz. centered" + } + } + } + "text update" { + object { + x=5 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m3.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=4 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=4 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=5 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m4.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=39 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m4_able.VAL" + } + } + rectangle { + object { + x=29 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m4.LLS" + } + } + rectangle { + object { + x=29 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m4.LVIO" + } + } + rectangle { + object { + x=29 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m4.HLS" + } + } + composite { + object { + x=5 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=5 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m4" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=5 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m4.DMOV" + } + } + rectangle { + object { + x=5 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=5 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="4" + align="horiz. centered" + } + } + } + "text update" { + object { + x=5 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m4.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=4 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=4 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=5 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m5.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=39 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m5_able.VAL" + } + } + rectangle { + object { + x=29 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m5.LLS" + } + } + rectangle { + object { + x=29 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m5.LVIO" + } + } + rectangle { + object { + x=29 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m5.HLS" + } + } + composite { + object { + x=5 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=5 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m5" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=5 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m5.DMOV" + } + } + rectangle { + object { + x=5 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=5 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="5" + align="horiz. centered" + } + } + } + "text update" { + object { + x=5 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m5.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=4 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=4 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=5 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m6.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=39 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m6_able.VAL" + } + } + rectangle { + object { + x=29 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m6.LLS" + } + } + rectangle { + object { + x=29 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m6.LVIO" + } + } + rectangle { + object { + x=29 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m6.HLS" + } + } + composite { + object { + x=5 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=5 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m6" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=5 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m6.DMOV" + } + } + rectangle { + object { + x=5 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=5 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="6" + align="horiz. centered" + } + } + } + "text update" { + object { + x=5 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m6.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=4 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=4 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=5 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m7.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=39 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m7_able.VAL" + } + } + rectangle { + object { + x=29 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m7.LLS" + } + } + rectangle { + object { + x=29 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m7.LVIO" + } + } + rectangle { + object { + x=29 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m7.HLS" + } + } + composite { + object { + x=5 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=5 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m7" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=5 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m7.DMOV" + } + } + rectangle { + object { + x=5 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=5 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="7" + align="horiz. centered" + } + } + } + "text update" { + object { + x=5 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m7.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=4 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=5 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m8.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=39 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m8_able.VAL" + } +} +rectangle { + object { + x=29 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m8.LLS" + } +} +rectangle { + object { + x=29 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m8.LVIO" + } +} +rectangle { + object { + x=29 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m8.HLS" + } +} +composite { + object { + x=5 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=5 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m8" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=5 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m8.DMOV" + } + } + rectangle { + object { + x=5 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=5 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="8" + align="horiz. centered" + } + } +} +"text update" { + object { + x=5 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m8.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=409 + y=20 + width=40 + height=285 + } + "composite name"="" + children { + rectangle { + object { + x=409 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=410 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m75.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=444 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m75_able.VAL" + } + } + rectangle { + object { + x=434 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m75.LLS" + } + } + rectangle { + object { + x=434 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m75.LVIO" + } + } + rectangle { + object { + x=434 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m75.HLS" + } + } + composite { + object { + x=410 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=410 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m75" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=410 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m75.DMOV" + } + } + rectangle { + object { + x=410 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=410 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="75" + align="horiz. centered" + } + } + } + rectangle { + object { + x=409 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=410 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m76.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=444 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m76_able.VAL" + } + } + rectangle { + object { + x=434 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m76.LLS" + } + } + rectangle { + object { + x=434 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m76.LVIO" + } + } + rectangle { + object { + x=434 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m76.HLS" + } + } + composite { + object { + x=410 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=410 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m76" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=410 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m76.DMOV" + } + } + rectangle { + object { + x=410 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=410 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="76" + align="horiz. centered" + } + } + } + rectangle { + object { + x=409 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=410 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m77.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=444 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m77_able.VAL" + } + } + rectangle { + object { + x=434 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m77.LLS" + } + } + rectangle { + object { + x=434 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m77.LVIO" + } + } + rectangle { + object { + x=434 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m77.HLS" + } + } + composite { + object { + x=410 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=410 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m77" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=410 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m77.DMOV" + } + } + rectangle { + object { + x=410 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=410 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="77" + align="horiz. centered" + } + } + } + rectangle { + object { + x=409 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=410 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m78.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=444 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m78_able.VAL" + } + } + rectangle { + object { + x=434 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m78.LLS" + } + } + rectangle { + object { + x=434 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m78.LVIO" + } + } + rectangle { + object { + x=434 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m78.HLS" + } + } + composite { + object { + x=410 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=410 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m78" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=410 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m78.DMOV" + } + } + rectangle { + object { + x=410 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=410 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="78" + align="horiz. centered" + } + } + } + rectangle { + object { + x=409 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=410 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m79.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=444 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m79_able.VAL" + } + } + rectangle { + object { + x=434 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m79.LLS" + } + } + rectangle { + object { + x=434 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m79.LVIO" + } + } + rectangle { + object { + x=434 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m79.HLS" + } + } + composite { + object { + x=410 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=410 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m79" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=410 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m79.DMOV" + } + } + rectangle { + object { + x=410 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=410 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="79" + align="horiz. centered" + } + } + } + rectangle { + object { + x=409 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=410 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m80.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=444 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m80_able.VAL" + } + } + rectangle { + object { + x=434 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m80.LLS" + } + } + rectangle { + object { + x=434 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m80.LVIO" + } + } + rectangle { + object { + x=434 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m80.HLS" + } + } + composite { + object { + x=410 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=410 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m80" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=410 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m80.DMOV" + } + } + rectangle { + object { + x=410 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=410 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="80" + align="horiz. centered" + } + } + } + rectangle { + object { + x=409 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=410 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m73.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=444 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m73_able.VAL" + } + } + rectangle { + object { + x=434 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m73.LLS" + } + } + rectangle { + object { + x=434 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m73.LVIO" + } + } + rectangle { + object { + x=434 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m73.HLS" + } + } + composite { + object { + x=410 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=410 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m73" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=410 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m73.DMOV" + } + } + rectangle { + object { + x=410 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=410 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="73" + align="horiz. centered" + } + } + } + rectangle { + object { + x=409 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=410 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m74.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=444 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m74_able.VAL" + } + } + rectangle { + object { + x=434 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m74.LLS" + } + } + rectangle { + object { + x=434 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m74.LVIO" + } + } + rectangle { + object { + x=434 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m74.HLS" + } + } + composite { + object { + x=410 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=410 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m74" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=410 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m74.DMOV" + } + } + rectangle { + object { + x=410 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=410 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="74" + align="horiz. centered" + } + } + } + "text update" { + object { + x=410 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m73.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=410 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m74.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=410 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m75.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=410 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m76.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=410 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m77.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=410 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m78.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=410 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m79.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=410 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m80.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=454 + y=20 + width=40 + height=285 + } + "composite name"="" + children { + rectangle { + object { + x=454 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=455 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m83.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=489 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m83_able.VAL" + } + } + rectangle { + object { + x=479 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m83.LLS" + } + } + rectangle { + object { + x=479 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m83.LVIO" + } + } + rectangle { + object { + x=479 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m83.HLS" + } + } + composite { + object { + x=455 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=455 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m83" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=455 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m83.DMOV" + } + } + rectangle { + object { + x=455 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=455 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="83" + align="horiz. centered" + } + } + } + rectangle { + object { + x=454 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=455 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m84.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=489 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m84_able.VAL" + } + } + rectangle { + object { + x=479 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m84.LLS" + } + } + rectangle { + object { + x=479 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m84.LVIO" + } + } + rectangle { + object { + x=479 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m84.HLS" + } + } + composite { + object { + x=455 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=455 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m84" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=455 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m84.DMOV" + } + } + rectangle { + object { + x=455 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=455 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="84" + align="horiz. centered" + } + } + } + rectangle { + object { + x=454 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=455 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m85.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=489 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m85_able.VAL" + } + } + rectangle { + object { + x=479 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m85.LLS" + } + } + rectangle { + object { + x=479 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m85.LVIO" + } + } + rectangle { + object { + x=479 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m85.HLS" + } + } + composite { + object { + x=455 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=455 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m85" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=455 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m85.DMOV" + } + } + rectangle { + object { + x=455 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=455 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="85" + align="horiz. centered" + } + } + } + rectangle { + object { + x=454 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=455 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m86.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=489 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m86_able.VAL" + } + } + rectangle { + object { + x=479 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m86.LLS" + } + } + rectangle { + object { + x=479 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m86.LVIO" + } + } + rectangle { + object { + x=479 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m86.HLS" + } + } + composite { + object { + x=455 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=455 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m86" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=455 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m86.DMOV" + } + } + rectangle { + object { + x=455 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=455 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="86" + align="horiz. centered" + } + } + } + rectangle { + object { + x=454 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=455 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m87.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=489 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m87_able.VAL" + } + } + rectangle { + object { + x=479 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m87.LLS" + } + } + rectangle { + object { + x=479 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m87.LVIO" + } + } + rectangle { + object { + x=479 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m87.HLS" + } + } + composite { + object { + x=455 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=455 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m87" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=455 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m87.DMOV" + } + } + rectangle { + object { + x=455 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=455 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="87" + align="horiz. centered" + } + } + } + rectangle { + object { + x=454 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=455 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m88.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=489 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m88_able.VAL" + } + } + rectangle { + object { + x=479 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m88.LLS" + } + } + rectangle { + object { + x=479 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m88.LVIO" + } + } + rectangle { + object { + x=479 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m88.HLS" + } + } + composite { + object { + x=455 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=455 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m88" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=455 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m88.DMOV" + } + } + rectangle { + object { + x=455 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=455 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="88" + align="horiz. centered" + } + } + } + rectangle { + object { + x=454 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=455 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m81.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=489 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m81_able.VAL" + } + } + rectangle { + object { + x=479 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m81.LLS" + } + } + rectangle { + object { + x=479 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m81.LVIO" + } + } + rectangle { + object { + x=479 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m81.HLS" + } + } + composite { + object { + x=455 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=455 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m81" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=455 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m81.DMOV" + } + } + rectangle { + object { + x=455 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=455 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="81" + align="horiz. centered" + } + } + } + rectangle { + object { + x=454 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=455 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m82.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=489 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m82_able.VAL" + } + } + rectangle { + object { + x=479 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m82.LLS" + } + } + rectangle { + object { + x=479 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m82.LVIO" + } + } + rectangle { + object { + x=479 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m82.HLS" + } + } + composite { + object { + x=455 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=455 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m82" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=455 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m82.DMOV" + } + } + rectangle { + object { + x=455 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=455 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="82" + align="horiz. centered" + } + } + } + "text update" { + object { + x=455 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m81.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=455 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m82.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=455 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m83.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=455 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m84.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=455 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m85.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=455 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m86.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=455 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m87.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=455 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m88.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=499 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=500 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m91.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=534 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m91_able.VAL" + } +} +rectangle { + object { + x=524 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m91.LLS" + } +} +rectangle { + object { + x=524 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m91.LVIO" + } +} +rectangle { + object { + x=524 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m91.HLS" + } +} +"related display" { + object { + x=500 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m91" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=500 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m91.DMOV" + } +} +rectangle { + object { + x=500 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=500 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="91" + align="horiz. centered" +} +rectangle { + object { + x=499 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=500 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m92.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=534 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m92_able.VAL" + } +} +rectangle { + object { + x=524 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m92.LLS" + } +} +rectangle { + object { + x=524 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m92.LVIO" + } +} +rectangle { + object { + x=524 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m92.HLS" + } +} +"related display" { + object { + x=500 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m92" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=500 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m92.DMOV" + } +} +rectangle { + object { + x=500 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=500 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="92" + align="horiz. centered" +} +rectangle { + object { + x=499 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=500 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m93.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=534 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m93_able.VAL" + } +} +rectangle { + object { + x=524 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m93.LLS" + } +} +rectangle { + object { + x=524 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m93.LVIO" + } +} +rectangle { + object { + x=524 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m93.HLS" + } +} +"related display" { + object { + x=500 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m93" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=500 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m93.DMOV" + } +} +rectangle { + object { + x=500 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=500 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="93" + align="horiz. centered" +} +rectangle { + object { + x=499 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=500 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m94.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=534 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m94_able.VAL" + } +} +rectangle { + object { + x=524 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m94.LLS" + } +} +rectangle { + object { + x=524 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m94.LVIO" + } +} +rectangle { + object { + x=524 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m94.HLS" + } +} +"related display" { + object { + x=500 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m94" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=500 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m94.DMOV" + } +} +rectangle { + object { + x=500 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=500 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="94" + align="horiz. centered" +} +rectangle { + object { + x=499 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=500 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m95.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=534 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m95_able.VAL" + } +} +rectangle { + object { + x=524 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m95.LLS" + } +} +rectangle { + object { + x=524 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m95.LVIO" + } +} +rectangle { + object { + x=524 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m95.HLS" + } +} +"related display" { + object { + x=500 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m95" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=500 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m95.DMOV" + } +} +rectangle { + object { + x=500 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=500 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="95" + align="horiz. centered" +} +rectangle { + object { + x=499 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=500 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m96.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=534 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m96_able.VAL" + } +} +rectangle { + object { + x=524 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m96.LLS" + } +} +rectangle { + object { + x=524 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m96.LVIO" + } +} +rectangle { + object { + x=524 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m96.HLS" + } +} +"related display" { + object { + x=500 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m96" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=500 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m96.DMOV" + } +} +rectangle { + object { + x=500 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=500 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="96" + align="horiz. centered" +} +rectangle { + object { + x=499 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=500 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m89.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=534 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m89_able.VAL" + } +} +rectangle { + object { + x=524 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m89.LLS" + } +} +rectangle { + object { + x=524 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m89.LVIO" + } +} +rectangle { + object { + x=524 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m89.HLS" + } +} +"related display" { + object { + x=500 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m89" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=500 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m89.DMOV" + } +} +rectangle { + object { + x=500 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=500 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="89" + align="horiz. centered" +} +rectangle { + object { + x=499 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=500 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m90.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=534 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m90_able.VAL" + } +} +rectangle { + object { + x=524 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m90.LLS" + } +} +rectangle { + object { + x=524 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m90.LVIO" + } +} +rectangle { + object { + x=524 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m90.HLS" + } +} +"related display" { + object { + x=500 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m90" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=500 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m90.DMOV" + } +} +rectangle { + object { + x=500 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=500 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="90" + align="horiz. centered" +} +"text update" { + object { + x=500 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m89.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=500 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m90.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=500 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m91.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=500 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m92.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=500 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m93.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=500 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m94.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=500 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m95.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=500 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m96.RBV" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=544 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=545 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m99.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=579 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m99_able.VAL" + } +} +rectangle { + object { + x=569 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m99.LLS" + } +} +rectangle { + object { + x=569 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m99.LVIO" + } +} +rectangle { + object { + x=569 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m99.HLS" + } +} +"related display" { + object { + x=545 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m99" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=545 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m99.DMOV" + } +} +rectangle { + object { + x=545 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=545 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="99" + align="horiz. centered" +} +rectangle { + object { + x=544 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=545 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m100.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=579 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m100_able.VAL" + } +} +rectangle { + object { + x=569 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m100.LLS" + } +} +rectangle { + object { + x=569 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m100.LVIO" + } +} +rectangle { + object { + x=569 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m100.HLS" + } +} +"related display" { + object { + x=545 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m100" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=545 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m100.DMOV" + } +} +rectangle { + object { + x=545 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=545 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="100" + align="horiz. centered" +} +rectangle { + object { + x=544 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=545 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m101.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=579 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m101_able.VAL" + } +} +rectangle { + object { + x=569 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m101.LLS" + } +} +rectangle { + object { + x=569 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m101.LVIO" + } +} +rectangle { + object { + x=569 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m101.HLS" + } +} +"related display" { + object { + x=545 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m101" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=545 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m101.DMOV" + } +} +rectangle { + object { + x=545 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=545 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="101" + align="horiz. centered" +} +rectangle { + object { + x=544 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=545 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m102.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=579 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m102_able.VAL" + } +} +rectangle { + object { + x=569 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m102.LLS" + } +} +rectangle { + object { + x=569 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m102.LVIO" + } +} +rectangle { + object { + x=569 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m102.HLS" + } +} +"related display" { + object { + x=545 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m102" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=545 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m102.DMOV" + } +} +rectangle { + object { + x=545 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=545 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="102" + align="horiz. centered" +} +rectangle { + object { + x=544 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=545 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m103.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=579 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m103_able.VAL" + } +} +rectangle { + object { + x=569 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m103.LLS" + } +} +rectangle { + object { + x=569 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m103.LVIO" + } +} +rectangle { + object { + x=569 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m103.HLS" + } +} +"related display" { + object { + x=545 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m103" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=545 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m103.DMOV" + } +} +rectangle { + object { + x=545 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=545 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="103" + align="horiz. centered" +} +rectangle { + object { + x=544 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=545 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m104.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=579 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m104_able.VAL" + } +} +rectangle { + object { + x=569 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m104.LLS" + } +} +rectangle { + object { + x=569 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m104.LVIO" + } +} +rectangle { + object { + x=569 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m104.HLS" + } +} +"related display" { + object { + x=545 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m104" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=545 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m104.DMOV" + } +} +rectangle { + object { + x=545 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=545 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="104" + align="horiz. centered" +} +rectangle { + object { + x=544 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=545 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m97.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=579 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m97_able.VAL" + } +} +rectangle { + object { + x=569 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m97.LLS" + } +} +rectangle { + object { + x=569 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m97.LVIO" + } +} +rectangle { + object { + x=569 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m97.HLS" + } +} +"related display" { + object { + x=545 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m97" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=545 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m97.DMOV" + } +} +rectangle { + object { + x=545 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=545 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="97" + align="horiz. centered" +} +rectangle { + object { + x=544 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=545 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m98.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=579 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m98_able.VAL" + } +} +rectangle { + object { + x=569 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m98.LLS" + } +} +rectangle { + object { + x=569 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m98.LVIO" + } +} +rectangle { + object { + x=569 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m98.HLS" + } +} +"related display" { + object { + x=545 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m98" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=545 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m98.DMOV" + } +} +rectangle { + object { + x=545 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=545 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="98" + align="horiz. centered" +} +"text update" { + object { + x=545 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m97.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=545 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m98.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=545 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m99.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=545 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m100.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=545 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m101.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=545 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m102.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=545 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m103.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=545 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m104.RBV" + clr=14 + bclr=0 + } + limits { + } +} +text { + object { + x=0 + y=0 + width=85 + height=14 + } + "basic attribute" { + clr=14 + } + textix="$(P) motors" + align="horiz. centered" +} +rectangle { + object { + x=589 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=590 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m107.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=624 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m107_able.VAL" + } +} +rectangle { + object { + x=614 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m107.LLS" + } +} +rectangle { + object { + x=614 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m107.LVIO" + } +} +rectangle { + object { + x=614 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m107.HLS" + } +} +"related display" { + object { + x=590 + y=103 + width=24 + height=12 + } + display[0] { + label="m107" + name="motorx_more.adl" + args="P=$(P),M=m107" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=590 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m107.DMOV" + } +} +rectangle { + object { + x=590 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=590 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="107" + align="horiz. centered" +} +rectangle { + object { + x=589 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=590 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m108.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=624 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m108_able.VAL" + } +} +rectangle { + object { + x=614 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m108.LLS" + } +} +rectangle { + object { + x=614 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m108.LVIO" + } +} +rectangle { + object { + x=614 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m108.HLS" + } +} +"related display" { + object { + x=590 + y=139 + width=24 + height=12 + } + display[0] { + label="m108" + name="motorx_more.adl" + args="P=$(P),M=m108" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=590 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m108.DMOV" + } +} +rectangle { + object { + x=590 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=590 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="108" + align="horiz. centered" +} +rectangle { + object { + x=589 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=590 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m109.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=624 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m109_able.VAL" + } +} +rectangle { + object { + x=614 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m109.LLS" + } +} +rectangle { + object { + x=614 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m109.LVIO" + } +} +rectangle { + object { + x=614 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m109.HLS" + } +} +"related display" { + object { + x=590 + y=175 + width=24 + height=12 + } + display[0] { + label="m109" + name="motorx_more.adl" + args="P=$(P),M=m109" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=590 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m109.DMOV" + } +} +rectangle { + object { + x=590 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=590 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="109" + align="horiz. centered" +} +rectangle { + object { + x=589 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=590 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m110.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=624 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m110_able.VAL" + } +} +rectangle { + object { + x=614 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m110.LLS" + } +} +rectangle { + object { + x=614 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m110.LVIO" + } +} +rectangle { + object { + x=614 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m110.HLS" + } +} +"related display" { + object { + x=590 + y=211 + width=24 + height=12 + } + display[0] { + label="m110" + name="motorx_more.adl" + args="P=$(P),M=m110" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=590 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m110.DMOV" + } +} +rectangle { + object { + x=590 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=590 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="110" + align="horiz. centered" +} +rectangle { + object { + x=589 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=590 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m111.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=624 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m111_able.VAL" + } +} +rectangle { + object { + x=614 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m111.LLS" + } +} +rectangle { + object { + x=614 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m111.LVIO" + } +} +rectangle { + object { + x=614 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m111.HLS" + } +} +"related display" { + object { + x=590 + y=247 + width=24 + height=12 + } + display[0] { + label="m111" + name="motorx_more.adl" + args="P=$(P),M=m111" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=590 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m111.DMOV" + } +} +rectangle { + object { + x=590 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=590 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="111" + align="horiz. centered" +} +rectangle { + object { + x=589 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=590 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m112.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=624 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m112_able.VAL" + } +} +rectangle { + object { + x=614 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m112.LLS" + } +} +rectangle { + object { + x=614 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m112.LVIO" + } +} +rectangle { + object { + x=614 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m112.HLS" + } +} +"related display" { + object { + x=590 + y=283 + width=24 + height=12 + } + display[0] { + label="m112" + name="motorx_more.adl" + args="P=$(P),M=m112" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=590 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m112.DMOV" + } +} +rectangle { + object { + x=590 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=590 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="112" + align="horiz. centered" +} +rectangle { + object { + x=589 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=590 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m105.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=624 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m105_able.VAL" + } +} +rectangle { + object { + x=614 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m105.LLS" + } +} +rectangle { + object { + x=614 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m105.LVIO" + } +} +rectangle { + object { + x=614 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m105.HLS" + } +} +"related display" { + object { + x=590 + y=31 + width=24 + height=12 + } + display[0] { + label="m105" + name="motorx_more.adl" + args="P=$(P),M=m105" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=590 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m105.DMOV" + } +} +rectangle { + object { + x=590 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=590 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="105" + align="horiz. centered" +} +rectangle { + object { + x=589 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=590 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m106.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=624 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m106_able.VAL" + } +} +rectangle { + object { + x=614 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m106.LLS" + } +} +rectangle { + object { + x=614 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m106.LVIO" + } +} +rectangle { + object { + x=614 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m106.HLS" + } +} +"related display" { + object { + x=590 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m106" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=590 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m106.DMOV" + } +} +rectangle { + object { + x=590 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=590 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="106" + align="horiz. centered" +} +"text update" { + object { + x=590 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m105.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=590 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m106.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=590 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m107.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=590 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m108.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=590 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m109.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=590 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m110.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=590 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m111.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=590 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m112.RBV" + clr=14 + bclr=0 + } + limits { + } +} +text { + object { + x=0 + y=0 + width=85 + height=14 + } + "basic attribute" { + clr=14 + } + textix="$(P) motors" + align="horiz. centered" +} +rectangle { + object { + x=634 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=635 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m115.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=669 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m115_able.VAL" + } +} +rectangle { + object { + x=659 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m115.LLS" + } +} +rectangle { + object { + x=659 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m115.LVIO" + } +} +rectangle { + object { + x=659 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m115.HLS" + } +} +"related display" { + object { + x=635 + y=103 + width=24 + height=12 + } + display[0] { + label="m115" + name="motorx_more.adl" + args="P=$(P),M=m115" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=635 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m115.DMOV" + } +} +rectangle { + object { + x=635 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=635 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="115" + align="horiz. centered" +} +rectangle { + object { + x=634 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=635 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m116.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=669 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m116_able.VAL" + } +} +rectangle { + object { + x=659 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m116.LLS" + } +} +rectangle { + object { + x=659 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m116.LVIO" + } +} +rectangle { + object { + x=659 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m116.HLS" + } +} +"related display" { + object { + x=635 + y=139 + width=24 + height=12 + } + display[0] { + label="m116" + name="motorx_more.adl" + args="P=$(P),M=m116" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=635 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m116.DMOV" + } +} +rectangle { + object { + x=635 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=635 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="116" + align="horiz. centered" +} +rectangle { + object { + x=634 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=635 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m117.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=669 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m117_able.VAL" + } +} +rectangle { + object { + x=659 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m117.LLS" + } +} +rectangle { + object { + x=659 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m117.LVIO" + } +} +rectangle { + object { + x=659 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m117.HLS" + } +} +"related display" { + object { + x=635 + y=175 + width=24 + height=12 + } + display[0] { + label="m117" + name="motorx_more.adl" + args="P=$(P),M=m117" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=635 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m117.DMOV" + } +} +rectangle { + object { + x=635 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=635 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="117" + align="horiz. centered" +} +rectangle { + object { + x=634 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=635 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m118.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=669 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m118_able.VAL" + } +} +rectangle { + object { + x=659 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m118.LLS" + } +} +rectangle { + object { + x=659 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m118.LVIO" + } +} +rectangle { + object { + x=659 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m118.HLS" + } +} +"related display" { + object { + x=635 + y=211 + width=24 + height=12 + } + display[0] { + label="m118" + name="motorx_more.adl" + args="P=$(P),M=m118" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=635 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m118.DMOV" + } +} +rectangle { + object { + x=635 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=635 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="118" + align="horiz. centered" +} +rectangle { + object { + x=634 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=635 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m119.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=669 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m119_able.VAL" + } +} +rectangle { + object { + x=659 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m119.LLS" + } +} +rectangle { + object { + x=659 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m119.LVIO" + } +} +rectangle { + object { + x=659 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m119.HLS" + } +} +"related display" { + object { + x=635 + y=247 + width=24 + height=12 + } + display[0] { + label="m119" + name="motorx_more.adl" + args="P=$(P),M=m119" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=635 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m119.DMOV" + } +} +rectangle { + object { + x=635 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=635 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="119" + align="horiz. centered" +} +rectangle { + object { + x=634 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=635 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m120.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=669 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m120_able.VAL" + } +} +rectangle { + object { + x=659 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m120.LLS" + } +} +rectangle { + object { + x=659 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m120.LVIO" + } +} +rectangle { + object { + x=659 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m120.HLS" + } +} +"related display" { + object { + x=635 + y=283 + width=24 + height=12 + } + display[0] { + label="m120" + name="motorx_more.adl" + args="P=$(P),M=m120" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=635 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m120.DMOV" + } +} +rectangle { + object { + x=635 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=635 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="120" + align="horiz. centered" +} +rectangle { + object { + x=634 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=635 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m113.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=669 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m113_able.VAL" + } +} +rectangle { + object { + x=659 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m113.LLS" + } +} +rectangle { + object { + x=659 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m113.LVIO" + } +} +rectangle { + object { + x=659 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m113.HLS" + } +} +"related display" { + object { + x=635 + y=31 + width=24 + height=12 + } + display[0] { + label="m113" + name="motorx_more.adl" + args="P=$(P),M=m113" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=635 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m113.DMOV" + } +} +rectangle { + object { + x=635 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=635 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="113" + align="horiz. centered" +} +rectangle { + object { + x=634 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=635 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m114.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=669 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m114_able.VAL" + } +} +rectangle { + object { + x=659 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m114.LLS" + } +} +rectangle { + object { + x=659 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m114.LVIO" + } +} +rectangle { + object { + x=659 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m114.HLS" + } +} +"related display" { + object { + x=635 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m114" + } + clr=14 + bclr=51 + visual="invisible" +} +rectangle { + object { + x=635 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m114.DMOV" + } +} +rectangle { + object { + x=635 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } +} +text { + object { + x=635 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="114" + align="horiz. centered" +} +"text update" { + object { + x=635 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m113.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=635 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m114.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=635 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m115.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=635 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m116.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=635 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m117.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=635 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m118.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=635 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m119.RBV" + clr=14 + bclr=0 + } + limits { + } +} +"text update" { + object { + x=635 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m120.RBV" + clr=14 + bclr=0 + } + limits { + } +} diff --git a/motorApp/op/adl/motorStatus96.adl b/motorApp/op/adl/motorStatus96.adl new file mode 100644 index 0000000..0c0f9c7 --- /dev/null +++ b/motorApp/op/adl/motorStatus96.adl @@ -0,0 +1,17148 @@ + +file { + name="/net/s8dserv/xorApps/epics/synApps_5_7/ioc/8id/8idApp/op/adl/motorStatus96.adl" + version=030107 +} +display { + object { + x=2019 + y=339 + width=537 + height=308 + } + clr=7 + bclr=2 + cmap="" + gridSpacing=5 + gridOn=0 + snapToGrid=1 +} +"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=0 + y=0 + width=500 + height=20 + } + "basic attribute" { + clr=14 + } + textix=" $(P) motor status" + align="horiz. centered" +} +composite { + object { + x=365 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=365 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=366 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m68.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=400 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m68_able.VAL" + } + } + rectangle { + object { + x=390 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m68.LLS" + } + } + rectangle { + object { + x=390 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m68.LVIO" + } + } + rectangle { + object { + x=390 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m68.HLS" + } + } + composite { + object { + x=366 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=366 + y=139 + width=24 + height=12 + } + display[0] { + label="m68" + name="motorx_more.adl" + args="P=$(P),M=m68" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=366 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m68.DMOV" + } + } + rectangle { + object { + x=366 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=366 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="68" + align="horiz. centered" + } + } + } + "text update" { + object { + x=366 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m68.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=320 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=320 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=321 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m60.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=355 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m60_able.VAL" + } + } + rectangle { + object { + x=345 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m60.LLS" + } + } + rectangle { + object { + x=345 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m60.LVIO" + } + } + rectangle { + object { + x=345 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m60.HLS" + } + } + composite { + object { + x=321 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=321 + y=139 + width=24 + height=12 + } + display[0] { + label="m60" + name="motorx_more.adl" + args="P=$(P),M=m60" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=321 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m60.DMOV" + } + } + rectangle { + object { + x=321 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=321 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="60" + align="horiz. centered" + } + } + } + "text update" { + object { + x=321 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m60.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=365 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=365 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=366 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m65.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=400 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m65_able.VAL" + } + } + rectangle { + object { + x=390 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m65.LLS" + } + } + rectangle { + object { + x=390 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m65.LVIO" + } + } + rectangle { + object { + x=390 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m65.HLS" + } + } + composite { + object { + x=366 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=366 + y=31 + width=24 + height=12 + } + display[0] { + label="m65" + name="motorx_more.adl" + args="P=$(P),M=m65" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=366 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m65.DMOV" + } + } + rectangle { + object { + x=366 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=366 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="65" + align="horiz. centered" + } + } + } + "text update" { + object { + x=366 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m65.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=365 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=365 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=366 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m66.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=400 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m66_able.VAL" + } + } + rectangle { + object { + x=390 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m66.LLS" + } + } + rectangle { + object { + x=390 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m66.LVIO" + } + } + rectangle { + object { + x=390 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m66.HLS" + } + } + composite { + object { + x=366 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=366 + y=67 + width=24 + height=12 + } + display[0] { + label="m66" + name="motorx_more.adl" + args="P=$(P),M=m66" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=366 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m66.DMOV" + } + } + rectangle { + object { + x=366 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=366 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="66" + align="horiz. centered" + } + } + } + "text update" { + object { + x=366 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m66.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=365 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=365 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=366 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m67.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=400 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m67_able.VAL" + } + } + rectangle { + object { + x=390 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m67.LLS" + } + } + rectangle { + object { + x=390 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m67.LVIO" + } + } + rectangle { + object { + x=390 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m67.HLS" + } + } + composite { + object { + x=366 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=366 + y=103 + width=24 + height=12 + } + display[0] { + label="m67" + name="motorx_more.adl" + args="P=$(P),M=m67" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=366 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m67.DMOV" + } + } + rectangle { + object { + x=366 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=366 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="67" + align="horiz. centered" + } + } + } + "text update" { + object { + x=366 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m67.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=320 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=320 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=321 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m57.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=355 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m57_able.VAL" + } + } + rectangle { + object { + x=345 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m57.LLS" + } + } + rectangle { + object { + x=345 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m57.LVIO" + } + } + rectangle { + object { + x=345 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m57.HLS" + } + } + composite { + object { + x=321 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=321 + y=31 + width=24 + height=12 + } + display[0] { + label="m57" + name="motorx_more.adl" + args="P=$(P),M=m57" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=321 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m57.DMOV" + } + } + rectangle { + object { + x=321 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=321 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="57" + align="horiz. centered" + } + } + } + "text update" { + object { + x=321 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m57.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=320 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=320 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=321 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m58.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=355 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m58_able.VAL" + } + } + rectangle { + object { + x=345 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m58.LLS" + } + } + rectangle { + object { + x=345 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m58.LVIO" + } + } + rectangle { + object { + x=345 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m58.HLS" + } + } + composite { + object { + x=321 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=321 + y=67 + width=24 + height=12 + } + display[0] { + label="m58" + name="motorx_more.adl" + args="P=$(P),M=m58" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=321 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m58.DMOV" + } + } + rectangle { + object { + x=321 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=321 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="58" + align="horiz. centered" + } + } + } + "text update" { + object { + x=321 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m58.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=320 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=320 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=321 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m59.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=355 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m59_able.VAL" + } + } + rectangle { + object { + x=345 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m59.LLS" + } + } + rectangle { + object { + x=345 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m59.LVIO" + } + } + rectangle { + object { + x=345 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m59.HLS" + } + } + composite { + object { + x=321 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=321 + y=103 + width=24 + height=12 + } + display[0] { + label="m59" + name="motorx_more.adl" + args="P=$(P),M=m59" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=321 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m59.DMOV" + } + } + rectangle { + object { + x=321 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=321 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="59" + align="horiz. centered" + } + } + } + "text update" { + object { + x=321 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m59.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=320 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=320 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=321 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m61.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=355 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m61_able.VAL" + } + } + rectangle { + object { + x=345 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m61.LLS" + } + } + rectangle { + object { + x=345 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m61.LVIO" + } + } + rectangle { + object { + x=345 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m61.HLS" + } + } + composite { + object { + x=321 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=321 + y=175 + width=24 + height=12 + } + display[0] { + label="m61" + name="motorx_more.adl" + args="P=$(P),M=m61" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=321 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m61.DMOV" + } + } + rectangle { + object { + x=321 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=321 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="61" + align="horiz. centered" + } + } + } + "text update" { + object { + x=321 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m61.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=365 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=365 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=366 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m69.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=400 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m69_able.VAL" + } + } + rectangle { + object { + x=390 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m69.LLS" + } + } + rectangle { + object { + x=390 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m69.LVIO" + } + } + rectangle { + object { + x=390 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m69.HLS" + } + } + composite { + object { + x=366 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=366 + y=175 + width=24 + height=12 + } + display[0] { + label="m69" + name="motorx_more.adl" + args="P=$(P),M=m69" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=366 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m69.DMOV" + } + } + rectangle { + object { + x=366 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=366 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="69" + align="horiz. centered" + } + } + } + "text update" { + object { + x=366 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m69.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=365 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=365 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=366 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m70.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=400 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m70_able.VAL" + } + } + rectangle { + object { + x=390 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m70.LLS" + } + } + rectangle { + object { + x=390 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m70.LVIO" + } + } + rectangle { + object { + x=390 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m70.HLS" + } + } + composite { + object { + x=366 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=366 + y=211 + width=24 + height=12 + } + display[0] { + label="m70" + name="motorx_more.adl" + args="P=$(P),M=m70" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=366 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m70.DMOV" + } + } + rectangle { + object { + x=366 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=366 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="70" + align="horiz. centered" + } + } + } + "text update" { + object { + x=366 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m70.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=320 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=320 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=321 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m62.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=355 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m62_able.VAL" + } + } + rectangle { + object { + x=345 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m62.LLS" + } + } + rectangle { + object { + x=345 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m62.LVIO" + } + } + rectangle { + object { + x=345 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m62.HLS" + } + } + composite { + object { + x=321 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=321 + y=211 + width=24 + height=12 + } + display[0] { + label="m62" + name="motorx_more.adl" + args="P=$(P),M=m62" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=321 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m62.DMOV" + } + } + rectangle { + object { + x=321 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=321 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="62" + align="horiz. centered" + } + } + } + "text update" { + object { + x=321 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m62.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=320 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=320 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=321 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m63.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=355 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m63_able.VAL" + } + } + rectangle { + object { + x=345 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m63.LLS" + } + } + rectangle { + object { + x=345 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m63.LVIO" + } + } + rectangle { + object { + x=345 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m63.HLS" + } + } + composite { + object { + x=321 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=321 + y=247 + width=24 + height=12 + } + display[0] { + label="m63" + name="motorx_more.adl" + args="P=$(P),M=m63" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=321 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m63.DMOV" + } + } + rectangle { + object { + x=321 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=321 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="63" + align="horiz. centered" + } + } + } + "text update" { + object { + x=321 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m63.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=365 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=365 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=366 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m71.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=400 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m71_able.VAL" + } + } + rectangle { + object { + x=390 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m71.LLS" + } + } + rectangle { + object { + x=390 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m71.LVIO" + } + } + rectangle { + object { + x=390 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m71.HLS" + } + } + composite { + object { + x=366 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=366 + y=247 + width=24 + height=12 + } + display[0] { + label="m71" + name="motorx_more.adl" + args="P=$(P),M=m71" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=366 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m71.DMOV" + } + } + rectangle { + object { + x=366 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=366 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="71" + align="horiz. centered" + } + } + } + "text update" { + object { + x=366 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m71.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=365 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=366 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m72.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=400 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m72_able.VAL" + } +} +rectangle { + object { + x=390 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m72.LLS" + } +} +rectangle { + object { + x=390 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m72.LVIO" + } +} +rectangle { + object { + x=390 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m72.HLS" + } +} +composite { + object { + x=366 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=366 + y=283 + width=24 + height=12 + } + display[0] { + label="m72" + name="motorx_more.adl" + args="P=$(P),M=m72" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=366 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m72.DMOV" + } + } + rectangle { + object { + x=366 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=366 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="72" + align="horiz. centered" + } + } +} +"text update" { + object { + x=366 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m72.RBV" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=320 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=321 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m64.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=355 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m64_able.VAL" + } +} +rectangle { + object { + x=345 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m64.LLS" + } +} +rectangle { + object { + x=345 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m64.LVIO" + } +} +rectangle { + object { + x=345 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m64.HLS" + } +} +composite { + object { + x=321 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=321 + y=283 + width=24 + height=12 + } + display[0] { + label="m64" + name="motorx_more.adl" + args="P=$(P),M=m64" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=321 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m64.DMOV" + } + } + rectangle { + object { + x=321 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=321 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="64" + align="horiz. centered" + } + } +} +"text update" { + object { + x=321 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m64.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=275 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=275 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=276 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m49.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=310 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m49_able.VAL" + } + } + rectangle { + object { + x=300 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m49.LLS" + } + } + rectangle { + object { + x=300 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m49.LVIO" + } + } + rectangle { + object { + x=300 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m49.HLS" + } + } + composite { + object { + x=276 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=276 + y=31 + width=24 + height=12 + } + display[0] { + label="m49" + name="motorx_more.adl" + args="P=$(P),M=m49" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=276 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m49.DMOV" + } + } + rectangle { + object { + x=276 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=276 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="49" + align="horiz. centered" + } + } + } + "text update" { + object { + x=276 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m49.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=275 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=275 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=276 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m50.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=310 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m50_able.VAL" + } + } + rectangle { + object { + x=300 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m50.LLS" + } + } + rectangle { + object { + x=300 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m50.LVIO" + } + } + rectangle { + object { + x=300 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m50.HLS" + } + } + composite { + object { + x=276 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=276 + y=67 + width=24 + height=12 + } + display[0] { + label="m50" + name="motorx_more.adl" + args="P=$(P),M=m50" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=276 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m50.DMOV" + } + } + rectangle { + object { + x=276 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=276 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="50" + align="horiz. centered" + } + } + } + "text update" { + object { + x=276 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m50.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=275 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=275 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=276 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m51.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=310 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m51_able.VAL" + } + } + rectangle { + object { + x=300 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m51.LLS" + } + } + rectangle { + object { + x=300 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m51.LVIO" + } + } + rectangle { + object { + x=300 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m51.HLS" + } + } + composite { + object { + x=276 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=276 + y=103 + width=24 + height=12 + } + display[0] { + label="m51" + name="motorx_more.adl" + args="P=$(P),M=m51" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=276 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m51.DMOV" + } + } + rectangle { + object { + x=276 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=276 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="51" + align="horiz. centered" + } + } + } + "text update" { + object { + x=276 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m51.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=275 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=275 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=276 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m52.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=310 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m52_able.VAL" + } + } + rectangle { + object { + x=300 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m52.LLS" + } + } + rectangle { + object { + x=300 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m52.LVIO" + } + } + rectangle { + object { + x=300 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m52.HLS" + } + } + composite { + object { + x=276 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=276 + y=139 + width=24 + height=12 + } + display[0] { + label="m52" + name="motorx_more.adl" + args="P=$(P),M=m52" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=276 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m52.DMOV" + } + } + rectangle { + object { + x=276 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=276 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="52" + align="horiz. centered" + } + } + } + "text update" { + object { + x=276 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m52.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=275 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=275 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=276 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m53.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=310 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m53_able.VAL" + } + } + rectangle { + object { + x=300 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m53.LLS" + } + } + rectangle { + object { + x=300 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m53.LVIO" + } + } + rectangle { + object { + x=300 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m53.HLS" + } + } + composite { + object { + x=276 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=276 + y=175 + width=24 + height=12 + } + display[0] { + label="m53" + name="motorx_more.adl" + args="P=$(P),M=m53" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=276 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m53.DMOV" + } + } + rectangle { + object { + x=276 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=276 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="53" + align="horiz. centered" + } + } + } + "text update" { + object { + x=276 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m53.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=275 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=275 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=276 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m54.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=310 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m54_able.VAL" + } + } + rectangle { + object { + x=300 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m54.LLS" + } + } + rectangle { + object { + x=300 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m54.LVIO" + } + } + rectangle { + object { + x=300 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m54.HLS" + } + } + composite { + object { + x=276 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=276 + y=211 + width=24 + height=12 + } + display[0] { + label="m54" + name="motorx_more.adl" + args="P=$(P),M=m54" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=276 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m54.DMOV" + } + } + rectangle { + object { + x=276 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=276 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="54" + align="horiz. centered" + } + } + } + "text update" { + object { + x=276 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m54.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=275 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=275 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=276 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m55.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=310 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m55_able.VAL" + } + } + rectangle { + object { + x=300 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m55.LLS" + } + } + rectangle { + object { + x=300 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m55.LVIO" + } + } + rectangle { + object { + x=300 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m55.HLS" + } + } + composite { + object { + x=276 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=276 + y=247 + width=24 + height=12 + } + display[0] { + label="m55" + name="motorx_more.adl" + args="P=$(P),M=m55" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=276 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m55.DMOV" + } + } + rectangle { + object { + x=276 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=276 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="55" + align="horiz. centered" + } + } + } + "text update" { + object { + x=276 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m55.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=275 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=276 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m56.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=310 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m56_able.VAL" + } +} +rectangle { + object { + x=300 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m56.LLS" + } +} +rectangle { + object { + x=300 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m56.LVIO" + } +} +rectangle { + object { + x=300 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m56.HLS" + } +} +composite { + object { + x=276 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=276 + y=283 + width=24 + height=12 + } + display[0] { + label="m56" + name="motorx_more.adl" + args="P=$(P),M=m56" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=276 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m56.DMOV" + } + } + rectangle { + object { + x=276 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=276 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="56" + align="horiz. centered" + } + } +} +"text update" { + object { + x=276 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m56.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=230 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=230 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=231 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m41.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=265 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m41_able.VAL" + } + } + rectangle { + object { + x=255 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m41.LLS" + } + } + rectangle { + object { + x=255 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m41.LVIO" + } + } + rectangle { + object { + x=255 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m41.HLS" + } + } + composite { + object { + x=231 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=231 + y=31 + width=24 + height=12 + } + display[0] { + label="m41" + name="motorx_more.adl" + args="P=$(P),M=m41" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=231 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m41.DMOV" + } + } + rectangle { + object { + x=231 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=231 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="41" + align="horiz. centered" + } + } + } + "text update" { + object { + x=231 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m41.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=230 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=230 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=231 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m42.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=265 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m42_able.VAL" + } + } + rectangle { + object { + x=255 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m42.LLS" + } + } + rectangle { + object { + x=255 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m42.LVIO" + } + } + rectangle { + object { + x=255 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m42.HLS" + } + } + composite { + object { + x=231 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=231 + y=67 + width=24 + height=12 + } + display[0] { + label="m42" + name="motorx_more.adl" + args="P=$(P),M=m42" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=231 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m42.DMOV" + } + } + rectangle { + object { + x=231 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=231 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="42" + align="horiz. centered" + } + } + } + "text update" { + object { + x=231 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m42.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=230 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=230 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=231 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m43.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=265 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m43_able.VAL" + } + } + rectangle { + object { + x=255 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m43.LLS" + } + } + rectangle { + object { + x=255 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m43.LVIO" + } + } + rectangle { + object { + x=255 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m43.HLS" + } + } + composite { + object { + x=231 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=231 + y=103 + width=24 + height=12 + } + display[0] { + label="m43" + name="motorx_more.adl" + args="P=$(P),M=m43" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=231 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m43.DMOV" + } + } + rectangle { + object { + x=231 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=231 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="43" + align="horiz. centered" + } + } + } + "text update" { + object { + x=231 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m43.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=230 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=230 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=231 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m44.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=265 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m44_able.VAL" + } + } + rectangle { + object { + x=255 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m44.LLS" + } + } + rectangle { + object { + x=255 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m44.LVIO" + } + } + rectangle { + object { + x=255 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m44.HLS" + } + } + composite { + object { + x=231 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=231 + y=139 + width=24 + height=12 + } + display[0] { + label="m44" + name="motorx_more.adl" + args="P=$(P),M=m44" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=231 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m44.DMOV" + } + } + rectangle { + object { + x=231 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=231 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="44" + align="horiz. centered" + } + } + } + "text update" { + object { + x=231 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m44.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=230 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=230 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=231 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m45.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=265 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m45_able.VAL" + } + } + rectangle { + object { + x=255 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m45.LLS" + } + } + rectangle { + object { + x=255 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m45.LVIO" + } + } + rectangle { + object { + x=255 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m45.HLS" + } + } + composite { + object { + x=231 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=231 + y=175 + width=24 + height=12 + } + display[0] { + label="m45" + name="motorx_more.adl" + args="P=$(P),M=m45" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=231 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m45.DMOV" + } + } + rectangle { + object { + x=231 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=231 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="45" + align="horiz. centered" + } + } + } + "text update" { + object { + x=231 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m45.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=230 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=230 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=231 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m46.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=265 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m46_able.VAL" + } + } + rectangle { + object { + x=255 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m46.LLS" + } + } + rectangle { + object { + x=255 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m46.LVIO" + } + } + rectangle { + object { + x=255 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m46.HLS" + } + } + composite { + object { + x=231 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=231 + y=211 + width=24 + height=12 + } + display[0] { + label="m46" + name="motorx_more.adl" + args="P=$(P),M=m46" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=231 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m46.DMOV" + } + } + rectangle { + object { + x=231 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=231 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="46" + align="horiz. centered" + } + } + } + "text update" { + object { + x=231 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m46.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=230 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=230 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=231 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m47.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=265 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m47_able.VAL" + } + } + rectangle { + object { + x=255 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m47.LLS" + } + } + rectangle { + object { + x=255 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m47.LVIO" + } + } + rectangle { + object { + x=255 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m47.HLS" + } + } + composite { + object { + x=231 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=231 + y=247 + width=24 + height=12 + } + display[0] { + label="m47" + name="motorx_more.adl" + args="P=$(P),M=m47" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=231 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m47.DMOV" + } + } + rectangle { + object { + x=231 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=231 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="47" + align="horiz. centered" + } + } + } + "text update" { + object { + x=231 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m47.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=230 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=231 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m48.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=265 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m48_able.VAL" + } +} +rectangle { + object { + x=255 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m48.LLS" + } +} +rectangle { + object { + x=255 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m48.LVIO" + } +} +rectangle { + object { + x=255 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m48.HLS" + } +} +composite { + object { + x=231 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=231 + y=283 + width=24 + height=12 + } + display[0] { + label="m48" + name="motorx_more.adl" + args="P=$(P),M=m48" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=231 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m48.DMOV" + } + } + rectangle { + object { + x=231 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=231 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="48" + align="horiz. centered" + } + } +} +"text update" { + object { + x=231 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m48.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=185 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=185 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=186 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m33.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=220 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m33_able.VAL" + } + } + rectangle { + object { + x=210 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m33.LLS" + } + } + rectangle { + object { + x=210 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m33.LVIO" + } + } + rectangle { + object { + x=210 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m33.HLS" + } + } + composite { + object { + x=186 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=186 + y=31 + width=24 + height=12 + } + display[0] { + label="m33" + name="motorx_more.adl" + args="P=$(P),M=m33" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=186 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m33.DMOV" + } + } + rectangle { + object { + x=186 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=186 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="33" + align="horiz. centered" + } + } + } + "text update" { + object { + x=186 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m33.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=185 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=185 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=186 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m34.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=220 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m34_able.VAL" + } + } + rectangle { + object { + x=210 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m34.LLS" + } + } + rectangle { + object { + x=210 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m34.LVIO" + } + } + rectangle { + object { + x=210 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m34.HLS" + } + } + composite { + object { + x=186 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=186 + y=67 + width=24 + height=12 + } + display[0] { + label="m34" + name="motorx_more.adl" + args="P=$(P),M=m34" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=186 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m34.DMOV" + } + } + rectangle { + object { + x=186 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=186 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="34" + align="horiz. centered" + } + } + } + "text update" { + object { + x=186 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m34.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=185 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=185 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=186 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m35.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=220 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m35_able.VAL" + } + } + rectangle { + object { + x=210 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m35.LLS" + } + } + rectangle { + object { + x=210 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m35.LVIO" + } + } + rectangle { + object { + x=210 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m35.HLS" + } + } + composite { + object { + x=186 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=186 + y=103 + width=24 + height=12 + } + display[0] { + label="m35" + name="motorx_more.adl" + args="P=$(P),M=m35" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=186 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m35.DMOV" + } + } + rectangle { + object { + x=186 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=186 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="35" + align="horiz. centered" + } + } + } + "text update" { + object { + x=186 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m35.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=185 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=185 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=186 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m36.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=220 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m36_able.VAL" + } + } + rectangle { + object { + x=210 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m36.LLS" + } + } + rectangle { + object { + x=210 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m36.LVIO" + } + } + rectangle { + object { + x=210 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m36.HLS" + } + } + composite { + object { + x=186 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=186 + y=139 + width=24 + height=12 + } + display[0] { + label="m36" + name="motorx_more.adl" + args="P=$(P),M=m36" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=186 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m36.DMOV" + } + } + rectangle { + object { + x=186 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=186 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="36" + align="horiz. centered" + } + } + } + "text update" { + object { + x=186 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m36.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=185 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=185 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=186 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m37.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=220 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m37_able.VAL" + } + } + rectangle { + object { + x=210 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m37.LLS" + } + } + rectangle { + object { + x=210 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m37.LVIO" + } + } + rectangle { + object { + x=210 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m37.HLS" + } + } + composite { + object { + x=186 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=186 + y=175 + width=24 + height=12 + } + display[0] { + label="m37" + name="motorx_more.adl" + args="P=$(P),M=m37" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=186 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m37.DMOV" + } + } + rectangle { + object { + x=186 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=186 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="37" + align="horiz. centered" + } + } + } + "text update" { + object { + x=186 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m37.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=185 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=185 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=186 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m38.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=220 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m38_able.VAL" + } + } + rectangle { + object { + x=210 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m38.LLS" + } + } + rectangle { + object { + x=210 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m38.LVIO" + } + } + rectangle { + object { + x=210 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m38.HLS" + } + } + composite { + object { + x=186 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=186 + y=211 + width=24 + height=12 + } + display[0] { + label="m38" + name="motorx_more.adl" + args="P=$(P),M=m38" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=186 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m38.DMOV" + } + } + rectangle { + object { + x=186 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=186 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="38" + align="horiz. centered" + } + } + } + "text update" { + object { + x=186 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m38.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=185 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=185 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=186 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m39.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=220 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m39_able.VAL" + } + } + rectangle { + object { + x=210 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m39.LLS" + } + } + rectangle { + object { + x=210 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m39.LVIO" + } + } + rectangle { + object { + x=210 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m39.HLS" + } + } + composite { + object { + x=186 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=186 + y=247 + width=24 + height=12 + } + display[0] { + label="m39" + name="motorx_more.adl" + args="P=$(P),M=m39" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=186 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m39.DMOV" + } + } + rectangle { + object { + x=186 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=186 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="39" + align="horiz. centered" + } + } + } + "text update" { + object { + x=186 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m39.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=185 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=186 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m40.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=220 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m40_able.VAL" + } +} +rectangle { + object { + x=210 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m40.LLS" + } +} +rectangle { + object { + x=210 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m40.LVIO" + } +} +rectangle { + object { + x=210 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m40.HLS" + } +} +composite { + object { + x=186 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=186 + y=283 + width=24 + height=12 + } + display[0] { + label="m40" + name="motorx_more.adl" + args="P=$(P),M=m40" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=186 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m40.DMOV" + } + } + rectangle { + object { + x=186 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=186 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="40" + align="horiz. centered" + } + } +} +"text update" { + object { + x=186 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m40.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=140 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=140 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=141 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m25.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=175 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m25_able.VAL" + } + } + rectangle { + object { + x=165 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m25.LLS" + } + } + rectangle { + object { + x=165 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m25.LVIO" + } + } + rectangle { + object { + x=165 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m25.HLS" + } + } + composite { + object { + x=141 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=141 + y=31 + width=24 + height=12 + } + display[0] { + label="m25" + name="motorx_more.adl" + args="P=$(P),M=m25" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=141 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m25.DMOV" + } + } + rectangle { + object { + x=141 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=141 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="25" + align="horiz. centered" + } + } + } + "text update" { + object { + x=141 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m25.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=140 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=140 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=141 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m26.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=175 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m26_able.VAL" + } + } + rectangle { + object { + x=165 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m26.LLS" + } + } + rectangle { + object { + x=165 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m26.LVIO" + } + } + rectangle { + object { + x=165 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m26.HLS" + } + } + composite { + object { + x=141 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=141 + y=67 + width=24 + height=12 + } + display[0] { + label="m26" + name="motorx_more.adl" + args="P=$(P),M=m26" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=141 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m26.DMOV" + } + } + rectangle { + object { + x=141 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=141 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="26" + align="horiz. centered" + } + } + } + "text update" { + object { + x=141 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m26.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=140 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=140 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=141 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m27.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=175 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m27_able.VAL" + } + } + rectangle { + object { + x=165 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m27.LLS" + } + } + rectangle { + object { + x=165 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m27.LVIO" + } + } + rectangle { + object { + x=165 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m27.HLS" + } + } + composite { + object { + x=141 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=141 + y=103 + width=24 + height=12 + } + display[0] { + label="m27" + name="motorx_more.adl" + args="P=$(P),M=m27" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=141 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m27.DMOV" + } + } + rectangle { + object { + x=141 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=141 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="27" + align="horiz. centered" + } + } + } + "text update" { + object { + x=141 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m27.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=140 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=140 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=141 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m28.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=175 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m28_able.VAL" + } + } + rectangle { + object { + x=165 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m28.LLS" + } + } + rectangle { + object { + x=165 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m28.LVIO" + } + } + rectangle { + object { + x=165 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m28.HLS" + } + } + composite { + object { + x=141 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=141 + y=139 + width=24 + height=12 + } + display[0] { + label="m28" + name="motorx_more.adl" + args="P=$(P),M=m28" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=141 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m28.DMOV" + } + } + rectangle { + object { + x=141 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=141 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="28" + align="horiz. centered" + } + } + } + "text update" { + object { + x=141 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m28.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=140 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=140 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=141 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m29.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=175 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m29_able.VAL" + } + } + rectangle { + object { + x=165 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m29.LLS" + } + } + rectangle { + object { + x=165 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m29.LVIO" + } + } + rectangle { + object { + x=165 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m29.HLS" + } + } + composite { + object { + x=141 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=141 + y=175 + width=24 + height=12 + } + display[0] { + label="m29" + name="motorx_more.adl" + args="P=$(P),M=m29" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=141 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m29.DMOV" + } + } + rectangle { + object { + x=141 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=141 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="29" + align="horiz. centered" + } + } + } + "text update" { + object { + x=141 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m29.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=140 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=140 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=141 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m30.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=175 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m30_able.VAL" + } + } + rectangle { + object { + x=165 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m30.LLS" + } + } + rectangle { + object { + x=165 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m30.LVIO" + } + } + rectangle { + object { + x=165 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m30.HLS" + } + } + composite { + object { + x=141 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=141 + y=211 + width=24 + height=12 + } + display[0] { + label="m30" + name="motorx_more.adl" + args="P=$(P),M=m30" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=141 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m30.DMOV" + } + } + rectangle { + object { + x=141 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=141 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="30" + align="horiz. centered" + } + } + } + "text update" { + object { + x=141 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m30.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=140 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=140 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=141 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m31.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=175 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m31_able.VAL" + } + } + rectangle { + object { + x=165 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m31.LLS" + } + } + rectangle { + object { + x=165 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m31.LVIO" + } + } + rectangle { + object { + x=165 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m31.HLS" + } + } + composite { + object { + x=141 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=141 + y=247 + width=24 + height=12 + } + display[0] { + label="m31" + name="motorx_more.adl" + args="P=$(P),M=m31" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=141 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m31.DMOV" + } + } + rectangle { + object { + x=141 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=141 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="31" + align="horiz. centered" + } + } + } + "text update" { + object { + x=141 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m31.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=140 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=141 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m32.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=175 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m32_able.VAL" + } +} +rectangle { + object { + x=165 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m32.LLS" + } +} +rectangle { + object { + x=165 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m32.LVIO" + } +} +rectangle { + object { + x=165 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m32.HLS" + } +} +composite { + object { + x=141 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=141 + y=283 + width=24 + height=12 + } + display[0] { + label="m32" + name="motorx_more.adl" + args="P=$(P),M=m32" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=141 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m32.DMOV" + } + } + rectangle { + object { + x=141 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=141 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="32" + align="horiz. centered" + } + } +} +"text update" { + object { + x=141 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m32.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=95 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=95 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=96 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m17.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=130 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m17_able.VAL" + } + } + rectangle { + object { + x=120 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m17.LLS" + } + } + rectangle { + object { + x=120 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m17.LVIO" + } + } + rectangle { + object { + x=120 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m17.HLS" + } + } + composite { + object { + x=96 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=96 + y=31 + width=24 + height=12 + } + display[0] { + label="m17" + name="motorx_more.adl" + args="P=$(P),M=m17" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=96 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m17.DMOV" + } + } + rectangle { + object { + x=96 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=96 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="17" + align="horiz. centered" + } + } + } + "text update" { + object { + x=96 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m17.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=95 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=95 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=96 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m18.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=130 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m18_able.VAL" + } + } + rectangle { + object { + x=120 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m18.LLS" + } + } + rectangle { + object { + x=120 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m18.LVIO" + } + } + rectangle { + object { + x=120 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m18.HLS" + } + } + composite { + object { + x=96 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=96 + y=67 + width=24 + height=12 + } + display[0] { + label="m18" + name="motorx_more.adl" + args="P=$(P),M=m18" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=96 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m18.DMOV" + } + } + rectangle { + object { + x=96 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=96 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="18" + align="horiz. centered" + } + } + } + "text update" { + object { + x=96 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m18.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=95 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=95 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=96 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m19.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=130 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m19_able.VAL" + } + } + rectangle { + object { + x=120 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m19.LLS" + } + } + rectangle { + object { + x=120 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m19.LVIO" + } + } + rectangle { + object { + x=120 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m19.HLS" + } + } + composite { + object { + x=96 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=96 + y=103 + width=24 + height=12 + } + display[0] { + label="m19" + name="motorx_more.adl" + args="P=$(P),M=m19" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=96 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m19.DMOV" + } + } + rectangle { + object { + x=96 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=96 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="19" + align="horiz. centered" + } + } + } + "text update" { + object { + x=96 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m19.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=95 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=95 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=96 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m20.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=130 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m20_able.VAL" + } + } + rectangle { + object { + x=120 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m20.LLS" + } + } + rectangle { + object { + x=120 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m20.LVIO" + } + } + rectangle { + object { + x=120 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m20.HLS" + } + } + composite { + object { + x=96 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=96 + y=139 + width=24 + height=12 + } + display[0] { + label="m20" + name="motorx_more.adl" + args="P=$(P),M=m20" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=96 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m20.DMOV" + } + } + rectangle { + object { + x=96 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=96 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="20" + align="horiz. centered" + } + } + } + "text update" { + object { + x=96 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m20.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=95 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=95 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=96 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m21.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=130 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m21_able.VAL" + } + } + rectangle { + object { + x=120 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m21.LLS" + } + } + rectangle { + object { + x=120 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m21.LVIO" + } + } + rectangle { + object { + x=120 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m21.HLS" + } + } + composite { + object { + x=96 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=96 + y=175 + width=24 + height=12 + } + display[0] { + label="m21" + name="motorx_more.adl" + args="P=$(P),M=m21" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=96 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m21.DMOV" + } + } + rectangle { + object { + x=96 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=96 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="21" + align="horiz. centered" + } + } + } + "text update" { + object { + x=96 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m21.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=95 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=95 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=96 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m22.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=130 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m22_able.VAL" + } + } + rectangle { + object { + x=120 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m22.LLS" + } + } + rectangle { + object { + x=120 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m22.LVIO" + } + } + rectangle { + object { + x=120 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m22.HLS" + } + } + composite { + object { + x=96 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=96 + y=211 + width=24 + height=12 + } + display[0] { + label="m22" + name="motorx_more.adl" + args="P=$(P),M=m22" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=96 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m22.DMOV" + } + } + rectangle { + object { + x=96 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=96 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="22" + align="horiz. centered" + } + } + } + "text update" { + object { + x=96 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m22.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=95 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=95 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=96 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m23.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=130 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m23_able.VAL" + } + } + rectangle { + object { + x=120 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m23.LLS" + } + } + rectangle { + object { + x=120 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m23.LVIO" + } + } + rectangle { + object { + x=120 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m23.HLS" + } + } + composite { + object { + x=96 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=96 + y=247 + width=24 + height=12 + } + display[0] { + label="m23" + name="motorx_more.adl" + args="P=$(P),M=m23" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=96 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m23.DMOV" + } + } + rectangle { + object { + x=96 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=96 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="23" + align="horiz. centered" + } + } + } + "text update" { + object { + x=96 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m23.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=95 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=96 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m24.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=130 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m24_able.VAL" + } +} +rectangle { + object { + x=120 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m24.LLS" + } +} +rectangle { + object { + x=120 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m24.LVIO" + } +} +rectangle { + object { + x=120 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m24.HLS" + } +} +composite { + object { + x=96 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=96 + y=283 + width=24 + height=12 + } + display[0] { + label="m24" + name="motorx_more.adl" + args="P=$(P),M=m24" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=96 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m24.DMOV" + } + } + rectangle { + object { + x=96 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=96 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="24" + align="horiz. centered" + } + } +} +"text update" { + object { + x=96 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m24.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=50 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=50 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=51 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m9.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=85 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m9_able.VAL" + } + } + rectangle { + object { + x=75 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m9.LLS" + } + } + rectangle { + object { + x=75 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m9.LVIO" + } + } + rectangle { + object { + x=75 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m9.HLS" + } + } + composite { + object { + x=51 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=51 + y=31 + width=24 + height=12 + } + display[0] { + label="m9" + name="motorx_more.adl" + args="P=$(P),M=m9" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=51 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m9.DMOV" + } + } + rectangle { + object { + x=51 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=51 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="9" + align="horiz. centered" + } + } + } + "text update" { + object { + x=51 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m9.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=50 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=50 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=51 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m10.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=85 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m10_able.VAL" + } + } + rectangle { + object { + x=75 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m10.LLS" + } + } + rectangle { + object { + x=75 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m10.LVIO" + } + } + rectangle { + object { + x=75 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m10.HLS" + } + } + composite { + object { + x=51 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=51 + y=67 + width=24 + height=12 + } + display[0] { + label="m10" + name="motorx_more.adl" + args="P=$(P),M=m10" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=51 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m10.DMOV" + } + } + rectangle { + object { + x=51 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=51 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="10" + align="horiz. centered" + } + } + } + "text update" { + object { + x=51 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m10.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=50 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=50 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=51 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m11.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=85 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m11_able.VAL" + } + } + rectangle { + object { + x=75 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m11.LLS" + } + } + rectangle { + object { + x=75 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m11.LVIO" + } + } + rectangle { + object { + x=75 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m11.HLS" + } + } + composite { + object { + x=51 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=51 + y=103 + width=24 + height=12 + } + display[0] { + label="m11" + name="motorx_more.adl" + args="P=$(P),M=m11" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=51 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m11.DMOV" + } + } + rectangle { + object { + x=51 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=51 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="11" + align="horiz. centered" + } + } + } + "text update" { + object { + x=51 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m11.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=50 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=50 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=51 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m12.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=85 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m12_able.VAL" + } + } + rectangle { + object { + x=75 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m12.LLS" + } + } + rectangle { + object { + x=75 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m12.LVIO" + } + } + rectangle { + object { + x=75 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m12.HLS" + } + } + composite { + object { + x=51 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=51 + y=139 + width=24 + height=12 + } + display[0] { + label="m12" + name="motorx_more.adl" + args="P=$(P),M=m12" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=51 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m12.DMOV" + } + } + rectangle { + object { + x=51 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=51 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="12" + align="horiz. centered" + } + } + } + "text update" { + object { + x=51 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m12.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=50 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=50 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=51 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m13.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=85 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m13_able.VAL" + } + } + rectangle { + object { + x=75 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m13.LLS" + } + } + rectangle { + object { + x=75 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m13.LVIO" + } + } + rectangle { + object { + x=75 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m13.HLS" + } + } + composite { + object { + x=51 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=51 + y=175 + width=24 + height=12 + } + display[0] { + label="m13" + name="motorx_more.adl" + args="P=$(P),M=m13" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=51 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m13.DMOV" + } + } + rectangle { + object { + x=51 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=51 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="13" + align="horiz. centered" + } + } + } + "text update" { + object { + x=51 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m13.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=50 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=50 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=51 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m14.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=85 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m14_able.VAL" + } + } + rectangle { + object { + x=75 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m14.LLS" + } + } + rectangle { + object { + x=75 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m14.LVIO" + } + } + rectangle { + object { + x=75 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m14.HLS" + } + } + composite { + object { + x=51 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=51 + y=211 + width=24 + height=12 + } + display[0] { + label="m14" + name="motorx_more.adl" + args="P=$(P),M=m14" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=51 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m14.DMOV" + } + } + rectangle { + object { + x=51 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=51 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="14" + align="horiz. centered" + } + } + } + "text update" { + object { + x=51 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m14.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=50 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=50 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=51 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m15.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=85 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m15_able.VAL" + } + } + rectangle { + object { + x=75 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m15.LLS" + } + } + rectangle { + object { + x=75 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m15.LVIO" + } + } + rectangle { + object { + x=75 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m15.HLS" + } + } + composite { + object { + x=51 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=51 + y=247 + width=24 + height=12 + } + display[0] { + label="m15" + name="motorx_more.adl" + args="P=$(P),M=m15" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=51 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m15.DMOV" + } + } + rectangle { + object { + x=51 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=51 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="15" + align="horiz. centered" + } + } + } + "text update" { + object { + x=51 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m15.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=50 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=51 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m16.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=85 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m16_able.VAL" + } +} +rectangle { + object { + x=75 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m16.LLS" + } +} +rectangle { + object { + x=75 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m16.LVIO" + } +} +rectangle { + object { + x=75 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m16.HLS" + } +} +composite { + object { + x=51 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=51 + y=283 + width=24 + height=12 + } + display[0] { + label="m16" + name="motorx_more.adl" + args="P=$(P),M=m16" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=51 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m16.DMOV" + } + } + rectangle { + object { + x=51 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=51 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="16" + align="horiz. centered" + } + } +} +"text update" { + object { + x=51 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m16.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=5 + y=20 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=5 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=6 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m1.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=40 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m1_able.VAL" + } + } + rectangle { + object { + x=30 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m1.LLS" + } + } + rectangle { + object { + x=30 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m1.LVIO" + } + } + rectangle { + object { + x=30 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m1.HLS" + } + } + composite { + object { + x=6 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=6 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m1" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=6 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m1.DMOV" + } + } + rectangle { + object { + x=6 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=6 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="1" + align="horiz. centered" + } + } + } + "text update" { + object { + x=6 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m1.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=5 + y=56 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=5 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=6 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m2.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=40 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m2_able.VAL" + } + } + rectangle { + object { + x=30 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m2.LLS" + } + } + rectangle { + object { + x=30 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m2.LVIO" + } + } + rectangle { + object { + x=30 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m2.HLS" + } + } + composite { + object { + x=6 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=6 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m2" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=6 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m2.DMOV" + } + } + rectangle { + object { + x=6 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=6 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="2" + align="horiz. centered" + } + } + } + "text update" { + object { + x=6 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m2.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=5 + y=92 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=5 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=6 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m3.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=40 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m3_able.VAL" + } + } + rectangle { + object { + x=30 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m3.LLS" + } + } + rectangle { + object { + x=30 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m3.LVIO" + } + } + rectangle { + object { + x=30 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m3.HLS" + } + } + composite { + object { + x=6 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=6 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m3" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=6 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m3.DMOV" + } + } + rectangle { + object { + x=6 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=6 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="3" + align="horiz. centered" + } + } + } + "text update" { + object { + x=6 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m3.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=5 + y=128 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=5 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=6 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m4.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=40 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m4_able.VAL" + } + } + rectangle { + object { + x=30 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m4.LLS" + } + } + rectangle { + object { + x=30 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m4.LVIO" + } + } + rectangle { + object { + x=30 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m4.HLS" + } + } + composite { + object { + x=6 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=6 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m4" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=6 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m4.DMOV" + } + } + rectangle { + object { + x=6 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=6 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="4" + align="horiz. centered" + } + } + } + "text update" { + object { + x=6 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m4.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=5 + y=164 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=5 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=6 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m5.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=40 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m5_able.VAL" + } + } + rectangle { + object { + x=30 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m5.LLS" + } + } + rectangle { + object { + x=30 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m5.LVIO" + } + } + rectangle { + object { + x=30 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m5.HLS" + } + } + composite { + object { + x=6 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=6 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m5" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=6 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m5.DMOV" + } + } + rectangle { + object { + x=6 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=6 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="5" + align="horiz. centered" + } + } + } + "text update" { + object { + x=6 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m5.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=5 + y=200 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=5 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=6 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m6.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=40 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m6_able.VAL" + } + } + rectangle { + object { + x=30 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m6.LLS" + } + } + rectangle { + object { + x=30 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m6.LVIO" + } + } + rectangle { + object { + x=30 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m6.HLS" + } + } + composite { + object { + x=6 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=6 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m6" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=6 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m6.DMOV" + } + } + rectangle { + object { + x=6 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=6 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="6" + align="horiz. centered" + } + } + } + "text update" { + object { + x=6 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m6.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=5 + y=236 + width=40 + height=33 + } + "composite name"="" + children { + rectangle { + object { + x=5 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=6 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m7.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=40 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m7_able.VAL" + } + } + rectangle { + object { + x=30 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m7.LLS" + } + } + rectangle { + object { + x=30 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m7.LVIO" + } + } + rectangle { + object { + x=30 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m7.HLS" + } + } + composite { + object { + x=6 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=6 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m7" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=6 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m7.DMOV" + } + } + rectangle { + object { + x=6 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=6 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="7" + align="horiz. centered" + } + } + } + "text update" { + object { + x=6 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m7.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +rectangle { + object { + x=5 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } +} +"text update" { + object { + x=6 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m8.DESC" + clr=14 + bclr=0 + } + limits { + } +} +rectangle { + object { + x=40 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m8_able.VAL" + } +} +rectangle { + object { + x=30 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m8.LLS" + } +} +rectangle { + object { + x=30 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m8.LVIO" + } +} +rectangle { + object { + x=30 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m8.HLS" + } +} +composite { + object { + x=6 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=6 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m8" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=6 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m8.DMOV" + } + } + rectangle { + object { + x=6 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=6 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="8" + align="horiz. centered" + } + } +} +"text update" { + object { + x=6 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m8.RBV" + clr=14 + bclr=0 + } + limits { + } +} +composite { + object { + x=410 + y=20 + width=40 + height=285 + } + "composite name"="" + children { + rectangle { + object { + x=410 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=411 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m75.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=445 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m75_able.VAL" + } + } + rectangle { + object { + x=435 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m75.LLS" + } + } + rectangle { + object { + x=435 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m75.LVIO" + } + } + rectangle { + object { + x=435 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m75.HLS" + } + } + composite { + object { + x=411 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=411 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m75" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=411 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m75.DMOV" + } + } + rectangle { + object { + x=411 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=411 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="75" + align="horiz. centered" + } + } + } + rectangle { + object { + x=410 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=411 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m76.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=445 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m76_able.VAL" + } + } + rectangle { + object { + x=435 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m76.LLS" + } + } + rectangle { + object { + x=435 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m76.LVIO" + } + } + rectangle { + object { + x=435 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m76.HLS" + } + } + composite { + object { + x=411 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=411 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m76" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=411 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m76.DMOV" + } + } + rectangle { + object { + x=411 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=411 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="76" + align="horiz. centered" + } + } + } + rectangle { + object { + x=410 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=411 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m77.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=445 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m77_able.VAL" + } + } + rectangle { + object { + x=435 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m77.LLS" + } + } + rectangle { + object { + x=435 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m77.LVIO" + } + } + rectangle { + object { + x=435 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m77.HLS" + } + } + composite { + object { + x=411 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=411 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m77" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=411 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m77.DMOV" + } + } + rectangle { + object { + x=411 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=411 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="77" + align="horiz. centered" + } + } + } + rectangle { + object { + x=410 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=411 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m78.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=445 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m78_able.VAL" + } + } + rectangle { + object { + x=435 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m78.LLS" + } + } + rectangle { + object { + x=435 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m78.LVIO" + } + } + rectangle { + object { + x=435 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m78.HLS" + } + } + composite { + object { + x=411 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=411 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m78" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=411 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m78.DMOV" + } + } + rectangle { + object { + x=411 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=411 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="78" + align="horiz. centered" + } + } + } + rectangle { + object { + x=410 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=411 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m79.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=445 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m79_able.VAL" + } + } + rectangle { + object { + x=435 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m79.LLS" + } + } + rectangle { + object { + x=435 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m79.LVIO" + } + } + rectangle { + object { + x=435 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m79.HLS" + } + } + composite { + object { + x=411 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=411 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m79" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=411 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m79.DMOV" + } + } + rectangle { + object { + x=411 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=411 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="79" + align="horiz. centered" + } + } + } + rectangle { + object { + x=410 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=411 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m80.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=445 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m80_able.VAL" + } + } + rectangle { + object { + x=435 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m80.LLS" + } + } + rectangle { + object { + x=435 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m80.LVIO" + } + } + rectangle { + object { + x=435 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m80.HLS" + } + } + composite { + object { + x=411 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=411 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m80" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=411 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m80.DMOV" + } + } + rectangle { + object { + x=411 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=411 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="80" + align="horiz. centered" + } + } + } + rectangle { + object { + x=410 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=411 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m73.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=445 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m73_able.VAL" + } + } + rectangle { + object { + x=435 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m73.LLS" + } + } + rectangle { + object { + x=435 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m73.LVIO" + } + } + rectangle { + object { + x=435 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m73.HLS" + } + } + composite { + object { + x=411 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=411 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m73" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=411 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m73.DMOV" + } + } + rectangle { + object { + x=411 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=411 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="73" + align="horiz. centered" + } + } + } + rectangle { + object { + x=410 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=411 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m74.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=445 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m74_able.VAL" + } + } + rectangle { + object { + x=435 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m74.LLS" + } + } + rectangle { + object { + x=435 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m74.LVIO" + } + } + rectangle { + object { + x=435 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m74.HLS" + } + } + composite { + object { + x=411 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=411 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m74" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=411 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m74.DMOV" + } + } + rectangle { + object { + x=411 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=411 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="74" + align="horiz. centered" + } + } + } + "text update" { + object { + x=411 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m73.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=411 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m74.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=411 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m75.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=411 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m76.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=411 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m77.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=411 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m78.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=411 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m79.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=411 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m80.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=455 + y=20 + width=40 + height=285 + } + "composite name"="" + children { + rectangle { + object { + x=455 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=456 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m83.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=490 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m83_able.VAL" + } + } + rectangle { + object { + x=480 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m83.LLS" + } + } + rectangle { + object { + x=480 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m83.LVIO" + } + } + rectangle { + object { + x=480 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m83.HLS" + } + } + composite { + object { + x=456 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=456 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m83" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=456 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m83.DMOV" + } + } + rectangle { + object { + x=456 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=456 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="83" + align="horiz. centered" + } + } + } + rectangle { + object { + x=455 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=456 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m84.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=490 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m84_able.VAL" + } + } + rectangle { + object { + x=480 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m84.LLS" + } + } + rectangle { + object { + x=480 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m84.LVIO" + } + } + rectangle { + object { + x=480 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m84.HLS" + } + } + composite { + object { + x=456 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=456 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m84" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=456 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m84.DMOV" + } + } + rectangle { + object { + x=456 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=456 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="84" + align="horiz. centered" + } + } + } + rectangle { + object { + x=455 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=456 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m85.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=490 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m85_able.VAL" + } + } + rectangle { + object { + x=480 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m85.LLS" + } + } + rectangle { + object { + x=480 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m85.LVIO" + } + } + rectangle { + object { + x=480 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m85.HLS" + } + } + composite { + object { + x=456 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=456 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m85" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=456 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m85.DMOV" + } + } + rectangle { + object { + x=456 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=456 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="85" + align="horiz. centered" + } + } + } + rectangle { + object { + x=455 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=456 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m86.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=490 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m86_able.VAL" + } + } + rectangle { + object { + x=480 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m86.LLS" + } + } + rectangle { + object { + x=480 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m86.LVIO" + } + } + rectangle { + object { + x=480 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m86.HLS" + } + } + composite { + object { + x=456 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=456 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m86" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=456 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m86.DMOV" + } + } + rectangle { + object { + x=456 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=456 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="86" + align="horiz. centered" + } + } + } + rectangle { + object { + x=455 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=456 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m87.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=490 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m87_able.VAL" + } + } + rectangle { + object { + x=480 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m87.LLS" + } + } + rectangle { + object { + x=480 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m87.LVIO" + } + } + rectangle { + object { + x=480 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m87.HLS" + } + } + composite { + object { + x=456 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=456 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m87" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=456 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m87.DMOV" + } + } + rectangle { + object { + x=456 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=456 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="87" + align="horiz. centered" + } + } + } + rectangle { + object { + x=455 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=456 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m88.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=490 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m88_able.VAL" + } + } + rectangle { + object { + x=480 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m88.LLS" + } + } + rectangle { + object { + x=480 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m88.LVIO" + } + } + rectangle { + object { + x=480 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m88.HLS" + } + } + composite { + object { + x=456 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=456 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m88" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=456 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m88.DMOV" + } + } + rectangle { + object { + x=456 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=456 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="88" + align="horiz. centered" + } + } + } + rectangle { + object { + x=455 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=456 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m81.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=490 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m81_able.VAL" + } + } + rectangle { + object { + x=480 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m81.LLS" + } + } + rectangle { + object { + x=480 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m81.LVIO" + } + } + rectangle { + object { + x=480 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m81.HLS" + } + } + composite { + object { + x=456 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=456 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m81" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=456 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m81.DMOV" + } + } + rectangle { + object { + x=456 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=456 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="81" + align="horiz. centered" + } + } + } + rectangle { + object { + x=455 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=456 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m82.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=490 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m82_able.VAL" + } + } + rectangle { + object { + x=480 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m82.LLS" + } + } + rectangle { + object { + x=480 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m82.LVIO" + } + } + rectangle { + object { + x=480 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m82.HLS" + } + } + composite { + object { + x=456 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=456 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m82" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=456 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m82.DMOV" + } + } + rectangle { + object { + x=456 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=456 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="82" + align="horiz. centered" + } + } + } + "text update" { + object { + x=456 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m81.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=456 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m82.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=456 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m83.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=456 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m84.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=456 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m85.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=456 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m86.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=456 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m87.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=456 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m88.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} +composite { + object { + x=495 + y=20 + width=40 + height=285 + } + "composite name"="" + children { + rectangle { + object { + x=495 + y=92 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=496 + y=93 + width=38 + height=10 + } + monitor { + chan="$(P)m91.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=530 + y=103 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m91_able.VAL" + } + } + rectangle { + object { + x=520 + y=111 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m91.LLS" + } + } + rectangle { + object { + x=520 + y=107 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m91.LVIO" + } + } + rectangle { + object { + x=520 + y=103 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m91.HLS" + } + } + composite { + object { + x=496 + y=102 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=496 + y=103 + width=24 + height=12 + } + display[0] { + label="m3" + name="motorx_more.adl" + args="P=$(P),M=m91" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=496 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m91.DMOV" + } + } + rectangle { + object { + x=496 + y=103 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=496 + y=102 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="91" + align="horiz. centered" + } + } + } + rectangle { + object { + x=495 + y=128 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=496 + y=129 + width=38 + height=10 + } + monitor { + chan="$(P)m92.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=530 + y=139 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m92_able.VAL" + } + } + rectangle { + object { + x=520 + y=147 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m92.LLS" + } + } + rectangle { + object { + x=520 + y=143 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m92.LVIO" + } + } + rectangle { + object { + x=520 + y=139 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m92.HLS" + } + } + composite { + object { + x=496 + y=138 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=496 + y=139 + width=24 + height=12 + } + display[0] { + label="m4" + name="motorx_more.adl" + args="P=$(P),M=m92" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=496 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m92.DMOV" + } + } + rectangle { + object { + x=496 + y=139 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=496 + y=138 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="92" + align="horiz. centered" + } + } + } + rectangle { + object { + x=495 + y=164 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=496 + y=165 + width=38 + height=10 + } + monitor { + chan="$(P)m93.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=530 + y=175 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m93_able.VAL" + } + } + rectangle { + object { + x=520 + y=183 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m93.LLS" + } + } + rectangle { + object { + x=520 + y=179 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m93.LVIO" + } + } + rectangle { + object { + x=520 + y=175 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m93.HLS" + } + } + composite { + object { + x=496 + y=174 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=496 + y=175 + width=24 + height=12 + } + display[0] { + label="m5" + name="motorx_more.adl" + args="P=$(P),M=m93" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=496 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m93.DMOV" + } + } + rectangle { + object { + x=496 + y=175 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=496 + y=174 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="93" + align="horiz. centered" + } + } + } + rectangle { + object { + x=495 + y=200 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=496 + y=201 + width=38 + height=10 + } + monitor { + chan="$(P)m94.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=530 + y=211 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m94_able.VAL" + } + } + rectangle { + object { + x=520 + y=219 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m94.LLS" + } + } + rectangle { + object { + x=520 + y=215 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m94.LVIO" + } + } + rectangle { + object { + x=520 + y=211 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m94.HLS" + } + } + composite { + object { + x=496 + y=210 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=496 + y=211 + width=24 + height=12 + } + display[0] { + label="m6" + name="motorx_more.adl" + args="P=$(P),M=m94" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=496 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m94.DMOV" + } + } + rectangle { + object { + x=496 + y=211 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=496 + y=210 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="94" + align="horiz. centered" + } + } + } + rectangle { + object { + x=495 + y=236 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=496 + y=237 + width=38 + height=10 + } + monitor { + chan="$(P)m95.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=530 + y=247 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m95_able.VAL" + } + } + rectangle { + object { + x=520 + y=255 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m95.LLS" + } + } + rectangle { + object { + x=520 + y=251 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m95.LVIO" + } + } + rectangle { + object { + x=520 + y=247 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m95.HLS" + } + } + composite { + object { + x=496 + y=246 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=496 + y=247 + width=24 + height=12 + } + display[0] { + label="m7" + name="motorx_more.adl" + args="P=$(P),M=m95" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=496 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m95.DMOV" + } + } + rectangle { + object { + x=496 + y=247 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=496 + y=246 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="95" + align="horiz. centered" + } + } + } + rectangle { + object { + x=495 + y=272 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=496 + y=273 + width=38 + height=10 + } + monitor { + chan="$(P)m96.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=530 + y=283 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m96_able.VAL" + } + } + rectangle { + object { + x=520 + y=291 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m96.LLS" + } + } + rectangle { + object { + x=520 + y=287 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m96.LVIO" + } + } + rectangle { + object { + x=520 + y=283 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m96.HLS" + } + } + composite { + object { + x=496 + y=282 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=496 + y=283 + width=24 + height=12 + } + display[0] { + label="m8" + name="motorx_more.adl" + args="P=$(P),M=m96" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=496 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m96.DMOV" + } + } + rectangle { + object { + x=496 + y=283 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=496 + y=282 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="96" + align="horiz. centered" + } + } + } + rectangle { + object { + x=495 + y=20 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=496 + y=21 + width=38 + height=10 + } + monitor { + chan="$(P)m89.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=530 + y=31 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m89_able.VAL" + } + } + rectangle { + object { + x=520 + y=39 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m89.LLS" + } + } + rectangle { + object { + x=520 + y=35 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m89.LVIO" + } + } + rectangle { + object { + x=520 + y=31 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m89.HLS" + } + } + composite { + object { + x=496 + y=30 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=496 + y=31 + width=24 + height=12 + } + display[0] { + label="m1" + name="motorx_more.adl" + args="P=$(P),M=m89" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=496 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m89.DMOV" + } + } + rectangle { + object { + x=496 + y=31 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=496 + y=30 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="89" + align="horiz. centered" + } + } + } + rectangle { + object { + x=495 + y=56 + width=40 + height=33 + } + "basic attribute" { + clr=14 + fill="outline" + } + } + "text update" { + object { + x=496 + y=57 + width=38 + height=10 + } + monitor { + chan="$(P)m90.DESC" + clr=14 + bclr=0 + } + limits { + } + } + rectangle { + object { + x=530 + y=67 + width=5 + height=12 + } + "basic attribute" { + clr=14 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m90_able.VAL" + } + } + rectangle { + object { + x=520 + y=75 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m90.LLS" + } + } + rectangle { + object { + x=520 + y=71 + width=10 + height=4 + } + "basic attribute" { + clr=30 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m90.LVIO" + } + } + rectangle { + object { + x=520 + y=67 + width=10 + height=4 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="if not zero" + chan="$(P)m90.HLS" + } + } + composite { + object { + x=496 + y=66 + width=24 + height=14 + } + "composite name"="" + children { + "related display" { + object { + x=496 + y=67 + width=24 + height=12 + } + display[0] { + label="m2" + name="motorx_more.adl" + args="P=$(P),M=m90" + } + clr=14 + bclr=51 + visual="invisible" + } + rectangle { + object { + x=496 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=60 + fill="outline" + width=2 + } + "dynamic attribute" { + vis="if zero" + chan="$(P)m90.DMOV" + } + } + rectangle { + object { + x=496 + y=67 + width=24 + height=12 + } + "basic attribute" { + clr=5 + } + } + text { + object { + x=496 + y=66 + width=24 + height=14 + } + "basic attribute" { + clr=14 + } + textix="90" + align="horiz. centered" + } + } + } + "text update" { + object { + x=496 + y=43 + width=38 + height=10 + } + monitor { + chan="$(P)m89.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=496 + y=79 + width=38 + height=10 + } + monitor { + chan="$(P)m90.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=496 + y=115 + width=38 + height=10 + } + monitor { + chan="$(P)m91.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=496 + y=151 + width=38 + height=10 + } + monitor { + chan="$(P)m92.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=496 + y=187 + width=38 + height=10 + } + monitor { + chan="$(P)m93.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=496 + y=223 + width=38 + height=10 + } + monitor { + chan="$(P)m94.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=496 + y=259 + width=38 + height=10 + } + monitor { + chan="$(P)m95.RBV" + clr=14 + bclr=0 + } + limits { + } + } + "text update" { + object { + x=496 + y=295 + width=38 + height=10 + } + monitor { + chan="$(P)m96.RBV" + clr=14 + bclr=0 + } + limits { + } + } + } +} diff --git a/motorApp/op/adl/motorx_msta_detail.adl b/motorApp/op/adl/motorx_msta_detail.adl index ea380cf..af8383f 100644 --- a/motorApp/op/adl/motorx_msta_detail.adl +++ b/motorApp/op/adl/motorx_msta_detail.adl @@ -1,7 +1,7 @@ file { - name="motorx_msta_detail.adl" - version=030102 + name="/home/oxygen/MOONEY/epics/synApps/support/motor/motorApp/op/adl/motorx_msta_detail.adl" + version=030107 } display { object { @@ -15,7 +15,7 @@ display { cmap="" gridSpacing=5 gridOn=0 - snapToGrid=0 + snapToGrid=1 } "color map" { ncolors=65 @@ -182,7 +182,7 @@ text { byte { object { x=5 - y=65 + y=62 width=37 height=320 } @@ -192,207 +192,198 @@ byte { bclr=3 } direction="down" + sbit=0 + ebit=15 +} +text { + object { + x=50 + y=365 + width=171 + height=15 + } + "basic attribute" { + clr=14 + } + textix="Unused" +} +text { + object { + x=50 + y=345 + width=171 + height=15 + } + "basic attribute" { + clr=14 + } + textix="Unused" +} +text { + object { + x=50 + y=325 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="MINUS_LS: minus limit switch has been hit" +} +text { + object { + x=50 + y=305 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="COMM_ERR: Communication Error" +} +text { + object { + x=50 + y=285 + width=345 + height=15 + } + "basic attribute" { + clr=14 + } + textix="GAIN_SUPPORT: motor supports closed-loop position control" +} +text { + object { + x=50 + y=265 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="MOVING: non-zero velocity present" +} +text { + object { + x=50 + y=245 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="PROBLEM: driver stopped polling" +} +text { + object { + x=50 + y=225 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="PRESENT: encoder is present" +} +text { + object { + x=50 + y=205 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="HOME: if at home position" } -composite { +text { object { x=50 - y=68 + y=185 width=350 - height=315 - } - "composite name"="" - children { - text { - object { - x=50 - y=68 - width=171 - height=15 - } - "basic attribute" { - clr=14 - } - textix="Unused" - } - text { - object { - x=50 - y=88 - width=171 - height=15 - } - "basic attribute" { - clr=14 - } - textix="Unused" - } - text { - object { - x=50 - y=108 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="MINUS_LS: minus limit switch has been hit" - } - text { - object { - x=50 - y=128 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="COMM_ERR: Communication Error" - } - text { - object { - x=50 - y=148 - width=345 - height=15 - } - "basic attribute" { - clr=14 - } - textix="GAIN_SUPPORT: motor supports closed-loop position control" - } - text { - object { - x=50 - y=168 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="MOVING: non-zero velocity present" - } - text { - object { - x=50 - y=188 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="PROBLEM: driver stopped polling" - } - text { - object { - x=50 - y=208 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="PRESENT: encoder is present" - } - text { - object { - x=50 - y=228 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="HOME: if at home position" - } - text { - object { - x=50 - y=248 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="Unused" - } - text { - object { - x=50 - y=268 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="POSITION: closed-loop position control enabled" - } - text { - object { - x=50 - y=288 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="Unused" - } - text { - object { - x=50 - y=308 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="HOMELS: state of home limit switch" - } - text { - object { - x=50 - y=328 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="PLUS_LS: plus limit has been hit" - } - text { - object { - x=50 - y=348 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="DONE: motion is complete" - } - text { - object { - x=50 - y=368 - width=350 - height=15 - } - "basic attribute" { - clr=14 - } - textix="DIRECTION: last raw (0:Neg, 1:Pos)" - } + height=15 + } + "basic attribute" { + clr=14 + } + textix="Unused" +} +text { + object { + x=50 + y=165 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="POSITION: closed-loop position control enabled" +} +text { + object { + x=50 + y=145 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="Unused" +} +text { + object { + x=50 + y=125 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="HOMELS: state of home limit switch" +} +text { + object { + x=50 + y=105 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="PLUS_LS: plus limit has been hit" +} +text { + object { + x=50 + y=85 + width=350 + height=15 + } + "basic attribute" { + clr=14 + } + textix="DONE: motion is complete" +} +text { + object { + x=50 + y=65 + width=350 + height=15 + } + "basic attribute" { + clr=14 } + textix="DIRECTION: last raw (0:Neg, 1:Pos)" } diff --git a/motorApp/op/opi/4motor_form.opi b/motorApp/op/opi/4motor_form.opi index 58a617f..0e2c5fa 100644 --- a/motorApp/op/opi/4motor_form.opi +++ b/motorApp/op/opi/4motor_form.opi @@ -583,230 +583,6 @@ $(pv_value) 950 - - false - true - 1 - false - false - - 16 - false - true - - - - Text Input - true - - - - - 50 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-38de - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(M5).BACC - - - - false - 0 - - - false - - - - 0 - - 113 - $(pv_name) -$(pv_value) - 1000 - - - false - true - 1 - false - false - - 16 - false - true - - - - Text Input - true - - - - - 50 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-38dd - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(M6).BACC - - - - false - 0 - - - false - - - - 0 - - 128 - $(pv_name) -$(pv_value) - 1000 - - - false - true - 1 - false - false - - 16 - false - true - - - - Text Input - true - - - - - 50 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-38dc - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(M7).BACC - - - - false - 0 - - - false - - - - 0 - - 143 - $(pv_name) -$(pv_value) - 1000 - - - false - true - 1 - false - false - - 16 - false - true - - - - Text Input - true - - - - - 50 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-38db - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(M8).BACC - - - - false - 0 - - - false - - - - 0 - - 158 - $(pv_name) -$(pv_value) - 1000 - false true @@ -5920,4 +5696,4 @@ $(pv_value) $(pv_value) 0 - \ No newline at end of file + diff --git a/motorApp/op/ui/16motor_form.ui b/motorApp/op/ui/autoconvert/16motor_form.ui similarity index 100% rename from motorApp/op/ui/16motor_form.ui rename to motorApp/op/ui/autoconvert/16motor_form.ui diff --git a/motorApp/op/ui/4motor_form.ui b/motorApp/op/ui/autoconvert/4motor_form.ui similarity index 96% rename from motorApp/op/ui/4motor_form.ui rename to motorApp/op/ui/autoconvert/4motor_form.ui index e61fe50..b41b2b9 100644 --- a/motorApp/op/ui/4motor_form.ui +++ b/motorApp/op/ui/autoconvert/4motor_form.ui @@ -451,150 +451,6 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - 1000 - 113 - 50 - 16 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).BACC - - - - 0 - 0 - 0 - - - - - 218 - 218 - 218 - - - - caLineEdit::Static - - - decimal - - - - - - 1000 - 128 - 50 - 16 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).BACC - - - - 0 - 0 - 0 - - - - - 218 - 218 - 218 - - - - caLineEdit::Static - - - decimal - - - - - - 1000 - 143 - 50 - 16 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M7).BACC - - - - 0 - 0 - 0 - - - - - 218 - 218 - 218 - - - - caLineEdit::Static - - - decimal - - - - - - 1000 - 158 - 50 - 16 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M8).BACC - - - - 0 - 0 - 0 - - - - - 218 - 218 - 218 - - - - caLineEdit::Static - - - decimal - - @@ -4401,4 +4257,4 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} caTextEntry_63 - \ No newline at end of file + diff --git a/motorApp/op/ui/8motor_form.ui b/motorApp/op/ui/autoconvert/8motor_form.ui similarity index 100% rename from motorApp/op/ui/8motor_form.ui rename to motorApp/op/ui/autoconvert/8motor_form.ui diff --git a/motorApp/op/ui/ACRAux.ui b/motorApp/op/ui/autoconvert/ACRAux.ui similarity index 100% rename from motorApp/op/ui/ACRAux.ui rename to motorApp/op/ui/autoconvert/ACRAux.ui diff --git a/motorApp/op/ui/ACRTop.ui b/motorApp/op/ui/autoconvert/ACRTop.ui similarity index 100% rename from motorApp/op/ui/ACRTop.ui rename to motorApp/op/ui/autoconvert/ACRTop.ui diff --git a/motorApp/op/ui/EnsemblePSOFly.ui b/motorApp/op/ui/autoconvert/EnsemblePSOFly.ui similarity index 100% rename from motorApp/op/ui/EnsemblePSOFly.ui rename to motorApp/op/ui/autoconvert/EnsemblePSOFly.ui diff --git a/motorApp/op/ui/EnsemblePSOFly_graphic.ui b/motorApp/op/ui/autoconvert/EnsemblePSOFly_graphic.ui similarity index 100% rename from motorApp/op/ui/EnsemblePSOFly_graphic.ui rename to motorApp/op/ui/autoconvert/EnsemblePSOFly_graphic.ui diff --git a/motorApp/op/ui/EnsemblePSOFly_more.ui b/motorApp/op/ui/autoconvert/EnsemblePSOFly_more.ui similarity index 100% rename from motorApp/op/ui/EnsemblePSOFly_more.ui rename to motorApp/op/ui/autoconvert/EnsemblePSOFly_more.ui diff --git a/motorApp/op/ui/EnsemblePVErr.ui b/motorApp/op/ui/autoconvert/EnsemblePVErr.ui similarity index 100% rename from motorApp/op/ui/EnsemblePVErr.ui rename to motorApp/op/ui/autoconvert/EnsemblePVErr.ui diff --git a/motorApp/op/ui/HXP.ui b/motorApp/op/ui/autoconvert/HXP.ui similarity index 100% rename from motorApp/op/ui/HXP.ui rename to motorApp/op/ui/autoconvert/HXP.ui diff --git a/motorApp/op/ui/HXP_coordSys.ui b/motorApp/op/ui/autoconvert/HXP_coordSys.ui similarity index 100% rename from motorApp/op/ui/HXP_coordSys.ui rename to motorApp/op/ui/autoconvert/HXP_coordSys.ui diff --git a/motorApp/op/ui/HXP_extra.ui b/motorApp/op/ui/autoconvert/HXP_extra.ui similarity index 100% rename from motorApp/op/ui/HXP_extra.ui rename to motorApp/op/ui/autoconvert/HXP_extra.ui diff --git a/motorApp/op/ui/HXP_motors.ui b/motorApp/op/ui/autoconvert/HXP_motors.ui similarity index 100% rename from motorApp/op/ui/HXP_motors.ui rename to motorApp/op/ui/autoconvert/HXP_motors.ui diff --git a/motorApp/op/ui/HXP_moveAll.ui b/motorApp/op/ui/autoconvert/HXP_moveAll.ui similarity index 100% rename from motorApp/op/ui/HXP_moveAll.ui rename to motorApp/op/ui/autoconvert/HXP_moveAll.ui diff --git a/motorApp/op/ui/MAX_trajectoryPlot.ui b/motorApp/op/ui/autoconvert/MAX_trajectoryPlot.ui similarity index 100% rename from motorApp/op/ui/MAX_trajectoryPlot.ui rename to motorApp/op/ui/autoconvert/MAX_trajectoryPlot.ui diff --git a/motorApp/op/ui/MAX_trajectoryPlot2.ui b/motorApp/op/ui/autoconvert/MAX_trajectoryPlot2.ui similarity index 100% rename from motorApp/op/ui/MAX_trajectoryPlot2.ui rename to motorApp/op/ui/autoconvert/MAX_trajectoryPlot2.ui diff --git a/motorApp/op/ui/MAX_trajectoryScan.ui b/motorApp/op/ui/autoconvert/MAX_trajectoryScan.ui similarity index 100% rename from motorApp/op/ui/MAX_trajectoryScan.ui rename to motorApp/op/ui/autoconvert/MAX_trajectoryScan.ui diff --git a/motorApp/op/ui/MAX_trajectoryScan1.ui b/motorApp/op/ui/autoconvert/MAX_trajectoryScan1.ui similarity index 100% rename from motorApp/op/ui/MAX_trajectoryScan1.ui rename to motorApp/op/ui/autoconvert/MAX_trajectoryScan1.ui diff --git a/motorApp/op/ui/MAX_trajectoryScan2.ui b/motorApp/op/ui/autoconvert/MAX_trajectoryScan2.ui similarity index 100% rename from motorApp/op/ui/MAX_trajectoryScan2.ui rename to motorApp/op/ui/autoconvert/MAX_trajectoryScan2.ui diff --git a/motorApp/op/ui/MAX_trajectoryScanDebug.ui b/motorApp/op/ui/autoconvert/MAX_trajectoryScanDebug.ui similarity index 100% rename from motorApp/op/ui/MAX_trajectoryScanDebug.ui rename to motorApp/op/ui/autoconvert/MAX_trajectoryScanDebug.ui diff --git a/motorApp/op/ui/MAX_trajectoryScanSpeed.ui b/motorApp/op/ui/autoconvert/MAX_trajectoryScanSpeed.ui similarity index 100% rename from motorApp/op/ui/MAX_trajectoryScanSpeed.ui rename to motorApp/op/ui/autoconvert/MAX_trajectoryScanSpeed.ui diff --git a/motorApp/op/ui/PSOarrayPlot.ui b/motorApp/op/ui/autoconvert/PSOarrayPlot.ui similarity index 100% rename from motorApp/op/ui/PSOarrayPlot.ui rename to motorApp/op/ui/autoconvert/PSOarrayPlot.ui diff --git a/motorApp/op/ui/XPSAux.ui b/motorApp/op/ui/autoconvert/XPSAux.ui similarity index 100% rename from motorApp/op/ui/XPSAux.ui rename to motorApp/op/ui/autoconvert/XPSAux.ui diff --git a/motorApp/op/ui/XPSAuxBi_more.ui b/motorApp/op/ui/autoconvert/XPSAuxBi_more.ui similarity index 100% rename from motorApp/op/ui/XPSAuxBi_more.ui rename to motorApp/op/ui/autoconvert/XPSAuxBi_more.ui diff --git a/motorApp/op/ui/XPSAuxTest.ui b/motorApp/op/ui/autoconvert/XPSAuxTest.ui similarity index 100% rename from motorApp/op/ui/XPSAuxTest.ui rename to motorApp/op/ui/autoconvert/XPSAuxTest.ui diff --git a/motorApp/op/ui/XPSExtra.ui b/motorApp/op/ui/autoconvert/XPSExtra.ui similarity index 100% rename from motorApp/op/ui/XPSExtra.ui rename to motorApp/op/ui/autoconvert/XPSExtra.ui diff --git a/motorApp/op/ui/XPSTest.ui b/motorApp/op/ui/autoconvert/XPSTest.ui similarity index 100% rename from motorApp/op/ui/XPSTest.ui rename to motorApp/op/ui/autoconvert/XPSTest.ui diff --git a/motorApp/op/ui/XPSTop.ui b/motorApp/op/ui/autoconvert/XPSTop.ui similarity index 100% rename from motorApp/op/ui/XPSTop.ui rename to motorApp/op/ui/autoconvert/XPSTop.ui diff --git a/motorApp/op/ui/motor2x.ui b/motorApp/op/ui/autoconvert/motor2x.ui similarity index 100% rename from motorApp/op/ui/motor2x.ui rename to motorApp/op/ui/autoconvert/motor2x.ui diff --git a/motorApp/op/ui/motor3x.ui b/motorApp/op/ui/autoconvert/motor3x.ui similarity index 100% rename from motorApp/op/ui/motor3x.ui rename to motorApp/op/ui/autoconvert/motor3x.ui diff --git a/motorApp/op/ui/motor4x.ui b/motorApp/op/ui/autoconvert/motor4x.ui similarity index 100% rename from motorApp/op/ui/motor4x.ui rename to motorApp/op/ui/autoconvert/motor4x.ui diff --git a/motorApp/op/ui/motor5x.ui b/motorApp/op/ui/autoconvert/motor5x.ui similarity index 100% rename from motorApp/op/ui/motor5x.ui rename to motorApp/op/ui/autoconvert/motor5x.ui diff --git a/motorApp/op/ui/motor6x.ui b/motorApp/op/ui/autoconvert/motor6x.ui similarity index 100% rename from motorApp/op/ui/motor6x.ui rename to motorApp/op/ui/autoconvert/motor6x.ui diff --git a/motorApp/op/ui/motor8x.ui b/motorApp/op/ui/autoconvert/motor8x.ui similarity index 100% rename from motorApp/op/ui/motor8x.ui rename to motorApp/op/ui/autoconvert/motor8x.ui diff --git a/motorApp/op/ui/motorStatus104.ui b/motorApp/op/ui/autoconvert/motorStatus104.ui similarity index 100% rename from motorApp/op/ui/motorStatus104.ui rename to motorApp/op/ui/autoconvert/motorStatus104.ui diff --git a/motorApp/op/ui/motorStatus16.ui b/motorApp/op/ui/autoconvert/motorStatus16.ui similarity index 100% rename from motorApp/op/ui/motorStatus16.ui rename to motorApp/op/ui/autoconvert/motorStatus16.ui diff --git a/motorApp/op/ui/motorStatus24.ui b/motorApp/op/ui/autoconvert/motorStatus24.ui similarity index 100% rename from motorApp/op/ui/motorStatus24.ui rename to motorApp/op/ui/autoconvert/motorStatus24.ui diff --git a/motorApp/op/ui/motorStatus32.ui b/motorApp/op/ui/autoconvert/motorStatus32.ui similarity index 100% rename from motorApp/op/ui/motorStatus32.ui rename to motorApp/op/ui/autoconvert/motorStatus32.ui diff --git a/motorApp/op/ui/motorStatus40.ui b/motorApp/op/ui/autoconvert/motorStatus40.ui similarity index 100% rename from motorApp/op/ui/motorStatus40.ui rename to motorApp/op/ui/autoconvert/motorStatus40.ui diff --git a/motorApp/op/ui/motorStatus48.ui b/motorApp/op/ui/autoconvert/motorStatus48.ui similarity index 100% rename from motorApp/op/ui/motorStatus48.ui rename to motorApp/op/ui/autoconvert/motorStatus48.ui diff --git a/motorApp/op/ui/motorStatus56.ui b/motorApp/op/ui/autoconvert/motorStatus56.ui similarity index 100% rename from motorApp/op/ui/motorStatus56.ui rename to motorApp/op/ui/autoconvert/motorStatus56.ui diff --git a/motorApp/op/ui/motorStatus64.ui b/motorApp/op/ui/autoconvert/motorStatus64.ui similarity index 100% rename from motorApp/op/ui/motorStatus64.ui rename to motorApp/op/ui/autoconvert/motorStatus64.ui diff --git a/motorApp/op/ui/motorStatus72.ui b/motorApp/op/ui/autoconvert/motorStatus72.ui similarity index 100% rename from motorApp/op/ui/motorStatus72.ui rename to motorApp/op/ui/autoconvert/motorStatus72.ui diff --git a/motorApp/op/ui/motorStatus8.ui b/motorApp/op/ui/autoconvert/motorStatus8.ui similarity index 100% rename from motorApp/op/ui/motorStatus8.ui rename to motorApp/op/ui/autoconvert/motorStatus8.ui diff --git a/motorApp/op/ui/motorStatus80.ui b/motorApp/op/ui/autoconvert/motorStatus80.ui similarity index 100% rename from motorApp/op/ui/motorStatus80.ui rename to motorApp/op/ui/autoconvert/motorStatus80.ui diff --git a/motorApp/op/ui/motorStatus88.ui b/motorApp/op/ui/autoconvert/motorStatus88.ui similarity index 100% rename from motorApp/op/ui/motorStatus88.ui rename to motorApp/op/ui/autoconvert/motorStatus88.ui diff --git a/motorApp/op/ui/motors.ui b/motorApp/op/ui/autoconvert/motors.ui similarity index 100% rename from motorApp/op/ui/motors.ui rename to motorApp/op/ui/autoconvert/motors.ui diff --git a/motorApp/op/ui/motors_s.ui b/motorApp/op/ui/autoconvert/motors_s.ui similarity index 100% rename from motorApp/op/ui/motors_s.ui rename to motorApp/op/ui/autoconvert/motors_s.ui diff --git a/motorApp/op/ui/motorx.ui b/motorApp/op/ui/autoconvert/motorx.ui similarity index 100% rename from motorApp/op/ui/motorx.ui rename to motorApp/op/ui/autoconvert/motorx.ui diff --git a/motorApp/op/ui/motorxU.ui b/motorApp/op/ui/autoconvert/motorxU.ui similarity index 100% rename from motorApp/op/ui/motorxU.ui rename to motorApp/op/ui/autoconvert/motorxU.ui diff --git a/motorApp/op/ui/motorx_all.ui b/motorApp/op/ui/autoconvert/motorx_all.ui similarity index 100% rename from motorApp/op/ui/motorx_all.ui rename to motorApp/op/ui/autoconvert/motorx_all.ui diff --git a/motorApp/op/ui/motorx_bare.ui b/motorApp/op/ui/autoconvert/motorx_bare.ui similarity index 100% rename from motorApp/op/ui/motorx_bare.ui rename to motorApp/op/ui/autoconvert/motorx_bare.ui diff --git a/motorApp/op/ui/motorx_help.ui b/motorApp/op/ui/autoconvert/motorx_help.ui similarity index 100% rename from motorApp/op/ui/motorx_help.ui rename to motorApp/op/ui/autoconvert/motorx_help.ui diff --git a/motorApp/op/ui/motorx_more.ui b/motorApp/op/ui/autoconvert/motorx_more.ui similarity index 100% rename from motorApp/op/ui/motorx_more.ui rename to motorApp/op/ui/autoconvert/motorx_more.ui diff --git a/motorApp/op/ui/autoconvert/motorx_msta_detail.ui b/motorApp/op/ui/autoconvert/motorx_msta_detail.ui new file mode 100644 index 0000000..965fdd7 --- /dev/null +++ b/motorApp/op/ui/autoconvert/motorx_msta_detail.ui @@ -0,0 +1,968 @@ + + + MainWindow + + + + 0 + 0 + 400 + 400 + + + + + +QWidget#centralWidget {background: rgba(200, 200, 200, 255);} + + + + + + + + 0 + 31 + 100 + 25 + + + + + 10 + 0 + 184 + + + + caGraphics::Solid + + + caGraphics::Filled + + + + 10 + 0 + 184 + + + + caGraphics::Rectangle + + + + + + 0 + 0 + 398 + 30 + + + + + 255 + 255 + 255 + + + + caGraphics::Solid + + + caGraphics::Filled + + + + 255 + 255 + 255 + + + + caGraphics::Rectangle + + + + + + 0 + 30 + 402 + 3 + + + + + 10 + 0 + 184 + + + + caPolyLine::Solid + + + 3 + + + + 10 + 0 + 184 + + + + 1,1;400,1 + + + caPolyLine::Filled + + + + + + 4 + 5 + 153 + 20 + + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + $(P)$(M).DESC + + + + 10 + 0 + 184 + + + + + 255 + 255 + 255 + + + + caLineEdit::Static + + + caLineEdit::Channel + + + caLineEdit::Channel + + + 1.000000000000000 + + + 0.000000000000000 + + + caLineEdit::Height + + + caLineEdit::decimal + + + + + + 289 + 5 + 100 + 20 + + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + $(P)$(M).DTYP + + + + 10 + 0 + 184 + + + + + 255 + 255 + 255 + + + + caLineEdit::Static + + + caLineEdit::Channel + + + caLineEdit::Channel + + + 1.000000000000000 + + + 0.000000000000000 + + + caLineEdit::Height + + + caLineEdit::decimal + + + + + + 171 + 5 + 51 + 20 + + + + QFrame::NoFrame + + + $(P)$(M) + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 2 + 34 + 95 + 20 + + + + QFrame::NoFrame + + + Status Detail + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 255 + 255 + 255 + + + + + 255 + 255 + 255 + + + + + + + 5 + 65 + 37 + 320 + + + + $(P)$(M).MSTA + + + caByte::Up + + + 0 + + + 15 + + + caByte::Static + + + + 30 + 187 + 0 + + + + + 200 + 200 + 200 + + + + + + + 50 + 68 + 352 + 317 + + + + + + 0 + 0 + 171 + 15 + + + + QFrame::NoFrame + + + Unused + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 20 + 171 + 15 + + + + QFrame::NoFrame + + + Unused + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 40 + 350 + 15 + + + + QFrame::NoFrame + + + MINUS_LS: minus limit switch has been hit + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 60 + 350 + 15 + + + + QFrame::NoFrame + + + COMM_ERR: Communication Error + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 80 + 345 + 15 + + + + QFrame::NoFrame + + + GAIN_SUPPORT: motor supports closed-loop position control + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 100 + 350 + 15 + + + + QFrame::NoFrame + + + MOVING: non-zero velocity present + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 120 + 350 + 15 + + + + QFrame::NoFrame + + + PROBLEM: driver stopped polling + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 140 + 350 + 15 + + + + QFrame::NoFrame + + + PRESENT: encoder is present + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 160 + 350 + 15 + + + + QFrame::NoFrame + + + HOME: if at home position + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 180 + 350 + 15 + + + + QFrame::NoFrame + + + Unused + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 200 + 350 + 15 + + + + QFrame::NoFrame + + + POSITION: closed-loop position control enabled + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 220 + 350 + 15 + + + + QFrame::NoFrame + + + Unused + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 240 + 350 + 15 + + + + QFrame::NoFrame + + + HOMELS: state of home limit switch + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 260 + 350 + 15 + + + + QFrame::NoFrame + + + PLUS_LS: plus limit has been hit + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 280 + 350 + 15 + + + + QFrame::NoFrame + + + DONE: motion is complete + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + + + 0 + 300 + 350 + 15 + + + + QFrame::NoFrame + + + DIRECTION: last raw (0:Neg, 1:Pos) + + + Qt::AlignAbsolute|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + + caRectangle_0 + caRectangle_1 + caPolyLine_0 + caLabel_0 + caLabel_1 + caFrame_0 + caLineEdit_0 + caLineEdit_1 + caByte_0 + + + + + caFrame + QFrame +
    caFrame
    + 1 +
    + + caLabel + QLabel +
    caLabel
    +
    + + caGraphics + QWidget +
    caGraphics
    +
    + + caPolyLine + QWidget +
    caPolyLine
    +
    + + caLineEdit + QLineEdit +
    caLineEdit
    +
    + + caByte + QWidget +
    caByte
    +
    +
    + + +
    diff --git a/motorApp/op/ui/motorx_setup.ui b/motorApp/op/ui/autoconvert/motorx_setup.ui similarity index 100% rename from motorApp/op/ui/motorx_setup.ui rename to motorApp/op/ui/autoconvert/motorx_setup.ui diff --git a/motorApp/op/ui/motorx_tiny.ui b/motorApp/op/ui/autoconvert/motorx_tiny.ui similarity index 100% rename from motorApp/op/ui/motorx_tiny.ui rename to motorApp/op/ui/autoconvert/motorx_tiny.ui diff --git a/motorApp/op/ui/profileMove.ui b/motorApp/op/ui/autoconvert/profileMove.ui similarity index 100% rename from motorApp/op/ui/profileMove.ui rename to motorApp/op/ui/autoconvert/profileMove.ui diff --git a/motorApp/op/ui/profileMoveXPS.ui b/motorApp/op/ui/autoconvert/profileMoveXPS.ui similarity index 100% rename from motorApp/op/ui/profileMoveXPS.ui rename to motorApp/op/ui/autoconvert/profileMoveXPS.ui diff --git a/motorApp/op/ui/topMotors4.ui b/motorApp/op/ui/autoconvert/topMotors4.ui similarity index 100% rename from motorApp/op/ui/topMotors4.ui rename to motorApp/op/ui/autoconvert/topMotors4.ui diff --git a/motorApp/op/ui/topMotors8.ui b/motorApp/op/ui/autoconvert/topMotors8.ui similarity index 100% rename from motorApp/op/ui/topMotors8.ui rename to motorApp/op/ui/autoconvert/topMotors8.ui diff --git a/motorApp/op/ui/topMotors8_more.ui b/motorApp/op/ui/autoconvert/topMotors8_more.ui similarity index 100% rename from motorApp/op/ui/topMotors8_more.ui rename to motorApp/op/ui/autoconvert/topMotors8_more.ui diff --git a/motorApp/op/ui/trajectoryPlot.ui b/motorApp/op/ui/autoconvert/trajectoryPlot.ui similarity index 100% rename from motorApp/op/ui/trajectoryPlot.ui rename to motorApp/op/ui/autoconvert/trajectoryPlot.ui diff --git a/motorApp/op/ui/trajectoryScan.ui b/motorApp/op/ui/autoconvert/trajectoryScan.ui similarity index 100% rename from motorApp/op/ui/trajectoryScan.ui rename to motorApp/op/ui/autoconvert/trajectoryScan.ui diff --git a/motorApp/op/ui/trajectoryScanDebug.ui b/motorApp/op/ui/autoconvert/trajectoryScanDebug.ui similarity index 100% rename from motorApp/op/ui/trajectoryScanDebug.ui rename to motorApp/op/ui/autoconvert/trajectoryScanDebug.ui diff --git a/motorApp/op/ui/trajectoryScan_Ensemble.ui b/motorApp/op/ui/autoconvert/trajectoryScan_Ensemble.ui similarity index 100% rename from motorApp/op/ui/trajectoryScan_Ensemble.ui rename to motorApp/op/ui/autoconvert/trajectoryScan_Ensemble.ui diff --git a/motorApp/op/ui/trajectoryScan_MAXv.ui b/motorApp/op/ui/autoconvert/trajectoryScan_MAXv.ui similarity index 100% rename from motorApp/op/ui/trajectoryScan_MAXv.ui rename to motorApp/op/ui/autoconvert/trajectoryScan_MAXv.ui diff --git a/motorApp/op/ui/motor2xU.ui b/motorApp/op/ui/motor2xU.ui new file mode 100644 index 0000000..826a681 --- /dev/null +++ b/motorApp/op/ui/motor2xU.ui @@ -0,0 +1,60 @@ + + + MainWindow + + + + 0 + 0 + 352 + 282 + + + + MainWindow + + + + + + 0 + 0 + 176 + 282 + + + + P=$(P),M=$(M1) + + + motorxU.ui + + + + + + 176 + 0 + 176 + 282 + + + + P=$(P),M=$(M2) + + + motorxU.ui + + + + + + + caInclude + QWidget +
    caInclude
    +
    +
    + + +
    diff --git a/motorApp/op/ui/motor3xU.ui b/motorApp/op/ui/motor3xU.ui new file mode 100644 index 0000000..13cee66 --- /dev/null +++ b/motorApp/op/ui/motor3xU.ui @@ -0,0 +1,76 @@ + + + MainWindow + + + + 0 + 0 + 528 + 282 + + + + MainWindow + + + + + + 0 + 0 + 176 + 282 + + + + P=$(P),M=$(M1) + + + motorxU.ui + + + + + + 176 + 0 + 176 + 282 + + + + P=$(P),M=$(M2) + + + motorxU.ui + + + + + + 352 + 0 + 176 + 282 + + + + P=$(P),M=$(M3) + + + motorxU.ui + + + + + + + caInclude + QWidget +
    caInclude
    +
    +
    + + +
    diff --git a/motorApp/op/ui/motor4xU.ui b/motorApp/op/ui/motor4xU.ui new file mode 100644 index 0000000..147d9e8 --- /dev/null +++ b/motorApp/op/ui/motor4xU.ui @@ -0,0 +1,92 @@ + + + MainWindow + + + + 0 + 0 + 704 + 282 + + + + MainWindow + + + + + + 0 + 0 + 176 + 282 + + + + P=$(P),M=$(M1) + + + motorxU.ui + + + + + + 176 + 0 + 176 + 282 + + + + P=$(P),M=$(M2) + + + motorxU.ui + + + + + + 352 + 0 + 176 + 282 + + + + P=$(P),M=$(M3) + + + motorxU.ui + + + + + + 528 + 0 + 176 + 282 + + + + P=$(P),M=$(M4) + + + motorxU.ui + + + + + + + caInclude + QWidget +
    caInclude
    +
    +
    + + +
    diff --git a/motorApp/op/ui/motor5xU.ui b/motorApp/op/ui/motor5xU.ui new file mode 100644 index 0000000..ca45d7d --- /dev/null +++ b/motorApp/op/ui/motor5xU.ui @@ -0,0 +1,108 @@ + + + MainWindow + + + + 0 + 0 + 880 + 282 + + + + MainWindow + + + + + + 0 + 0 + 176 + 282 + + + + P=$(P),M=$(M1) + + + motorxU.ui + + + + + + 176 + 0 + 176 + 282 + + + + P=$(P),M=$(M2) + + + motorxU.ui + + + + + + 352 + 0 + 176 + 282 + + + + P=$(P),M=$(M3) + + + motorxU.ui + + + + + + 528 + 0 + 176 + 282 + + + + P=$(P),M=$(M5) + + + motorxU.ui + + + + + + 704 + 0 + 176 + 282 + + + + P=$(P),M=$(M5) + + + motorxU.ui + + + + + + + caInclude + QWidget +
    caInclude
    +
    +
    + + +
    diff --git a/motorApp/op/ui/motor6xU.ui b/motorApp/op/ui/motor6xU.ui new file mode 100644 index 0000000..2de5181 --- /dev/null +++ b/motorApp/op/ui/motor6xU.ui @@ -0,0 +1,124 @@ + + + MainWindow + + + + 0 + 0 + 528 + 564 + + + + MainWindow + + + + + + 0 + 0 + 176 + 282 + + + + P=$(P),M=$(M1) + + + motorxU.ui + + + + + + 176 + 0 + 176 + 282 + + + + P=$(P),M=$(M2) + + + motorxU.ui + + + + + + 352 + 0 + 176 + 282 + + + + P=$(P),M=$(M3) + + + motorxU.ui + + + + + + 0 + 282 + 176 + 282 + + + + P=$(P),M=$(M4) + + + motorxU.ui + + + + + + 176 + 282 + 176 + 282 + + + + P=$(P),M=$(M5) + + + motorxU.ui + + + + + + 352 + 282 + 176 + 282 + + + + P=$(P),M=$(M6) + + + motorxU.ui + + + + + + + caInclude + QWidget +
    caInclude
    +
    +
    + + +
    diff --git a/motorApp/op/ui/motor7xU.ui b/motorApp/op/ui/motor7xU.ui new file mode 100644 index 0000000..f29081c --- /dev/null +++ b/motorApp/op/ui/motor7xU.ui @@ -0,0 +1,140 @@ + + + MainWindow + + + + 0 + 0 + 704 + 564 + + + + MainWindow + + + + + + 0 + 0 + 176 + 282 + + + + P=$(P),M=$(M1) + + + motorxU.ui + + + + + + 176 + 0 + 176 + 282 + + + + P=$(P),M=$(M2) + + + motorxU.ui + + + + + + 352 + 0 + 176 + 282 + + + + P=$(P),M=$(M3) + + + motorxU.ui + + + + + + 528 + 0 + 176 + 282 + + + + P=$(P),M=$(M4) + + + motorxU.ui + + + + + + 0 + 282 + 176 + 282 + + + + P=$(P),M=$(M5) + + + motorxU.ui + + + + + + 176 + 282 + 176 + 282 + + + + P=$(P),M=$(M6) + + + motorxU.ui + + + + + + 352 + 282 + 176 + 282 + + + + P=$(P),M=$(M7) + + + motorxU.ui + + + + + + + caInclude + QWidget +
    caInclude
    +
    +
    + + +
    diff --git a/motorApp/op/ui/motor8xU.ui b/motorApp/op/ui/motor8xU.ui new file mode 100644 index 0000000..8a6d044 --- /dev/null +++ b/motorApp/op/ui/motor8xU.ui @@ -0,0 +1,156 @@ + + + MainWindow + + + + 0 + 0 + 704 + 564 + + + + MainWindow + + + + + + 0 + 0 + 176 + 282 + + + + P=$(P),M=$(M1) + + + motorxU.ui + + + + + + 176 + 0 + 176 + 282 + + + + P=$(P),M=$(M2) + + + motorxU.ui + + + + + + 352 + 0 + 176 + 282 + + + + P=$(P),M=$(M3) + + + motorxU.ui + + + + + + 528 + 0 + 176 + 282 + + + + P=$(P),M=$(M4) + + + motorxU.ui + + + + + + 0 + 282 + 176 + 282 + + + + P=$(P),M=$(M5) + + + motorxU.ui + + + + + + 176 + 282 + 176 + 282 + + + + P=$(P),M=$(M6) + + + motorxU.ui + + + + + + 352 + 282 + 176 + 282 + + + + P=$(P),M=$(M7) + + + motorxU.ui + + + + + + 528 + 282 + 176 + 282 + + + + P=$(P),M=$(M8) + + + motorxU.ui + + + + + + + caInclude + QWidget +
    caInclude
    +
    +
    + + +
    diff --git a/motorApp/op/ui/motorx_msta_detail.ui b/motorApp/op/ui/motorx_msta_detail.ui deleted file mode 100644 index 7b4499c..0000000 --- a/motorApp/op/ui/motorx_msta_detail.ui +++ /dev/null @@ -1,956 +0,0 @@ - - -MainWindow - - - - 549 - 406 - 400 - 400 - - - - - -QWidget#centralWidget {background: rgba(200, 200, 200, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - caGraphics::Rectangle - - - - 0 - 31 - 100 - 25 - - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - caGraphics::Rectangle - - - - 0 - 0 - 398 - 30 - - - - - 255 - 255 - 255 - - - - Filled - - - - 255 - 255 - 255 - - - - Solid - - - - - - 0 - 30 - 402 - 3 - - - - 3 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - 1,1;400,1; - - - - - - 4 - 5 - 153 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - decimal - - - caLineEdit::Static - - - - - - 289 - 5 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M).DTYP - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(M) - - - ESimpleLabel::WidthAndHeight - - - - 171 - 5 - 96 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - Status Detail - - - ESimpleLabel::WidthAndHeight - - - - 2 - 34 - 156 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 5 - 65 - 37 - 320 - - - - $(P)$(M).MSTA - - - - 30 - 187 - 0 - - - - - 200 - 200 - 200 - - - - caByte::Static - - - 0 - - - 15 - - - Down - - - - - - 50 - 68 - 352 - 317 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Unused - - - ESimpleLabel::WidthAndHeight - - - - 0 - 0 - 171 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Unused - - - ESimpleLabel::WidthAndHeight - - - - 0 - 20 - 171 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - MINUS_LS: minus limit switch has been hit - - - ESimpleLabel::WidthAndHeight - - - - 0 - 40 - 369 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - COMM_ERR: Communication Error - - - ESimpleLabel::WidthAndHeight - - - - 0 - 60 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - GAIN_SUPPORT: motor supports closed-loop position control - - - ESimpleLabel::WidthAndHeight - - - - 0 - 80 - 513 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - MOVING: non-zero velocity present - - - ESimpleLabel::WidthAndHeight - - - - 0 - 100 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - PROBLEM: driver stopped polling - - - ESimpleLabel::WidthAndHeight - - - - 0 - 120 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - PRESENT: encoder is present - - - ESimpleLabel::WidthAndHeight - - - - 0 - 140 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - HOME: if at home position - - - ESimpleLabel::WidthAndHeight - - - - 0 - 160 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Unused - - - ESimpleLabel::WidthAndHeight - - - - 0 - 180 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - POSITION: closed-loop position control enabled - - - ESimpleLabel::WidthAndHeight - - - - 0 - 200 - 414 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Unused - - - ESimpleLabel::WidthAndHeight - - - - 0 - 220 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - HOMELS: state of home limit switch - - - ESimpleLabel::WidthAndHeight - - - - 0 - 240 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - PLUS_LS: plus limit has been hit - - - ESimpleLabel::WidthAndHeight - - - - 0 - 260 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - DONE: motion is complete - - - ESimpleLabel::WidthAndHeight - - - - 0 - 280 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - DIRECTION: last raw (0:Neg, 1:Pos) - - - ESimpleLabel::WidthAndHeight - - - - 0 - 300 - 350 - 15 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - caRectangle_0 - caRectangle_1 - caPolyLine_0 - caLabel_0 - caLabel_1 - caLabel_2 - caLabel_3 - caLabel_4 - caLabel_5 - caLabel_6 - caLabel_7 - caLabel_8 - caLabel_9 - caLabel_10 - caLabel_11 - caLabel_12 - caLabel_13 - caLabel_14 - caLabel_15 - caLabel_16 - caLabel_17 - caFrame_0 - caLineEdit_0 - caLineEdit_1 - caByte_0 - - - \ No newline at end of file diff --git a/motorExApp/NoAsyn/Makefile b/motorExApp/NoAsyn/Makefile index 64b6a95..c2dc693 100644 --- a/motorExApp/NoAsyn/Makefile +++ b/motorExApp/NoAsyn/Makefile @@ -1,10 +1,6 @@ #FILENAME... Makefile #USAGE... Makefile for motor application example without Asyn -#Version: $Revision$ -#Modified By: $Author$ -#Last Modified: $Date$ -#HeadURL: $URL$ # "#!" marks lines that can be uncommented. diff --git a/motorExApp/WithAsyn/Makefile b/motorExApp/WithAsyn/Makefile index f002a2b..268cbfe 100644 --- a/motorExApp/WithAsyn/Makefile +++ b/motorExApp/WithAsyn/Makefile @@ -1,10 +1,6 @@ #FILENAME... Makefile #USAGE... Makefile for motor application example with Asyn -#Version: $Revision: 18552 $ -#Modified By: $Author: sluiter $ -#Last Modified: $Date: 2015-01-07 09:33:30 -0600 (Wed, 07 Jan 2015) $ -#HeadURL: $URL: https://subversion.xray.aps.anl.gov/synApps/motor/tags/R6-9/motorExApp/WithAsyn/Makefile $ # "#!" marks lines that can be uncommented. @@ -24,6 +20,7 @@ COMMONDBDS += devMicroMo.dbd COMMONDBDS += devNewport.dbd ifdef SNCSEQ COMMONDBDS += LdevNewportTS.dbd +COMMONDBDS += devAerotechSeq.dbd endif COMMONDBDS += devPIMotor.dbd COMMONDBDS += devOms.dbd @@ -43,11 +40,20 @@ ifdef BUSY endif COMMONDBDS += PI_GCS2Support.dbd COMMONDBDS += phytron.dbd +ifdef LUA +COMMONDBDS += ScriptMotorDriver.dbd +endif DBD += WithAsyn.dbd WithAsyn_DBD += $(COMMONDBDS) ifdef SNCSEQ -WithAsyn_DBD += devSequencer.dbd + # seq-2-1 and earlier has devSequencer + ifeq (seq-2-1, $(findstring seq-2-1, $(SNCSEQ))) + WithAsyn_DBD += devSequencer.dbd + else ifeq (seq-2.1, $(findstring seq-2.1, $(SNCSEQ))) + WithAsyn_DBD += devSequencer.dbd + endif + endif DBD += WithAsynVx.dbd @@ -81,12 +87,24 @@ COMMONLIBS += ACRMotor COMMONLIBS += PI_GCS2Support COMMONLIBS += phytronAxisMotor COMMONLIBS += motor +ifdef LUA +COMMONLIBS += ScriptMotor +COMMONLIBS += lua +endif # Needed for Newport SNL programs WithAsyn_LIBS += $(COMMONLIBS) WithAsyn_LIBS += asyn ifdef SNCSEQ -WithAsyn_LIBS += seqDev seq pv + # seq-2-1 and earlier has devSequencer + ifeq (seq-2-1, $(findstring seq-2-1, $(SNCSEQ))) + WithAsyn_LIBS += seqDev seq pv + else ifeq (seq-2.1, $(findstring seq-2.1, $(SNCSEQ))) + WithAsyn_LIBS += seqDev seq pv + else + # seq 2.2. + WithAsyn_LIBS += seq pv + endif endif WithAsyn_LIBS += $(EPICS_BASE_IOC_LIBS) @@ -97,7 +115,14 @@ endif WithAsynVx_LIBS += asyn # Needed for Newport SNL programs ifdef SNCSEQ -WithAsynVx_LIBS += seqDev seq pv + ifeq (seq-2-1, $(findstring seq-2-1, $(SNCSEQ))) + WithAsynVx_LIBS += seqDev seq pv + else ifeq (seq-2.1, $(findstring seq-2.1, $(SNCSEQ))) + WithAsynVx_LIBS += seqDev seq pv + else + # seq 2.2. + WithAsynVx_LIBS += seq pv + endif endif WithAsynVx_LIBS += $(EPICS_BASE_IOC_LIBS)