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  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: module for Keithley 6485 PA-meter
From: Márcio Paduan Donadio <[email protected]>
To: Paramveer Jain <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 15 Nov 2016 19:42:48 +0000

Hello, Paramveer.


First of all, I saw that your st.cmd file has duplicated code. After epicsEnvSet("P","$(P=K6485:)") you are repeating the initial code twice again.


The first time you called st.cmd you forgot to define the SCAN macro. But I think you corrected it because it did not complain at the second time.


Another problem is that your IOC couldn't find the file db/asynRecord.db. Check to see if it is in the K6485App/Db directory (or something near this name). If it is the case, you need to modify the Makefile file inside this folder (the Db with capital D), inserting asynRecord.db in the list of files that need to be installed.


The last problem, as I could understand, is that you defined parameters for some types of record in the C code, but you used different record types in the db file. For example:


record(bo, "$(BL)$(P)$(R)Autozero") {
  field(DESC, "Disable/Enable Auto zero")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @11")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(FLNK, "$(BL)$(P)$(R)AutozeroRBV")
}

/* 11: autoZero: */
{
&DSET_MBBO,GPIBEFASTO,IB_Q_HIGH,NULL,NULL,MAX_RSP,MAX_MSG,NULL,0,0,autoZero,&autoZeroNames,NULL
},

Autozero is a BO record, but the dataset inside the C code is defined as MBBO. I'm guessing that, if you tie things correctly those error messages will go away.


It is also a good idea to check Mark Rivers comment on how to use Stream Device in EPICS IOCs.


Best Regards,


Márcio Paduan Donadio.


De: Paramveer Jain <[email protected]>
Enviado: terça-feira, 15 de novembro de 2016 08:47:08
Para: Márcio Paduan Donadio
Cc: [email protected]
Assunto: Re: module for Keithley 6485 PA-meter
 
hello sir,
          I need your urgent help
 I designed an IOC for Keithley 6485 using asyn with following database
#! Generated by VisualDCT v2.6
#! DBDSTART
#! DBDEND


# ###################################################################
# Copyright (c) 2011 Lawrence Berkeley National Laboratory, Accelerator
# Technology Group, Engineering Division
# This code is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
# #######################################################################
# Basic SCPI (IEEE488.2) commands
record(stringin, "$(BL)$(P)$(R)IDN") {
  field(DESC, "SCPI identification string")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @0")
  field(PINI, "NO")
}

record(bo, "$(BL)$(P)$(R)RST") {
  field(DESC, "SCPI Reset")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @1")
}

record(bo, "$(BL)$(P)$(R)CLS") {
  field(DESC, "SCPI Clear status")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @2")
}

record(longin, "$(BL)$(P)$(R)GetSTB") {
  field(DESC, "SCPI get status byte")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @3")
}

record(longin, "$(BL)$(P)$(R)GetESR") {
  field(DESC, "SCPI get event status")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @4")
}

record(longout, "$(BL)$(P)$(R)SetESE") {
  field(DESC, "SCPI enable event status")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @5")
}

record(longin, "$(BL)$(P)$(R)GetESE") {
  field(DESC, "SCPI enabled event status")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @6")
}

record(longout, "$(BL)$(P)$(R)SetSRE") {
  field(DESC, "SCPI enable service requests")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @7")
}

record(longin, "$(BL)$(P)$(R)GetSRE") {
  field(DESC, "Enabled service requests")

  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @8")
}

record(longin, "$(BL)$(P)$(R)GetOPC") {
  field(DESC, "Output completion status")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @9")
}

# Reading
record(ai, "$(BL)$(P)$(R)Measure") {
  field(DESC, "Measure current")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @14")
  field(EGU, "Amp")
  field(PREC, "5")
  field(SCAN, "$(SCAN)")
}

#### record(waveform, "$(BL)$(P)$(R)FetchWF")
#{
#   field(DESC, "Fetch buffered data")
#   field(DTYP, "K6485")
#   field(INP,  "L$(L) A$(A) @7")
#   field(EGU,  "A")
#   field(PREC, "5")
#   field(FTVL, "FLOAT")
#   field(NELM, "$(NELM=1000)")
#}
#
# Zero-check
#
record(bo, "$(BL)$(P)$(R)ZeroCheck") {
  field(DESC, "Disable/Enable zero check (input clamp)")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @12")
  field(ZNAM, "Off")
  field(ONAM, "On")
#field(PROC, "0")
  field(FLNK, "$(BL)$(P)$(R)ZeroCheckRBV")
}

