EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Re:RE: no bin file
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: lynn <lynn0703 at yeah.net>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 26 May 2023 13:42:18 +0000
Hi Lynn,

    1)  i did not change the function which i would not use.
        such as, asynStatus MCB4BAxis::home(double minVelocity, double maxVelocity, double acceleration, int forwards)
                                                        setPosition( .... )
        i did not comment out them,  I just put it here, no modify.
        Is it suitable?

You should remove the code that actually sends messages to the device in those functions.  Perhaps print an error message saying that "home" is not implemented.

    2) i need to send "mo=1" to enable the motor, at the beginning.
        how should i do it ?  I think the INIT, but i did not find example.

Send that command in the axis constructor, i.e. in MCB4BAxis::MCB4BAxis.

    3)  I saw pasynOctetSyncIO->connect or read  or writeonce ,but i know nothing about it's meaning.
         where should i find the information


    4) in st.cmd. Do i need some other word after:
        drvAsynIPPortConfigure("serial1", "192.168.1.5:5001 udp",10,,0,0,0)
       such as  ControllerConfig(serial,0,0,0,0)  ?

You need a command like:
MCB4BCreateController("MCB4B1", "serial1", 4, 100, 5000)

The example IOC for the MCB4B is here:

    5) i want to send the two words, first and another,
    sprintf(pC_->outString_, "PR=%d;", NINT(position));
    sprintf(pC_->outString_, "BG;");         

No, after each sprintf you need to make the call to actually send the string to the controller.
     comStatus = pC_->writeReadController();

     6) i delete "axisNo_" in some function, not the whole function, just delete the "axisNo_". because i have one axis only, and if i keep it, i don't know how to deal with "%02d" and "axisNo_" . and my command word did not have the axisNo parm.
     does it right?

If the controller only supports a single axis then you don't need the axisNo_ argument.

Mark


From: lynn <lynn0703 at yeah.net>
Sent: Tuesday, May 23, 2023 9:39 AM
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: tech-talk <tech-talk at aps.anl.gov>
Subject: Re:RE: no bin file
 
Hi Mark,
    Thanks for your answer. bin file came out.

    I modified the driver of MC4B as i needed during the two days.
    But I know little about c++,so could you do me a favor about the driver.   
   
     I have some question, i bold it bellow. ( connect the device with UDP )
    1)  i did not change the function which i would not use.
        such as, asynStatus MCB4BAxis::home(double minVelocity, double maxVelocity, double acceleration, int forwards)
                                                        setPosition( .... )
        i did not comment out them,  I just put it here, no modify.
        Is it suitable?
    2) i need to send "mo=1" to enable the motor, at the beginning.
        how should i do it ?  I think the INIT, but i did not find example.
    3)  I saw pasynOctetSyncIO->connect or read  or writeonce ,but i know nothing about it's meaning.
         where should i find the information
    4) in st.cmd. Do i need some other word after:
        drvAsynIPPortConfigure("serial1", "192.168.1.5:5001 udp",10,,0,0,0)
       such as  ControllerConfig(serial,0,0,0,0)  ?
    5) i want to send the two words, first and another,
    sprintf(pC_->outString_, "PR=%d;", NINT(position));
    sprintf(pC_->outString_, "BG;");                                    
    is it right i write?
     6) i delete "axisNo_" in some function, not the whole function, just delete the "axisNo_". because i have one axis only, and if i keep it, i don't know how to deal with "%02d" and "axisNo_" . and my command word did not have the axisNo parm.
     does it right?
    
     Bellow is my information, it's so long.
     Any answer was appreciate.
    

Regards,
Lynn


*********************MC4BB4.cpp*********************
/** Creates a new MCB4BController object.
  * \param[in] portName          The name of the asyn port that will be created for this driver
  * \param[in] MCB4BPortName     The name of the drvAsynSerialPort that was created previously to connect to the MCB4B 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
  */
