Image Aquisition -GevSCPSPacketsize in Matlab 2015 - 2019

5 次查看(过去 30 天)
Sometimes it is necessary, to adjust the PacketSize of GigE cameras.
In the Camera XML File is the Minimum, Maximum and Increment defined.
After camera start and open, mostly the Minimum ist set automatically by Matlab.
When I will set a higher value, there are sometimes some errors.
Example: Minimum: 1444 Maximum: 8228 Increment 128
increment means, that the (value - minimum ) must be divisible by icrement -->Example (8228 - 1444 ) / 128 = 53
Test in Matlab:
>> g.GevSCPSPacketSize= 8228
GevSCPSPacketSize can only be changed in increments of 128.
Another Test with 8100
>> g.GevSCPSPacketSize= 8100
GevSCPSPacketSize can only be changed in increments of 128.
It seems, that malab divides the value by 128 and not the difference from value and minimum:
Example 8192 / 128 = 64
>> g.GevSCPSPacketSize= 8192
The GevSCPSPacketSize property could not be set. Check the current value before continuing your work.
This example do not meet the condition of the camera, but matlab allows it.
Is there a problem in the GigE implementation of the Image Acquisition Toolbox?
Thanks a lot
Richard

回答(5 个)

Shubh Sahu
Shubh Sahu 2020-1-29
To trobleshoot that issue get the camera XML file, as cached on the local drive. The folder location for the camera GenICam XML file can be found in the output of IMAQSUPPORT command (GENICAM section -- GENICAM_CACHE_V2_3 path)
Here is an example of the GENICAM section in IMAQSUPPORT output -- the folder location for the camera XML file(s) in this example is "C:\Users\user\AppData\Roaming\MathWorks\MATLAB\R2014b\GenICamXMLCache":
Clear the cache and try again.
For more information refer to these links:

Ric Fut
Ric Fut 2020-1-29
Thank you for answering.
From my side of view the problem is not located in the xml file.
The cache is clear, but that bings no benefit.
The problem is, that MATLAB not accept packet sizes grater than minimum if they are not dividable by the increment value.
This problem occurs when the packet size minumum value itself is not dividable by the increment value.
It seems that MATLAB handles this wrong. Because the difference between packet size and minimum packet size must be dividable by the increment, not the packet size itself.
In all other camera tools there a no problems
Perhaps somebody of the mathworks team could check, how matlab internally proofe the packet size value. I think it is possible that there is something wrong.
Thank you very much
  1 个评论
Shubh Sahu
Shubh Sahu 2020-2-3
Could you please provide the following information
- Camera manufacturer and model
- The output of imaqsupport command
- Compare behavior when using videoinput with gige adaptor and setting the PacketSize

请先登录,再进行评论。


Ric Fut
Ric Fut 2020-2-3
The camera is a custom model.
The textfile of imaqsupport i have attached
The following command
>> src = getselectedsource(vid);
>> src.PacketSize=8228
src =
Display Summary for Video Source Object:
General Settings:
Parent = [1x1 videoinput]
Selected = on
SourceName = input1
Tag = [0x0 string]
Type = videosource
Device Specific Properties:
AcquisitionFrameRate = 61.1591
DeviceID = SN_TEST120815RF
DeviceManufacturerInfo = ---
DeviceModelName = MarsBB_1.1
DeviceScanType = Areascan
DeviceUserID = MARS
DeviceVendorName = TU I
DeviceVersion = 1.0.0
ExposureMode = Timed
ExposureTime = 8000
FrameWait = 0
Gain = 1.5
GainSelector = DigitalAll
MultiROIMode = ROI1
PacketDelay = 0
PacketSize = 8228
ROISelect = ROI1
SPIAdd = 7
SPIDat = 2561
TestImageSelector = Off
TimestampTickFrequency = 62500000
TriggerMode = Off
TriggerSelector = FrameStart
>> src.PacketSize
ans =
int32
8228
>> preview(vid)
>> src.PacketSize
ans =
int32
8100

Shubh Sahu
Shubh Sahu 2020-2-7
Thank you for your response. It appears that setting the PacketSize works with videoinput gige adaptor. Could you please use videoinput gige as a workaround (instead of gigecam).

Ric Fut
Ric Fut 2020-2-7
We have several cameras and a very complex and big matlab script, so this would be a large effort for us to change this.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by