record(bi, "$(BL)$(P)$(R)ZeroCheckRBV") {
  field(DESC, "Disable/Enable zero check (input clamp)")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @12")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(PINI, "YES")
}

record(bo, "$(BL)$(P)$(R)Autozero") {
  field(DESC, "Disable/Enable Auto zero")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @11")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(FLNK, "$(BL)$(P)$(R)AutozeroRBV")
}

record(bi, "$(BL)$(P)$(R)AutozeroRBV") {
  field(DESC, "Disable/Enable Autozero")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @11")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(PINI, "YES")
}

record(bo, "$(BL)$(P)$(R)Zerocorrect") {
  field(DESC, "Disable/Enable Zero correct")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @13")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(FLNK, "$(BL)$(P)$(R)ZerocorrectRBV")
}

record(bi, "$(BL)$(P)$(R)ZerocorrectRBV") {
  field(DESC, "Disable/enable Zerocurrect")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @13")
  field(ZNAM, "off")
  field(ONAM, "on")
}

########Range#######
record(mbbo, "$(BL)$(P)$(R)Range") {
  field(DESC, "Full-scale range")
  field(DTYP, "K6485")
  field(OUT, "#L$(L) A$(A) @10")
  field(ZRVL, "9")
  field(ZRST, "2 nA")
  field(ONVL, "8")
  field(ONST, "20 nA")
  field(TWVL, "7")
  field(TWST, "200 nA")
  field(THVL, "6")
  field(THST, "2 uA")
  field(FRVL, "5")
  field(FRST, "20 uA")
  field(FVVL, "4")
  field(FVST, "200 uA")
  field(SXVL, "3")
  field(SXST, "2 mA")
  field(SVVL, "2")
  field(SVST, "20 mA")
  field(FLNK, "$(BL)$(P)$(R)RangeRBV")
}

record(mbbi, "$(BL)$(P)$(R)RangeRBV") {
  field(DESC, "Full-scale range readback")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @10")
  field(ZRVL, "9")
  field(ZRST, "2 nA")
  field(ONVL, "8")
  field(ONST, "20 nA")
  field(TWVL, "7")
  field(TWST, "200 nA")
  field(THVL, "6")
  field(THST, "2 uA")
  field(FRVL, "5")
  field(FRST, "20 uA")
  field(FVVL, "4")
  field(FVST, "200 uA")
  field(SXVL, "3")
  field(SXST, "2 mA")
  field(SVVL, "2")
  field(SVST, "20 mA")
  field(PINI, "YES")
}

record(bo, "$(BL)$(P)$(R)Display") {
  field(DESC, "disable /enable display")
  field(DTYP, "K6485")
  field(FLNK, "$(BL)$(P)$(R)DisplayRBV")
  field(OUT, "#L$(L) A$(A) @15")
  field(ZNAM, "off")
  field(ONAM, "off")
}

record(bi, "$(BL)$(P)$(R)DisplayRBV") {
  field(DESC, "Disable/enable display")
  field(PINI, "YES")
  field(DTYP, "K6485")
  field(INP, "#L$(L) A$(A) @15")
  field(ZNAM, "off")
  field(ONAM, "on")
}




and .c file for device support is 

 /*
 * K6485 device support
 */

#include <epicsStdio.h>
#include <devCommonGpib.h>

/******************************************************************************
 *
 * The following define statements are used to declare the names to be used
 * for the dset tables.   
 *
 * A DSET_AI entry must be declared here and referenced in an application
 * database description file even if the device provides no AI records.
 *
 ******************************************************************************/
