Advertisement

Sentech GigE Vision Camera
StGigE SDK
Sample Guide
Sensor Technology Co., Ltd.
Sentech GigE Vision Camera StGigE SDK
Sample Guide Rev.1.00
1/33

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the GigE Vision and is the answer not in the manual?

Questions and answers

Summary of Contents for SenTech GigE Vision

  • Page 1 Sentech GigE Vision Camera StGigE SDK Sample Guide Sensor Technology Co., Ltd. Sentech GigE Vision Camera StGigE SDK 1/33 Sample Guide Rev.1.00...
  • Page 2: Table Of Contents

    2.2 Obtain the NIC and the camera information ......................24 2.3 Sets the IP Address ..............................26 2.4 Obtains the command information ..........................28 2.5 Uses the serial communication ........................... 31 Sentech GigE Vision Camera StGigE SDK 2/33 Sample Guide Rev.1.00...
  • Page 3: Descriptions Of The Sample Programs

    This source code file shows how to use EbNetworkAdapter, EbDriver and EbInstaller classes. 1.2 GEVPlayerSample This sample is the source code for the StGigE Player application. StGigE Player application is used to connect and configure the GigE Vision camera. 1) Introduction This sample help to understand how to use StGigE SDK.
  • Page 4 ProgressDlg. (Please check ProgressDlg.cpp) 3.17) SetupDlg.cpp The source code file for the Setup dialog. It is accessible from " Setup..." under "Tools" in the menu. Sentech GigE Vision Camera StGigE SDK 4/33 Sample Guide Rev.1.00...
  • Page 5: Pvbufferwritersample

    The source code file for the sample program of how to use the PvBuffer and the PvBufferWriter classes. Please check the comments in this source code for the information, which is how to use these classes. Sentech GigE Vision Camera StGigE SDK 5/33...
  • Page 6: Pvcamheadserialcomlogsample

    This application displays the main application dialog. 3.3 Thread.cpp The source code file for the thread, which is created the class of display the image from the PvPipeline on the PvDisplay. Sentech GigE Vision Camera StGigE SDK 6/33 Sample Guide Rev.1.00...
  • Page 7: Pvconfigurationreadersample

    The source code file for the sample program of how to use the PvPipeline class. Please check the comments in this source code for the information, which is how to use this class. Sentech GigE Vision Camera StGigE SDK 7/33...
  • Page 8: Pvdevicefindingsample

    The source code file for the sample program of how to use the PvGenParameterArray and the PvGenParameter classes. Please check the comments in this source code for the information, which is how to use these classes. Sentech GigE Vision Camera StGigE SDK 8/33 Sample Guide Rev.1.00...
  • Page 9: Pvmulticastmastersample

    The source code file, which shows how to use the PvPipeline and the PvStream classes. Please check the comments in this source code for the information, which is how to use these classes. Sentech GigE Vision Camera StGigE SDK 9/33...
  • Page 10: Pvpipelinesample

    The source code file for the sample program of how to use the PvPipeline class. Please check the comments in this source code for the information, which is how to use this class. Sentech GigE Vision Camera StGigE SDK 10/33...
  • Page 11: Pvplcandgevevents

    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. Sentech GigE Vision Camera StGigE SDK 11/33 Sample Guide Rev.1.00...
  • Page 12: Pvplcdelayersample

    PLC_ctrl0 is turn on/off the rescaler. LUT routes rescaler output signal to Q0 (TTL_OUT[0]). NOTE: This sample is based on the Demonstrating the Rescaler tutorial in the Programmable Logic Controller Reference Guide. Sentech GigE Vision Camera StGigE SDK 12/33 Sample Guide Rev.1.00...
  • Page 13: Pvrecoverysample

    The source code file, which is simple command line application that obtains the image. Please check the comments in this source code for the information, which is how to use these classes. Sentech GigE cameras do NOT have the DeviceReset function in this. 1.16 PvRGBFilterSample This sample shows how to use the PVBufferConverter and the PvFilterRGB, to convert the image.
  • Page 14: Pvsimpleuisample

    The camera has to connect to the NIC, which is installed either the eBUS Universal Pro or the Optimal driver, before use this sample. 3) Descriptions of the files 3.1 PvStreamSample.cpp The source code file for the sample program of how to use the PvStream. Sentech GigE Vision Camera StGigE SDK 14/33 Sample Guide Rev.1.00...
  • Page 15: Netcommandsample

    When use this sample: Please use the Visual Studio 2005 (VS8) C++. Required to understand the C++ and the Microsoft MFC. Please build to make the application to understand the operation. Sentech GigE Vision Camera StGigE SDK 15/33 Sample Guide Rev.1.00...
  • Page 16: Stgeopencvfacesdetectsample

    Please use the Visual Studio 2005 (VS8) C++. Required to understand the C++ and the Microsoft MFC. Please build to make the application to understand the operation. This sample made with OpenCV2.1.0. Sentech GigE Vision Camera StGigE SDK 16/33 Sample Guide Rev.1.00...
  • Page 17: The Sample Programs For The Specific Usages

    // Function for sets the LookupTable BOOL SetupLUT( PvDevice *pDevice, int iQ, PCHAR pText1,PCHAR pText2,PCHAR pText3,PCHAR pText4,PCHAR pText5,PCHAR pText6,PCHAR pText7 // *********************************************** // // Route PLC_Ixx to Qxx // *********************************************** // Sentech GigE Vision Camera StGigE SDK 17/33 Sample Guide Rev.1.00...
  • Page 18 PLCText, "PLC_Q%d_Variable3", iQ ); lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText ) ); if(lPvGenEnum==NULL) return FALSE; lResult = lPvGenEnum->SetValue(pText7); if( !lResult.IsOK() ) return FALSE; return TRUE; // Function for sets the SignalRoutingBlock Sentech GigE Vision Camera StGigE SDK 18/33 Sample Guide Rev.1.00...
  • Page 19 FALSE; lResult = lPvGenEnum->SetValue(index); if( !lResult.IsOK() ) return FALSE; sprintf( PLCText, "TimerDurationRaw" ); lPvGenInteger = dynamic_cast<PvGenInteger *>(pDevice->GetGenParameters()->Get( PLCText ) ); if(lPvGenInteger==NULL) return FALSE; lResult = lPvGenInteger->SetValue( durationOfHigh ); Sentech GigE Vision Camera StGigE SDK 19/33 Sample Guide Rev.1.00...
  • Page 20 // Sets the exposure mode //iExposureMode: 0:Timed 1:TriggerWidth BOOL SetExposureMode( PvDevice *pDevice, int iExposureMode ) PvGenEnum* lPvGenEnum=dynamic_cast<PvGenEnum*>(pDevice->GetGenParameters()->Get( "ExposureMode" ) ); if( lPvGenEnum==NULL ) return FALSE; PvResult lResult = lPvGenEnum->SetValue(iExposureMode); return (BOOL)lResult.IsOK(); Sentech GigE Vision Camera StGigE SDK 20/33 Sample Guide Rev.1.00...
  • Page 21 BOOL SetControlBit( PvDevice *pDevice, int index, bool bFlg ) char PLCText[64]; sprintf( PLCText, "PLC_ctrl%d", index); PvGenBoolean* lGenBoolean; lGenBoolean = dynamic_cast<PvGenBoolean *>(pDevice->GetGenParameters()->Get( PLCText ) ); if( lGenBoolean==NULL ) return FALSE; PvResult lResult = lGenBoolean->SetValue(bFlg); return (BOOL)lResult.IsOK(); Sentech GigE Vision Camera StGigE SDK 21/33 Sample Guide Rev.1.00...
  • Page 22: Software Trigger With Genicam Command

    BOOL SetExposureMode( PvDevice *pDevice, int iExposureTime ) PvGenInteger* lPvGenInteger=dynamic_cast<PvGenInteger*>(pDevice->GetGenParameters()->Get("ExposureTimeRaw")); if( lPvGenInteger==NULL ) return FALSE; PvResult lResult = lPvGenInteger->SetValue(iExposureTime); return (BOOL)lResult.IsOK(); E. Sets the "Software trigger" for the trigger source. //iTriggerSource: 0:Software 1:Hardware Sentech GigE Vision Camera StGigE SDK 22/33 Sample Guide Rev.1.00...
  • Page 23 ) return FALSE; PvResult lResult = lPvGenEnum->SetValue(iTriggerSoftwareSource); return (BOOL)lResult.IsOK(); G. Input the trigger. BOOL SetTriggerSoftware( PvDevice *pDevice ) PvGenCommand* lPvGenCommand=dynamic_cast<PvGenCommand*>(pDevice->GetGenParameters()->Get("TriggerSoftware")); if( lPvGenCommand==NULL ) return FALSE; PvResult lResult = lPvGenCommand->Execute(); return (BOOL)lResult.IsOK(); Sentech GigE Vision Camera StGigE SDK 23/33 Sample Guide Rev.1.00...
  • Page 24: Obtain The Nic And The Camera Information

    "Device %i MAC Address: %s IP Address: %s \n", lDeviceInfo->GetMACAddress().GetUnicode(), lDeviceInfo->GetIPAddress().GetUnicode() return (BOOL)lResult.IsOK(); //IP Address, Subnet Mask and Default gateway can be changeable with the MAC Address information before Sentech GigE Vision Camera StGigE SDK 24/33 Sample Guide Rev.1.00...
  • Page 25 //lSubnetmask= "255.255.255.0"; (Changes to the specified Subnet Mask) //lGateway = "0.0.0.0"; (Changes to the specified Default Gateway Address) BOOL ChangeDeviceInformation(PvDeviceInfo *lDeviceInfo,PvString lIPAddress,PvString lSubnetmask,PvString lGateway ) PvDevice lDevice; PvResult lResult = lDevice.SetIPConfiguration(lDeviceInfo->GetMACAddress(),lIPAddress ,lSubnetmask ,lGateway ); return (BOOL)lResult.IsOK(); Sentech GigE Vision Camera StGigE SDK 25/33 Sample Guide Rev.1.00...
  • Page 26: Sets The Ip Address

    ) return FALSE; PvGenInteger *lFlushSubnetMaskParam=dynamic_cast<PvGenInteger *>(lGenDevice->Get("GevPersistentSubnetMask")); if( !lFlushSubnetMaskParam ) return FALSE; lResult = lFlushSubnetMaskParam->SetValue( lSubnetMask ); if( lResult.IsFailure() ) return FALSE; PvGenInteger *lFlushGatewayParam=dynamic_cast<PvGenInteger *>(lGenDevice->Get("GevPersistentDefaultGateway")); if( !lFlushGatewayParam ) return FALSE; Sentech GigE Vision Camera StGigE SDK 26/33 Sample Guide Rev.1.00...
  • Page 27 = lFlushGatewayParam->SetValue( lGateway ); if( lResult.IsFailure() ) return FALSE; return TRUE; Sentech GigE Vision Camera StGigE SDK 27/33 Sample Guide Rev.1.00...
  • Page 28: Obtains The Command Information

    ) lStr="PvGenTypeEnum"; //1 else if( aType==PvGenTypeBoolean ) lStr="PvGenTypeBoolean"; //2 else if( aType==PvGenTypeString ) lStr="PvGenTypeString"; //3 else if( aType==PvGenTypeCommand ) lStr="PvGenTypeCommand"; //4 else if( aType==PvGenTypeFloat ) lStr="PvGenTypeFloat"; //5 else lStr="PvGenTypeUndefined"; Sentech GigE Vision Camera StGigE SDK 28/33 Sample Guide Rev.1.00...
  • Page 29 ) lResult = lGenFloat->GetUnit(strValue); if( lResult.IsOK() ) printf(" Value=%f[%s]\n", dblValue, strValue.GetAscii() ); lResult = lGenFloat->GetMax(dblMax); if( lResult.IsOK() ) printf(" Max=%f\n", dblMax ); lResult = lGenFloat->GetMin(dblMin); if( lResult.IsOK() ) printf(" Min=%f\n", dblMin ); else{ Sentech GigE Vision Camera StGigE SDK 29/33 Sample Guide Rev.1.00...
  • Page 30 TRUE; Sentech GigE Vision Camera StGigE SDK 30/33 Sample Guide Rev.1.00...
  • Page 31: Uses The Serial Communication

    This sample shows how to use the serial communication between the camera and the PC. Communicates to the main FPGA of the camera when selects "PvIPEngineSerial0" for the port number. Sentech GigE cameras do NOT use "PvIPEngineSerial1". The following sample program shows how to sends 6Byte data then receives 4Byte data.
  • Page 32 WORD wReadSize=0; bReval=SerialDataSendRev(&lSerialPort,&byteSend[0],sizeof(byteSend),&byteRcv[0],sizeof(byteRcv), &wReadSize ); if( bReval ){ printf( "RcvData " ); for( int i=0; i<wReadSize; i++ ) printf( "%02X ",byteRcv[i] ); printf( "\n\n" ); SerialPortClose( &lSerialPort ); return bReval; Sentech GigE Vision Camera StGigE SDK 32/33 Sample Guide Rev.1.00...
  • Page 33 Date Changes Note 2.00 2012/11/05 New document Sensor Technology Co., Ltd 7F, Harada center building 9-17, Naka cho 4 chome Atsugi-city, Kanagawa 243-0018 Japan TEL 81-46-295-7061 FAX 81-46-295-7066 URL http://www.sentech.co.jp/ Sentech GigE Vision Camera StGigE SDK 33/33 Sample Guide Rev.1.00...

Table of Contents