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

How to set values for IPD and PacketSize by code? #129

Closed
lcflorindo opened this issue Jun 27, 2019 · 5 comments
Closed

How to set values for IPD and PacketSize by code? #129

lcflorindo opened this issue Jun 27, 2019 · 5 comments

Comments

@lcflorindo
Copy link

Hi, everytime that I turn my whole system off, I must set the Packet Size and Inter-Packet Delay values throught pylon software before use the camera again (else I get the buffer error).

There is a way to do it by code? (Then everytime I run my programm it sets automatically)

Thanks in advance.

@thiesmoeller
Copy link
Collaborator

You can always lookup the parameters in the normal camera documentation

docs.baslerweb.com

The translation between C++ and python is nothing more than search-and-replace:

Take care to call camera.Open() before accessing camera features.

C++

// Payload Size
int64_t payloadSize = camera.PayloadSize.GetValue();
// Packet Size
camera.GevSCPSPacketSize.SetValue(1500);
// Inter-Packet Delay
camera.GevSCPD.SetValue(1000);
// Frame transmission delay
camera.GevSCFTD.SetValue(1000);
// Bandwidth Assigned
int64_t bandwidthAssigned = camera.GevSCBWA.GetValue();
// Bandwidth Reserve
camera.GevSCBWR.SetValue(10);
// Bandwidth Reserve Accumulation
camera.GevSCBWRA.SetValue(10);
// Frame Jitter Max
int64_t jitterMax = camera.GevSCFJM.GetValue();
// Device Max Throughput
int64_t maxThroughput = camera.GevSCDMT.GetValue();
// Device Current Throughput
int64_t currentThroughput = camera.GevSCDCT.GetValue();
// Heartbeat Timeout
camera.GevHeartbeatTimeout.SetValue(5000);

becomes:

Python

# Payload Size
int64_t payloadSize = camera.PayloadSize.GetValue()
# Packet Size
camera.GevSCPSPacketSize.SetValue(1500)
# Inter-Packet Delay
camera.GevSCPD.SetValue(1000)
# Frame transmission delay
camera.GevSCFTD.SetValue(1000)
# Bandwidth Assigned
int64_t bandwidthAssigned = camera.GevSCBWA.GetValue()
# Bandwidth Reserve
camera.GevSCBWR.SetValue(10)
# Bandwidth Reserve Accumulation
camera.GevSCBWRA.SetValue(10)
# Frame Jitter Max
int64_t jitterMax = camera.GevSCFJM.GetValue()
# Device Max Throughput
int64_t maxThroughput = camera.GevSCDMT.GetValue()
# Device Current Throughput
int64_t currentThroughput = camera.GevSCDCT.GetValue()
# Heartbeat Timeout
camera.GevHeartbeatTimeout.SetValue(5000)

@cute-tiger
Copy link

Issue has been solved by adding these two lines into code:

Packet Size

camera.GevSCPSPacketSize.SetValue(1500) # using 9000 causes grabbing image is not successful every single time

Inter-Packet Delay

camera.GevSCPD.SetValue(2000)

@lcflorindo
Copy link
Author

Thanks for the support! It worked!

@kesaroid
Copy link

I am using a acA1300-200uc, and when I try to set its attributes, I get the following error:
Exception Node not existing (file 'genicam_wrap.cpp', line 16130) Exception initializing camera

This only happens when I try to set PacketSize and IPD. Acquisiting rate and exposure time methods don't seem to have the same problem

@thiesmoeller
Copy link
Collaborator

@kesaroid .... You own a USB camera ... GIGE specific parameters are not available on your device.

Please check the docs.baslerweb.com for your camera specific parameters

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

4 participants