11/33
Sentech GigE Vision Camera StGigE SDK
Sample Guide Rev.1.00
1.12 PvPlcAndGevEvents
This sample shows the outlines for how to use the few tasks using the StGigE SDK.
StGigE SDK does NOT have CounterSelector, CounterEventSource, CounterResetSource, CounterResetActivation
and CounterValue functions in this sample. Please comments out these function in the sample code before use this.
The tasks are in the following buttons:
1) "Select/Connect" button
This shows how to connect to the camera on the selection window.
2) "Acquisition Start" ("Acquisition Stop") button
This shows how to start and stop the image acquisition and display.
3) "Setup PLC" button
This shows how to setup the camera's PLC.
3.1) Signal Routing Block setup:
#ifdef USE_FVAL
PLC_I0 =PLC_A4 //PLC_A4 is the FVAL signal from camera
#else
PLC_I0 =PLC_ctrl0
#endif
PLC_I4 =PLC_ctrl1
3.2) PLC LUT setup:
PLC_Q7 = I0 // PLC_Interrupt
PLC_Q17 = I0 // Counter increament signal
PLC_Q3 = I4 // Counter reset
3.3) Enable PLC_Interrupt_FIFO0_Q7 and register PLC_Interrupt_FIFI0_IRQ_mask parameter to the
PvGenEventSink.
Updates this parameter when the PLC interrupt happens.
After update, the PvGenEventSink::OnParameterUpdate() callback function call.
3.4) Setup as the rising edge of PLC_Q17 signal counts and the counter clears by PLC_Q3 signal.
3.5) When change PLC_ctrl1 from false to true, the counter clears.
4) "Generate 1 pulse" button
This is only enable when USE_FVAL is NOT defined.
This shows how to generate one pulse.
When select this button, PLC_ctrl0 change from false to true then one pulse generates to PLC_Q17 and
PLC_Q7.
The counter value increases one and OnParameterUpdate() called once. The result shows up on the pop up
message.
5) "Device control" button
This shows how to display "Gev Device Control" window.
PLC_ctrl0 change from false to true, is the same effect as select "Generate 1 pulse" button.