AxoVisionPro refactor and bug fixes#1142
Merged
Merged
Conversation
…tes for UserData and Results
PTKu
approved these changes
May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AxoVisionProrefactor and bug fixes. Tested on hardware.AxoVisionProHWIDsnow stores*_InAddress/*_InLength/*_OutAddress/*_OutLengthfor every submodule (SystemControl,EngineControl_1..4,UserData_240B_1..5,UserData_64B_1,Results_240B_1..5,Results_64B_1).Run()resolves them once per slot viaReadHardwareIOAddressand writes them into the struct. The dozens of per-cycleReadHardwareIOAddresscalls that previously sat inside the read/write paths are gone.CASE _readResultsLength OF UINT#1..UINT#240 / 241..480 / ...(six size buckets, ~150 lines) is replaced by a single linear sequence that walks the six PROFINET items once and clamps each segment withSystem.Math.Min. Same treatment forSendDataTask. Behavior is unchanged for valid lengths.UINT#1307—ReadResultsTaskrejected whenReadResultsLength > 1264(hardware ceiling: 5 x 240 B + 64 B).UINT#1308—SendDataTaskrejected whenSendDataLength > 1260(hardware ceiling: 1196 user bytes + 64 B).UINT#1304("results length out of range") is removed.IF (CurentJobID = 0) AND NOT JobLoadComplete(wasAND JobLoadComplete, unreachable).Outputs.Control.InitiateJobLoadnow mirrors the PROFINET output bit instead of being heldTRUEwhile the hardware bit followed the 1 Hz blinker -- fixes the HMI "InitiateJobLoad stays on" symptom._Clock_1Hz.Restore()called on state transitions to clear stale blink state.Outputs.Control.WriteDataId := BYTE#0reset added in the user-data write reset path._startAddress,_bytesCount,_inputsAddress,_inputsCount,_outputsAddress,_outputsCount,_data_,_data_out. Per-call address resolution usesVAR_TEMPlocals.Files changed
axopen/src/components.cognex.vision/ctrl/src/AxoVisionPro/AxoVisionPro.st-- refactor + fixes (~490 lines removed, ~400 added).axopen/src/components.cognex.vision/ctrl/src/AxoVisionPro/TypesStructuresAndEnums/AxoVisionProHWIDs.st-- new address/length fields.axopen/src/components.cognex.vision/docs/CHANGELOG.md-- new0.44.0entry.axopen/src/components.cognex.vision/docs/TROUBLES.md-- full troubleshooting tables (hardware init7xx/8xx, task-level1303/1305/1307/1308, symptom-driven entries, known limitations).axopen/src/components.cognex.vision/docs/AxoVisionPro.md-- "How it works" section explaining cached PROFINET addresses,CameraNosemantics, buffer ceilings.Compatibility notes
AxoVisionProHWIDsadds new public fields. Existing struct-literal initializers may need to declare the new_InAddress/_InLength/_OutAddress/_OutLengthmembers. Default0is safe --Run()overwrites them on first call.UINT#1304is no longer emitted. Operator dashboards filtering on1304should switch to1307.Test plan
1307).1308).InitiateJobLoadindicator follows the PLC output bit (no longer stuckTRUE).apax buildclean onaxopen/src/components.cognex.vision.docfx buildrenders the new TROUBLES.md tables and the AxoVisionPro.md "How it works" section.Follow-ups (out of scope for this PR)
// TODO implement error message on the .NET sidemarkers added next to1307/1308-- add the localized strings inAXOpen.Components.Cognex.Visionresource files before tagging a release.axopen/GitVersion.ymlcurrently hasnext-version: 0.50.0while this PR adds a0.44.0changelog entry. Decide whether to bump the changelog heading to0.50.0or roll backGitVersion.ymlbefore merging.axopen/CHANGELOG.mdhas not been updated for this PR; if your convention is to add a PR-level block there (as#1117and#1054did), add one before merging.