Page 5 of 6 FirstFirst ... 3 4 5 6 LastLast
Results 61 to 75 of 77

Thread: trigger problem

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

    Re: trigger problem

    Since you mention this: "0V for 8ms and 5v for 2ms" This is 10ms. That means 100Hz trigger frequency. This can be done, but the frame rate must be much more than 100 fps and the exposure time must be very very short

    However, I will look into your program code again and come back to you.
    Best regards
    Stefan
    IC Imaging Control Support

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

    Re: trigger problem

    Hello

    I checked this code
    Code:
    						IC_EnableTrigger(hGrabber,1);
    						IC_SetFrameReadyCallback (hGrabber, *TriggerCallback, (void*)&ImageReceived);
    						IC_SetContinuousMode(hGrabber,0);
    
    						if(IC_StartLive (hGrabber, 0)==IC_SUCCESS)
    						{
    							Tries = 60; // Tries for time out. Depends on the Sleep time and the frame rate.
    							while(Tries > 0 && ImageReceived == 0)
    							{
    								Sleep( 1000 );
    								Tries--;
    							}	
    
    							printf("Loop ended\n");
    						}
    And it works as expected.

    IC_SetContinuousMode(hGrabber,0);

    is correct, the paramater must be "0".
    Best regards
    Stefan
    IC Imaging Control Support

  3. #63
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    in my program its not working
    So if you said that it is correct, it's another place that has the bug but I do not think so because when I am not using the trigger works its impecable

    the test where I did plugging the cable that very briefly that does not work with my program
    Last edited by icemake; May 17, 2013 at 11:01:34.

  4. #64
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    I have another little question at the same time
    esque these lines of code can be used under Linux?

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

    Re: trigger problem

    Hello

    No, these lines can not be used in Linux. Unfortunately I have no Linux support at this point of time.
    Best regards
    Stefan
    IC Imaging Control Support

  6. #66
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    ok

    I will continue on windows until then
    thank you for your answers

  7. #67
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    I'm thinking about the program that you have shown and there is something I do not understand how can ImageReceived changed state by looking at the program there is no place where he can change?


    and you know when you can have support for Linux?
    because I'd like my program runs under Windows and Linux

    thank you in advance for your answers
    Last edited by icemake; May 21, 2013 at 09:02:55.

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

    Re: trigger problem

    Hi

    I copied a snipped of the complete program a few pages before. Its the one, you created. The ImageReceived changes state in the callback, I guess. However, in there is the position, where to save.

    and you know when you can have support for Linux?
    No. Sorry for that.
    Best regards
    Stefan
    IC Imaging Control Support

  9. #69
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    ok I'm inspired ANSIC to write
    therefore, after what you said
    void _cdecl TriggerCallback (HGRABBER hGrabber, unsigned char * pData, unsigned long frameNumber, void * data)
    that changes the value if I understand but I do not see when it is called
    I ask this because in my ImageReceived program never changes so I searched or it changed because as long as it does not change the camera take not image, I use the same signal in ICcapture and ICcapture he takes out a picture every second as I would

    ok
    Last edited by icemake; May 21, 2013 at 12:08:24.

  10. #70
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    have you any idea?

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

    Re: trigger problem

    TriggerCallback is a callback. It is called by the grabber, when a new image arrived and IC_SetContinuousMode(hGrabber,0); was called once.
    Best regards
    Stefan
    IC Imaging Control Support

  12. #72
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    agreed
    So it's really not logical that it does not work but works with IC Capture

  13. #73
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    Have you found something to make it work?

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

    Re: trigger problem

    Sorry, but you lost me.



    IC_EnableTrigger(hGrabber,1);

    This enables waiting for extern trigger in the camera. No images are provided now, until the trigger pulse generates a rising edge.


    IC_SetFrameReadyCallback (hGrabber, *TriggerCallback, (void*)&ImageReceived);

    This passes the address of the callback function to the internal grabber. Now the grabber knows, there is a callback, that shall be called, if a new image arrives.


    IC_SetContinuousMode(hGrabber,0);

    This tells the grabber to save all incoming image automatically in memory and call the callback function.


    if(IC_StartLive (hGrabber, 0)==IC_SUCCESS)

    This starts the live video. Now the grabber is waiting for incoming images.

    The following is the implmentation of the callback:
    Code:
    void  _cdecl TriggerCallback(HGRABBER hGrabber, unsigned char* pData, unsigned long frameNumber, void* Data)
    {
    	int *pImageReceived;
    	pImageReceived = (int*) Data;
    	*pImageReceived = 1;
    	printf("Callback called.\n");
    }
    Best regards
    Stefan
    IC Imaging Control Support

  15. #75
    Join Date
    Apr 2013
    Posts
    43

    Re: trigger problem

    yes this is what I have but it does not work yet
    if I send an external signal (which works with IC Capture) my program does not record images variable "ImageReceived" never changes state

Page 5 of 6 FirstFirst ... 3 4 5 6 LastLast

Similar Threads

  1. Problem with external trigger
    By edparber in forum Hardware and Driver
    Replies: 1
    Last Post: October 15, 2012, 10:19:58
  2. About extern Trigger Problem!!!
    By yangping1220 in forum IC Imaging Control .NET
    Replies: 2
    Last Post: December 7, 2011, 01:33:18
  3. problem synchronizing two cameras with external trigger
    By LH2011 in forum Hardware and Driver
    Replies: 1
    Last Post: July 18, 2011, 16:21:25
  4. trigger not available
    By windman in forum IC Imaging Control .NET
    Replies: 4
    Last Post: May 24, 2010, 09:52:55

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
  •