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
Problem with PSVar
October 21, 2015
7:19, EEST
Avatar
Gabor
Member
Members
Forum Posts: 4
Member Since:
October 21, 2015
sp_UserOfflineSmall Offline

Hi everybody,

Consider the following situation:

Analog signal in every 2 seconds –> OPC Server –> TPSOPCServer –> TPSOPCConnector –> TPSVarLink –> TPSFloat variable OnChange event handler.

TPSConnector update rate 500 ms.

While examining the data flow, I recognised, that there is an outage in the data flow. I mean, that the onchange event is not fired in every data change (For example, Timestamp deltas are 2sec 2sec 6sec 4sec 2sec 2sec 8sec…).

Reading this value by the Prosys OPC Client, everything is ok, the data flow do not contain any error.

What I’m doing wrong?

October 21, 2015
7:38, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Is the value changing with every read? TPsFloat only notifies when the value is actually changing.

You can verify it also with OnChanging, which is called for every update.

October 21, 2015
8:36, EEST
Avatar
Gabor
Member
Members
Forum Posts: 4
Member Since:
October 21, 2015
sp_UserOfflineSmall Offline

Here is the Onchange event output:
2015.10.21. 10:27:24 23,6133346557617
2015.10.21. 10:27:26 23,6098251342773
2015.10.21. 10:27:28 23,6133346557617
2015.10.21. 10:27:30 23,606315612793
2015.10.21. 10:27:32 23,6028060913086
2015.10.21. 10:27:34 23,6098251342773
2015.10.21. 10:27:36 23,606315612793
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:46 23,606315612793
2015.10.21. 10:27:48 23,6098251342773
2015.10.21. 10:27:52 23,6133346557617
2015.10.21. 10:27:56 23,6449203491211
2015.10.21. 10:27:58 23,6098251342773
2015.10.21. 10:28:00 23,6133346557617
2015.10.21. 10:28:02 23,6449203491211
2015.10.21. 10:28:06 23,606315612793
2015.10.21. 10:28:08 23,6098251342773
2015.10.21. 10:28:14 23,606315612793

And here is the Onchanging event output:
2015.10.21. 10:27:24 23,6133346557617
2015.10.21. 10:27:24 23,6133346557617
2015.10.21. 10:27:26 23,6098251342773
2015.10.21. 10:27:26 23,6098251342773
2015.10.21. 10:27:28 23,6133346557617
2015.10.21. 10:27:28 23,6133346557617
2015.10.21. 10:27:30 23,606315612793
2015.10.21. 10:27:30 23,606315612793
2015.10.21. 10:27:32 23,6028060913086
2015.10.21. 10:27:32 23,6028060913086
2015.10.21. 10:27:34 23,6098251342773
2015.10.21. 10:27:34 23,6098251342773
2015.10.21. 10:27:36 23,606315612793
2015.10.21. 10:27:36 23,606315612793
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:38 23,6098251342773
2015.10.21. 10:27:46 23,606315612793
2015.10.21. 10:27:46 23,606315612793
2015.10.21. 10:27:48 23,6098251342773
2015.10.21. 10:27:48 23,6098251342773
2015.10.21. 10:27:48 23,6098251342773
2015.10.21. 10:27:48 23,6098251342773
2015.10.21. 10:27:52 23,6133346557617
2015.10.21. 10:27:52 23,6133346557617
2015.10.21. 10:27:52 23,6133346557617
2015.10.21. 10:27:52 23,6133346557617
2015.10.21. 10:27:56 23,6449203491211
2015.10.21. 10:27:56 23,6449203491211
2015.10.21. 10:27:58 23,6098251342773
2015.10.21. 10:27:58 23,6098251342773
2015.10.21. 10:28:00 23,6133346557617
2015.10.21. 10:28:00 23,6133346557617
2015.10.21. 10:28:02 23,6449203491211
2015.10.21. 10:28:02 23,6449203491211
2015.10.21. 10:28:02 23,6449203491211
2015.10.21. 10:28:02 23,6449203491211
2015.10.21. 10:28:06 23,606315612793
2015.10.21. 10:28:06 23,606315612793
2015.10.21. 10:28:08 23,6098251342773
2015.10.21. 10:28:08 23,6098251342773
2015.10.21. 10:28:08 23,6098251342773
2015.10.21. 10:28:08 23,6098251342773
2015.10.21. 10:28:08 23,6098251342773
2015.10.21. 10:28:08 23,6098251342773
2015.10.21. 10:28:14 23,606315612793

