question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PackML code generation wrong

See original GitHub issue

Hi

I notice that the PackML ObjectType PackMLBaseObjectType as defined in https://reference.opcfoundation.org/PackML/v101/docs/6.3.2 in incorrectly generated by the model compiler when taking the official PackML NodeSet2 as input.

All the Mandatory objects Admin, Status, BaseStateMachine are missing as well as the Methods defined on this object.

The generated object type by the Model Compiler is

<UAObjectType NodeId="ns=1;i=6" BrowseName="1:PackMLBaseObjectType"> <DisplayName>PackMLBaseObjectType</DisplayName> <References> <Reference ReferenceType="HasProperty">ns=1;i=221</Reference> <Reference ReferenceType="HasProperty">ns=1;i=218</Reference> <Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference> </References> </UAObjectType>

while the NodeSet2 input of the model compiler is

<UAObjectType NodeId="ns=1;i=6" BrowseName="1:PackMLBaseObjectType"> <DisplayName>PackMLBaseObjectType</DisplayName> <Documentation>https://reference.opcfoundation.org/v104/PackML/v101/docs/6.3.2</Documentation> <References> <Reference ReferenceType="HasComponent">ns=1;i=73</Reference> <Reference ReferenceType="HasComponent">ns=1;i=88</Reference> <Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference> <Reference ReferenceType="HasProperty">ns=1;i=221</Reference> <Reference ReferenceType="HasComponent">ns=1;i=403</Reference> <Reference ReferenceType="HasComponent">ns=1;i=404</Reference> <Reference ReferenceType="HasComponent">ns=1;i=400</Reference> <Reference ReferenceType="HasComponent">ns=1;i=402</Reference> <Reference ReferenceType="HasComponent">ns=1;i=401</Reference> <Reference ReferenceType="HasComponent">ns=1;i=362</Reference> <Reference ReferenceType="HasComponent">ns=1;i=87</Reference> <Reference ReferenceType="HasProperty">ns=1;i=218</Reference> </References> </UAObjectType>

The problem is that the C# is also wrong. The point is that the Create method which creates an instance of the PackMLBaseObjectType is creating an incomplete instance albeit the type PackMLBaseObjectType in the Types hierarchy looks ok with UaExpert.

Regards

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
opcfoundation-orgcommented, Jul 15, 2023

Added fix to member-only version that handles missing ParentNodeIds if an inverse HasComponent reference exists on the child.

1reaction
opcfoundation-orgcommented, Jul 15, 2023

I fixed the NodeSet (added all of the missing ParentNodeIds).

Opc.Ua.PackML.NodeSet2.xml.txt

Builds good code with the member-only ModelCompiler.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PackML standard : r/PLC
My problem with PackML is that it tries to standardize things that aren't standard. The goal is nice, but the more custom a...
Read more >
PackML
PackML is an automation standard developed by the OMAC and adopted by ISA as TR88.00.02 that makes it easier to transfer and retrieve...
Read more >
Eric OURSEL eoursel
Day of Week July Jul July Jul Sunday Sun No contributions on Sunday, July 24, 2022 No contributions on Sunday, July... Monday Mon No contributions...
Read more >
THE POWER OF PACKML
PackML is actually implemented on a real machine, and having experience in designing and coding such an implementation is likely a different story....
Read more >
IASIMP-QS018B-EN-P PackML 3.0-based Programming ...
In this chapter, you create a PCam (Position Cam) profile by using Motion Analyzer software and exporting the PCam data to your Logix...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found