OPC Server and Visual basic script

D

Thread Starter

Dee

I am a newbie to Visual basic and OPC, and I hope someone can help me here. I have an historical database which has data in intervals of 40mins, I also have an OPC server which intends to go into the database and get data. I am trying to write a Visual basic script to tell the OPC Server to get the historical data (from a “start date” to an “end date”) and manipulate the data such that the intervals are 1 min and the value remain the same until the next time. Below is the description of what I want to achieve:<pre>
Historical database data looks like this:
Number Date/Time Value
536 10/1/2011 0:00 AM 21
400 10/1/2011 0:40 AM 18
256 10/1/2011 1:20 AM 16
589 10/1/2011 2:00 AM 17
896 10/1/2011 2:40 AM 20

I want the VB Script to keep adding 1 min to the "Date/Time",
and keep the same "Value" and "Number" until the next "Number".
Description below:

Number Date/Time Value
536 10/1/2011 0:00 AM 21
536 10/1/2011 0:01 AM 21
536 10/1/2011 0:02 AM 21
536 10/1/2011 0:03 AM 21
:
:
536 10/1/2011 0:39 AM 21
400 10/1/2011 0:40 AM 18
400 10/1/2011 0:41 AM 18
:
:
:
400 10/1/2011 1:19 AM 18
256 10/1/2011 1:20 AM 16
:
:</pre>
Any help will be appreciated.

Thanks
 
I successfully completed a similar application in VC# using OPC libraries from Advosol. They give you good help documentation as well as good examples

thus I recommend Advosol and VC not visual basic.


My application connected to a MKVI ge turbine controller and I used an EGD to OPC server from Kepware
 
Top