Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
onStatusChange getCurrentTime & Status getCurrentTime and Rockwell FT Gateway OPC UA
November 27, 2018
15:44, EET
Avatar
Christv
Member
Members
Forum Posts: 9
Member Since:
August 9, 2016
sp_UserOfflineSmall Offline

Prosys OPC client sdk 3.1.8-580
I have a test setup with 2 opc ua servers that run follow line on the onStatusChange(UaClient uaClient, ServerStatusDataType status)
System.out.println(“>>>>” + deviceId + ” now=” + DateTime.currentTime() + ” Status getCurrentTime=” + status.getCurrentTime() + ” client=” + uaClient.getServerStatus().getCurrentTime() + ” getServerTimeDifference=” + client.getServerTimeDifference() + ” calc diff= ” + (DateTime.currentTime().getTimeInMillis() – status.getCurrentTime().getTimeInMillis()) + ” getStartTime=” + status.getStartTime());

BND cvcn is based on Unified Automation toolkit
DkFTUA2 is using the Rockwell FT Gateway OPC UA server

Example output:
>>>>BNDcvcn now=2018-11-27 13:25:14.1600000 Status getCurrentTime=2018-11-27 13:25:14.1586923 client=2018-11-27 13:25:14.1586923 getServerTimeDifference=-2 calc diff= 3 getStartTime=2018-11-22 10:46:00.4127100
>>>>DkFTUA2 now=2018-11-27 13:25:14.9890000 Status getCurrentTime=2018-11-13 12:24:48.8214507 client=2018-11-13 12:24:48.8214507 getServerTimeDifference=-1213226168 calc diff= 1213226168 getStartTime=2018-11-13 12:24:48.8214507

As you can see for DkFTUA2 the getServerTimeDifference is very big and the getCurrentTime is same as getStartTime!

But when I look to DkFTUA2 via OPCClients nodeid i=2258 (status current time) the value is matching current time.

Any idea what could case of these different value that are returned by onStatusChange event?

November 27, 2018
16:39, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

There are two possible sources for that value. The the server implementation must keep them in sync.

A) The ServerStatus node’s (i=2256) directly. The value is a ServerStatusDataType Structure which contains all the data in the subnodes of that node (a lot’s of Structure nodes behave like this).
B) CurrentTime node (i=2258) that is directly below the ServerStatus node.

The UaClient prefers A, if it cannot read that it will read the individual components instead, which includes B.

I recommend reporting this bug to the server vendor.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
54 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 734

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1523

Posts: 6449

Newest Members:

christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1