MCB4BController::MCB4BController(const char *portName, const char *MCB4BPortName, int numAxes,
                                 double movingPollPeriod, double idlePollPeriod)
  :  asynMotorController(portName, numAxes, NUM_MCB4B_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;
  asynStatus status;
  MCB4BAxis *pAxis;
  static const char *functionName = "MCB4BController::MCB4BController";

  /* Connect to MCB4B controller */
  status = pasynOctetSyncIO->connect(MCB4BPortName, 0, &pasynUserController_, NULL);
  if (status) {
    asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
      "%s: cannot connect to MCB-4B controller\n",
      functionName);
  }
  for (axis=0; axis<numAxes; axis++) {
    pAxis = new MCB4BAxis(this, axis);
  }

  startPoller(movingPollPeriod, idlePollPeriod, 2);
}
/** Creates a new MCB4BController 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] MCB4BPortName       The name of the drvAsynIPPPort that was created previously to connect to the MCB4B 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 MCB4BCreateController(const char *portName, const char *MCB4BPortName, int numAxes,
                                   int movingPollPeriod, int idlePollPeriod)
{
  MCB4BController *pMCB4BController
    = new MCB4BController(portName, MCB4BPortName, numAxes, movingPollPeriod/1000., idlePollPeriod/1000.);
  pMCB4BController = NULL;
  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 MCB4BController::report(FILE *fp, int level)
{
  fprintf(fp, "MCB-4B 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 MCB4BAxis object.
  * Returns NULL if the axis number encoded in pasynUser is invalid.
  * \param[in] pasynUser asynUser structure that encodes the axis index number. */
MCB4BAxis* MCB4BController::getAxis(asynUser *pasynUser)
{
  return static_cast<MCB4BAxis*>(asynMotorController::getAxis(pasynUser));
}
/** Returns a pointer to an MCB4BAxis object.
  * Returns NULL if the axis number encoded in pasynUser is invalid.
  * \param[in] axisNo Axis index number. */
MCB4BAxis* MCB4BController::getAxis(int axisNo)
/*
  i delte the "axisNo" below, because i just have one axis, does i need to change it here or i should not delte it below?
*/
{
  return static_cast<MCB4BAxis*>(asynMotorController::getAxis(axisNo));
}

// These are the MCB4BAxis methods

/** Creates a new MCB4BAxis object.
  * \param[in] pC Pointer to the MCB4BController to which this axis belongs.
  * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1.
  *
  * Initializes register numbers, etc.
  */
MCB4BAxis::MCB4BAxis(MCB4BController *pC, int axisNo)
  : asynMotorAxis(pC, axisNo),
    pC_(pC)
{
}

/** 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 MCB4BAxis::report(FILE *fp, int level)
{
  if (level > 0) {
    fprintf(fp, "  axis %d\n",   axisNo_);
  }

  // Call the base class method
  asynMotorAxis::report(fp, level);
}

asynStatus MCB4BAxis::sendAccelAndVelocity(double acceleration, double velocity)
{
  asynStatus status;
  int ival;
  // static const char *functionName = "MCB4B::sendAccelAndVelocity";

  // Send the velocity
  ival = NINT(velocity);
  if (ival < 2) ival=2;
  if (ival > 2147483647) ival = 2147483647;
  /*
     Does it right?  i delete "axisNo_" , because i have 1 axis only. 
   */
  sprintf(pC_->outString_, "SP=%d;", ival);
  status = pC_->writeReadController();

  // Send the acceleration
  // acceleration is in steps/sec/sec
  // MCB is programmed with Ramp Index (R) where:
  //   dval (steps/sec/sec) = 720,000/(256-R) */
  //   or R=256-(720,000/dval) */
  //ival = NINT(256-(720000./acceleration));
  ival = NINT(acceleration);
  if (ival < 1) ival=1;
  if (ival > 7000000) ival=7000000;
   /*
   * the same of axisNo_
   */
  sprintf(pC_->outString_, "AC[1]=%d", ival);
  status = pC_->writeReadController();
  return status;
}


