org.lsst.ccs.drivers.parker
Class AcrComm

java.lang.Object
  extended by org.lsst.ccs.drivers.parker.AcrComm

public final class AcrComm
extends Object

Routines for communicating with a Parker (ACR) motor controller

Author:
Owen Saxton

Nested Class Summary
 class AcrComm.Exception
          Inner exception class for laundering non-runtime exceptions
 
Field Summary
static int ACO_ECHO_COMMAND
           
static int ACO_GET_RESPONSE
           
static int ACO_SHOW_PROMPT
           
static int ACR_SYS_PTR
           
static int ACT_CONV_FP32
           
static int ACT_CONV_FP64
           
static int ACT_CONV_INT
           
static int ACTL_TORQ_PRM
           
static int ACV_$A
           
static int ACV_$V
           
static int ACV_DA
           
static int ACV_DV
           
static int ACV_LA
           
static int ACV_LV
           
static int ACV_SA
           
static int ACV_SV
           
static int BUS_VOLT_PRM
           
static int CAL_SYNC_BIT
           
static int CAP_CMPL_BIT
           
static int CAP_POSN_PRM
           
static int CMDD_CURR_PRM
           
static int CMDD_TORQ_PRM
           
static int DGAIN_PRM
           
static int DRIVE_TEMP_PRM
           
static int ENAB_NEOT_BIT
           
static int ENAB_NSLM_BIT
           
static int ENAB_PEOT_BIT
           
static int ENAB_PSLM_BIT
           
static int ENC_POSN_PRM
           
static int HOME_BKUP_BIT
           
static int HOME_FAIL_BIT
           
static int HOME_FND_BIT
           
static int HOME_NEDG_BIT
           
static int HOME_NFNL_BIT
           
static int ICM_FALL_1ST
           
static int ICM_FALL_2ND
           
static int ICM_FALL_3RD
           
static int ICM_FALL_4TH
           
static int ICM_RISE_1ST
           
static int ICM_RISE_2ND
           
static int ICM_RISE_3RD
           
static int ICM_RISE_4TH
           
static int IGAIN_PRM
           
static int INP_LINE_PRM
           
static int INPUT4_BIT
           
static int INVT_HOME_BIT
           
static int INVT_NEOT_BIT
           
static int INVT_PEOT_BIT
           
static int JOG_ACC_PRM
           
static int JOG_ACTV_BIT
           
static int JOG_DEC_PRM
           
static int JOG_JRK_PRM
           
static int JOG_VEL_PRM
           
static int KILL_MOTN_BIT
           
static int KILL_MOVE_BIT
           
static int LINE_NUM_BIT
           
static int MOVE_SYNC_BIT
           
static int NEG_EOT_BIT
           
static int NEG_SLM_BIT
           
static int NEG_TLM_PRM
           
static int OUTPUT33_BIT
           
static int PGAIN_PRM
           
static int POS_EOT_BIT
           
static int POS_SLM_BIT
           
static int POS_TLM_PRM
           
static int POSN_ERR_BIT
           
static int PPU_PRM
           
static int PRIM_AXIS_PRM
           
static int SAMP_ACTV_BIT
           
static int SAMP_ARM_BIT
           
static int SAMP_MODE_BIT
           
static int SAMP_PERD_PRM
           
static int SYS_CLOCK_PRM
           
static int TEMP_FLT_PRM
           
static int TEMP_INT_PRM
           
 
Constructor Summary
AcrComm(String node)
           
AcrComm(String node, boolean logging)
           
AcrComm(String node, boolean logging, org.lsst.ccs.utilities.sa.Output iOut)
          Main constructor
