IC Imaging Control ActiveX

ICImagingControl.DeviceCurrentActualFrameRate Property

ICImagingControl.DeviceCurrentActualFrameRate Property

Returns the frame rate currently used by the video capture device. A value of 0 indicates that this property is not supported by the video capture device.
Syntax:
Public DeviceCurrentActualFrameRate As Single
Limitations:

Run time only, read only. Only available in live mode.

Remarks:

DeviceCurrentActualFrameRate returns the number of frames actually sent by the video capture device. The actual frame rate depends on the bandwith and the video format. Therefore, the DeviceCurrentActualFrameRate may differ from the desired frame rate that has been set with the ICImagingControl.DeviceFrameRate property. It can be less than the desired frame rate if the bandwith is too low, but will never be greater.

If an application needs to display the actual frame rate, it is recommended to check the frame rate with DeviceCurrentActualFrameRate as shown in the example below.

Sample:

This example shows how to display the actual frame rate of the video capture device. A timer has been added to the application in order to update the display of the current frame rate periodically.

Private Sub Timer1_Timer()
    Dim currentFrameRate As Single
    currentFrameRate = 0
    ' Check whether the device is valid.
    If ICImagingControl1.DeviceValid Then
        ' Check whether the live video is running.
        If ICImagingControl1.LiveVideoRunning Then
            ' Get the current frame rate from ImagingControl.
            currentFrameRate = ICImagingControl1.DeviceCurrentActualFrameRate
            ' If it is greater than 0, the current frame rate is valid.
            If currentFrameRate > 0 Then
                ActFrameRate.Caption = Str(currentFrameRate)
            End If
        End If
    End If
   ' If currentFrameRate is equal to 0, it is not valid. That
   ' means that either the live video is not running, the device
   ' is invalid, or the device does not support this property.
    If currentFrameRate = 0 Then
        ActFrameRate.Caption = "n/a"
    End If
End Sub
See also: ICImagingControl, ICImagingControl.DeviceFrameRateAvailable, ICImagingControl.DeviceFrameRate, ICImagingControl.DeviceFrameRates

<< ICImagingControl

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us