![]() |
VOOZH | about |
dotnet add package TcOpen.Inxton.TcoCognexVision.Wpf --version 0.12.0-alpha.111
NuGet\Install-Package TcOpen.Inxton.TcoCognexVision.Wpf -Version 0.12.0-alpha.111
<PackageReference Include="TcOpen.Inxton.TcoCognexVision.Wpf" Version="0.12.0-alpha.111" />
<PackageVersion Include="TcOpen.Inxton.TcoCognexVision.Wpf" Version="0.12.0-alpha.111" />Directory.Packages.props
<PackageReference Include="TcOpen.Inxton.TcoCognexVision.Wpf" />Project file
paket add TcOpen.Inxton.TcoCognexVision.Wpf --version 0.12.0-alpha.111
#r "nuget: TcOpen.Inxton.TcoCognexVision.Wpf, 0.12.0-alpha.111"
#:package TcOpen.Inxton.TcoCognexVision.Wpf@0.12.0-alpha.111
#addin nuget:?package=TcOpen.Inxton.TcoCognexVision.Wpf&version=0.12.0-alpha.111&prereleaseInstall as a Cake Addin
#tool nuget:?package=TcOpen.Inxton.TcoCognexVision.Wpf&version=0.12.0-alpha.111&prereleaseInstall as a Cake Tool
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:
Check general requisits for TcOpen here.
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.VAR_GLOBAL
myVeryFirstDatamanGVL : TcoCognexVision.TcoDatamanIO_v_5_x_x;
END_VAR
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.User Data - 64 bytes in the slots 6 to matches your requirements.Result Data - 64 bytes in the slots 7 to matches your requirements.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.TcoCore.TcoContext function block.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
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.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();
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
MAIN(PRG) add the call of the Run() method of the instance created in the previous step, according to the example.myVeryFirstTcoContextInstance.Run();
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>
Vortex Builder.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>
RenderableContentControl and bind its DataContext to the myVeryFirstTcoContextInstance.myVeryFirstDataman, using the PresentationType of the value Service.<vortex:RenderableContentControl DataContext="{Binding myVeryFirstTcoContextInstance.myVeryFirstDataman}" PresentationType="Service"/>
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
{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^);
designer(inoData:=_specificData );
designer.Service();
<vortex:RenderableContentControl DataContext="{Binding myVeryFirstTcoContextInstance.designer}" PresentationType="Service"/>
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-windows7.0 net5.0-windows7.0 is compatible. net6.0-windows net6.0-windows was computed. net7.0-windows net7.0-windows was computed. net8.0-windows net8.0-windows was computed. net9.0-windows net9.0-windows was computed. net10.0-windows net10.0-windows was computed. |
| .NET Framework | net48 net48 is compatible. net481 net481 was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.12.0-alpha.111 | 49 | 6/16/2026 |
| 0.12.0-alpha.108 | 57 | 6/15/2026 |
| 0.12.0-alpha.105 | 47 | 6/12/2026 |
| 0.12.0-alpha.101 | 54 | 6/11/2026 |
| 0.12.0-alpha.98 | 51 | 6/8/2026 |
| 0.12.0-alpha.88 | 79 | 5/28/2026 |
| 0.12.0-alpha.84 | 112 | 3/3/2026 |
| 0.12.0-alpha.81 | 85 | 1/27/2026 |
| 0.12.0-alpha.78 | 179 | 10/24/2025 |
| 0.12.0-alpha.75 | 181 | 10/13/2025 |
| 0.12.0-alpha.71 | 180 | 10/9/2025 |
| 0.12.0-alpha.69 | 192 | 9/30/2025 |
| 0.12.0-alpha.63 | 194 | 9/1/2025 |
| 0.12.0-alpha.58 | 184 | 7/17/2025 |
| 0.12.0-alpha.55 | 193 | 7/7/2025 |
| 0.12.0-alpha.51 | 213 | 5/20/2025 |
| 0.12.0-alpha.42 | 255 | 5/14/2025 |
| 0.12.0-alpha.38 | 223 | 3/12/2025 |
| 0.12.0-alpha.35 | 168 | 2/14/2025 |
| 0.12.0-alpha.30 | 143 | 2/11/2025 |
Early dev stage. Experimental. DO NOT USE IN PRODUCTION!!!