AcrComm(String node, org.lsst.ccs.utilities.sa.Output iOut)
           
 
Method Summary
 void clearBit(int bnum)
          Clear a bit in the controller
 void drain()
          Drain the input from the controller sockets
 int getBit(int bnum)
          Get a bit from the controller
 float getFloatParm(int pnum)
          Get a float parameter from the controller
 int getFloatParmAsInt(int pnum)
          Get a float parameter from the controller as integer
 int getIntParm(int pnum)
          Get an integer parameter from the controller
 int getParmAddr(int pnum)
          Get a parameter address from the controller
 int getParmAsInt(int pnum)
          Get a parameter (int or float) from the controller as int
 String getPrompt()
          Get the stored prompt
 int getStream()
          Get the stored connection stream number
 int getUserParms(int pnum, double[] value, int count)
          Get user parameters (doubles) from the controller
 int getVarAddr(int pnum, int vcode)
          Get a program variable base address from the controller
 int getVarCount(int pnum, int type, int array)
          Get a program variable count from the controller
 int getVars(int pnum, int index, int count, double[] value)
          Get double program variable values from the controller
 int getVars(int pnum, int index, int count, float[] value)
          Get float (single) program variable values from the controller
 int getVars(int pnum, int index, int count, int[] value)
          Get integer (long) program variable values from the controller
 int getVars(int pnum, int array, int index, int count, double[] value)
          Get double program array variable values from the controller
 int getVars(int pnum, int array, int index, int count, float[] value)
          Get float (single) program array variable values from the controller
 int getVars(int pnum, int array, int index, int count, int[] value)
          Get integer (long) program array variable values from the controller
 int getVars(int pnum, int array, int index, int count, String[] value)
          Get string program array variable values from the controller
 int getVars(int pnum, int index, int count, String[] value)
          Get string program variable values from the controller
 void logClose()
          Stop logging commands
 void logOpen(String name)
          Start logging commands
 void peek(int addr, int type, int[] value, int count)
          Get values from controller memory
 int peekVars(int pnum, int type, int index, int count, int[] value)
          Get numeric program variable values from the controller as integers
 int peekVars(int pnum, int type, int array, int index, int count, int[] value)
          Get numeric program array variable values from the controller as integers
 void poke(int addr, int type, int[] value, int count)
          Set values into controller memory
 int rcveAsc(int optn)
          Receive and process ASCII data from the controller
 int rcveBin(byte[] buff, int leng)
          Receive binary data from the controller
 void sendBin(byte[] cmnd)
          Send binary command to the controller
 void sendFile(String fName, int optns)
          Read a file and send it to the controller
 int sendStr(String cmnd, int optn)
          Send a string to the controller and receive reply
 void setBit(int bnum)
          Set a bit in the controller
 void setFloatParm(int pnum, float value)
          Set a float parameter into the controller
 void setIntParm(int pnum, int value)
          Set an integer parameter into the controller
 int setUserParms(int pnum, double[] value, int count)
          Set user parameters (doubles) into the controller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACR_SYS_PTR

public static final int ACR_SYS_PTR
See Also:
Constant Field Values

ACO_GET_RESPONSE

public static final int ACO_GET_RESPONSE
See Also:
Constant Field Values

ACO_ECHO_COMMAND

public static final int ACO_ECHO_COMMAND
See Also:
Constant Field Values

ACO_SHOW_PROMPT

public static final int ACO_SHOW_PROMPT
See Also:
Constant Field Values

ACT_CONV_INT

public static final int ACT_CONV_INT
See Also:
Constant Field Values

ACT_CONV_FP64

public static final int ACT_CONV_FP64
See Also:
Constant Field Values

ACT_CONV_FP32

public static final int ACT_CONV_FP32
See Also:
Constant Field Values

ACV_DV

public static final int ACV_DV
See Also:
Constant Field Values

ACV_DA

public static final int ACV_DA
See Also:
Constant Field Values

ACV_SV

public static final int ACV_SV
See Also:
Constant Field Values

ACV_SA

public static final int ACV_SA
See Also:
Constant Field Values

ACV_LV

public static final int ACV_LV
See Also:
Constant Field Values

ACV_LA

public static final int ACV_LA
See Also:
Constant Field Values

ACV_$V

public static final int ACV_$V
See Also:
Constant Field Values

ACV_$A

public static final int ACV_$A
See Also:
Constant Field Values

INP_LINE_PRM

public static final int INP_LINE_PRM
See Also:
Constant Field Values

PRIM_AXIS_PRM

public static final int PRIM_AXIS_PRM
See Also:
Constant Field Values

ENC_POSN_PRM

public static final int ENC_POSN_PRM
See Also:
Constant Field Values

SAMP_PERD_PRM

public static final int SAMP_PERD_PRM
See Also:
Constant Field Values

SYS_CLOCK_PRM

public static final int SYS_CLOCK_PRM
See Also:
Constant Field Values

CAP_POSN_PRM

public static final int CAP_POSN_PRM
See Also:
Constant Field Values

PGAIN_PRM

public static final int PGAIN_PRM
See Also:
Constant Field Values

IGAIN_PRM

public static final int IGAIN_PRM
See Also:
Constant Field Values

DGAIN_PRM

public static final int DGAIN_PRM
See Also:
Constant Field Values

POS_TLM_PRM

public static final int POS_TLM_PRM
See Also:
Constant Field Values

NEG_TLM_PRM

public static final int NEG_TLM_PRM
See Also:
Constant Field Values

JOG_VEL_PRM

public static final int JOG_VEL_PRM
See Also:
Constant Field Values

