Skip to content

1104 new featureaxovisionpro alternative#1159

Open
peterbarancek wants to merge 5 commits into
devfrom
1104-new-featureaxovisionpro-alternative
Open

1104 new featureaxovisionpro alternative#1159
peterbarancek wants to merge 5 commits into
devfrom
1104-new-featureaxovisionpro-alternative

Conversation

@peterbarancek
Copy link
Copy Markdown
Collaborator

No description provided.

Introduces AxoVisionProNet component for Cognex VisionPro PC-based vision systems, including:
- PLC-side S7-extern class with task-based control, config, and status structures
- .NET Twin integration for data marshaling and remote task invocation
- Generic containers for user-specific data exchange
- Robust async TCP client using a JSON protocol for runtime communication
- Extensible protocol message definitions and envelope
Enables seamless, type-safe PLC ↔ VisionPro PC integration in industrial automation projects.
Major protocol and client refactor for Cognex VisionPro integration:
- Add new PLC remote tasks: ReceiveSpecificData, TriggerWithSpecificData, SendSpecificDataAndTypes, with corresponding methods and execution logic.
- Extend protocol: triggerId (short) and Variant (string) in requests/responses; new InspectionFault and ReceiveSpecificData payloads; support for type-annotated data.
- VisionTcpClient: switch to per-request Channels for response correlation, support multi-step trigger flows, improve error diagnostics, and increase timeouts to 5s.
- Add VisionTypedPayloadSerializer for round-tripping .NET objects with type metadata.
- Update status and control structures for new protocol fields.
- Remove obsolete protocol code and improve extensibility for future data flows.
Implement full TriggerWithSpecificData flow in AxoVisionProNet and VisionTcpClient, including sending/receiving specific data payloads and handling returned data. Extend error handling to propagate runtime error messages from all remote tasks to the messenger and status descriptions. Add new message types, payload fields, and configurable timeouts to support the new functionality.
- Introduce RunWithLifecycleAsync for consistent task status updates
- Add TaskLifecycleCodes for clear action/error code mapping
- Refactor error/action message handling and remove legacy messenger logic
- Update all remote task methods to set status before exceptions
- Add ConnectTimeout and unified per-task timeout config to VisionTcpClientOptions
- Implement TCP connection timeout with descriptive errors
- Remove obsolete DataEntity property and related status logic
- Modernize and streamline component lifecycle and error reporting
- Added `USING AXOpen.Components.Abstractions;` for required abstractions.
- Introduced `DeviceIpAddress` and `Proxy` properties with `{S7.extern=ReadWrite}`.
- Improved task execution with error handling for remote exceptions.
- Added logic to disable tasks based on busy states or manual mode.
- Updated `Restore` method to reset additional status fields.
- Added `CallTimers` method for timer-based logic using `_infoTimer` and `_errorTimer`.
- Enhanced `AxoVisionProNet_Component_Status` with new fields for detailed status reporting.
- Refactored redundant fields in `AxoVisionProNet_Component_Status` for consistency.
@peterbarancek peterbarancek linked an issue May 28, 2026 that may be closed by this pull request
{
var payload = envelope.GetPayload<TriggerAcceptedPayload>();
return payload?.Accepted == true
? TriggerResult.Ok(payload?.TriggerId ?? 0)
{
var payload = envelope.GetPayload<TriggerAcceptedPayload>();
return payload?.Accepted == true
? TriggerResult.Ok(payload?.TriggerId ?? 0)
Comment on lines +210 to +217
foreach (var prop in properties)
{
if (!prop.CanRead || prop.GetIndexParameters().Length > 0)
continue;

if (DerivesFromOpenGeneric(prop.PropertyType, openGenericBase))
return prop.GetValue(this) as ITwinObject;
}
Comment on lines +233 to +237
foreach (var iface in type.GetInterfaces())
{
if (iface.IsGenericType && iface.GetGenericTypeDefinition() == openGenericBase)
return true;
}
if (_receiveLoop is not null)
{
try { await _receiveLoop; }
catch { /* already cancelled */ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NEW-FEATURE]AxoVisionPro alternative

1 participant