#define DSET_AI     devAiK6485
#define DSET_AO     devAoK6485
#define DSET_BI     devBiK6485
#define DSET_BO     devBoK6485
#define DSET_EV     devEvK6485
#define DSET_LI     devLiK6485
#define DSET_LO     devLoK6485
#define DSET_MBBI   devMbbiK6485
#define DSET_MBBID  devMbbidK6485 
#define DSET_MBBO   devMbboK6485
#define DSET_MBBOD  devMbbodK6485
#define DSET_SI     devSiK6485
#define DSET_SO     devSoK6485
#define DSET_WF     devWfK6485

#include <devGpib.h>
#include <alarm.h>
#include <recGbl.h>
#include <cvtTable.h>
#include <string.h>
#include <dbEvent.h>
#include <caeventmask.h>
#include <menuConvert.h> /* must be included after DSET defines */

#define TIMEOUT     .5    /* I/O must complete within this time (.5 second)*/
#define TIMEWINDOW  .5   /* Wait this long after device timeout */

int aiK6485Convert(struct gpibDpvt *pdpvt,int p1,int p2,char **p3);
/******************************************************************************
 * Strings used by the init routines to fill in the znam,onam,...
 * fields in BI and BO record types.
 ******************************************************************************/

/*static char  *offOnList[] = { "Off","On" };
static struct devGpibNames   offOn = { 2,offOnList,0,1 };
*
static char  *initNamesList[] = { "Init","Init" };
static struct devGpibNames initNames = { 2,initNamesList,0,1 };

static char  *disableEnableList[] = { "Disable","Enable" };
static struct devGpibNames disableEnable = { 2,disableEnableList,0,1 };

static char  *resetList[] = { "Reset","Reset" };
static struct devGpibNames reset = { 2,resetList,0,1 };

static char  *lozHizList[] = { "50 OHM","IB_Q_HIGH Z" };
static struct devGpibNames lozHiz = {2,lozHizList,0,1};

static char  *invertNormList[] = { "INVERT","NORM" };
static struct devGpibNames invertNorm = { 2,invertNormList,0,1 };

static char  *fallingRisingList[] = { "FALLING","RISING" };
static struct devGpibNames fallingRising = { 2,fallingRisingList,0,1 };

static char  *clearList[] = { "Clear","Clear" };
static struct devGpibNames clear = { 2,clearList,0,1 }; */
static char  *resetList[] = { "Reset","Reset" };
static struct devGpibNames reset = { 2,resetList,0,1 };

static char  *clearList[] = { "Clear","Clear" };
static struct devGpibNames clear = { 2,clearList,0,1 };

static char *currList[] =
{
    "Auto On","2 nA","20 nA","200 nA","2 uA","20 uA","200 uA","2 mA","20 mA","Auto Off"
};
static unsigned long currVal[] = {0,1,2,3,4,5,6,7,8,9};
static struct devGpibNames currNames = 
{
10,currList,currVal,4
};
static char *autoZeroList[] =
{
    "autoZero Off","autoZero On"
};
static unsigned long autoZeroVal[] = {0,1};
static struct devGpibNames autoZeroNames = 
{
2,autoZeroList,autoZeroVal,1
};

static char *zCheckList[] =
{
"zCheckOff","zCheckOn"
};
static unsigned long zCheckVal[] = {0,1};
static struct devGpibNames zCheckNames = 
{
2,zCheckList,zCheckVal,1
};
static char *zCorrList[] =
{
"zCorrOff","zCorrOn"
};
static unsigned long zCorrVal[] = {0,1};
static struct devGpibNames zCorrNames = 
{
2,zCorrList,zCorrVal,1
};
static char *displayList[] =
{
    "Display Off","Display On"
};
static unsigned long displayVal[] = {0,1};
static struct devGpibNames displayNames = 
{
2,displayList,displayVal,1
};

/******************************************************************************
 *
 * Name tables for BO / MBBO GPIBEFASTO
 *
 ******************************************************************************/

static char *(rangeCurr[]) = { ":CURR:RANG:AUTO ON",":CURR:RANG 2e-9",":CURR:RANG 20e-9",":CURR:RANG 200e-9",":CURR:RANG 2e-6",":CURR:RANG 20e-6",":CURR:RANG 200e-6",":CURR:RANG 2e-3",":CURR:RANG 20e-3",":CURR:RANG:AUTO OFF", NULL};
static char *(autoZero[]) = { ":SYST:AZER:STAT 0",":SYST:AZER:STAT 1",NULL};

