[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [milo-dev] Reg: Doubt in FindServersOnNetworkResponse() API of Milo
|
> Instead, I am expecting an API function call which will scan my network and provide a list of PLCs and their corresponding OPC UA endpoints.
That would be nice but it's not the reality.
The closest thing available to this is mDNS discovery as detailed in Part 12, but that still requires you have an LDS that has the multicast extension enabled _and_ that all servers support registration and are configured to register with an LDS that supports mDNS.
You may not like it, but the reality is you probably need to know the endpoint URL for every server you will connect to. This is how most software I've seen works.
Thanks for the detailed information.
If there are many PLCs running, documenting(manually) each PLC's OPC UA server endpoint URLs is tedious work. Instead, I am expecting an API function call which will scan my network and provide a list of PLCs and their corresponding OPC UA endpoints.
4diac has an inbuilt open6251 server. It is running at this address "opc.tcp://localhost:4840". The following are detailed logs.
INFO: T#173331525686: [OPC UA LOCAL]: Starting OPC UA Server: opc.tcp://localhost:4840
[2017-09-05 23:26:29.679 (UTC+0000)] warn/server Username/Password configured, but no encrypting SecurityPolicy. This can leak credenti.
TRACE: T#173722354686: OutputEvent: Function Block sending event: 0 (maxid: 1)
TRACE: T#173722413020: InputEvent: Function Block (PUBLISH_1) got event: 0 (maxid: 1)
INFO: T#173722435353: [OPC UA LOGGER] info/network TCP network layer listening on opc.tcp://SabreSD_Host-forte_4840:4840/
TRACE: T#173723029686: OutputEvent: Function Block sending event: 0 (maxid: 1)
Please correct me, If my expectations are wrong.
Thanks,
Dhanasekar
You can only access a PLC with Milo if that PLC has a built-in OPC UA server.
Discovery servers are not required to connect to a server. All servers should document their endpoint URL. Use that to call GetEndpoints, select an endpoint, then configure the OpcUaClient with that and connect.
I can conclude like this, "
Unless a OPU UA server is registered with any LDS server, we cannot access it by FindServersOnNetworks() api or
FindServesOnNetworks() will not enumerate that server".
Please help me to understand, How I can communicate or access a PLC(any manufacturer) via Milo. Please provide your ideas or steps.
Maybe you should be asking someone from the 4diac project. I can't really tell you why any given server or discovery server acts or responds the way it does. Ostensibly it would be because there is no server registered with the LDS for the FindServersOnNetwork service to return.
Hi Kevin,
After restarting my server, I am able to see only one entry.
I am working to access 4diac PLC from Milo.
Through, FindServerOnNetwork() I have tried to get 4diac details. Even though 4diac has inbuilt open62541 server , FindServerOnNetwork() is not finding the open62541 server.
Correct me if I am wrong.
Please give me suggestions on how to access 4diac PLC from Milo.
What are the different ways are there to do this?
Thanks,
Dhanasekar
As per your suggestion, I have changed my server Registration code like this
and getting output like this,
Servers=
[ServerOnNetwork{RecordId=1, ServerName=opc.tcp://localhost:4840-localhost, DiscoveryUrl=opc.tcp://localhost:12686/milo/discovery, ServerCapabilities=[NA]},
ServerOnNetwork{RecordId=3, ServerName=opc.tcp://localhost:4840-10-1-61-200, DiscoveryUrl=opc.tcp://10.1.61.200:12686/milo/discovery, ServerCapabilities=[NA]}]}
I am getting two records for a single server. I don't know why it is happening.
In the meantime, I am running another Milo server on windows host and 4diac PLC OPC UA server. These are not enumerated by FindServerOnNetworks().
Please help me to get details of these two servers too.
You must have been the one to register that server, so you should probably take a look at your own code.
I am seeing the word "localhost" and I don't know where it is pointing to.
I am expecting the IP address or name of the host where the OPC UA server is running.
Correct me if I am wrong.
Using “NA” seems to give you a result with a real server. Isn’t that what you want?
Sorry, it is a typo error. Below the corrected changes,
If I use serverCapabilityFilter = new String[]{"DA"};, I am receiving Servers=NULL.
LastCounterResetTime=DateTime{utcTime=132368633219396840, javaDate=Wed Jun 17 15:58:41 IST 2020}, Servers=null}
If I use serverCapabilityFilter = new String[]{"NA"};, I am receiving below output.
Servers=[ServerOnNetwork{RecordId=1, ServerName=opc.tcp://localhost:4840-localhost, DiscoveryUrl=opc.tcp://localhost:12686/milo/discovery, ServerCapabilities=[NA]}]
Why is the "LDS" result different than before?
Isn't the result using "NA" showing a Milo server instance registered?
Kevin,
If I use serverCapabilityFilter = new String[]{"LDS"};, I am receiving Servers=NULL.
LastCounterResetTime=DateTime{utcTime=132368633219396840, javaDate=Wed Jun 17 15:58:41 IST 2020}, Servers=null}
If I use serverCapabilityFilter = new String[]{"NA"};, I am receiving below output.
Servers=[ServerOnNetwork{RecordId=1, ServerName=opc.tcp://localhost:4840-localhost, DiscoveryUrl=opc.tcp://localhost:12686/milo/discovery, ServerCapabilities=[NA]}]
It seems only LDS is working properly with FindServerOnNetworks() api service.
I do need to do extra coding to retrieve servers on Networks ?.
Thanks,
Dhanasekar
Using "DA" seems appropriate.
Ok..If I want to retrieve the OPC UA server running in my networks, I have to mention 'DA' in filters.. Am I correct ??
On Thursday, June 18, 2020, Kevin Herron <kevinherron@xxxxxxxxx> wrote:
> It looks like you specified a serverCapabilityFilter of "LDS", so this LDS is only returning other LDS servers it knows about, and that's only itself.
> On Thu, Jun 18, 2020 at 1:34 AM J Dhanasekar <jdhanasekar@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> Hi Milo,
>>
>> I have implemented FindServerOnNetwork() like this,
>>
>> UInteger startingRecordId = UInteger.valueOf(0);
>> UInteger maxRecordsToReturn = UInteger.valueOf(0);
>> String[] serverCapabilityFilter = new String[]{"LDS"};
>>
>> UaStackClient stackClient = client.getStackClient();
>> client.connect().get();
>> RequestHeader reqHead = stackClient.newRequestHeader(
>> client.getSession().get().getAuthenticationToken()
>> );
>>
>> FindServersOnNetworkRequest myServOnNetReq = new FindServersOnNetworkRequest(reqHead,startingRecordId,maxRecordsToReturn,serverCapabilityFilter);
>> FindServersOnNetworkResponse myServOnNetRes= (FindServersOnNetworkResponse) stackClient.sendRequest(myServOnNetReq).get();
>>
>> After running the program, I am getting output like this,
>>
>> FindServersOnNetworkResponse{
>> ResponseHeader=
>> ResponseHeader
>> {
>> Timestamp=DateTime{utcTime=132368706172341250, javaDate=Wed Jun 17 18:00:17 IST 2020},
>> RequestHandle=4,
>> ServiceResult=StatusCode{name=Good, value=0x00000000, quality=good},
>> ServiceDiagnostics=null,
>> StringTable=null,
>> AdditionalHeader=ExtensionObject{encoded=ByteString{bytes=null}, encodingId=NodeId{ns=0, id=0}}},
>> LastCounterResetTime=DateTime{utcTime=132368633219396840, javaDate=Wed Jun 17 15:58:41 IST 2020},
>> Servers=[
>> ServerOnNetwork{RecordId=0, ServerName=LDS-quanta, DiscoveryUrl=opc.tcp://quanta:4840, ServerCapabilities=[LDS]},
>> ServerOnNetwork{RecordId=2, ServerName=UA Local Discovery Server on BLRB1DT166.VTPPL.COM, DiscoveryUrl=opc.tcp://BLRB1DT166.VTPPL.COM:4840, ServerCapabilities=[LDS]}
>> ]}
>>
>> As OPC 4 spec , FindServerOnNetwork() should provide servers known to DiscoverServer. But I am getting only details about DiscoveryServer , not servers known to DiscoveryServer.
>> </mail/u/0/s/?view=att&th=172c83616c5a3b28&attid=0.0.1&disp=emb&realattid=ii_kbkixcba0&zw&atsh=1>
>>
>>
>> Please correct me, If I misunderstood the concept.
>> Or, Please help me to retrieve list of server from DiscoveryServer
>> Thanks,
>> Dhanasekar
>> _______________________________________________
>> milo-dev mailing list
>> milo-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
>
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________milo-dev mailing listmilo-dev@xxxxxxxxxxxTo unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________milo-dev mailing listmilo-dev@xxxxxxxxxxxTo unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev