TcOpen.Inxton.TcoCognexVision.Wpf
0.11.0-alpha.84
See the version list below for details.
dotnet add package TcOpen.Inxton.TcoCognexVision.Wpf --version 0.11.0-alpha.84
NuGet\Install-Package TcOpen.Inxton.TcoCognexVision.Wpf -Version 0.11.0-alpha.84
<PackageReference Include="TcOpen.Inxton.TcoCognexVision.Wpf" Version="0.11.0-alpha.84" />
paket add TcOpen.Inxton.TcoCognexVision.Wpf --version 0.11.0-alpha.84
#r "nuget: TcOpen.Inxton.TcoCognexVision.Wpf, 0.11.0-alpha.84"
// Install TcOpen.Inxton.TcoCognexVision.Wpf as a Cake Addin #addin nuget:?package=TcOpen.Inxton.TcoCognexVision.Wpf&version=0.11.0-alpha.84&prerelease // Install TcOpen.Inxton.TcoCognexVision.Wpf as a Cake Tool #tool nuget:?package=TcOpen.Inxton.TcoCognexVision.Wpf&version=0.11.0-alpha.84&prerelease
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:
- Dataman firmware v5.x.x
- 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 itemsInputs.PnIoBoxState
,Inputs.PnIoBoxDiag
andOutputs.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 theTcoDataman_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 theRun()
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 itsDataContext
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 exampleStackPanel
and bind itsDataContext
to theMAIN
of theEntryPointToYourPlc
.<StackPanel DataContext="{Binding EntryPointToYourPlc.MAIN}"> </StackPanel>
3. Into the container added, insert the
RenderableContentControl
and bind itsDataContext
to themyVeryFirstTcoContextInstance.myVeryFirstDataman
, using thePresentationType
of the valueService
.<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 TodoEnterLinkToExample
How to video could be found here TodoEnterLinkToVideo
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-windows7.0 is compatible. net6.0-windows was computed. net7.0-windows was computed. net8.0-windows was computed. |
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- TcOpen.Inxton.TcoCore.Wpf (>= 0.11.0-alpha.84)
- TcOpen.TcoCognexVisionConnector (>= 0.11.0-alpha.84)
-
net5.0-windows7.0
- TcOpen.Inxton.TcoCore.Wpf (>= 0.11.0-alpha.84)
- TcOpen.TcoCognexVisionConnector (>= 0.11.0-alpha.84)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.11.0-alpha.85 | 57 | 12/5/2024 |
0.11.0-alpha.84 | 38 | 12/5/2024 |
0.11.0-alpha.83 | 49 | 12/4/2024 |
0.11.0-alpha.79 | 75 | 10/10/2024 |
0.11.0-alpha.74 | 84 | 6/25/2024 |
0.11.0-alpha.73 | 58 | 6/17/2024 |
0.11.0-alpha.71 | 70 | 6/3/2024 |
0.11.0-alpha.68 | 70 | 4/29/2024 |
0.11.0-alpha.65 | 75 | 3/27/2024 |
0.11.0-alpha.64 | 77 | 3/21/2024 |
0.11.0-alpha.63 | 76 | 3/18/2024 |
0.11.0-alpha.62 | 64 | 3/14/2024 |
0.11.0-alpha.61 | 66 | 2/26/2024 |
0.11.0-alpha.60 | 78 | 2/13/2024 |
0.11.0-alpha.59 | 63 | 1/22/2024 |
0.11.0-alpha.58 | 59 | 1/22/2024 |
0.11.0-alpha.57 | 76 | 1/19/2024 |
0.11.0-alpha.56 | 78 | 1/8/2024 |
0.11.0-alpha.55 | 84 | 1/4/2024 |
0.11.0-alpha.54 | 91 | 12/12/2023 |
0.11.0-alpha.53 | 75 | 12/12/2023 |
0.11.0-alpha.52 | 93 | 12/6/2023 |
0.11.0-alpha.50 | 89 | 11/30/2023 |
0.11.0-alpha.49 | 81 | 11/24/2023 |
0.11.0-alpha.48 | 81 | 11/24/2023 |
0.11.0-alpha.45 | 99 | 10/6/2023 |
0.11.0-alpha.44 | 80 | 9/22/2023 |
0.11.0-alpha.43 | 90 | 9/7/2023 |
0.11.0-alpha.42 | 88 | 9/7/2023 |
0.11.0-alpha.41 | 84 | 9/5/2023 |
0.11.0-alpha.35 | 105 | 7/25/2023 |
0.11.0-alpha.32 | 94 | 7/20/2023 |
0.11.0-alpha.29 | 83 | 5/22/2023 |
0.11.0-alpha.26 | 90 | 4/21/2023 |
0.11.0-alpha.23 | 110 | 3/22/2023 |
0.11.0-alpha.19 | 104 | 2/22/2023 |
0.11.0-alpha.17 | 97 | 2/15/2023 |
0.11.0-alpha.16 | 116 | 2/2/2023 |
0.11.0-alpha.15 | 109 | 1/29/2023 |
0.11.0-alpha.12 | 104 | 1/20/2023 |
0.11.0-alpha.8 | 109 | 1/11/2023 |
0.11.0-alpha.6 | 106 | 12/20/2022 |
0.11.0-alpha.3 | 99 | 12/12/2022 |
0.11.0-alpha.2 | 102 | 12/6/2022 |
0.10.0-alpha.31 | 98 | 11/28/2022 |
0.10.0-alpha.30 | 101 | 11/23/2022 |
0.10.0-alpha.27 | 111 | 11/14/2022 |
0.10.0-alpha.22 | 95 | 11/2/2022 |
0.10.0-alpha.20 | 103 | 10/27/2022 |
0.10.0-alpha.15 | 104 | 10/24/2022 |
0.10.0-alpha.10 | 110 | 10/13/2022 |
0.10.0-alpha.9 | 116 | 10/13/2022 |
Early dev stage. Experimental. DO NOT USE IN PRODUCTION!!!