Professional OPC
Development Tools

logos

How to set DataSource and value age

More
11 Dec 2014 16:49 #2568 by pgilbert
Many thanks this answer my question.

Please Log in or Create an account to join the conversation.

More
11 Dec 2014 08:34 #2566 by support
The values are as follows:
/// <summary>Selects the data source for OPC reads (from device, from OPC cache, or dynamically determined).</summary>
[v1_enum] typedef enum 
{
	/// <summary>The data source (memory, OPC cache or OPC device) selection will be based on the desired value age and 
	/// current status of data received from the server.</summary>
	ByValueAge = 0,	// OCK_DS_BY_VALUE_AGE
	/// <summary>OPC reads will be fulfilled from the cache in the OPC server. </summary>
    Cache = 1,		// OPC_DS_CACHE
	/// <summary>OPC reads will be fulfilled from the device by the OPC server. </summary>
	Device = 2,		// OPC_DS_DEVICE
} DADataSource;

Best regards

Note: Using an OleView utility from Microsoft SDK's (or included with Visual Studio), one can view the contents of the type libraries that go with the product - useful when the consuming tool does not allow the access to enumeration values from the type library natively. I understand, however, that with some tools (like yours) this is not something you would normally do anyway. Keep asking if you need more...
The following user(s) said Thank You: pgilbert

Please Log in or Create an account to join the conversation.

More
10 Dec 2014 20:36 #2565 by pgilbert
I would like to set programmatically in Client Mode the Data source by value age. In our program we have access to this property by doing: ⎕WI 'xClientMode.DataSource'. This property seems to accept only an integer. What would be the integer value for: 'By value age' 'OPC cache' 'OPC device'.

To set the DesiredValueAge to 5 sec. we just do: ⎕WI 'xClientMode.DesiredValueAge' 5000

Thanks in advance,

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.160 seconds

      

 Recommend this on Google