VOOZH about

URL: https://www.nuget.org/packages/TcOpen.TcoCognexVisionConnector/

⇱ NuGet Gallery | TcOpen.TcoCognexVisionConnector 0.12.0-alpha.111




👁 Image
TcOpen.TcoCognexVisionConnector 0.12.0-alpha.111

This is a prerelease version of TcOpen.TcoCognexVisionConnector.
dotnet add package TcOpen.TcoCognexVisionConnector --version 0.12.0-alpha.111
 
 
NuGet\Install-Package TcOpen.TcoCognexVisionConnector -Version 0.12.0-alpha.111
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TcOpen.TcoCognexVisionConnector" Version="0.12.0-alpha.111" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TcOpen.TcoCognexVisionConnector" Version="0.12.0-alpha.111" />
 
Directory.Packages.props
<PackageReference Include="TcOpen.TcoCognexVisionConnector" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TcOpen.TcoCognexVisionConnector --version 0.12.0-alpha.111
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TcOpen.TcoCognexVisionConnector, 0.12.0-alpha.111"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TcOpen.TcoCognexVisionConnector@0.12.0-alpha.111
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TcOpen.TcoCognexVisionConnector&version=0.12.0-alpha.111&prerelease
 
Install as a Cake Addin
#tool nuget:?package=TcOpen.TcoCognexVisionConnector&version=0.12.0-alpha.111&prerelease
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

TcoCognexVision

Introduction

The TcoCognexVision is a set of libraries covering the product portfolio of the vision systems from the vendor Cognex for the target PLC platform Twincat and TcOpen framework.

The package consists of a PLC library providing control logic and its .NET twin counterpart aimed at the visualization part. This package currently covers following product range:

  1. Dataman firmware v5.x.x
  2. More enroute

General TcOpen Prerequisites

Check general requisits for TcOpen here.

Dataman v5.x.x

  • PLC enviroment


    Preconditions: The gsdml file(s) included in this package is(are) copied into the subfolder ..\Config\Io\Profinet\ of the TwinCAT3 instalation folder, before opening Visual Studio. The Profinet interface of the slave device is activated, its Profinet name is set and its network parameters are set to match the address range of the Profinet master. This settings needs to by done by DATAMAN SETUP TOOL SOFTWARE provided by Cognex.

    • Implementation steps.
      1. Declare the hardware structure in the Global Variable list (GVL).
      VAR_GLOBAL
       myVeryFirstDatamanGVL 	: TcoCognexVision.TcoDatamanIO_v_5_x_x;
      END_VAR
      
      2. Build the XAE project.
      3. Add Profinet master device, set its network adapter and network parameters.
      4. Using the gsdml file mentioned, add Profinet slave device, choose proper DAP (Device Access Point) and set its Profinet name and network parameters to match those already assigned by the configuration tool.
      5. If necessary for your application, change the predefined submodule User Data - 64 bytes in the slots 6 to matches your requirements.
      6. If necessary for your application, change the predefined submodule Result Data - 64 bytes in the slots 7 to matches your requirements.
      7. Link all items of the structure GVL.myVeryFirstDatamanGVL with the respective items of the Application Process Identifier (API) of the slave device, so as the items Inputs.PnIoBoxState, Inputs.PnIoBoxDiag and Outputs.PnIoBoxCtrl.
      8. Create the Function Block that extends the TcoCore.TcoContext function block.
      9. Inside the declaration part of the function block created, add an instance of the TcoCognexVision.TcoDataman_v_5_x_x function block with the initialization according to the example.
      FUNCTION_BLOCK myVeryFirstTcoContext EXTENDS TcoCore.TcoContext
      VAR
       {attribute addProperty Name "<#Enter the user friendly name of this instance here!!!#>"}
       myVeryFirstDataman : TcoCognexVision.TcoDataman_v_5_x_x(THIS^);
      END_VAR
      
      10. Add the Main method to the function block created in the step 8, and insert the TcoDataman_v_5_x_x instance call with passing the mapped hardware structure.
      11. Add call of the method Service() according to the example. By calling this method, all control elements of this component are accessible later in the visualization.
      myVeryFirstDataman(inoIoData:= GVL.myVeryFirstDatamanGVL);
      myVeryFirstDataman.Service();
      
      12. In the declaration part of the MAIN(PRG) create an instance of the function block created in the step 8 according to the example.
      PROGRAM MAIN
      VAR
       myVeryFirstTcoContextInstance :	myVeryFirstTcoContext;
      END_VAR
      
      13. Into the body of the MAIN(PRG) add the call of the Run() method of the instance created in the previous step, according to the example.
      myVeryFirstTcoContextInstance.Run();
      
      14. Build and save the XAE project.
      15. Activate configuration, load the PLC program and swith the PLC into the run mode.

  • .NET enviroment


    Preconditions: All neccessary packages are installed, all neccessary references are set, connector to the target PLC is set. MainWindow.xaml has its view model declared and its DataContext is set to this view model, according to the example.
     <Window.DataContext>
     <local:MainWindowViewModel />
     </Window.DataContext>
    

    • Implementation steps.
      1. Run the Vortex Builder.
      2. Into the MainWindow.xaml insert any kind of container, for example StackPanel and bind its DataContext to the MAIN of the EntryPointToYourPlc.
      <StackPanel DataContext="{Binding EntryPointToYourPlc.MAIN}">
      </StackPanel>
      
      3. Into the container added, insert the RenderableContentControl and bind its DataContext to the myVeryFirstTcoContextInstance.myVeryFirstDataman, using the PresentationType of the value Service.
      <vortex:RenderableContentControl DataContext="{Binding myVeryFirstTcoContextInstance.myVeryFirstDataman}" PresentationType="Service"/>
      
      4. After starting the application and expanding the view, final view should look as follows:
  • links

    • Example project could be found here
    • How to video could be found here

Components

TcoDataman

TcoInsight

TcoDesigner

Definition UserData and ResultsData

Important: Project specific data have to be derived from TcoCognexVision.TcoDesignerRootContainer (this is required for correctly rendered Ui)

 FUNCTION_BLOCK ProjectSpecificData EXTENDS TcoCognexVision.TcoDesignerRootContainer 
 VAR_INPUT
 END_VAR
 VAR_OUTPUT
 END_VAR
 VAR
 {attribute wpf [Container(Layout.Stack,"PcToPlc")]}	
 {attribute wpf [Group(Layout.GroupBox)]}
 {attribute addProperty Name "<#PcToPlc#>"}
 PcToPlc:DesignerResults;
 {attribute wpf [Container(Layout.Stack,"PlcToPc")]}	
 {attribute wpf [Group(Layout.GroupBox)]}
 {attribute addProperty Name "<#PlcToPc#>"}
 PlcToPc:DesignerUserData;
 
 END_VAR

where DesignerResults are (here may be placed customized data (what project required from vision system to plc))

 TYPE DesignerResults EXTENDS TcoCore.TcoStruct :
 STRUCT
 {attribute addProperty Name "<#ResultBool#>"}
 ResultBool:BOOL;
 {attribute addProperty Name "<#ResultInt#>"}
 ResultInt:INT;
 {attribute addProperty Name "<#ResultString#>"}
 ResultString:STRING;

 
 {attribute addProperty Name "<#Data inspector#>"}
 DigitalInspector:TcoInspectors.TcoDigitalInspector(THISSTRUCT);
 {attribute addProperty Name "<#Data inspector#>"}
 DataInspector:TcoInspectors.TcoDataInspector(THISSTRUCT);
 
 {attribute addProperty Name "<#Analog inspector#>"}
 AnalogInspector:TcoInspectors.TcoAnalogueInspector(THISSTRUCT);
 END_STRUCT
 END_TYPE

and where DesignerUserData are (here may be placed customized data (what project required from plc to vision system))

 TYPE DesignerUserData EXTENDS TcoCore.TcoStruct :
 STRUCT
 {attribute addProperty Name "<#ResultBool#>"}
 ResultBool:BOOL;
 {attribute addProperty Name "<#ResultInt#>"}
 ResultInt:INT;
 {attribute addProperty Name "<#ResultString#>"}
 ResultString:STRING;
 
 END_STRUCT
 END_TYPE

Declaration Plc

 {attribute addProperty Name "<#Cognex Designer#>"}
	designer : TcoCognexVision.TcoDesigner_v_2_x_x(THIS^);
	//Project specific data
	{attribute addProperty Name "<#Project Specific Data#>"}
 _specificData : ProjectSpecificData(THIS^);

Initialization

 designer(inoData:=_specificData );
 designer.Service();

XAML

 <vortex:RenderableContentControl DataContext="{Binding myVeryFirstTcoContextInstance.designer}" PresentationType="Service"/>

Service View

ProjectSpecific data defined above in UI

Export symbols for visions purposes

If filter field is empty all data wil be generated. If you would to ganerate only specific data you may apply filter or tail filter.(see picture below).

MAIN.myVeryFirstTcoContextInstance._specificData.PcToPlc.AnalogInspector._data.DetectedStatus

Final data suitable for import into designer will be:

MAIN.myVeryFirstTcoContextInstance._specificData.PcToPlc.AnalogInspector._data.RequiredMin;System.Double;
MAIN.myVeryFirstTcoContextInstance._specificData.PcToPlc.AnalogInspector._data.RequiredMin;System.Double;
MAIN.myVeryFirstTcoContextInstance._specificData.PcToPlc.AnalogInspector._data.DetectedStatus;System.Double;
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 is compatible.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Framework net48 net48 is compatible.  net481 net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TcOpen.TcoCognexVisionConnector:

Package Downloads
TcOpen.Inxton.TcoCognexVision.Wpf

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.12.0-alpha.111 53 6/16/2026
0.12.0-alpha.108 60 6/15/2026
0.12.0-alpha.105 52 6/12/2026
0.12.0-alpha.101 59 6/11/2026
0.12.0-alpha.98 58 6/8/2026
0.12.0-alpha.88 84 5/28/2026
0.12.0-alpha.84 122 3/3/2026
0.12.0-alpha.81 101 1/27/2026
0.12.0-alpha.78 162 10/24/2025
0.12.0-alpha.75 183 10/13/2025
0.12.0-alpha.71 186 10/9/2025
0.12.0-alpha.69 191 9/30/2025
0.12.0-alpha.63 197 9/1/2025
0.12.0-alpha.58 177 7/17/2025
0.12.0-alpha.55 180 7/7/2025
0.12.0-alpha.51 218 5/20/2025
0.12.0-alpha.42 267 5/14/2025
0.12.0-alpha.38 215 3/12/2025
0.12.0-alpha.35 176 2/14/2025
0.12.0-alpha.30 140 2/11/2025
Loading failed

Early dev stage. Experimental. DO NOT USE IN PRODUCTION!!!