Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iocAmptek #36

Open
Baokangwen opened this issue Jun 30, 2023 · 11 comments
Open

iocAmptek #36

Baokangwen opened this issue Jun 30, 2023 · 11 comments

Comments

@Baokangwen
Copy link

Dear,
How this IOC module should work?
I run the /mca/iocBoot/iocAmptek/st.cmd file nothing happend

[guest@localhost iocAmptek]$ ./st.cmd
[guest@localhost iocAmptek]$

I have compiled successfully, and successfully communicated with the X-123SDD hardware device, but I don't know how to run ioc.

Your sincerely
Kangwen

@MarkRivers
Copy link
Member

You run the IOC as follows:

cd mca/iocBoot/iocAmptek
../../bin/linux-x86_64/mcaAmptekApp st.cmd

If you EPICS_HOST_ARCH is not linux-x86_64 then replace that with the correct path.

@Baokangwen
Copy link
Author

@MarkRivers
Dear Mark,
I ran st.cmd the way you told me, here's what I ran, I don't know if it's right, what modifications do I need to make.
(base) [guest@localhost iocAmptek]$ ./start_amptek
< envPaths
epicsEnvSet("IOC","iocAmptek")
epicsEnvSet("TOP","/home/guest/EPICS/synApps/support/mca-R7-10")
epicsEnvSet("SUPPORT","/home/guest/EPICS/synApps/support")
epicsEnvSet("CALC","/home/guest/EPICS/synApps/support/calc-R3-7-1")
epicsEnvSet("SSCAN","/home/guest/EPICS/synApps/support/sscan-R2-11-1")
epicsEnvSet("BUSY","/home/guest/EPICS/synApps/support/busy-R1-7")
epicsEnvSet("SCALER","/home/guest/EPICS/synApps/support/scaler")
epicsEnvSet("SNCSEQ","/home/guest/EPICS/synApps/support/seq-2-2-5")
epicsEnvSet("AUTOSAVE","/home/guest/EPICS/synApps/support/autosave-R5-9")
epicsEnvSet("ASYN","/home/guest/EPICS/synApps/support/asyn-R4-40")
epicsEnvSet("MCA","/home/guest/EPICS/synApps/support/mca-R7-10")
epicsEnvSet("EPICS_BASE","/home/guest/EPICS/epics-base")
< st_base.cmd
#The is the ASYN example for communication to a AMPTEK
epicsEnvSet(STARTUP,/home/guest/EPICS/synApps/support/mca-R7-10/iocBoot/iocAmptek)
dbLoadDatabase("/home/guest/EPICS/synApps/support/mca-R7-10/dbd/mcaAmptekApp.dbd",0,0)
mcaAmptekApp_registerRecordDeviceDriver pdbbase
#Use this line for Ethernet
drvAmptekConfigure(Amptek1, 0, "10.50.10.232")
Found 2 broadcast interfaces ...
Broadcast list ...
10.50.10.255:0
192.168.122.255:0
#Use this line for USB
#drvAmptekConfigure(Amptek1, 1, "")
#asynSetTraceMask(Amptek1, 0, 9)
asynSetTraceIOMask(Amptek1, 0, 2)
dbLoadRecords("/home/guest/EPICS/synApps/support/mca-R7-10/db/mca.db","P=mcaTest:,M=mca1,NCHAN=8192,DTYP=asynMCA,INP=@ASYN(Amptek1)")
dbLoadRecords("/home/guest/EPICS/synApps/support/mca-R7-10/db/Amptek.db","P=mcaTest:,R=Amptek1:,PORT=Amptek1")
dbLoadTemplate("Amptek_SCAs.substitutions")
dbLoadRecords("/home/guest/EPICS/synApps/support/asyn-R4-40/db/asynRecord.db","P=mcaTest:,R=asyn1,PORT=Amptek1,ADDR=0,OMAX=256,IMAX=256")
< ../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(/home/guest/EPICS/synApps/support/mca-R7-10/iocBoot/iocAmptek, "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(/home/guest/EPICS/synApps/support/mca-R7-10/iocBoot/iocAmptek, "")
set_requestfile_path(/home/guest/EPICS/synApps/support/mca-R7-10/iocBoot/iocAmptek, "autosave")
set_requestfile_path(/home/guest/EPICS/synApps/support/autosave-R5-9, "db")
set_requestfile_path(/home/guest/EPICS/synApps/support/calc-R3-7-1, "db")
set_requestfile_path(/home/guest/EPICS/synApps/support/mca-R7-10, "db")
set_requestfile_path(/home/guest/EPICS/synApps/support/sscan-R2-11-1, "db")
set_requestfile_path(/home/guest/EPICS/synApps/support/scaler, "db")
dbLoadRecords("/home/guest/EPICS/synApps/support/autosave-R5-9/db/save_restoreStatus.db", "P=mcaTest:")
iocInit()
Starting iocInit
############################################################################
##EPICS R3.15.9.1-DEV
##EPICS Base built Jul 26 2022
############################################################################
reboot_restore: entry for file 'auto_settings.sav'
reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
*** restoring from '/home/guest/EPICS/synApps/support/mca-R7-10/iocBoot/iocAmptek/autosave/auto_settings.sav' at initHookState 6 (before record/device init) ***
reboot_restore: done with file 'auto_settings.sav'

interface broadcast address 10.50.10.255:0
Searching for Amptek modules on network:
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 0 Amptek units
interface broadcast address 10.50.10.255:0
Searching for Amptek modules on network:
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 0 Amptek units
interface broadcast address 10.50.10.255:0
Searching for Amptek modules on network:
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 0 Amptek units
2023/06/30 23:38:37.086 Amptek1 0 autoConnect could not connect: DPP device 10.50.10.232 not found, total devices found=0
2023/06/30 23:38:37.087 mcaTest:asyn1: special queueRequest timeout
reboot_restore: entry for file 'auto_settings.sav'
reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
*** restoring from '/home/guest/EPICS/synApps/support/mca-R7-10/iocBoot/iocAmptek/autosave/auto_settings.sav' at initHookState 7 (after record/device init) ***
reboot_restore: done with file 'auto_settings.sav'

2023/06/30 23:38:37.591 mcaTest:Amptek1:InputPolarity devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:Clock devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:Gate devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:FastPeakingTime devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:PUREnable devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:MCASource devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:AuxOut1 devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:AuxOut2 devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:AuxOut34 devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:Connector1 devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:Connector2 devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCAOutputWidth devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA0OutputLevel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA1OutputLevel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA2OutputLevel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA3OutputLevel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA4OutputLevel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA5OutputLevel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA6OutputLevel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA7OutputLevel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:Gain devAsynFloat64::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:PeakingTime devAsynFloat64::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:FlatTopTime devAsynFloat64::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SlowThreshold devAsynFloat64::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:FastThreshold devAsynFloat64::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SetDetTemp devAsynFloat64::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:MCSLowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:MCSHighChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SetHighVoltage devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA0LowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA0HighChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA1LowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA1HighChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA2LowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA2HighChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA3LowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA3HighChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA4LowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA4HighChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA5LowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA5HighChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA6LowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA6HighChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA7LowChannel devAsynInt32::processCallbackOutput process write error
2023/06/30 23:38:37.591 mcaTest:Amptek1:SCA7HighChannel devAsynInt32::processCallbackOutput process write error
iocRun: All initialization complete
#save settings every thirty seconds
create_monitor_set("auto_settings.req",30,"P=mcaTest:,M=mca1,R=Amptek1:")
save_restore:readReqFile: unable to open file mca_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
#asynReport 1 Amptek1
epics> 2023/06/30 23:38:38.090 mcaTest:Amptek1:ReadStatus devAsynInt32::processCallbackOutput process write error
auto_settings.sav: 0 of 0 PV's connected
interface broadcast address 10.50.10.255:0
Searching for Amptek modules on network:
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 0 Amptek units

@MarkRivers
Copy link
Member

The problem is that it is sending a broadcast message to the correct subnet, 10.50.10.255, but it does not appear to be receiving a response from the module.

interface broadcast address 10.50.10.255:0
Searching for Amptek modules on network:
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 0 Amptek units

Here are some questions:

  • Can you ping the module?
  • Can you control the module using the vendor software?

@Baokangwen
Copy link
Author

@MarkRivers
Dear Mark,
I can ping the module.
b40e689c84fda59545f0c18166c94b8
I set static ip by vendor software.
I run the st.cmd file find the same error,it does not appear to be receiving a response from the module.
ERROR INFORMATION:interface broadcast address 10.50.10.255:0
Searching for Amptek modules on network:
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 0 Amptek units.
cad579b90aa2cfcd8fbb38a1099ed55
0f8fa4cd187b06bbba9cdd2ddb00539
5112ed62ff183570d01f8f1460658f5
a511b037ff0f46dd7ebdcb17e207cfc

@Baokangwen
Copy link
Author

Baokangwen commented Jul 2, 2023

@MarkRivers
Dear Mark,

I connected to an amptek device, but the port shows 3040, I show the port in the vendor software is 10001, I don't know if this is correct, here is the result of my st.cmd run, I don't know if it is right, what else I need to do.

############################################################################
##EPICS R3.15.9.1-DEV
##EPICS Base built Jul 26 2022
############################################################################
reboot_restore: entry for file 'auto_settings.sav'
reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
*** restoring from '/home/guest/EPICS/synApps/support/mca-R7-10/iocBoot/iocAmptek/autosave/auto_settings.sav' at initHookState 6 (before record/device init) ***
reboot_restore: done with file 'auto_settings.sav'

interface broadcast address 10.50.11.255:0
Searching for Amptek modules on network:
Address: 10.50.11.74 Port: 3040 bytes:101
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 1 Amptek units
2023/07/02 16:54:35.506 Amptek1 0 autoConnect could not connect: error calling SendCommand for XMTPT_SEND_STATUS
2023/07/02 16:54:35.508 mcaTest:asyn1: special queueRequest timeout
reboot_restore: entry for file 'auto_settings.sav'
reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
*** restoring from '/home/guest/EPICS/synApps/support/mca-R7-10/iocBoot/iocAmptek/autosave/auto_settings.sav' at initHookState 7 (after record/device init) ***
reboot_restore: done with file 'auto_settings.sav'

2023/07/02 16:54:36.009 mcaTest:Amptek1:InputPolarity devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:Clock devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:Gate devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:FastPeakingTime devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:PUREnable devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:MCASource devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:AuxOut1 devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:AuxOut2 devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:AuxOut34 devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:Connector1 devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:Connector2 devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCAOutputWidth devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA0OutputLevel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA1OutputLevel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA2OutputLevel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA3OutputLevel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA4OutputLevel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA5OutputLevel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA6OutputLevel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA7OutputLevel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:Gain devAsynFloat64::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:PeakingTime devAsynFloat64::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:FlatTopTime devAsynFloat64::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SlowThreshold devAsynFloat64::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:FastThreshold devAsynFloat64::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SetDetTemp devAsynFloat64::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:MCSLowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:MCSHighChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SetHighVoltage devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA0LowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA0HighChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA1LowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA1HighChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA2LowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA2HighChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA3LowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA3HighChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA4LowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA4HighChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA5LowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA5HighChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA6LowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA6HighChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA7LowChannel devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:SCA7HighChannel devAsynInt32::processCallbackOutput process write error
cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 41865,
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
#save settings every thirty seconds
create_monitor_set("auto_settings.req",30,"P=mcaTest:,M=mca1,R=Amptek1:")
save_restore:readReqFile: unable to open file mca_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
#asynReport 1 Amptek1
epics> 2023/07/02 16:54:36.509 mcaTest:Amptek1:ReadStatus devAsynInt32::processCallbackOutput process write error
auto_settings.sav: 0 of 0 PV's connected
interface broadcast address 10.50.11.255:0
Searching for Amptek modules on network:
Address: 10.50.11.74 Port: 3040 bytes:101
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 1 Amptek units
epics> interface broadcast address 10.50.11.255:0
Searching for Amptek modules on network:
Address: 10.50.11.74 Port: 3040 bytes:101
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 1 Amptek units
interface broadcast address 10.50.11.255:0
Searching for Amptek modules on network:
Address: 10.50.11.74 Port: 3040 bytes:101
interface broadcast address 192.168.122.255:0
Searching for Amptek modules on network:
Found 1 Amptek units

@MarkRivers
Copy link
Member

What did you change so that it found the Amptek device? Previously it was not finding any Amptek devices.

I think the driver uses port 3040 for broadcast messages to find the modules on the network, and then uses port 10001 for normal UDP communication.

The driver sends UDP messages to port 10001 in this line:
https://github.com/epics-modules/mca/blame/0c3e8b76aaad7a9616e44f0bb41fa927abd1608e/mcaApp/AmptekSrc/DppSocket.cpp#L463

It sends broadcast messages to port 3040 here:

iRetSock = BroadCastSendTo(buff, 6, 3040, pNode->addr.ia);

Here there is a commented out line for port 3040, and instead it gets the port dynamically:

// nPort = 3040;

It uses port 3040 to read the response from NetFinder messages here:

nPort = 3040;

Please try power-cycling the module. Make sure you are not running the vendor software at the same time you are running the EPICS IOC. You must wait at least 20 seconds after closing the IOC before opening it again.

@Baokangwen
Copy link
Author

@MarkRivers
I'm sure I didn't have the commercial software open when I ran it.It should be read to the device.Is this a success?
There are still some problems with running st.cmd, I don't know if there is any impact, I extracted it below.
If nothing is wrong, what should I do next.

2023/07/02 16:54:36.009 mcaTest:Amptek1:InputPolarity devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:Clock devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:Gate devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:FastPeakingTime devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:PUREnable devAsynInt32::processCallbackOutput process write error
2023/07/02 16:54:36.010 mcaTest:Amptek1:MCASource devAsynInt32::processCallbackOutput process write error

save_restore:readReqFile: unable to open file mca_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.
save_restore:readReqFile: unable to open file Amptek_SCAn_settings.req. Exiting.

@MarkRivers
Copy link
Member

Another possibility is a firewall. Are you running the vendor software on Linux or Windows? If it is on Linux, is it running on the same machine as the IOC? I would suggest disabling the Linux firewall and seeing if the IOC can then connect to the device.

@Baokangwen
Copy link
Author

@MarkRivers
Thank you very much.
I have successfully connected to the device.

@MarkRivers
Copy link
Member

What was the problem?

@Baokangwen
Copy link
Author

@MarkRivers
You remind me to turn off the firewall.
Turn off the firewall for centos7.
Run st.cmd, which can read the device.
Thank you very much.

Yours sincerely,
Kangwen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants