Giter Club home page Giter Club logo

mappvision-demo's Introduction

Table of Contents

Introduction

This is a demo application for B&R vision camera. It is developed and maintained by vision enthusiasts and is not and official B&R product. For a detailed description see this documentation.

Note: A basic version of this demo can be found here

Note: For better alignment between the index number and IO names most arrays start at index 1 (not 0). This can cause issues with C Task since these tasks do not support arrays starting at index 1. Most arrays can be redefined starting with 0 without any issues from a code perspective but it will cause an empty line in the mappView result tables.

Note: There is a user task with actions and type definitions to ease embedden user code in the vision task.

Features

This vision sample contains a lot of functions that are not included in the mappVision HMI (Vision cockpit). These include:

  • Easy-to-use mappView visualization
  • All IO data points of the camera are connected to the visualization
  • Image archive to save the images
    • different formats available (jpg, bmp)
    • selection of quality levels for compressed images (jpg)
    • Embedded overlay on the image
  • Rotation of the image on the main page
  • fast repetitive mode (5 fps/200ms)
  • Simultaneous use of several cameras in one visualization
  • Use of the nettime function together with axes
  • Integration of Lightbar and Backlight
  • Recipe management for the used parameters

Requirements (current used versions)

Should also work with newer and some older versions

  • Automation Studio 4.12
  • Automation Runtime B4.93 or higher
  • mapp 5.22 (Cockpit, motion, service, view, vision) *Chrome Browser

Recommended task class is #8 with a 10ms cycle time. For the nettime and axis tasks use #1

version 5.22.1

Fixed:

  • Recipe for vision task did not work as the light loop overwritten the index string
  • Page fault for click on image if no element was clicked twice. Removed style creating string as it was not needed at the start for click

Modifided:

  • Set project up to include user drive web folder, as this includes the issue web page.
  • Match score and scale er now in percent
  • Added units for matching results

version 5.22.0

  • Updated to AS 4.12
  • Updated to Mapp 5.22
  • Major rework of the entire application
  • Added brdk vision libraries to the project
  • No need to route any more
  • Always using nettime for triggering
  • Support of multiple camera at the same time
  • Prepared for smart camera support, which will be implementated later on

Version 5.15

  • Update recipe managment to V1.0
  • Updated constant for code reader parameter "ParameterMode"
  • Fix ViColor
  • Make it possible to change connections
  • Updated to official 5.15 versions and official lightbar upgrade
  • Vi_Optics added

Version 2.3

  • Added RouteInfo_Tool.ps1
  • Added color detection first version
  • Split up main task into main and visu, integrated light task into main and visu
  • Added functionality to rotate the image on the main page
  • Click on the image on the main page toggles now the text position (crosshair-details) from left to right
  • CodeReader and OCR Text will be shown on the main page and saved in SVG file
  • Added proxy task to eliminate routing batch file
  • Added Pixel Counter hardware and code

Version 2.2

  • Added new functionality to show images in every size on the web viewer widget on the main page
  • Improved repetitive mode
  • SVG files save now all information. It is possible to click on the crosshairs to show the details
  • Added diagnostic data creation
  • Updated recipe management
  • Changed public arrays start index to 0 to avoid issues with C task
  • Added a VC4 visualization
  • Added functionality to show the image on the VC4 visualization (documentation still missing)
  • After boot the first found light will be selected
  • Some additional improvements, code optimizations & bug fixes

Version 2.1

  • First public release

mappvision-demo's People

Contributors

buhlj avatar horngacherb avatar jobfranken avatar muehlbauem avatar samuelotto avatar stephan1827 avatar volnyjakub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mappvision-demo's Issues

result arrows not working on main page

the eventbinding for the arrows not work for every cam. instead of the existing binding in MainContent.eventbinding use:
 <EventBinding id="EventBinding_18">
      <Source xsi:type="widgets.brease.Image.Event" contentRefId="contentMain" widgetRefId="numDetailsNoUp" event="Click" />
      <Operand datatype="ANY_INT" name="ix2">
        <ReadTarget xsi:type="session.VariableAction.Read" refId="camIdx">
          <Method xsi:type="session.VariableAction.GetValue" />
        </ReadTarget>
      </Operand>
      <EventHandler condition="ix2 = 4">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[4].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix2 = 3">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[3].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix2 = 1">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[1].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix2 = 2">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[2].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix2 = 4">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[4].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix2 = 5">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[5].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix2 = 6">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[6].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="1" />
          </Target>
        </Action>
      </EventHandler>
    </EventBinding>
    <EventBinding id="EventBinding_19">
      <Source xsi:type="widgets.brease.Image.Event" contentRefId="contentMain" widgetRefId="numDetailsNoDown" event="Click" />
      <Operand datatype="ANY_INT" name="ix">
        <ReadTarget xsi:type="session.VariableAction.Read" refId="camIdx">
          <Method xsi:type="session.VariableAction.GetValue" />
        </ReadTarget>
      </Operand>
      <EventHandler condition="ix = 1">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[1].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="-1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix = 2">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[2].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="-1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix = 3">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[3].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="-1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix = 4">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[4].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="-1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix = 4">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[4].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="-1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix = 5">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[5].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="-1" />
          </Target>
        </Action>
      </EventHandler>
      <EventHandler condition="ix = 6">
        <Action>
          <Target xsi:type="opcUa.NodeAction" refId="::Vision1:hmiInstance[6].in.cmd.intElemId">
            <Method xsi:type="opcUa.NodeAction.AddValue" value="-1" />
          </Target>
        </Action>
      </EventHandler>
    </EventBinding>

mappview navigation is hanging

After returning from Page Vision HMI, mappView navigation is not more working and the content at the bottom is emthy.
image

Loading a vision application from the PLC is broken since mapp 5.15

Trying to load a vision application causes error -1045168083

The problem is caused by a change in the startup behavior in mappVision 5.15. The vision component is transferred in the init part of the task "YourTask" to the global structure gVisionSensor. The vision component does not contain valid data in the init part causing the value CameraType to be 0.

Flash Color Selection not possible

When selecting the Setup FlyOut the "DropDownBoxFlashColor" shows no data.
When looking deeper into it I realized that this issue seems to be related the missing Ordernumber.

image

Since there's no Ordernumber the "brdkViBase_LEDColorToOptions" function isn't working correctly.
I tried adding the ordernumber manually but this didn't change anything.

The only workaround I could find was to either force the values in the IO-Mapping or manually setting the color at "hmiInstance[i].in.recipe.cam.flashColorStr".

Versions used:
AR B4.93
mappVision 5.22.0
mappCockpit 5.22.0
mappView 5.22.1
mappMotion 5.22.1
mappServices 5.22.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.