paulscherrerinstitute / ADZMQ

ZMQ ADDriver and NDPlugin for areaDetector
1 stars 2 forks source link

IOC start up with error: Command NDZMQConfigure not found #5

Open LeeYangLBLBCS opened 11 months ago

LeeYangLBLBCS commented 11 months ago

I compiled ADZMQ into an area detector. When I start the IOC, I get this error:

============================================== ....... NDZMQConfigure("NDZMQ1", "tcp://*:1234", 3, 0, "SP1", 0) st.cmd.base line 59: Command NDZMQConfigure not found. dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/ADApp/Db/NDPluginBase.template","P=13SP1:,R=ZMQ1:,PORT=NDZMQ1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SP1,NDARRAY_ADDR=0") doAfterIocInit ("dbpf 13SP1:ZMQ1:EnableCallbacks,1") st.cmd.base line 61: Command doAfterIocInit not found. iocInit() Starting iocInit ....

============================================== The driver module I'm using is ADSpinnaker, for a FLIR camera. thanks for the help.

xiaoqiangwang commented 11 months ago

It looks like either the IOC does not have the proper DBD files built or the startup script does not call the function. Can you show the whole startup script?

LeeYangLBLBCS commented 11 months ago

The st.cmd.oryx_51S5 calls st.cmd.base. Both of them come from github repo.

file:///opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADSpinnaker/iocs/spinnakerIOC/iocBoot/iocSpinnaker/st.cmd.oryx_51S5 file:///opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADSpinnaker/iocs/spinnakerIOC/iocBoot/iocSpinnaker/st.cmd.base

xiaoqiangwang commented 11 months ago

Did you modify /opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADSpinnaker/iocs/spinnakerIOC/spinnakerApp/src/Makefile to include ADZMQ? e.g.

$(PROD_NAME)_DBD += ADZMQSupport.dbd
$(PROD_NAME)_LIBS += ADZMQ zmq
LeeYangLBLBCS commented 11 months ago

Oh, right. that's exactly what I forgot to add. It worked after I added them. thanks.

LeeYangLBLBCS commented 11 months ago

What is the ZMQ's header's frame number tied to? Is it ArrayCounter_RBV? For some reason, ADSpinnaker IOC always generates ZMQ frames with frame number=1, as shown below. image

=========================================== Even when the MEDM screen shows the "Image Counter" is more than 1. {"htype":["array-1.0"], "type":"uint16", "shape":[2048,2048], "frame":1, "ndattr":{"ColorMode":0}} 1254052292 [255 255 255 ... 255 444 444] {"htype":["array-1.0"], "type":"uint16", "shape":[2048,2048], "frame":1, "ndattr":{"ColorMode":0}} 1166377238 [255 255 255 ... 617 444 255] {"htype":["array-1.0"], "type":"uint16", "shape":[2048,2048], "frame":1, "ndattr":{"ColorMode":0}} 1166691730 [255 255 255 ... 444 255 255] {"htype":["array-1.0"], "type":"uint16", "shape":[2048,2048], "frame":1, "ndattr":{"ColorMode":0}} 1166809517 [255 255 255 ... 444 444 255] {"htype":["array-1.0"], "type":"uint16", "shape":[2048,2048], "frame":1, "ndattr":{"ColorMode":0}} 1166711314 [255 255 255 ... 255 255 255] {"htype":["array-1.0"], "type":"uint16", "shape":[2048,2048], "frame":1, "ndattr":{"ColorMode":0}} 1166359140 [255 255 255 ... 255 773 921]

xiaoqiangwang commented 11 months ago

On the control panel, right bottom corner, there is a UniqueId mode menu. If you choose Driver, it will use ArrayCounter number.

The frame number comes from the NDArray's UniqueId. And UniqueIdMode controls where the UniqueId number is from.

xiaoqiangwang commented 11 months ago

Unrelated, just a reminder that 1.4.0 release has compatibility breaking changes in the JSON header, https://github.com/paulscherrerinstitute/ADZMQ/blob/master/RELEASE.md

LeeYangLBLBCS commented 11 months ago

This camera works with either ADAravis or ADSpinnaker IOCs. The MEDM screen for ADAravis, attached below, doesn't have the "UniqueId" selection. The ADZMQ's frame number follows the cam1:ArrayCounter_RBV, which is very useful because I can reset it to 0 when needed. On the contrary, ADSpinnaker's IOC, the frame number always increments, even if I reset cam1:ArrayCounter_RBV to 0. It makes the frame number difficult to use. Do you think if there is a way to make ADSpinnaker's frame number work similarly to ADAravis? image image

xiaoqiangwang commented 11 months ago

Do you think if there is a way to make ADSpinnaker's frame number work similarly to ADAravis?

The driver needs modifications. Open an issue at https://github.com/areaDetector/ADSpinnaker/issues describing the difference between ADAravis and ADSpinnaker.