asynStatus MCB4BAxis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration)
{
  asynStatus status;
  // static const char *functionName = "MCB4BAxis::move";

  status = sendAccelAndVelocity(acceleration, maxVelocity);

  if (relative) {
    /*  The same axisNo_
     *  sprintf(pC_->outString_, "#%02dI%+d", axisNo_, NINT(position)); 
     *  and i did not know how to put the axisNo_ and  %02d ?
     */
    sprintf(pC_->outString_, "PR=%d;", NINT(position));
    sprintf(pC_->outString_, "BG;");                                       //  i mean send "PR=111",then send "bg",does the format of word ok?
  } else {
    sprintf(pC_->outString_, "PA=%d;", NINT(position));
    sprintf(pC_->outString_, "BG;");
  }
  status = pC_->writeReadController();
  return status;
}

/*
 * would not use home ,so i did not change it. it would be right?
 */
asynStatus MCB4BAxis::home(double minVelocity, double maxVelocity, double acceleration, int forwards)
{
  asynStatus status;
  // static const char *functionName = "MCB4BAxis::home";

  status = sendAccelAndVelocity(acceleration, maxVelocity);

  if (forwards) {
    sprintf(pC_->outString_, "#%02dH+", axisNo_);
  } else {
    sprintf(pC_->outString_, "#%02dH-", axisNo_);
  }
  status = pC_->writeReadController();
  return status;
}
asynStatus MCB4BAxis::moveVelocity(double minVelocity, double maxVelocity, double acceleration)
{
  asynStatus status;
  static const char *functionName = "MCB4BAxis::moveVelocity";

  asynPrint(pasynUser_, ASYN_TRACE_FLOW,
    "%s: minVelocity=%f, maxVelocity=%f, acceleration=%f\n",
    functionName, minVelocity, maxVelocity, acceleration);

  status = sendAccelAndVelocity(acceleration, maxVelocity);

  /* MCB-4B does not have jog command. Move 1 million steps */
  if (maxVelocity > 0.) {
    /* This is a positive move in MCB4B coordinates */
    sprintf(pC_->outString_, "PR=5000;");
    sprintf(pC_->outString_, "BG;");
  } else {
      /* This is a negative move in MCB4B coordinates */
        /* this is the origin word, del axisNo_ same
         * this is the origin word:sprintf(pC_->outString_, "#%02dI-1000000", axisNo_);  
         */
      sprintf(pC_->outString_, "PR=-5000;");
      sprintf(pC_->outString_, "BG;");  // i intend send: PR1000; return; BG
  }
  status = pC_->writeReadController();
  return status;
}

asynStatus MCB4BAxis::stop(double acceleration )
{
  asynStatus status;
  //static const char *functionName = "MCB4BAxis::stop";

  /*
   * sprintf(pC_->outString_, "#%02dQ", axisNo_);
   */
  sprintf(pC_->outString_, "ST[1];");
  status = pC_->writeReadController();
  return status;
}
/*
 * no changing here, because i would not use it.
 */

asynStatus MCB4BAxis::setPosition(double position)
{
  asynStatus status;
  //static const char *functionName = "MCB4BAxis::setPosition";

  sprintf(pC_->outString_, "#%02dP=%+d", axisNo_, NINT(position));
  status = pC_->writeReadController();
  return status;
}

/*
 *  no changing, beacuse i would not use it.
 */
asynStatus MCB4BAxis::setClosedLoop(bool closedLoop)
{
  asynStatus status;
  //static const char *functionName = "MCB4BAxis::setClosedLoop";

  sprintf(pC_->outString_, "#%02dW=%d", axisNo_, closedLoop ? 1:0);
  status = pC_->writeReadController();
  return status;
}