static char *(display[]) = { ":DISP:ENAB 0",":DISP:ENAB 1",NULL};
#define MAX_RSP 0
#define MAX_MSG 45
/*static char trigCmd[30] = ":READ?";*/

/******************************************************************************
 * Array of structures that define all GPIB messages
 * supported for this type of instrument.
 ******************************************************************************/

static struct gpibCmd gpibCmds[] = {
/* Param 0 -- Read SCPI identification string */
    {&DSET_SI, GPIBREAD, IB_Q_HIGH, "*IDN?", "%39[^\r\n]", 
         0, 200, NULL, 0, 0, NULL, NULL, NULL},

    /* Param 1 - SCPI reset command */
    {&DSET_BO, GPIBCMD, IB_Q_HIGH, "*RST", NULL, 
         0, 80, NULL, 0, 0, NULL, &reset, NULL},

    /* Param 2 - SCPI clear status command */
    {&DSET_BO, GPIBCMD, IB_Q_HIGH, "*CLS", NULL, 
         0, 80, NULL, 0, 0, NULL, &clear, NULL},

    /* Param 3 - Read SCPI status byte */
    {&DSET_LI, GPIBREAD, IB_Q_HIGH, "*STB?", "%d", 
         0, 80, NULL, 0, 0, NULL, NULL, NULL},

    /* Param 4 - Read SCPI event register */
    {&DSET_LI, GPIBREAD, IB_Q_HIGH, "*ESR?", "%d", 
         0, 80, NULL, 0, 0, NULL, NULL, NULL},

    /* Param 5 - Enable SCPI events */
    {&DSET_LO, GPIBWRITE, IB_Q_HIGH, NULL, "*ESE %d", 
         0, 80, NULL, 0, 0, NULL, NULL, NULL},

    /* Param 6 - Read back SCPI enabled events */
    {&DSET_LI, GPIBREAD, IB_Q_HIGH, "*ESE?", "%d", 
         0, 80, NULL, 0, 0, NULL, NULL, NULL},

    /* Param 7 - Enable SCPI service request sources */
    {&DSET_LO, GPIBWRITE, IB_Q_HIGH, NULL, "*SRE %d", 
         0, 80, NULL, 0, 0, NULL, NULL, NULL},

    /* Param 8 - Read back SCPI enabled service request sources */
    {&DSET_LI, GPIBREAD, IB_Q_HIGH, "*SRE?", "%d", 
         0, 80, NULL, 0, 0, NULL, NULL, NULL},

    /* Param 9 - Read SCPI output completion status */
    {&DSET_LI, GPIBREAD, IB_Q_HIGH, "*OPC?", "%d", 
         0, 80, NULL, 0, 0, NULL, NULL, 0},

/* 10: rangeCurr */
{
&DSET_MBBO,GPIBEFASTO,IB_Q_HIGH,NULL,NULL,MAX_RSP,MAX_MSG,NULL,0,0,rangeCurr,&currNames,NULL
},
/* 11: autoZero: */
{
&DSET_MBBO,GPIBEFASTO,IB_Q_HIGH,NULL,NULL,MAX_RSP,MAX_MSG,NULL,0,0,autoZero,&autoZeroNames,NULL
},
/* 12: zero check */
{
&DSET_BO,GPIBWRITE,IB_Q_HIGH,NULL,":SYST:ZCH %d",MAX_RSP,MAX_MSG,NULL,0,0,NULL,&zCheckNames,NULL
},
/* 13: zero correct */
{
&DSET_BO,GPIBWRITE,IB_Q_HIGH,NULL,":SYST:ZCOR %d",MAX_RSP,MAX_MSG,NULL,0,0,NULL,&zCorrNames,NULL
},
/* 14: read (raw) value */
{
&DSET_AI,GPIBREAD,IB_Q_HIGH,"READ?","%lf",MAX_RSP,MAX_MSG,NULL,0,0,NULL,NULL,0
},
/* 15: display: */
{
&DSET_MBBO,GPIBEFASTO,IB_Q_HIGH,NULL,NULL,MAX_RSP,MAX_MSG,NULL,0,0,display,&displayNames,NULL
},
};
/* The following is the number of elements in the command array above.  */
#define NUMPARAMS sizeof(gpibCmds)/sizeof(struct gpibCmd)

