Results 1 to 10 of 10

Thread: VB6 Write buffer data

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    6

    VB6 Write buffer data

    I have a small task I need to try to accomplish. Circumstances here have left us with no real programmer so I need to try to find a solution.

    I need to figure out how to take camera data from a frame grabber and write it to disk.

    Code:
        'Acquire multiple images into the frame buffer  
       Call frmMain.DTAFGMON1.AcquireMem(0, 2, ContinuousAsync)
    This seems to be where data is put into a buffer. I just need to write it to the HDD.
    Since this is a continuous stream, I would need it to write to disk until the acquisition is manually stopped.

    Thanks for any help.

    SNT

  2. #2

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    6

    Re: VB6 Write buffer data

    It seems that the DTAFGMON1 object is where the feed is displayed onscreen. So I think all I need to do is somehow take that data and write it disk. Would it be something like:


    Code:
     Call frmMain.somewritefunction.AcquireMem(0, 2, ContinuousAsync)
    ?

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    6

    Re: VB6 Write buffer data

    In case it is useful, I attached the project.

    Thanks
    Attached Files Attached Files

  4. #4
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: VB6 Write buffer data

    Hi,
    How is your Project going.

    If you post a zip instead of a rar You'll get more help.

    I need to figure out how to take camera data from a frame grabber and write it to disk.
    Yip, this is the ''DTAFGMON1'' Acquiring multiple images into the frame buffer
    'Acquire multiple images into the frame buffer
    Call frmMain.DTAFGMON1.AcquireMem(0, 2, ContinuousAsync)
    and this is Saving image to bitmap file
    Code:
    'Save image to bitmap file.
            Dim FrameBuffer As DTBuffer
            Set FrameBuffer = frmMain.DTAFGMON1.GetBuffer(0)
            Call FrameBuffer.SaveImage(frmCommonDialog.CommonDialog1.FileName, Bitmap)
    Hope this helps you!

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    6

    Re: VB6 Write buffer data

    Thanks for the help.

    What I need to do is somehow write the stream from the camera to disk.
    I am guessing that I can use similar code to the bitmap:

    Code:
            Dim FrameBuffer As DTBuffer
            Set FrameBuffer = frmMain.DTAFGMON1.GetBuffer(0)
    But being that I know absolutely nothing about programming, I am not sure how to finish it.

    Edit: Here it is in zip format.
    Attached Files Attached Files
    Last edited by xSNTx; Jun 17th, 2010 at 03:07 PM. Reason: Added attachement

  6. #6
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: VB6 Write buffer data

    Did you run the Project?.

    I am guessing but, the VB_Example came with ''DTFGCTLS.dll'' install ?.

    You need moor info on the ''DTAFGMON1 object''

  7. #7

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    6

    Re: VB6 Write buffer data

    Quote Originally Posted by 5ms? View Post
    Did you run the Project?.

    I am guessing but, the VB_Example came with ''DTFGCTLS.dll'' install ?.

    You need moor info on the ''DTAFGMON1 object''
    Yes, it runs fine, but there is no "record".

    This is software that came with the board from the manufacturer. I do not have the source code to the DTAFGMON1 object, which I think is what I need.

  8. #8
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: VB6 Write buffer data

    This is software that came with the board from the manufacturer. I do not have the source code to the DTAFGMON1 object, which I think is what I need.
    Is there no doc's or help?
    lists of the available properties, methods, and events ?


    In the,
    Code:
    Public Sub mnuStartContinuous_Click()
    You have,
    Code:
    'Acquire multiple images into the frame buffer
            Call frmMain.DTAFGMON1.AcquireMem(0, 2, ContinuousAsync)
    and in,
    Code:
    mnuSaveImageFile_Click
    Code:
     'Acquire an image into the frame buffer.
    frmMain.DTAFGMON1.AcquireMem(0, 1, SingleShot)
    So, in the, ''Save image to bitmap file''
    Code:
            'Save image to bitmap file.
            Dim FrameBuffer As DTBuffer
            Set FrameBuffer = frmMain.DTAFGMON1.GetBuffer(0)
    You Set Buffer to DTAFGMON1.GetBuffer(0)
    So maybe same for ContinuousAsync.
    Just a guess !
    Maybe the manufacturer can help with that.

    But you know you have,
    Code:
    frmMain.DTAFGMON1.Visible
    frmMain.DTAFGMON1.AcquireMem(0, 1, SingleShot)
    frmMain.DTAFGMON1.GetBuffer(0)
    frmMain.DTAFGMON1.AcquireMem(0, 2, ContinuousAsync)
    frmMain.DTAFGMON1.CloseDevice
    frmMain.DTAFGMON1.StopAcquire
    'Open the Configuration property pages
    DTAFGMON1.ShowPropPages(frmMain.hWnd, pfInput Or pfOutput Or pfCapture Or pfLUT)
    frmMain.DTAFGMON1.OpenDevice(BoardName)
    frmMain.DTAFGMON1.LoadConfigFile
    NumDTBoards = frmMain.DTAFGMON1.DeviceCount
    cboSelectDevice.AddItem frmMain.DTAFGMON1.GetDeviceName(i)
    frmMain.DTAFGMON1.WriteDigitalOutputPattern(DigitalOutputPattern)
    DigInValue = frmMain.DTAFGMON1.ReadDigitalInputPattern
    frmMain.DTAFGMON1.Timeout = 
    frmMain.DTAFGMON1.InputLineEventMask = HF
    And a ''DTBuffer''.

    So that's a good start.

  9. #9
    Hyperactive Member
    Join Date
    Sep 2009
    Location
    Lost in thought
    Posts
    349

    Re: VB6 Write buffer data

    You can easily incorporate video capture capabilities into your application by using the AVICap window class. AVICap provides applications with a simple, message-based interface to access video and waveform-audio acquisition hardware and to control the process of streaming video capture to disk.

    Look here!
    .

    The answer to your question is Here
    And here
    C:\Program Files\Microsoft Visual Studio\MSDN98\98VSa\1033\SAMPLES\VB98

    Please go to the "Thread Tools" menu at the top of this Thread, and click "Mark Thread Resolved" when you have your answer.
    So I can fine the answer when I need it.

    how to stop the playsound when it is in loop..Play more than 1 sound at a time..
    ini file Check if IP changed Strings 'Split', 'Left' and 'Right'
    Save And Load an Array of list-boxes, to and from a file......list-box and CommonDialog
    Quote Originally Posted by RobDog888

    So please install VB6 service pack 6 as its the latest and last supported service pack MS will ever make.
    http://support.microsoft.com/kb/q198880/ I'm sure this will fix your issue
    The only reason some people get lost in thought is because it’s unfamiliar territory. —Paul Fix

  10. #10

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    6

    Re: VB6 Write buffer data

    Quote Originally Posted by 5ms? View Post
    You can easily incorporate video capture capabilities into your application by using the AVICap window class. AVICap provides applications with a simple, message-based interface to access video and waveform-audio acquisition hardware and to control the process of streaming video capture to disk.

    Look here!

    Thank you. I will check that out today and let you how it goes.

    -SNT

Posting Permissions

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



Click Here to Expand Forum to Full Width