NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI LabVIEW OPC UA APIs Discussion

It's an indicator output from the VI. I mean, when you connect the client to the server, you need to tell an url to the client, just give the client opc.tcp://ip:4841, it doesn't matter if you see the localhost in the VI output.

Ryan Shi
National Instruments
0 Kudos
Message 51 of 150
(5,431 Views)

Thanks again.

The Prosysopc UA java client seems to follow the discovered endpoint, after its first successful connection for discovery.

I assume I could have missed some options using the API. Will dig more.

The Client.vi runs fine.

0 Kudos
Message 52 of 150
(5,431 Views)

most opc ua clients browses the discovery server for regiesterd server endpoint, and also they are able to directly input the server endpoint to connect without the discovery server. The problem is that, we don't have the discovery server on RT, so we expect the client to directly connect to the server with the endpoint without request the discovery server first. Maybe it remembers the endpoint you use last time?

Ryan Shi
National Instruments
0 Kudos
Message 53 of 150
(5,431 Views)

I've posted a small android application with prosys java.

https://decibel.ni.com/content/docs/DOC-21303

feel free to test it.

0 Kudos
Message 54 of 150
(5,431 Views)

Thanks cosmin.

We'd like to run the java client from a linux box. I've used the following code snippet.


client.connect();

NodeId nodeId = new NodeId(2, "Device.Node");

int i=0;

while (i<10){

DataValue value = client.readValue(nodeId);

System.out.println("[" + i + "]: " + value);

Thread.sleep(5000);

i++;

}

After first successful read, the Server.vi crashes.

What did I do wrong?

Thanks.

0 Kudos
Message 55 of 150
(5,431 Views)

You need to make sure to apply client.disconnect();

actually, just make one connection and in the read loop test client==null;

So, in a separate section of code put connect and disconnect actions.

0 Kudos
Message 56 of 150
(5,431 Views)

Do you see the crash every time? It should not crash.

Can you create a memory dump for the crash?

You can use this tool

http://technet.microsoft.com/en-us/sysinternals/dd996900

Input the command before crash

procdump -e labview.exe c:\dump.dmp

You can upload the crash to ftp://ftp.ni.com/incoming

Ryan Shi
National Instruments
0 Kudos
Message 57 of 150
(5,431 Views)

Thanks, Ryan.

I've uploaded 9f6ef3ef-47e4-4168-8a23-ba1e71127ee6.zip.

The zip was generated by LabView when it crashed, not by procdump.

Hope this helps.

If you needs procdump output, let me know.

0 Kudos
Message 58 of 150
(5,431 Views)

I cannot extract the zip file. The dump file in zip is damaged. Can you upload it again? I notice that the zip is just 27kb, please also check the size after you upload it.

Ryan Shi
National Instruments
0 Kudos
Message 59 of 150
(5,431 Views)

Hello, I want underline my interest for this protocol because it represents a modern approach in industrial communication. So I'm trying this new API in order to update all my software as soon as possible. I have two questions:

1) the implementation of methods is foreseen in future updates?

2) I tried to generate a windows executable. It works onto the development machine, not into a CPU with runtime engine because it is not able to open the subvi's as indicated in the picture.

opcuaserver error.png

Can you help me?

Thanks a lot,

Sandro

0 Kudos
Message 60 of 150
(5,431 Views)