/******************************************************************************
 * Initialize device support parameters
 *
 *****************************************************************************/
static long init_ai(int parm)
{
    if(parm==0) {
        devSupParms.name = "devK6485";
        devSupParms.gpibCmds = gpibCmds;
        devSupParms.numparams = NUMPARAMS;
        devSupParms.timeout = TIMEOUT;
        devSupParms.timeWindow = TIMEWINDOW;
        devSupParms.respond2Writes = -1;
    }
    return(0);
}


and st.cmd as follows

#!../../bin/linux-x86_64/K6485

## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("BL","$(BL=bl21:)")
epicsEnvSet("P","$(P=K6485:)")
< envPaths
##############################################################################
cd "${TOP}"

## Register all support components
#dbLoadDatabase "dbd/devK6485.dbd"
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
###############################################################################
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetOption("L0", 19, "baud", "9600")
asynSetOption("L0", 19, "bits", "8")
asynSetOption("L0", 19, "parity", "none")
asynSetOption("L0", 19, "stop", "1")
asynSetOption("L0", 19, "crtscts", "N")
###################################################################
#asynSetTraceFile("L0",19,"")
#asynSetTraceMask("L0",19,0x09)
#asynSetTraceIOMask("L0",19,0x2)

###############################################################################
## Load record instances#!../../bin/linux-x86_64/K6485

## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("BL","$(BL=bl21:)")
epicsEnvSet("P","$(P=K6485:)")
< envPaths
##############################################################################
cd "${TOP}"

## Register all support components
#dbLoadDatabase "dbd/devK6485.dbd"
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
###############################################################################
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetOption("L0", 19, "baud", "9600")#!../../bin/linux-x86_64/K6485

## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("BL","$(BL=bl21:)")
epicsEnvSet("P","$(P=K6485:)")
< envPaths
##############################################################################
cd "${TOP}"

## Register all support components
#dbLoadDatabase "dbd/devK6485.dbd"
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
###############################################################################
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetOption("L0", 19, "baud", "9600")
asynSetOption("L0", 19, "bits", "8")
asynSetOption("L0", 19, "parity", "none")
asynSetOption("L0", 19, "stop", "1")
asynSetOption("L0", 19, "crtscts", "N")
###################################################################
#asynSetTraceFile("L0",19,"")
#asynSetTraceMask("L0",19,0x09)
#asynSetTraceIOMask("L0",19,0x2)

###############################################################################
## Load record instances
asynSetOption("L0", 19, "bits", "8")
asynSetOption("L0", 19, "parity", "none")
asynSetOption("L0", 19, "stop", "1")
asynSetOption("L0", 19, "crtscts", "N")
###################################################################
#asynSetTraceFile("L0",19,"")
#asynSetTraceMask("L0",19,0x09)
#asynSetTraceIOMask("L0",19,0x2)

###############################################################################
## Load record instances
dbLoadRecords("db/devK6485.db","BL=$(BL),P=$(P),R=1,L=0,A=-1,NELM=1000,SCAN= 5 second")
dbLoadRecords ("db/asynRecord.db","P=$(P),R=asyn,PORT=L0,ADDR=19,OMAX=0,IMAX=0")
cd "${TOP}/iocBoot/${IOC}"
iocInit
asynSetTraceMask("L0",19,0x09)
## Start any sequence programs
#seq sncxxx,"user=pxbl21-1Host"





running the IOC following is the output



