Ansi C source client example|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Ansi C source client example
Avatar
Andrea Bicego
Member
Members
Forum Posts: 4
Member Since:
08/03/2015
sp_UserOfflineSmall Offline
1
08/07/2017 - 04:08
sp_Permalink sp_Print

Is there a c client example for the ansi c stack ?
I need an example to read a tag via opc ua but under github there is only a server example.
In the Release 1.02.336.1 2015-12-03 there is a client and server example but there is some problem: the client always goes in disconnection.

Thank you
Best regards,
Andrea

Avatar
Guest
Guests
2
08/08/2017 - 21:50
sp_Permalink sp_Print

The sample publisher (https://github.com/OPCFoundati.....ePublisher) is also an OPC UA Client. Just remove the publishing code.

It is quite simple but it shows how to use the stack API to connect, create a session, browse, and read a node.

Avatar
Andrea Bicego
Member
Members
Forum Posts: 4
Member Since:
08/03/2015
sp_UserOfflineSmall Offline
3
08/11/2017 - 23:57
sp_Permalink sp_Print

Thank you for the sample: I understood that a call to OpcUa_ClientApi_CreateSession and OpcUa_ClientApi_ActivateSession is required before a OpcUa_ClientApi_Read.
Regarding the release 1.02.336.1 I succeeded to make uatestclient work with uatestserver but I had to add two rows in client and server:
UaTestClient_g_pProxyStubConfiguration.iSerializer_MaxRecursionDepth=OPCUA_ENCODER_MAXRECURSIONDEPTH
UaTestServer_g_pProxyStubConfiguration.iSerializer_MaxRecursionDepth=OPCUA_ENCODER_MAXRECURSIONDEPTH
otherwise the OpcUa_Channel_Connect always returns an error.

Best regards,

Andrea

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 36
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1353
Posts: 4589