My problem is, that I have to record the values in every 2 seconds. The strange thing, that in your sample application this works, I can see in the item grid the time stamp change in every 2 seconds…

October 21, 2015
8:54, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Looks like your OPCConnector is defined for synchronous mode and for some reason you don’t get data reliably from the server. Please, try to switch to asynchronous mode with ‘Async := True’ – maybe you are using async with the OPC Client application?

October 21, 2015
9:15, EEST
Avatar
Gabor
Member
Members
Forum Posts: 4
Member Since:
October 21, 2015
sp_UserOfflineSmall Offline

The connector settings are similar to the OPC Client App. Async = false, Datasource = Cache. I tried all the pocssible combinations of Async, cache mode… without success.
When I enable the file logging in the TpsOPCServer component, the log file shows the correct timestamps:
2015.10.21 11:14:00.338 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:00.341 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:13:59.900 Good;Non-specific;Not limited 24,448616027832

2015.10.21 11:14:01.335 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:01.337 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:13:59.900 Good;Non-specific;Not limited 24,448616027832

2015.10.21 11:14:02.340 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:02.342 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:01.891 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:03.335 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:03.337 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:01.891 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:04.338 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:04.340 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:03.910 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:05.339 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:05.342 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:03.910 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:06.332 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:06.334 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:05.895 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:07.336 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:07.338 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:05.895 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:08.333 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:08.335 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:07.902 Good;Non-specific;Not limited 24,4556350708008

2015.10.21 11:14:09.334 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:09.336 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:07.902 Good;Non-specific;Not limited 24,4556350708008

2015.10.21 11:14:10.340 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:10.342 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:09.910 Good;Non-specific;Not limited 24,448616027832

2015.10.21 11:14:11.337 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:11.339 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:09.910 Good;Non-specific;Not limited 24,448616027832

2015.10.21 11:14:12.332 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:12.335 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:11.919 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:13.334 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:13.336 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:11.919 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:14.338 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:14.340 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:13.900 Good;Non-specific;Not limited 24,3889541625977

2015.10.21 11:14:15.340 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:15.342 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:13.900 Good;Non-specific;Not limited 24,3889541625977

2015.10.21 11:14:16.332 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:16.334 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:15.907 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:17.331 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:17.334 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:15.907 Good;Non-specific;Not limited 24,4451065063477

2015.10.21 11:14:18.337 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:18.339 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:17.916 Good;Non-specific;Not limited 24,4415969848633

2015.10.21 11:14:19.335 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:19.337 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:17.916 Good;Non-specific;Not limited 24,4415969848633

2015.10.21 11:14:20.339 IOPCSyncIO.Read: Result=0x0 (OK)
2015.10.21 11:14:20.342 Transaction ID=1 Group=Form1.conn_OPCGroup Kind=Read ItemCount=1 Result=0x0 (OK)
ANALOG.AI-00(CH=0, SH=16383840): 2015.10.21 11:14:19.921 Good;Non-specific;Not limited 24,4451065063477

October 21, 2015
9:45, EEST
Avatar
Gabor
Member
Members
Forum Posts: 4
Member Since:
October 21, 2015
sp_UserOfflineSmall Offline

I have the suspicion, that the PSVar and the psopcconnector doesn’t take care for the timespamp of the opc item, it only compare the value of the opc item, and when it is changed, it fires the event.
My question is, how to tell to the component that it should watch the timestamp change instead of the value change?

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
31 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 682

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1, Flores Frederick, ellenmoss

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1