Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add MetalFormingMachine #818

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GoetzGoerisch
Copy link
Sponsor Collaborator

No description provided.

@GoetzGoerisch
Copy link
Sponsor Collaborator Author

@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
Copy link
Contributor

erossignon commented Jul 4, 2024

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
Copy link
Contributor

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
Copy link
Contributor

image

@GoetzGoerisch GoetzGoerisch force-pushed the feat/metalforming branch 2 times, most recently from ddc58a1 to cca3ad0 Compare July 11, 2024 13:19
@GoetzGoerisch
Copy link
Sponsor Collaborator Author

Thank you @erossignon!
I did forget to load.

Now, I think I have everything, but still PADIM NodeSet does not load:

13:16:44.154Z :ua_variable_impl              :564   UAVariable#setValueFromString Error :  EnumDictionaryEntries ns=23;i=1250
13:16:44.154Z :ua_variable_impl              :565   Matrix Variant : invalid value size = options.value.length 0!=11 => [11,1]
13:16:44.156Z :ua_variable_impl              :566   
 ...                                                          nodeId              : ns=23;i=1246
 ...                                                          nodeClass           : Variable (2)
 ...                                                          browseName          : 23:Setpoint
 ...                                                          displayName         : null Setpoint
 ...                                                          description         : 
 ...                                                          typeDefinition      : MultiStateDictionaryEntryDiscreteType (ns=0;i=19084)
 ...                                                          dataType            : ns=0;i=7  (UInt32)
 ...                                                          value               : 
 ...                                                                        | { /* DataValue */
 ...                                                                        |    value: Variant(Scalar<UInt32>, value: 7)
 ...                                                                        |    statusCode:      Good (0x00000000)
 ...                                                                        |    serverTimestamp: 2024-07-11T13:16:44.153Z $ 525.011.000
 ...                                                                        |    sourceTimestamp: 2024-07-11T13:16:44.153Z $ 525.011.000
 ...                                                                        | }
 ...                                                          valueRank           :  Scalar (-1)
 ...                                                 minimumSamplingInterval      :  0 ms
 ...                                                          accessLevel         :  CurrentRead | CurrentWrite
 ...                                                          userAccessLevel     :  CurrentRead | CurrentWrite
 ...                                                    references                :   length =6
 ...                                                      +-> ---- HasTypeDefinition (ns=0;i=40) ---> [ns=0;i=19084            ]MultiStateDictionaryEntryDiscreteType    MultiStateDictionaryEntryDiscreteType  [VT]
 ...                                                      +-> ---- HasModellingRule (ns=0;i=37) ----> [ns=0;i=78               ]Mandatory                                Mandatory                  [O] 
 ...                                                      +-> ------- HasProperty (ns=0;i=46) ------> [ns=23;i=1250            ]EnumDictionaryEntries                    EnumDictionaryEntries     M[V] ns=0;i=17 NodeId
 ...                                                      +-> ------- HasProperty (ns=0;i=46) ------> [ns=23;i=1251            ]EnumValues                               EnumValues                M[V] ns=0;i=7594 EnumValueType
 ...                                                      +-> ------- HasProperty (ns=0;i=46) ------> [ns=23;i=1252            ]ValueAsDictionaryEntries                 ValueAsDictionaryEntries  M[V] ns=0;i=17 NodeId
 ...                                                      +-> ------- HasProperty (ns=0;i=46) ------> [ns=23;i=1253            ]ValueAsText                              ValueAsText               M[V] ns=0;i=21 LocalizedText
 ...                                                 .... TRUNCATED ..... (NODEOPCUA_DEBUG_MAXLINE_PER_MESSAGE=25
13:16:44.159Z :load_nodeset2                 :1407   performPostLoadingTasks Err  =>  Matrix Variant : invalid value size = options.value.length 0!=11 => [11,1] 
 ...                                                 Error: Matrix Variant : invalid value size = options.value.length 0!=11 => [11,1]
 ...                                                    at constructHook (/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-variant/dist/variant.js:361:23)
 ...                                                    at new Variant (/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-variant/dist/variant.js:67:26)
 ...                                                    at Variant._coerceVariant [as coerce] (/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-variant/dist/variant.js:54:66)
 ...                                                    at UAVariableImpl.setValueFromSource (/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-address-space/dist/src/ua_variable_impl.js:529:59)
 ...                                                    at task (/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-address-space/dist/source/loader/load_nodeset2.js:1170:46)
 ...                                                    at performPostLoadingTasks (/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-address-space/dist/source/loader/load_nodeset2.js:1401:27)
 ...                                                    at async finalSteps (/home/ggoerisch/projects/Sample-Server-node-opcua/node_modules/node-opcua-address-space/dist/source/loader/load_nodeset2.js:1421:13)

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.

2 participants