Supported platforms: CODESYS 3.5

 

ActiveX methods for camera

Description

This section describes methods for controlling cameras.

 

Cameras are controlled using CODESYS ActiveX element, for more information about ActiveX refer to CODESYS manual

 

 

Limitations

Camera is supported with CODESYS runtime version 1.0.4.0 or newer.

 

 

ColorKeying is supported with CODESYS runtime version 1.3.1.0 or newer.

 

 

NTSC camera is supported with CODESYS runtime version 1.4.2.7 or newer. 

 

Method Start

This method starts the pipeline and connects the stream to ActiveX element. The stream visibility is set by element’s Invisible parameter. If the pipeline is already started, method only connects ActiveX element to the stream and source parameters are ignored. Sink parameters instead are unique for each ActiveX control element. One stream can be shown at a one ActiveX element at the same time. It is recommended to call this at ActiveX control’s Initial calls.

Inputs

Parameter

Data type

Description

Source

STRING

Supported sources:

"camera1"

"camera2"

 

 

Source parameters

CONTROL_CAMERA_PARAMETERS

Parameters for camera source

Sink parameters

CONTROL_SINK_PARAMETERS

Parameters for sink

ColorKeying parameters

CONTROL_COLORKEYING_PARAMETERS

Parameters for ColorKeying

Additional Camera parameters

CONTROL_CAMERA_PARAMETERS2

Additional Parameters

Return value

Data type

Range

Description

RTS_IEC_RESULT

 

ERR_FAILED or ERR_OK

See 3S SysTypes library

For error codes, refer to 3S CmpErrors library

 

Method Stop

This method stops currently active camera input in the control window.

Return value

Data type

Range

Description

RTS_IEC_RESULT

 

ERR_FAILED or ERR_OK

See 3S SysTypes library

For error codes, refer to 3S CmpErrors library

Method ChangeSource

This method changes the source of ActiveX element and starts the stream if it is not started.

If the stream is already started, the source parameters are ignored.

Inputs

Parameter

Data type

Range

Description

Source

STRING

 

Supported sources:

"camera1" and "camera2"

Source parameters

CONTROL_CAMERA_PARAMETERS

 

Parameters for camera source

Sink parameters

CONTROL_SINK_PARAMETERS

 

Parameters for sink

ColorKeying parameters

CONTROL_COLORKEYING_PARAMETERS

 

Parameters for ColorKeying (does not affect)

Additional Camera parameters

CONTROL_CAMERA_PARAMETERS2

 

Additional Parameters

Return value

Data type

Range

Description

RTS_IEC_RESULT

 

ERR_FAILED or ERR_OK

See 3S SysTypes library

For error codes, refer to 3S CmpErrors library

 

 

Method UpdateParameters

Updates crop and rotation of the control window.

Inputs

Parameter

Data type

Range

Description

Source parameters

CONTROL_CAMERA_PARAMETERS

 

Parameters for camera source

Sink parameters

CONTROL_SINK_PARAMETERS

 

Parameters for sink

Return value

Data type

Range

Description

RTS_IEC_RESULT

 

ERR_FAILED or ERR_OK

See 3S SysTypes library

For error codes, refer to 3S CmpErrors library

See also

 

 

Source file topic000876.htm

Last updated 21-Feb-2025