#!../../bin/linux-x86_64/K6485
## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("BL","bl21:")
epicsEnvSet("P","K6485:")
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocK6485")
epicsEnvSet("TOP","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("K6485","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("ASYN","/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/asyn-4-18")
epicsEnvSet("EPICS_BASE","/home/pxbl21-1/programs/epics/base-3.14.12.5")
##############################################################################
cd "/home/pxbl21-1/programs/epics/bl21/K6485"
## Register all support components
#dbLoadDatabase "dbd/devK6485.dbd"
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
###############################################################################
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetOption("L0", 19, "baud", "9600")
asynSetOption("L0", 19, "bits", "8")
asynSetOption("L0", 19, "parity", "none")running the IOC following is the output
#!../../bin/linux-x86_64/K6485
## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("BL","bl21:")
epicsEnvSet("P","K6485:")
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocK6485")
epicsEnvSet("TOP","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("K6485","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("ASYN","/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/asyn-4-18")
epicsEnvSet("EPICS_BASE","/home/pxbl21-1/programs/epics/base-3.14.12.5")
##############################################################################
cd "/home/pxbl21-1/programs/epics/bl21/K6485"
## Register all support components
#dbLoadDatabase "dbd/devK6485.dbd"
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
###############################################################################
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetOption("L0", 19, "baud", "9600")
asynSetOption("L0", 19, "bits", "8")
asynSetOption("L0", 19, "parity", "none")
asynSetOption("L0", 19, "stop", "1")
asynSetOption("L0", 19, "crtscts", "N")
###################################################################
#asynSetTraceFile("L0",19,"")
#asynSetTraceMask("L0",19,0x09)
#asynSetTraceIOMask("L0",19,0x2)
###############################################################################
## Load record instances
dbLoadRecords("db/devK6485.db","BL=bl21:,P=K6485:,R=1,L=0,A=-1,NELM=1000")
macLib: macro SCAN is undefined (expanding string   field(SCAN, "$(SCAN)")
)
filename="../dbLexRoutines.c" line number=321
macExpandString failed for file db/devK6485.db
bl21:K6485:1Measure.SCAN Has unexpanded macro
Can't set "bl21:K6485:1Measure.SCAN" to "$(SCAN,undefined)"
Error at or before ")" in file "db/devK6485.db" line 82
dbLoadRecords ("db/asynRecord.db","P=K6485:,R=asyn,PORT=L0,ADDR=19,OMAX=0,IMAX=0")
filename="../dbLexRoutines.c" line number=240running the IOC following is the output
#!../../bin/linux-x86_64/K6485
## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("BL","bl21:")
epicsEnvSet("P","K6485:")
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocK6485")
epicsEnvSet("TOP","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("K6485","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("ASYN","/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/asyn-4-18")
epicsEnvSet("EPICS_BASE","/home/pxbl21-1/programs/epics/base-3.14.12.5")
##############################################################################
cd "/home/pxbl21-1/programs/epics/bl21/K6485"
## Register all support components
#dbLoadDatabase "dbd/devK6485.dbd"
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
###############################################################################
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetOption("L0", 19, "baud", "9600")
asynSetOption("L0", 19, "bits", "8")
asynSetOption("L0", 19, "parity", "none")
No such file or directory dbRead opening file db/asynRecord.db
cd "/home/pxbl21-1/programs/epics/bl21/K6485/iocBoot/iocK6485"
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built Sep 15 2016
############################################################################
bl21:K6485:1AutozeroRBV : init_record : record type invalid for spec'd GPIB param#11
bl21:K6485:1DisplayRBV : init_record : record type invalid for spec'd GPIB param#15
bl21:K6485:1ZeroCheckRBV : init_record : record type invalid for spec'd GPIB param#12
bl21:K6485:1ZerocorrectRBV : init_record : record type invalid for spec'd GPIB param#13
bl21:K6485:1Autozero : init_record : record type invalid for spec'd GPIB param#11
bl21:K6485:1Display : init_record : record type invalid for spec'd GPIB param#15
bl21:K6485:1RangeRBV : init_record : record type invalid for spec'd GPIB param#10
iocRun: All initialization complete
asynSetTraceMask("L0",19,0x09)
## Start any sequence programs
#seq sncxxx,"user=pxbl21-1Host"
epics> ^C
pxbl21-1@linux-edqv:~/programs/epics/bl21/K6485/iocBoot/iocK6485> ../../bin/linux-x86_64/K6485 st.cmd 
#!../../bin/linux-x86_64/K6485
## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("BL","bl21:")
epicsEnvSet("P","K6485:")
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocK6485")
epicsEnvSet("TOP","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("K6485","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("ASYN","/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/asyn-4-18")
epicsEnvSet("EPICS_BASE","/home/pxbl21-1/programs/epics/base-3.14.12.5")
##############################################################################
cd "/home/pxbl21-1/programs/epics/bl21/K6485"
## Register all support components
#dbLoadDatabase "dbd/devK6485.dbd"
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
###############################################################################
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetOption("L0", 19, "baud", "9600")
asynSetOption("L0", 19, "bits", "8")
asynSetOption("L0", 19, "parity", "none")
asynSetOption("L0", 19, "stop", "1")
asynSetOption("L0", 19, "crtscts", "N")
###################################################################
#asynSetTraceFile("L0",19,"")
#asynSetTraceMask("L0",19,0x09)
#asynSetTraceIOMask("L0",19,0x2)
###############################################################################
## Load record instances
dbLoadRecords("db/devK6485.db","BL=bl21:,P=K6485:,R=1,L=0,A=-1,NELM=1000,SCAN= 5 second")
dbLoadRecords ("db/asynRecord.db","P=K6485:,R=asyn,PORT=L0,ADDR=19,OMAX=0,IMAX=0")
filename="../dbLexRoutines.c" line number=240
No such file or directory dbRead opening file db/asynRecord.db
cd "/home/pxbl21-1/programs/epics/bl21/K6485/iocBoot/iocK6485"
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built Sep 15 2016
############################################################################
bl21:K6485:1AutozeroRBV : init_record : record type invalid for spec'd GPIB param#11
bl21:K6485:1DisplayRBV : init_record : record type invalid for spec'd GPIB param#15
bl21:K6485:1ZeroCheckRBV : init_record : record type invalid for spec'd GPIB param#12
bl21:K6485:1ZerocorrectRBV : init_record : record type invalid for spec'd GPIB param#13
bl21:K6485:1Autozero : init_record : record type invalid for spec'd GPIB param#11
bl21:K6485:1Display : init_record : record type invalid for spec'd GPIB param#15
bl21:K6485:1RangeRBV : init_record : record type invalid for spec'd GPIB param#10
iocRun: All initialization complete
asynSetTraceMask("L0",19,0x09)
## Start any sequence programs
#seq sncxxx,"user=pxbl21-1Host"
epics> 2016/11/15 15:34:53.845 /dev/ttyUSB0 write 6
2016/11/15 15:34:54.443 bl21:K6485:1Measure read status "" nin 0
2016/11/15 15:34:54.443 bl21:K6485:1Measure error.
2016/11/15 15:34:58.845 /dev/ttyUSB0 write 6
2016/11/15 15:34:59.443 bl21:K6485:1Measure read status "" nin 0
2016/11/15 15:34:59.443 bl21:K6485:1Measure error.
2016/11/15 15:35:03.845 /dev/ttyUSB0 write 6
2016/11/15 15:35:04.443 bl21:K6485:1Measure read status "" nin 0
2016/11/15 15:35:04.443 bl21:K6485:1Measure error.



i followed all the steps as given in  "howtodoserial/tutorial.html"

I am unable to get the solution for above errors please help me to get it solved.
thank you  very much in advance

2016-09-23 1:47 GMT+05:30 Márcio Paduan Donadio <[email protected]>:

         Hello, Paramveer.

     Here in LNLS we have a module for Keithley 6485, too.

     Best regards,

--
Márcio Paduan Donadio
Engenheiro de Computação - Software de Operação das Linhas de Luz
Laboratório Nacional de Luz Síncrotron – (LNLS)
Centro Nacional de Pesquisa em Energia e Materiais (CNPEM)
+ 55 (19) 3512-3520 - [email protected]
www.lnls.cnpem.br




--
With Regards,

Paramveer Jain

Replies:
RE: module for Keithley 6485 PA-meter Mark Rivers
References:
Re: module for Keithley 6485 PA-meter Márcio Paduan Donadio
Re: module for Keithley 6485 PA-meter Paramveer Jain

Navigate by Date:
Prev: RE: IOC for keithley 6485 using asyn Mark Rivers
Next: Re: OS X edm/medm openmotif woes J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: module for Keithley 6485 PA-meter Paramveer Jain
Next: RE: module for Keithley 6485 PA-meter Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Nov 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·