You are here: Start » Program Examples » WebHMI Runtime for Linux Code Reading Demo (codes_reading_camera_demo)

WebHMI Runtime for Linux Code Reading Demo (codes_reading_camera_demo)

Aim

The task of this example is to prepare application which is based on WebHmi creation. Application initialize camera parameters, grabs image using GigE Vision filters, reads codes and displays the result of the inspection on the WebHmi.

Input

Images are acquired by GigEVision_GrabImage filter.

Output

Application with WebHmi interface which displays results of the inspection in web browser:

Hints

In the following articles you can find information about designing WebHmi and Event Handling mechanism:

Solution (AVS)

  1. In the InitializeParameters marcrofilter adjust ExposureTime, Gain and WhiteBalance with GigEVision_SetRealParameter and GigEVision_SetEnumParameter filters.
  2. In the VariantQR use ReadSingleQRCode. Gain point of mass for path outline with PathMassCenter. Draw result string with DrawStrings_SingleColor filter, use the path mass center as location.
  3. In the VariantBarcode use ReadSingleBarcode. Draw result string with DrawStrings_SingleColor filter, use the outBarcode.Position.Origin as location.
  4. Create Event handler OnButton1_Click and Global Parameter GlobalExit(bool). In event handler use WriteParameter and modify global to True.
  5. Use ReadParameter to acquire GlobalExit value. At the end of the Main macrofilter place Exit. Connect it with the value of GlobalExit.

Macrofilter Main

Macrofilter InitializeParameters

Macrofilter VariantQR(True)

Macrofilter VariantQR(False)

Macrofilter VariantBarcode(True)

Macrofilter VariantBarcode(False)

Event handling macrofilter OnButton1_Click

Further Readings