AndreasHeine / SampleServer-node-opcua

OPC UA Sample Server based on node-opcua. Showcasing how to implement OPC UA companion specifications.
Apache License 2.0
11 stars 17 forks source link

feat: add MetalFormingMachine #818

Open GoetzGoerisch opened 4 days ago

GoetzGoerisch commented 4 days ago

@erossignon could you please give me a hint?

As soon as I configure the metalforming nodeset, the server does not start with error:

/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-server/dist/server_engine.js:936
                if (!addressSpace1.rootFolder.objects) {
                                              ^

TypeError: Cannot read properties of null (reading 'objects')
    at prepareServerDiagnostics (/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-server/dist/server_engine.js:936:47)
    at /home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-server/dist/server_engine.js:981:13
    at callbackifyOnRejected (node:util:331:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
erossignon commented 4 days ago

looking at the model Metal forming depends upon:

  <Models>
        <Model ModelUri="http://schulergroup.com/UA/Standard/Example/"
            PublicationDate="2024-05-02T14:16:23Z" Version="1.00">
            <RequiredModel ModelUri="http://opcfoundation.org/UA/"
                PublicationDate="2023-12-15T00:00:00Z" Version="1.05.03" />
            <RequiredModel ModelUri="http://opcfoundation.org/UA/DI/"
                PublicationDate="2022-11-03T00:00:00Z" Version="1.04.0" />
            <RequiredModel ModelUri="http://opcfoundation.org/UA/Machinery/"
                PublicationDate="2023-08-01T00:00:00Z" Version="1.03.0" />
            <RequiredModel ModelUri="http://opcfoundation.org/UA/IA/"
                PublicationDate="2022-06-15T00:00:00Z" Version="1.01.2" />
            <RequiredModel ModelUri="http://opcfoundation.org/UA/Dictionary/IRDI"
                PublicationDate="2020-02-04T00:00:00Z" Version="1.00" />
            <RequiredModel ModelUri="http://opcfoundation.org/UA/PADIM/"
                PublicationDate="2022-06-27T00:00:00Z" Version="1.0.3" />
            <RequiredModel ModelUri="http://opcfoundation.org/UA/Machinery/ProcessValues/"
                PublicationDate="2022-06-20T00:00:00Z" Version="1.00.0" />
            <RequiredModel ModelUri="http://opcfoundation.org/UA/MachineTool/"
                PublicationDate="2022-07-04T12:00:00Z" Version="1.01.1" />
            <RequiredModel ModelUri="http://opcfoundation.org/UA/MetalForming/"
                PublicationDate="2024-02-01T00:00:00Z" Version="1.0.0" />
        </Model>
    </Models>

Make sure they are loaded first and appears int eh nodeset_filename list prior to metalforming.xml

erossignon commented 4 days ago

Also found some nodeiD with escaped quotes , which might not be well supported by NodeOCPUA yet.

    <UAObject
        ParentNodeId="ns=1;s=&quot;Root&quot;.&quot;Objects&quot;.&quot;Machines&quot;.&quot;SchulerStandardInterface&quot;.Components"
        NodeId="ns=1;s=&quot;Root&quot;.&quot;Objects&quot;.&quot;Machines&quot;.&quot;SchulerStandardInterface&quot;.Components.Hydraulic"
        BrowseName="2:Hydraulic">
erossignon commented 4 days ago

image