Results 1 to 2 of 2

Thread: Use VCDproperties to enable/disable external trigger

  1. #1
    Join Date
    Aug 2013
    Posts
    1

    Use VCDproperties to enable/disable external trigger

    Hi,
    I'd like to know how to Use VCDproperties to enable/disable external trigger.
    We use snap mode to capture image together with onfreamready(), we should enable or disable external trigger as needed, but it fails sometime(stoplive--setexternaltrigger--startlive). From another post I noticed I can set external trigger use VCDProperties, and I succeeded to get the triggerpolarity to work, but failed to set trigger mode. What should I do?

    tIVCDSwitchPropertyPtr pTriggerPolarity;
    tIVCDPropertyItemsPtr pItems = grabber.getAvailableVCDProperties();
    if( pItems != 0 )
    {
    tIVCDPropertyItemPtr pTriggerItem = pItems->findItem( VCDID_Trigger );
    if( pTriggerItem != NULL)
    {
    tIVCDPropertyElementPtr pModeValueElement1 = pTriggerItem->findElement( VCDElement_TriggerMode );
    tIVCDPropertyElementPtr pModeValueElement = pTriggerItem->findElement( VCDElement_TriggerPolarity );


    if( pModeValueElement != NULL )
    {
    pModeValueElement->getInterfacePtr(pTriggerPolarity);
    bool isenable = pTriggerPolarity->getSwitch();
    pTriggerPolarity->setSwitch(!isenable);
    }
    }
    }

    pModeValueElement1 is 0x0000000 all the time.

    DMK31BU03

  2. #2
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,886

    Re: Use VCDproperties to enable/disable external trigger

    Hello

    It should work as follows
    Code:
    tIVCDSwitchPropertyPtr pTriggerPolarity;
    tIVCDPropertyItemsPtr pItems = grabber.getAvailableVCDProperties();
    if( pItems != 0 )
    {
        tIVCDPropertyItemPtr pTriggerItem = pItems->findItem( VCDID_TriggerMode );
        if( pTriggerItem != NULL)
        {
            tIVCDPropertyElementPtr pModeValueElement1 = pTriggerItem->findElement( VCDElement_Value );
            tIVCDPropertyElementPtr pModeValueElement = pTriggerItem->findElement( VCDElement_TriggerPolarity );
    
    
            if( pModeValueElement != NULL )
            {
                pModeValueElement->getInterfacePtr(pTriggerPolarity);
                bool isenable = pModeValueElement->getSwitch();
                pModeValueElement->setSwitch(!isenable);
            }
        }
    }
    Best regards
    Stefan
    IC Imaging Control Support

Similar Threads

  1. Help me with the external trigger
    By Abel Dueñas in forum Hardware and Driver
    Replies: 3
    Last Post: June 28, 2011, 09:12:06
  2. Help me with the external trigger
    By Abel Dueñas in forum Hardware and Driver
    Replies: 1
    Last Post: June 27, 2011, 12:03:26
  3. External Trigger
    By drgolf in forum IC Imaging Control C++ Class Library
    Replies: 3
    Last Post: October 4, 2010, 09:31:44
  4. Enable/Disable Logging (IMVSCLog)
    By FS7 in forum MontiVision Development Kit
    Replies: 0
    Last Post: July 14, 2009, 16:25:04
  5. How to Enable/Disable Strobe
    By ronnie.b in forum IC Imaging Control ActiveX
    Replies: 5
    Last Post: November 28, 2008, 11:13:09

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •