EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: RE: building EPICS for Canberra MCA on Windows XP
From: "Mark Rivers" <[email protected]>
To: "Justin Coleman" <[email protected]>, <[email protected]>
Date: Wed, 4 Jul 2007 12:03:25 -0500
Hi Justin,

I just loaded the latest version of WinPcap (4.0.1) and built mcaAIM.exe
under Cygwin on my desktop Windows PC.  I used it successfully to
control the Camberra AIM MCA here.  My PC is called "Subaru".  Note that
in mcaAIMShowModules Subaru is listed as owning module NI00059e.  I was
able to acquire a spectrum, and to control all of the ICB modules.

There must be something different about your system, but I'm not sure
what it could be.

Here is the output when I start the soft IOC.

************************************************************************
****
$ ../../bin/cygwin-x86/mcaAIM.exe st.cmd
< envPaths
epicsEnvSet(ARCH,"cygwin-x86")
epicsEnvSet(IOC,"iocCygwin")
epicsEnvSet(TOP,"j:/epics/devel/mca/6-10beta")
epicsEnvSet(SNCSEQ,"/corvette/home/epics/devel/seq/2-0-11")
epicsEnvSet(CALC,"/corvette/home/epics/devel/calc/2-6-4beta")
epicsEnvSet(SSCAN,"/corvette/home/epics/devel/sscan/2-5-6beta")
epicsEnvSet(STD,"/corvette/home/epics/devel/std/2-5-5beta")
epicsEnvSet(AUTOSAVE,"/corvette/home/epics/devel/autosave/4-3")
epicsEnvSet(ASYN,"/corvette/home/epics/devel/asyn/4-9beta")
epicsEnvSet(MCA,"/corvette/home/epics/devel/mca/6-10beta")
epicsEnvSet(EPICS_BASE,"/corvette/usr/local/epics/base-3.14.8.2")
epicsEnvSet(STARTUP,j:/epics/devel/mca/6-10beta/iocBoot/iocCygwin)
dbLoadDatabase("../../dbd/mcaCanberra.dbd",0,0)
mcaCanberra_registerRecordDeviceDriver(pdbbase)
#var aimDebug 10
# AIMConfig(portName, ethernet_address, portNumber(1 or 2), maxChans,
#           maxSignals, maxSequences, ethernetDevice)
# On Windows the ethernetDevice name is unique to each network card.
# You can get this number for your Window machine by
# using the "regedit" utility, and doing an "export" of the key:
# [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\NetworkCards]
# This should look like:
# [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\NetworkCards]
#
# [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\NetworkCards\2]
# "ServiceName"="{15B576D2-6DF4-4C9F-B53C-DBF76B53194E}"
# "Description"="3Com 3C920 Integrated Fast Ethernet Controller
(3C905C-TX Compatible)"
# The number that is needed in the ServiceName field.
# Copy this number and paste into the AIMConfig command below
AIMConfig("AIM1/1", 0x59e, 1, 2048, 1, 1,
"\Device\NPF_{E9C3D739-42E6-4239-9E45-0763306D1802}")
AIMConfig("AIM1/2", 0x59e, 2, 2048, 1, 1,
"\Device\NPF_{E9C3D739-42E6-4239-9E45-0763306D1802}")
dbLoadRecords("/corvette/home/epics/devel/mca/6-10beta/mcaApp/Db/mca.db"
, "P=mcaTest:,M=aim_adc1,DTYP=asynMCA,INP=@asyn(
AIM1/1 0),NCHAN=2048")
dbLoadRecords("/corvette/home/epics/devel/mca/6-10beta/mcaApp/Db/mca.db"
, "P=mcaTest:,M=aim_adc2,DTYP=asynMCA,INP=@asyn(
AIM1/2 0),NCHAN=2048")
#icbConfig(portName, module, ethernetAddress, icbAddress, moduleType)
#   portName to give to this asyn port
#   ethernetAddress - Ethernet address of module, low order 16 bits
#   icbAddress - rotary switch setting inside ICB module
#   moduleType
#      0 = ADC
#      1 = Amplifier
#      2 = HVPS
#      3 = TCA
#      4 = DSP
icbConfig("icbAdc1", 0x59e, 5, 0)
dbLoadRecords("/corvette/home/epics/devel/mca/6-10beta/mcaApp/Db/icb_adc
.db", "P=mcaTest:,ADC=adc1,PORT=icbAdc1")
icbConfig("icbAmp1", 0x59e, 3, 1)
dbLoadRecords("/corvette/home/epics/devel/mca/6-10beta/mcaApp/Db/icb_amp
.db", "P=mcaTest:,AMP=amp1,PORT=icbAmp1")
icbConfig("icbHvps1", 0x59e, 2, 2)
dbLoadRecords("/corvette/home/epics/devel/mca/6-10beta/mcaApp/Db/icb_hvp
s.db", "P=mcaTest:,HVPS=hvps1,PORT=icbHvps1,LIMI
T=1000")
icbConfig("icbTca1", 0x59e, 8, 3)
dbLoadRecords("/corvette/home/epics/devel/mca/6-10beta/mcaApp/Db/icb_tca
.db", "P=mcaTest:,TCA=tca1,MCA=aim_adc2,PORT=icb
Tca1")
#icbConfig("icbDsp1", 0x8058, 0, 4)
#dbLoadRecords("$(MCA)/mcaApp/Db/icbDsp.db",
"P=mcaTest:,DSP=dsp1,PORT=icbDsp1")
mcaAIMShowModules
Module     Owner name      Owner ID       Status      Memory size Free
address
NI008058    ioc13lab  00:01:AF:0C:11:F7  Reachable     262140
00000000
NI0003ed    ioc13idd  08:00:3E:2F:1F:F8  Reachable     261116
00000000
NI0006e6    ioc13idc  00:01:AF:00:74:CD  Reachable     261116
00000000
NI00059e    Subaru    00:07:E9:6A:79:BA  Reachable     261116
00004000
NI0009ce    ioc13bmd  08:00:3E:2E:63:37  Reachable     261116
00000000
#asynSetTraceMask "AIM1/1",0,0xff
#asynSetTraceMask "icbTca1",0,0x13
#asynSetTraceMask "icbHvps1",0,0xff
< save_restore.cmd
### save_restore setup
#
# The rest this file does not require modification for standard use,
but...
# If you want save_restore to manage its own NFS mount, specify the name
and
# IP address of the file server to which save files should be written.
# This currently is supported only on vxWorks.
#save_restoreSet_NFSHost("oxygen", "164.54.52.4")
# status-PV prefix
save_restoreSet_status_prefix("mcaTest:")
# Debug-output level
save_restoreSet_Debug(0)
# Ok to save/restore save sets with missing values (no CA connection to
PV)?
save_restoreSet_IncompleteSetsOk(1)
# Save dated backup files?
save_restoreSet_DatedBackupFiles(1)
# Number of sequenced backup files to write
save_restoreSet_NumSeqFiles(3)
# Time interval between sequenced backups
save_restoreSet_SeqPeriodInSeconds(300)
# specify where save files should be
set_savefile_path(j:/epics/devel/mca/6-10beta/iocBoot/iocCygwin,
"autosave")
# specify what save files should be restored.  Note these files must be
# in the directory specified in set_savefile_path(), or, if that
function
# has not been called, from the directory current when iocInit is
invoked
set_pass0_restoreFile("auto_settings.sav")
set_pass1_restoreFile("auto_settings.sav")
# specify directories in which to to search for included request files
# Note cdCommands defines 'startup', but envPaths does not
set_requestfile_path(j:/epics/devel/mca/6-10beta/iocBoot/iocCygwin,  "")
set_requestfile_path(j:/epics/devel/mca/6-10beta/iocBoot/iocCygwin,
"autosave")
set_requestfile_path(/corvette/home/epics/devel/autosave/4-3,
"asApp/Db")
set_requestfile_path(/corvette/home/epics/devel/calc/2-6-4beta,
"calcApp/Db")
set_requestfile_path(/corvette/home/epics/devel/mca/6-10beta,
"mcaApp/Db")
set_requestfile_path(/corvette/home/epics/devel/sscan/2-5-6beta,
"sscanApp/Db")
dbLoadRecords("/corvette/home/epics/devel/autosave/4-3/asApp/Db/save_res
toreStatus.db", "P=mcaTest:")
iocInit()
Starting iocInit
########################################################################
####
###  EPICS IOC CORE built on Aug 25 2006
###  EPICS R3.14.8.2 $R3-14-8-2$ $2006/01/06 15:55:13$
########################################################################
####
reboot_restore: entry for file 'auto_settings.sav'
reboot_restore (v4.9): entry for file 'auto_settings.sav'
reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
*** restoring from
'j:/epics/devel/mca/6-10beta/iocBoot/iocCygwin/autosave/auto_settings.sa
v' at initHookState 5 ***
reboot_restore: done with file 'auto_settings.sav'

reboot_restore: entry for file 'auto_settings.sav'
reboot_restore (v4.9): entry for file 'auto_settings.sav'
reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
*** restoring from
'j:/epics/devel/mca/6-10beta/iocBoot/iocCygwin/autosave/auto_settings.sa
v' at initHookState 6 ***
reboot_restore: done with file 'auto_settings.sav'

iocInit: All initialization complete
# save settings every thirty seconds
create_monitor_set("auto_settings.req",30,"P=mcaTest:")

************************************************************************
****

So the AIMConfig command is working OK for me, while it is failing for
you.

Here is the output of icbShowModules
epics> icbShowModules

NI59E:2   3  CI9641 2K HVPS     8965924
NI59E:3   7  CI9615 AMP         11923928
   Preamp type:       RC
   Coarse gain:       2.500000
   Fine gain:         1.000000
   Super fine gain:   1.000000
   Shaping mode:      GAUSSIAN
   Pole zero:         1
   Baseline restore:  SYM
   Dead-time control: Norm
   Time constant:     2.000000
   Flags:             10
NI59E:5   6  CI9635 8K ADC      2936602
   Range:             2048
   Offset:            0
   Acquisition mode:  PHA
   Conversion gain:   2048
   Lower level disc:  1.000000
   Upper level disc:  100.000000
   Zero:              0.000000
   Flags:             40
NI59E:8   2  Unknown            3994275

Mark


> -----Original Message-----
> From: Justin Coleman [mailto:[email protected]] 
> Sent: Tuesday, July 03, 2007 4:41 PM
> To: Mark Rivers; [email protected]
> Subject: Re: building EPICS for Canberra MCA on Windows XP
> 
> Mark,
> 
> I suggested we use Linux for this system (since that was working fine
> thanks to your help previously), but my boss suggested we get it going
> under Windows as well, since the mca package documentation indicates
> it can be done. I think he's just more comfortable with the Windows
> environment, and he'll be the one doing most of the capture/analysis
> work.
> 
> Libnet.dll and Libnet.lib are included in the mcaR6-9 package
> (mcaApp/CanberraSrc directory), those are the only ones on this
> system. libpacket.a and libwpcap.a are from the WpdPack_4_0.zip file,
> since the WinPcap binary installer doesn't include them.
> 
> I just did a "make clean uninstall install" in all package directories
> (base, seq, asyn, autosave, gensub, sscan, calc, std, mca). Here's the
> sequence of events when I run the cygwin version. I've used script to
> capture a log, if that would be any help.
> 1. PC boots up.
> 2. Canberra rack powers on. This rack and PC are on their own network
> segment, and this PC is the only one we've used for an IOC, no other
> system has EPICS on it. At this point I wait for the OK light to come
> on on the AIM.
> 3. Cygwin shell opened, I run ..\..\bin\cygwin-x86\mcaAIM st.cmd
> 4. st.cmd script begins to run, first error occurs here (this is also
> when the "in use" light comes on, and the "comm tx" and "comm rx"
> blink a bit):
> AIMConfig("AIM1/1", 0x6aa, 1, 2048, 1, 1,
> "\Device\NPF_{697A363F-EC84-407F-9BD2-3678BE08AB3D}")
> AIMConfig ERROR: cannot buy module, someone else owns it!
> 5. next error occurs here:
> icbConfig("icbAdc1", 0x6aa, 0, 0)
> icbConfig: Error looking up ICB module NI6AA:0
> 6. mcaAIMShowModules
> Module     Owner name      Owner ID       Status      Memory 
> size Free address
> NI0006aa              00:00:00:00:00:00  Unreachable     
> 261116      00000000
> 7. lots of these: 2007/07/03 17:22:58.032 drvIcbAsyn::verifyModule
> module not defined or not found
> 2007/07/03 17:22:58.042 devMcaAsyn::init_record, mcaTest:aim_adc1
> connectDevice failed to AIM1/1
> 2007/07/03 17:22:58.162 devMcaAsyn::send_msg: mcaTest:aim_adc1 error
> calling queueRequest, asynManager::queueRequest not connected
> 8. this for pretty much every pv: 2007/07/03 17:23:02.288
> drvIcbAsyn::verifyModule module not defined or not found
> 2007/07/03 17:23:02.288 mcaTest:adc1LLD devAsynFloat64 process error
> 9. Right before we get to a prompt:
> iocInit: All initialization complete
> # save settings every thirty seconds
> create_monitor_set("auto_settings.req",30,"P=mcaTest:")
> epics>
> epicsSocketEnablePortUseForDatagramFanout: unable to set SO_REUSEADDR?
> **** The executable "caRepeater" couldn't be located
> **** because of errno = "No such file or directory".
> **** You may need to modify your PATH environment variable.
> **** Unable to start "CA Repeater" process.
> 10. nmc_show_modules isn't on the command list in any form. What
> package does it come from? icbShowModules gives no output, but no
> error.
> 
> Thanks,
> 
> -Justin
> 


References:
Re: building EPICS for Canberra MCA on Windows XP Justin Coleman

Navigate by Date:
Prev: RE: building EPICS for Canberra MCA on Windows XP Mark Rivers
Next: CA Beacon Heinrich du Toit
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: building EPICS for Canberra MCA on Windows XP Mark Rivers
Next: CA Beacon Heinrich du Toit
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·