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

Xspress::checkConnected ERROR: we are not connected. #37

Open
PeiyuQuan opened this issue Jan 4, 2023 · 5 comments
Open

Xspress::checkConnected ERROR: we are not connected. #37

PeiyuQuan opened this issue Jan 4, 2023 · 5 comments

Comments

@PeiyuQuan
Copy link

Hello
I installed a xspress3 EPICS driver in centos 8 linux computer. The IOC has been connected and most MEDM functions have worked.
But there are an information in IOC output:

2023/01/04 15:37:42.071 BL00:X3:det1:CONNECT devAsynInt32::processCallbackOutput process write error
2023/01/04 15:37:42.071 Xspress3::checkConnected ERROR: We are not connected.
2023/01/04 15:37:42.071 BL00:X3:det1:TriggerMode devAsynInt32::processCallbackOutput process write error

What means are those errors? I thought it happens I didn't connect to the detector. But When i connected a dectector, the errors are still there.
Thank you

Peiyu Quan

create_monitor_set("auto_settings.req",30,"P=BL00:X3:")
epicsThreadSleep(5.)
debug level 0
2023/01/04 15:37:42.071 xsp3_config returned XSP3_ERROR.
2023/01/04 15:37:42.071 API Error Message: xsp3_config: xsp3_config: Cannot initialise Fem 192.168.0.3 on port 30123.
2023/01/04 15:37:42.071 EPICS Driver Calling Function: Xspress3::connect.
2023/01/04 15:37:42.071 BL00:X3:det1:CONNECT devAsynInt32::processCallbackOutput process write error
2023/01/04 15:37:42.071 Xspress3::checkConnected ERROR: We are not connected.
2023/01/04 15:37:42.071 BL00:X3:det1:TriggerMode devAsynInt32::processCallbackOutput process write error
auto_settings.sav: 831 of 831 PV's connected

Set default event widths for deadtime correction

note: these may be tuned for each detector:

dbpf("$(PREFIX)C1:EventWidth", "6")

dbpf("$(PREFIX)C2:EventWidth", "6")

Xspress3 is now ready to use!

epics>

@newville
Copy link
Contributor

newville commented Jan 5, 2023

@PeiyuQuan The "We are not connected" error does mean that the IOC did not connect to the xspress3.
There are a few reasons why that could happen, including

  • the detector is already connected to something else (the QD xspress3-autocalib.py script, some other IOC, ...)
  • the IOC requested a connection to a detector of the wrong size.
  • the xspress3 box is off or not connected.
  • the address "192.168.0.3" is not the correct address for the xspress3 NIC.

I'm sure there are other possible reasons....

The startup script does have to match the number of detector elements. If that size has changed (say, a different detector is being used), it can sometimes work to delete the files in
/dev/shm/xsp3*

and restart the IOC -- those shared-memory files will be generated (with the correct size) if needed.

@PeiyuQuan
Copy link
Author

Hello Newville

I think IP address is correct, Because most functions of EPICS is working. I can set it. Only status show no connection. I think the Item 2 you told me is a possible issue. The connection between xspress 3 and detector has issue. we uses vortes single element detector.

Does Xspress3 have factory- software? I need test it where the issue is from.
Thank you
Peiyu Quan

@PeiyuQuan
Copy link
Author

Newville
I have modified my computer's IP address to 192.168.0.1. Never use 192.168.0.3. But errors are the same. why error report show an old IP address. What is API Error message: xsp3_config? where is xsp3_config?
Thank you
epics> 2023/01/05 23:41:26.306 xsp3_config returned XSP3_ERROR.
2023/01/05 23:41:26.306 API Error Message: xsp3_config: xsp3_config: Cannot initialise Fem 192.168.0.3 on port 30123.

@newville
Copy link
Contributor

newville commented Jan 6, 2023

@PeiyuQuan

Does Xspress3 have factory- software?

Yes, the program xspress3-autocalib.py should connect to and communicate with the detector.

What is API Error message: xsp3_config? where is xsp3_config?

I'm not 100% sure about your system, but the Epics IOC needs to find a set of files defining the calibration and processing parameters for each detector element. These are loaded by the IOC after iocInit with something like:

#Configure and connect to Xspress3
dbpf("$(PREFIX)det1:CONFIG_PATH", "/home/xspress3/xspress3_settings/current/")

That folder will need to contain the correct calibration files for your detector.

When running the xspress3_autocalib.py program to calibrate the detector, these will typically get written to someplace like /etc/xspress3/calibration. I should say, that if you have not heard of xspress3_autocalib.py or tried to do the calibration, I would strongly recommend talking to someone at your facility who is familiar with this or talk to people at QD. The calibration process is sort of notoriously tricky.

And, again, if the number of detector elements has changed or you have exchanged actual detectors, you may want to remove all of the /dev/shm/xsp3* files. These will get recreated when running the IOC or xspress3_autocalib.py and should reflect the xspress3 box as currently configured.

@PeiyuQuan
Copy link
Author

Hello Newville
I thought my previous installing has problem. I put xspress3 driver downloaded from your github under support folder. The path is /home/specadm/epics/support/xspress3. My all epics modules are under support folder. The paths is different from /home/xspress3/epics.
I built a new xspress3 folder under home directory and built epics folder under xspress3. The path is /home/xspress3/epics.
I used command "python3 build-xspress3.py all" to install it according to your procedures.
When i test it /home/xspress3/epics/bin/start_ioc xspress3.
The output is /usr/bin/env: ‘python’: No such file or directory.
I think I have python2 and python3, no python. How to modify python to python2 or python3 in the code?
I think some folders aren't auto-created
Thank you

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