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

Type Mismatch Error #117

Open
SerafinTech opened this issue Dec 10, 2022 · 1 comment
Open

Type Mismatch Error #117

SerafinTech opened this issue Dec 10, 2022 · 1 comment

Comments

@SerafinTech
Copy link

I am getting this error:

let errors = opc_items.Validate(tagList.length, tagList)
                       ^

Error: DispInvoke: Validate Type mismatch.
 on last line of following code:

From this code:

let winax = require('winax');

let con = new winax.Object('Graybox.OPC.DAWrapper');

con.Connect('Matrikon.OPC.Simulation.1', 'localhost')
con.ClientName = 'OpenOPC';

let groups = con.OPCGroups
groups.DefaultGroupUpdateRate = -1
let opc_group = groups.Add()
opc_group.IsSubscribed = 1
opc_group.IsActive = 1
let opc_items = opc_group.OPCItems
let tagList = ['Random.Real8']
let errors = opc_items.Validate(tagList.length, tagList)

Specification for the function:

Validate (Count As Long, ItemIDs() As String, ByRef Errors() As Long, Optional
RequestedDataTypes As Variant, Optional AccessPaths As Variant)

other object methods work with no problem. AddItem method of OPCItems object cause nodejs to exit with no error.

Attached is the library docs
OPC DA Auto 2.02 Specification.pdf

@durs
Copy link
Owner

durs commented Dec 13, 2022 via email

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

No branches or pull requests

2 participants