That is true for ImageJ, because it figures out how many elements in the ArrayData array actually contain useful data, and only reads that much.
However, I suspect that is not true of CSS-BOY. I suspect it is reading the entire array even if only part of it contains useful data. That is why you needed to increase EPICS_CA_MAX_ARRAY_BYTES. If I am right then that means you should
not set your waveform record array size much larger than it needs to be, or you will waste bandwidth.
Thanks to everyone who tried to help me with this.
For those interested, Mark's observation below was the critical point, and everything else was OK to begin with. "EPICS_CA_MAX_ARRAY_BYTES must be set a little larger than the largest array you want to send. I would set it at
least 100 bytes bigger."
In fact the array I'm sending is much smaller than these limits; only about 500,000 bytes; so I guess that might be better stated as "EPICS_CA_MAX_ARRAY_BYTES must be set a little larger than the
capacity of the NDArray you want to send. I would set it at least 100 bytes bigger."
Phil
This could be the problem:
Ø
epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "8000000")
Ø
dbLoadRecords("NDStdArrays.template", P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int16,FTVL=SHORT,NELEMENTS=4000000")
EPICS_CA_MAX_ARRAY_BYTES must be set a little larger than the largest array you want to send. I would set it at least 100 bytes bigger.
This is probably working with ImageJ because it determines that actual array size it needs to read (from the SizeX, SizeY, ColorMode, etc. PVs) and does a caget with that array size.
CSS-BOY may be putting a monitor or reading the entire waveform record, which would explain the different in behavior.
Mark
Thanks again Steven.
On 03/02/2016 17:11, Hartman, Steven M. wrote:
On Feb 3, 2016, at 11:54 AM, Phil Atkin <[email protected]> wrote:
I tried setting those environment values before CS-Studio is started, but actually it seems to make no difference.
CS-Studio (like most Java applications) has it own preferences for these rather then using the env vars. Preferences -> CSS Core -> EPICS for auto_addr_list and addr_list.
Thanks: I looked for those, but for some reason did not recognize them. They are set now.
Looking more carefully at what "Probe" within CS-Studio shows, I notice:
• It correctly shows 'simple' PVs from my IOC
• If I specify an erroneous PV name, it shows "UNDEFINED - Disconnected"
• When I correctly specify my array name, it shows “INVALID - No value"
Those results are consistent with too-small of max_array_bytes. The client connects to the server, but cannot receive the data for the large array.
max_array_bytes is set in CS-Studio to 16000000
In the startup of the IOC, I have
epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "8000000")
and then
dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int16,FTVL=SHORT,NELEMENTS=4000000")
and in fact, the array I'm trying to display is 500x500@16 bits.
Is any of this incorrect? Must the settings for client and server be the same?
Note, you need to restart CS-Studio after changing the EPICS network preference settings or max_array_bytes for the change to take effect.
Worth knowing, but I have restarted since making the changes.
Phil
--
Pixel Analytics is a limited company registered in England. Company number:
7747526; Registered office: 93A New Road, Haslingfield, Cambridge CB23 1LP