/** 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 MCB4BAxis::poll(bool *moving)
{
  int done;
  int driveOn;
  int limit;
  double position;
  asynStatus comStatus;
  // Read the current motor position
  /*
   * sprintf(pC_->outString_, "#%02dP", axisNo_);  i delted the axisNo_,because now i have only one axis.
   */
  sprintf(pC_->outString_, "PX;");
  comStatus = pC_->writeReadController();
  if (comStatus) goto skip;
                                            // The response string is of the form "PX=10000 or PX=-33131"
  position = atof(&pC_->inString_[3]);
  setDoubleParam(pC_->motorPosition_, position);

  // Read the moving status of this motor
  sprintf(pC_->outString_, "ID;");
  comStatus = pC_->writeReadController();
  if (comStatus) goto skip;
/*
 * The response string is ID=0.002245 OR ID=-0.00434, and i need the float number
 * compare the float number with 0.009, bigger then 0.009,axis was moving, less than 0.009,axis was stop.
 * So I add float before pC_>inString_[3],does it right?
 */
  done = (float(pC_->inString_[3]) > 0.009) ? 1:0;  // i added the "float" before the pc_->inString
  setIntegerParam(pC_->motorStatusDone_, done);
  *moving = done ? false:true;

  // Read the limit status
  sprintf(pC_->outString_, "IP;");
  comStatus = pC_->writeReadController();
  if (comStatus) goto skip;
  // The response string is of the form "ip=65536"
  limit = (pC_->inString_[3] == '131138') ? 1:0;
  setIntegerParam(pC_->motorStatusHighLimit_, limit);
  limit = (pC_->inString_[6] == '65666') ? 1:0;
  setIntegerParam(pC_->motorStatusLowLimit_, limit);
  /*
   *  i comment out the home status, beacuse i did not use the home status, is it ok?
 
   *  origin word:  limit = (pC_->inString_[7] == '1') ? 1:0;
   *  origin word:  setIntegerParam(pC_->motorStatusAtHome_, limit);
   */

 // Read the drive power on status
  sprintf(pC_->outString_, "MO;");
  comStatus = pC_->writeReadController();
  if (comStatus) goto skip;
  // The response string is of the form "mo=1"
  driveOn = (pC_->inString_[3] == '1') ? 1:0;     //get "MO=1" mean motor disable;get "MO=0" mean motor enable;
  setIntegerParam(pC_->motorStatusPowerOn_, driveOn);
  setIntegerParam(pC_->motorStatusProblem_, 0);

  skip:
  setIntegerParam(pC_->motorStatusProblem_, comStatus ? 1:0);
  callParamCallbacks();
  return comStatus ? asynError : asynSuccess;
}

/** Code for iocsh registration */
static const iocshArg MCB4BCreateControllerArg0 = {"Port name", iocshArgString};
static const iocshArg MCB4BCreateControllerArg1 = {"MCB-4B port name", iocshArgString};
static const iocshArg MCB4BCreateControllerArg2 = {"Number of axes", iocshArgInt};
static const iocshArg MCB4BCreateControllerArg3 = {"Moving poll period (ms)", iocshArgInt};
static const iocshArg MCB4BCreateControllerArg4 = {"Idle poll period (ms)", iocshArgInt};
static const iocshArg * const MCB4BCreateControllerArgs[] = {&MCB4BCreateControllerArg0,
                                                             &MCB4BCreateControllerArg1,
                                                             &MCB4BCreateControllerArg2,
                                                             &MCB4BCreateControllerArg3,
                                                             &MCB4BCreateControllerArg4};
static const iocshFuncDef MCB4BCreateControllerDef = {"MCB4BCreateController", 5, MCB4BCreateControllerArgs};
static void MCB4BCreateContollerCallFunc(const iocshArgBuf *args)
{
  MCB4BCreateController(args[0].sval, args[1].sval, args[2].ival, args[3].ival, args[4].ival);
}

static void MCB4BRegister(void)
{
  iocshRegister(&MCB4BCreateControllerDef, MCB4BCreateContollerCallFunc);
}

