LF: Camera Elements

Via Camera Elements, you can capture both still images and video files from a connected USB camera as they are displayed via the controller's HMI.

The captures are stored on the controller's SD card in the folder Media/Camera/BaseName_timestamp.jpg/avi.

To find the camera's supported resolutions:
 -PC: connecting the camera to PC and running the command “v4l2-ctl --list-formats-ext” works for many Linux-based cameras, and will return the the supported resolutions, and frame rates of the device.
 -PLC: if a USB camera is connected to the PLC at PLC powerup, a log will be created on the SD card in the locations /mnt/sd/Media/Camera/Camera.log

Capture Image

 

Parameter Name

Purpose

A

Image Base Name

Assign a String ASCII tag to contain the base file name

B

Image Width

You do not need to provide tags for Width and Height.
If desired, you can set constant values, or link a tag.

If Width and Height are both 0, or not set, maximum camera resolution will be used.

AOI: if the image is to be used in AOI to compare images, the resolution must be provided, and the only resolution supported is 640 x 480, as shown in the previous image.

C

Image Height

D

Status

1 = RC in progress

2 = AC in progress

0 = Finished successfully

-1 = No camera detected

-2 = Invalid resolution selected

E

Generated File Full Name

Assign a String ASCII tag to contain the generated file name; ensure that the tag comprises sufficient characters

 

Capture Video

 

 

Parameter Name

Purpose

A

Video Base Name

Assign a String ASCII tag to contain the base file name

B

Recording Time

Set the number of seconds to record the video from the controller

C

Width


If desired, you can set constant values, or link a tag.

Valid resolutions: 640x480 or 320x240 (Width x Height)

D

Height

E

Frame Rate

The minimum frame rate is 5 (less than that it will result in a zero size file)

E

Status

1 = RC in progress

2 = = AC in progress

0 = Finished successfully

-1 = No camera detected

-2 = Invalid resolution selected

E

Generated File Full Name

Assign a String ASCII tag to contain the generated file name; ensure that the tag comprises sufficient characters

 

Related Topics

LF: AOI Compare Image