JOG_ACC_PRM

public static final int JOG_ACC_PRM
See Also:
Constant Field Values

JOG_DEC_PRM

public static final int JOG_DEC_PRM
See Also:
Constant Field Values

JOG_JRK_PRM

public static final int JOG_JRK_PRM
See Also:
Constant Field Values

PPU_PRM

public static final int PPU_PRM
See Also:
Constant Field Values

CMDD_CURR_PRM

public static final int CMDD_CURR_PRM
See Also:
Constant Field Values

CMDD_TORQ_PRM

public static final int CMDD_TORQ_PRM
See Also:
Constant Field Values

ACTL_TORQ_PRM

public static final int ACTL_TORQ_PRM
See Also:
Constant Field Values

DRIVE_TEMP_PRM

public static final int DRIVE_TEMP_PRM
See Also:
Constant Field Values

BUS_VOLT_PRM

public static final int BUS_VOLT_PRM
See Also:
Constant Field Values

TEMP_INT_PRM

public static final int TEMP_INT_PRM
See Also:
Constant Field Values

TEMP_FLT_PRM

public static final int TEMP_FLT_PRM
See Also:
Constant Field Values

INPUT4_BIT

public static final int INPUT4_BIT
See Also:
Constant Field Values

OUTPUT33_BIT

public static final int OUTPUT33_BIT
See Also:
Constant Field Values

SAMP_ARM_BIT

public static final int SAMP_ARM_BIT
See Also:
Constant Field Values

SAMP_ACTV_BIT

public static final int SAMP_ACTV_BIT
See Also:
Constant Field Values

SAMP_MODE_BIT

public static final int SAMP_MODE_BIT
See Also:
Constant Field Values

MOVE_SYNC_BIT

public static final int MOVE_SYNC_BIT
See Also:
Constant Field Values

CAL_SYNC_BIT

public static final int CAL_SYNC_BIT
See Also:
Constant Field Values

KILL_MOVE_BIT

public static final int KILL_MOVE_BIT
See Also:
Constant Field Values

CAP_CMPL_BIT

public static final int CAP_CMPL_BIT
See Also:
Constant Field Values

JOG_ACTV_BIT

public static final int JOG_ACTV_BIT
See Also:
Constant Field Values

LINE_NUM_BIT

public static final int LINE_NUM_BIT
See Also:
Constant Field Values

KILL_MOTN_BIT

public static final int KILL_MOTN_BIT
See Also:
Constant Field Values

POSN_ERR_BIT

public static final int POSN_ERR_BIT
See Also:
Constant Field Values

POS_EOT_BIT

public static final int POS_EOT_BIT
See Also:
Constant Field Values

NEG_EOT_BIT

public static final int NEG_EOT_BIT
See Also:
Constant Field Values

POS_SLM_BIT

public static final int POS_SLM_BIT
See Also:
Constant Field Values

NEG_SLM_BIT

public static final int NEG_SLM_BIT
See Also:
Constant Field Values

HOME_FND_BIT

public static final int HOME_FND_BIT
See Also:
Constant Field Values

HOME_FAIL_BIT

public static final int HOME_FAIL_BIT
See Also:
Constant Field Values

INVT_PEOT_BIT

public static final int INVT_PEOT_BIT
See Also:
Constant Field Values

INVT_NEOT_BIT

public static final int INVT_NEOT_BIT
See Also:
Constant Field Values

INVT_HOME_BIT

public static final int INVT_HOME_BIT
See Also:
Constant Field Values

ENAB_PEOT_BIT

public static final int ENAB_PEOT_BIT
See Also:
Constant Field Values

ENAB_NEOT_BIT

public static final int ENAB_NEOT_BIT
See Also:
Constant Field Values

ENAB_PSLM_BIT

public static final int ENAB_PSLM_BIT
See Also:
Constant Field Values

ENAB_NSLM_BIT

public static final int ENAB_NSLM_BIT
See Also:
Constant Field Values

HOME_BKUP_BIT

public static final int HOME_BKUP_BIT
See Also:
Constant Field Values

HOME_NEDG_BIT

public static final int HOME_NEDG_BIT
See Also:
Constant Field Values

HOME_NFNL_BIT

public static final int HOME_NFNL_BIT
See Also:
Constant Field Values

ICM_RISE_1ST

public static final int ICM_RISE_1ST
See Also:
Constant Field Values

ICM_FALL_1ST

public static final int ICM_FALL_1ST
See Also:
Constant Field Values

ICM_RISE_2ND

public static final int ICM_RISE_2ND
See Also:
Constant Field Values

ICM_FALL_2ND