extern "C" {
epicsExportRegistrar(MCB4BRegister);







********************** Output of st.cmd **************************************************
#errlogInit(5000)
< envPaths
epicsEnvSet("IOC","iocAcs")
epicsEnvSet("TOP","/opt/epics/motorAcs-master/iocs/acsIOC")
epicsEnvSet("SUPPORT","/opt/epics")
epicsEnvSet("MOTOR","/opt/epics/motor")
epicsEnvSet("ASYN","/opt/epics/asyn")
epicsEnvSet("EPICS_BASE","/opt/epics/base")
epicsEnvSet("SNCSEQ","/opt/epics/seq")
epicsEnvSet("MOTOR_ACS","/opt/epics/motorAcs-master/")
# Tell EPICS all about the record types, device-support modules, drivers, etc.
dbLoadDatabase("../../dbd/acs.dbd")
acs_registerRecordDeviceDriver(pdbbase)
# Port 2 on a Moxa
#drvAsynIPPortConfigure("serial1", "192.168.1.5:5001",0,0,0)
drvAsynIPPortConfigure("serial1", "192.168.1.5:5001 udp",10,,0,0,0)
#asynOctetSetInputEos("serial1",0,"\r\n")     //there is not par in UDP?
#asynOctetSetOutputEos("serial1",0,"\r\n")

    it need another word for udp here?
    such as  ControllerConfig(serial,0,0,0,0)  ?

asynSetTraceIOMask("serial1", 0, 0x2)
asynSetTraceMask("serial1", 0, 0xff)
MCB4BCreateController("MCB4B1", "serial1", 1, 100, 5000)
### Motors
dbLoadTemplate "motor.substitutions.mcb4b"
2023/05/23 21:48:46.620 serial1 asynManager::queueLockPort locking port
2023/05/23 21:48:46.620 serial1 asynManager::queueLockPort created queueLockPortPvt=0x7f5c04000dd0
2023/05/23 21:48:46.620 serial1 asynManager::queueLockPort created queueLockPortPvt=0x7f5c04000dd0, event=0x7f5c04000df0, mutex=0x7f5c04000e90
2023/05/23 21:48:46.620 serial1 asynManager::queueLockPort taking mutex 0x7f5c04000e90
2023/05/23 21:48:46.620 serial1 asynManager::queueLockPort queueing request
2023/05/23 21:48:46.620 serial1 addr -1 queueRequest priority 0 not lockHolder
2023/05/23 21:48:46.620 serial1 schedule queueRequest timeout in 2.000000 seconds
2023/05/23 21:48:46.620 serial1 asynManager::queueLockPort waiting for event
2023/05/23 21:48:46.620 asynManager::portThread port=serial1 callback
dbLoadRecords("/opt/epics/asyn/db/asynRecord.db","P=IOC:,R=serial1,PORT=serial1,ADDR=0,OMAX=80,IMAX=80") #  OMAX and IMAX mean?
2023/05/23 21:48:46.620 serial1 asynManager::queueLockPortCallback signaling begin event
2023/05/23 21:48:46.620 iocInit
serial1 asynManager::queueLockPortCallback waiting for mutex from queueUnlockPort
Starting iocInit
############################################################################
## EPICS R7.0.6.1
## Rev. 2022-07-23T08:14+0000
############################################################################
2023/05/23 21:48:46.620 serial1 asynManager::queueLockPort got event from callback
2023/05/23 21:48:46.620 serial1 flush
2023/05/23 21:48:46.620 192.168.1.5:5001 udp flush
2023/05/23 21:48:46.620 192.168.1.5:5001 udp write.
2023/05/23 21:48:46.620 192.168.1.5:5001 udp write 3
PX;
2023/05/23 21:48:46.620 wrote 3 to 192.168.1.5:5001 udp, return asynSuccess.
2023/05/23 21:48:46.620 asynOctetSyncIO wrote:
PX;
2023/05/23 21:48:46.620 192.168.1.5:5001 udp read.
2023/05/23 21:48:46.622 192.168.1.5:5001 udp (from 192.168.1.5:5001) read 9
PX;13763;
2023/05/23 21:48:46.622 serial1 read 9 bytes eom=0
PX;13763;
2023/05/23 21:48:46.622 192.168.1.5:5001 udp read.
2023/05/23 21:48:48.625 serial1 read from low-level driver returned 1
2023/05/23 21:48:48.625 serial1 queueUnlockPort
2023/05/23 21:48:48.625 serial1 asynManager::queueUnlockPort waiting for event
2023/05/23 21:48:48.625 serial1 queueUnlockPort unlock mutex 0x7f5c04000e90 complete.
2023/05/23 21:48:48.625 serial1 addr -1 queueRequest priority 3 not lockHolder
2023/05/23 21:48:48.625 serial1 schedule queueRequest timeout in 10.000000 seconds
2023/05/23 21:48:48.625 serial1 addr -1 queueRequest priority 0 not lockHolder
2023/05/23 21:48:48.625 serial1 schedule queueRequest timeout in 10.000000 seconds
2023/05/23 21:48:48.625 asynManager connect queueCallback port:serial1
2023/05/23 21:48:48.625 IOC:serial1: asynCallbackSpecial, type=1
2023/05/23 21:48:48.626 IOC:serial1: getOptionCallback() port=serial1, addr=0
2023/05/23 21:48:48.626 asynManager::portThread port=serial1 callback
2023/05/23 21:48:48.626 IOC:serial1: asynCallbackSpecial, type=3
2023/05/23 21:48:48.626 serial1 get Eos 0
2023/05/23 21:48:48.626 serial1 get Eos 0
2023/05/23 21:48:48.725 serial1 asynManager::queueLockPort locking port
2023/05/23 21:48:48.725 serial1 asynManager::queueLockPort taking mutex 0x7f5c04000e90
2023/05/23 21:48:48.725 serial1 asynManager::queueLockPort queueing request
2023/05/23 21:48:48.725 serial1 addr -1 queueRequest priority 0 not lockHolder
2023/05/23 21:48:48.725 serial1 schedule queueRequest timeout in 2.000000 seconds
2023/05/23 21:48:48.725 serial1 asynManager::queueLockPort waiting for event
2023/05/23 21:48:48.725 asynManager::portThread port=serial1 callback
2023/05/23 21:48:48.725 serial1 asynManager::queueLockPortCallback signaling begin event
2023/05/23 21:48:48.725 serial1 asynManager::queueLockPortCallback waiting for mutex from queueUnlockPort
2023/05/23 21:48:48.725 serial1 asynManager::queueLockPort got event from callback
2023/05/23 21:48:48.725 serial1 flush
2023/05/23 21:48:48.725 192.168.1.5:5001 udp flush
2023/05/23 21:48:48.725 192.168.1.5:5001 udp write.
2023/05/23 21:48:48.725 192.168.1.5:5001 udp write 3
PX;
2023/05/23 21:48:48.725 wrote 3 to 192.168.1.5:5001 udp, return asynSuccess.
2023/05/23 21:48:48.725 asynOctetSyncIO wrote:
PX;
2023/05/23 21:48:48.725 192.168.1.5:5001 udp read.
2023/05/23 21:48:48.727 192.168.1.5:5001 udp (from 192.168.1.5:5001) read 9
PX;13763;
2023/05/23 21:48:48.727 serial1 read 9 bytes eom=0
PX;13763;
2023/05/23 21:48:48.727 192.168.1.5:5001 udp read.
cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 37599,
cas warning: but now two or more servers share the same UDP port.
cas warning: Depending on your IP kernel this server may not be
cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete

epics> 2023/05/23 21:48:50.729 serial1 read from low-level driver returned 1
2023/05/23 21:48:50.729 serial1 queueUnlockPort
2023/05/23 21:48:50.729 serial1 asynManager::queueUnlockPort waiting for event
2023/05/23 21:48:50.729 serial1 queueUnlockPort unlock mutex 0x7f5c04000e90 complete.
2023/05/23 21:48:50.829 serial1 asynManager::queueLockPort locking port
2023/05/23 21:48:50.829 serial1 asynManager::queueLockPort taking mutex 0x7f5c04000e90
2023/05/23 21:48:50.829 serial1 asynManager::queueLockPort queueing request
2023/05/23 21:48:50.829 serial1 addr -1 queueRequest priority 0 not lockHolder
2023/05/23 21:48:50.829 serial1 schedule queueRequest timeout in 2.000000 seconds
2023/05/23 21:48:50.829 serial1 asynManager::queueLockPort waiting for event
2023/05/23 21:48:50.829 asynManager::portThread port=serial1 callback
2023/05/23 21:48:50.829 serial1 asynManager::queueLockPortCallback signaling begin event
2023/05/23 21:48:50.829 serial1 asynManager::queueLockPortCallback waiting for mutex from queueUnlockPort
2023/05/23 21:48:50.829 serial1 asynManager::queueLockPort got event from callback
2023/05/23 21:48:50.829 serial1 flush
2023/05/23 21:48:50.829 192.168.1.5:5001 udp flush
2023/05/23 21:48:50.829 192.168.1.5:5001 udp write.
2023/05/23 21:48:50.829 192.168.1.5:5001 udp write 3
PX;
2023/05/23 21:48:50.829 wrote 3 to 192.168.1.5:5001 udp, return asynSuccess.
2023/05/23 21:48:50.829 asynOctetSyncIO wrote:
PX;
2023/05/23 21:48:50.829 192.168.1.5:5001 udp read.
2023/05/23 21:48:50.831 192.168.1.5:5001 udp (from 192.168.1.5:5001) read 9
PX;13763;
2023/05/23 21:48:50.831 serial1 read 9 bytes eom=0
PX;13763;
2023/05/23 21:48:50.831 192.168.1.5:5001 udp read.
2023/05/23 21:48:52.833 serial1 read from low-level driver returned 1
2023/05/23 21:48:52.833 serial1 queueUnlockPort
2023/05/23 21:48:52.833 serial1 asynManager::queueUnlockPort waiting for event
2023/05/23 21:48:52.833 serial1 queueUnlockPort unlock mutex 0x7f5c04000e90 complete.
2023/05/23 21:48:52.933 serial1 asynManager::queueLockPort locking port
2023/05/23 21:48:52.933 serial1 asynManager::queueLockPort taking mutex 0x7f5c04000e90
2023/05/23 21:48:52.933 serial1 asynManager::queueLockPort queueing request
2023/05/23 21:48:52.933 serial1 addr -1 queueRequest priority 0 not lockHolder
2023/05/23 21:48:52.933 serial1 schedule queueRequest timeout in 2.000000 seconds
2023/05/23 21:48:52.933 serial1 asynManager::queueLockPort waiting for event
2023/05/23 21:48:52.933 asynManager::portThread port=serial1 callback
2023/05/23 21:48:52.933 serial1 asynManager::queueLockPortCallback signaling begin event
2023/05/23 21:48:52.933 serial1 asynManager::queueLockPortCallback waiting for mutex from queueUnlockPort
2023/05/23 21:48:52.933 serial1 asynManager::queueLockPort got event from callback
2023/05/23 21:48:52.933 serial1 flush
2023/05/23 21:48:52.933 192.168.1.5:5001 udp flush
2023/05/23 21:48:52.933 192.168.1.5:5001 udp write.
2023/05/23 21:48:52.933 192.168.1.5:5001 udp write 3
PX;
2023/05/23 21:48:52.933 wrote 3 to 192.168.1.5:5001 udp, return asynSuccess.
2023/05/23 21:48:52.933 asynOctetSyncIO wrote:
PX;
2023/05/23 21:48:52.933 192.168.1.5:5001 udp read.
2023/05/23 21:48:52.935 192.168.1.5:5001 udp (from 192.168.1.5:5001) read 9
PX;13763;
2023/05/23 21:48:52.935 serial1 read 9 bytes eom=0
PX;13763;
2023/05/23 21:48:52.935 192.168.1.5:5001 udp read.
2023/05/23 21:48:54.937 serial1 read from low-level driver returned 1
2023/05/23 21:48:54.937 serial1 queueUnlockPort
2023/05/23 21:48:54.937 serial1 asynManager::queueUnlockPort waiting for event
2023/05/23 21:48:54.937 serial1 queueUnlockPort unlock mutex 0x7f5c04000e90 complete.
2023/05/23 21:48:55.037 serial1 asynManager::queueLockPort locking port
2023/05/23 21:48:55.037 serial1 asynManager::queueLockPort taking mutex 0x7f5c04000e90
2023/05/23 21:48:55.037 serial1 asynManager::queueLockPort queueing request
2023/05/23 21:48:55.037 serial1 addr -1 queueRequest priority 0 not lockHolder
2023/05/23 21:48:55.037 serial1 schedule queueRequest timeout in 2.000000 seconds
2023/05/23 21:48:55.037 serial1 asynManager::queueLockPort waiting for event
2023/05/23 21:48:55.037 asynManager::portThread port=serial1 callback
2023/05/23 21:48:55.037 serial1 asynManager::queueLockPortCallback signaling begin event
2023/05/23 21:48:55.037 serial1 asynManager::queueLockPortCallback waiting for mutex from queueUnlockPort
2023/05/23 21:48:55.037 serial1 asynManager::queueLockPort got event from callback
2023/05/23 21:48:55.037 serial1 flush
2023/05/23 21:48:55.037 192.168.1.5:5001 udp flush
2023/05/23 21:48:55.037 192.168.1.5:5001 udp write.
2023/05/23 21:48:55.037 192.168.1.5:5001 udp write 3
PX;
2023/05/23 21:48:55.037 wrote 3 to 192.168.1.5:5001 udp, return asynSuccess.
2023/05/23 21:48:55.037 asynOctetSyncIO wrote:
PX;
2023/05/23 21:48:55.037 192.168.1.5:5001 udp read.
2023/05/23 21:48:55.039 192.168.1.5:5001 udp (from 192.168.1.5:5001) read 9
PX;13763;
2023/05/23 21:48:55.039 serial1 read 9 bytes eom=0
PX;13763;






在 2023-05-23 02:35:04,"Mark Rivers" <rivers at cars.uchicago.edu> 写道:

  •   Then i modified the motorAcs file as i need.
  •   Now, there is not bin file after i make it.

 

The bin file is created in the motorAcs/iocs/acsIOC/acsApp/src directory.  The iocs/ directory does not get built by default.  You can cd to the iocs/ directory and run “make” and it will be built.

 

Mark

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of lynn via Tech-talk
Sent: Monday, May 22, 2023 10:14 AM
To: tech-talk <tech-talk at aps.anl.gov>
Subject: no bin file

 

Hi all,

    Recently, i try to modify the dirver of motorAcs.

    All environment about epics,motor,asyn was good and run well.

   

    I downloaded motorAcs file from https://github.com/epics-motor/motorAcs.

    Then i modified the motorAcs file as i need.

    Now, there is not bin file after i make it.

    Could someone tell me how to make the bin file came out? Because i just know type: ../../bin/ st.cmd to start it.

 

Regards,

Lynn

 

 

 

 

 

--

Image removed by sender.

lynn

邮箱:lynn0703 at yeah.net

 


References:
no bin file lynn via Tech-talk
RE: no bin file Mark Rivers via Tech-talk
Re:RE: no bin file lynn via Tech-talk

Navigate by Date:
Prev: Re: some motor driver 3 questions Mark Rivers via Tech-talk
Next: Re: makefile question about HDEPENDS Andrew Johnson via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re:RE: no bin file lynn via Tech-talk
Next: PVA Gateway Logging Problem Murray, Doug via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 26 May 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·