Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Vision AI Assistant

Visualize skill information with scripting

  • Last UpdatedFeb 12, 2024
  • 2 minute read

Using predefined APIs and a .dll file, you can view skill results in an AVEVA™ InTouch OMI application. Application Server scripts can be used to visualize skill characteristics and classified images.

After you install AVEVA Vision AI Assistant, the following files are available in the installed location C:\Program Files (x86)\AVEVA\Vision\bin\framework. The files needed are UD_Vision.aaPKG and VisionAI.dll.

The following is a sample script for the related procedure in this section:

Dim strEndDate as string;

Dim startDateTime as System.DateTime;

Dim endDateTime As System.DateTime;

Dim strBuilder as System.Text.StringBuilder;

Dim result as String;

Dim url as string;

'--------------------------------------------------------------------------------------------------------

url = "https://" + Me.ServerName + ":" + Me.PortNumber + "/apis/cameras/" + Me.CameraName + "/models/" + Me.SkillName + "/predictions/property/prediction/";

result = vision.getResponse(url, Me.Token);

Me.Score = result;

'--------------------------------------------------------------------------------------------------------

url = "https://" + Me.ServerName + ":" + Me.PortNumber + "/apis/cameras/" + Me.CameraName + "/models/" + Me.SkillName + "/predictions/property/label/";

result = vision.getResponse(url, Me.Token);

Me.CurrentLabel = result;

'--------------------------------------------------------------------------------------------------------

url = "https://" + Me.ServerName + ":" + Me.PortNumber + "/apis/cameras/" + Me.CameraName + "/models/" + Me.SkillName + "/predictions/property/labelCount=0/";

result = vision.getResponse(url, Me.Token);

Me.Label0Count = result;

'--------------------------------------------------------------------------------------------------------

url = "https://" + Me.ServerName + ":" + Me.PortNumber + "/apis/cameras/" + Me.CameraName + "/models/" + Me.SkillName + "/predictions/property/labelCount=1/";

result = vision.getResponse(url, Me.Token);

Me.Label1Count = result;

'--------------------------------------------------------------------------------------------------------

url = "https://" + Me.ServerName + ":" + Me.PortNumber + "/apis/cameras/" + Me.CameraName + "/models/" + Me.SkillName + "/predictions/property/imgFile/";

result = vision.getResponse(url, Me.Token);

Me.ImageFileName = result;

To view the skill information with scripting

  1. Using the System Platform IDE, create a galaxy.

  2. Import the UD_Vision.aaPKG and VisionAI.dll files.

  3. Optional: Create a ViewApp, layout, and graphics. Map the graphics on the layout to the attributes of the imported object (UD_Vision.aapkg).

  4. Update the script with the relevant properties.

    See the previous sample script. The script constructs the API calls and parses the data to be viewed in the OMI application.

  5. Deploy the application.

TitleResults for “How to create a CRG?”Also Available in