public static final int ICM_FALL_2ND
See Also:
Constant Field Values

ICM_RISE_3RD

public static final int ICM_RISE_3RD
See Also:
Constant Field Values

ICM_FALL_3RD

public static final int ICM_FALL_3RD
See Also:
Constant Field Values

ICM_RISE_4TH

public static final int ICM_RISE_4TH
See Also:
Constant Field Values

ICM_FALL_4TH

public static final int ICM_FALL_4TH
See Also:
Constant Field Values
Constructor Detail

AcrComm

public AcrComm(String node,
               boolean logging,
               org.lsst.ccs.utilities.sa.Output iOut)
Main constructor


AcrComm

public AcrComm(String node)

AcrComm

public AcrComm(String node,
               boolean logging)

AcrComm

public AcrComm(String node,
               org.lsst.ccs.utilities.sa.Output iOut)
Method Detail

getPrompt

public String getPrompt()
Get the stored prompt


getStream

public int getStream()
Get the stored connection stream number


sendFile

public void sendFile(String fName,
                     int optns)
Read a file and send it to the controller


sendStr

public int sendStr(String cmnd,
                   int optn)
Send a string to the controller and receive reply


rcveAsc

public int rcveAsc(int optn)
Receive and process ASCII data from the controller


sendBin

public void sendBin(byte[] cmnd)
Send binary command to the controller


rcveBin

public int rcveBin(byte[] buff,
                   int leng)
Receive binary data from the controller


getParmAsInt

public int getParmAsInt(int pnum)
Get a parameter (int or float) from the controller as int


getIntParm

public int getIntParm(int pnum)
Get an integer parameter from the controller


setIntParm

public void setIntParm(int pnum,
                       int value)
Set an integer parameter into the controller


getFloatParmAsInt

public int getFloatParmAsInt(int pnum)
Get a float parameter from the controller as integer


getFloatParm

public float getFloatParm(int pnum)
Get a float parameter from the controller


setFloatParm

public void setFloatParm(int pnum,
                         float value)
Set a float parameter into the controller


getUserParms

public int getUserParms(int pnum,
                        double[] value,
                        int count)
Get user parameters (doubles) from the controller


setUserParms

public int setUserParms(int pnum,
                        double[] value,
                        int count)
Set user parameters (doubles) into the controller


getParmAddr

public int getParmAddr(int pnum)
Get a parameter address from the controller


getVarAddr

public int getVarAddr(int pnum,
                      int vcode)
Get a program variable base address from the controller


getVarCount

public int getVarCount(int pnum,
                       int type,
                       int array)
Get a program variable count from the controller


peekVars

public int peekVars(int pnum,
                    int type,
                    int index,
                    int count,
                    int[] value)
Get numeric program variable values from the controller as integers


peekVars

public int peekVars(int pnum,
                    int type,
                    int array,
                    int index,
                    int count,
                    int[] value)
Get numeric program array variable values from the controller as integers


getVars

public int getVars(int pnum,
                   int index,
                   int count,
                   int[] value)
Get integer (long) program variable values from the controller


getVars

public int getVars(int pnum,
                   int array,
                   int index,
                   int count,
                   int[] value)
Get integer (long) program array variable values from the controller


getVars

public int getVars(int pnum,
                   int index,
                   int count,
                   float[] value)
Get float (single) program variable values from the controller


getVars

public int getVars(int pnum,
                   int array,
                   int index,
                   int count,
                   float[] value)
Get float (single) program array variable values from the controller


getVars

public int getVars(int pnum,
                   int index,
                   int count,
                   double[] value)
Get double program variable values from the controller


getVars

public int getVars(int pnum,
                   int array,
                   int index,
                   int count,
                   double[] value)
Get double program array variable values from the controller


getVars

public int getVars(int pnum,
                   int index,
                   int count,
                   String[] value)
Get string program variable values from the controller


getVars

public int getVars(int pnum,
                   int array,
                   int index,
                   int count,
                   String[] value)
Get string program array variable values from the controller


getBit

public int getBit(int bnum)
Get a bit from the controller


setBit

public void setBit(int bnum)
Set a bit in the controller


clearBit

public void clearBit(int bnum)
Clear a bit in the controller


peek

public void peek(int addr,
                 int type,
                 int[] value,
                 int count)
Get values from controller memory


poke

public void poke(int addr,
                 int type,
                 int[] value,
                 int count)
Set values into controller memory


drain

public void drain()
Drain the input from the controller sockets


logOpen

public void logOpen(String name)
Start logging commands


logClose

public void logClose()
Stop logging commands



Copyright © 2012 LSST. All Rights Reserved.