Written by Phil

Produce OPC Data Logger with COPC32 as well as Aesthetic Studio 2015 Express

COPC32 activeX control utilized for SCADA creation and also development. You can produce SCADA system (Graphic checking & & control, Trending, Alarm, and also much more. )within your favorite shows IDE such as Aesthetic Standard 6.0, Aesthetic Studio.Net (VB.Net, C#),

as well as VBA (MS Excel, Word, & hellip;-RRB-. COPC32 1.7 full summary COPC32 activeX control utilized for SCADA creation as well as growth. You can produce SCADA system (Graphic monitoring & & control, Trending, Alarm, and extra.) within your favorite programs IDE such as Aesthetic Fundamental 6.0, Visual Studio.Net (VB.Net, C#), as well as VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Trail variation will quit working after a hr. You need to reactivate program to run it once more.

This instance shows how to logging OPC data in to MS SQL Server 2014 Express making use of COPC32 and Aesthetic Studio 2015 Express.


  • MS SQL Server/ MS SQL Web Server Express
  • Visual Workshop 2015 Express (download right here)
  • COPC32 (it is not cost-free, download trial here). And you have to setting up COPC32.
  • OPC Web server

My database name as well as table’& rsquo; s column shown “listed below. & ldquo; id & rdquo; column is automobile increment.read about it COPC32 for windows from Our Articles

MS SQL Server, circumstances name shown. It is MS SQL Web Server on same PC of my Visual Studio. After that I can use “& ldquo; (neighborhood)& rdquo; as recommendation name in manuscript. If your circumstances name is something like “& ldquo; ACER \ SQLEXPRESS & rdquo;, after that you can utilize & ldquo;(

local)\ SQLEXPRESS & rdquo;. Download OPC Information logging example

project(135kb)Open up downloaded and install job and ensure you have insert COPC32 control on Toolbox of Visual Workshop.

3 tag used to show OPC tags worth with Timer2 every 1 sec. Timer1 has logging manuscript functioning every 5 sec.

Define OPC Server on COPC32 ‘& lsquo; s residential property web page.

In addition to OPC tags.

In Timer2’& rsquo; s code, getting OPC information into worldwide variable v( 0) to v( 2) (see downloaded instance code, will see international variable declared). And additionally show information on labels.

Exclusive Below Timer2_Tick(sender As Item, e As EventArgs) Takes Care Of Timer2.Tick
For i = 0 To 2
v(i) = Axcopc1.GetVl(i)

Label1.Text = v( 0 ). ToString()
Label2.Text = v( 1 ). ToString()
Label3.Text = v( 2 ). ToString()
End Sub

I have use covering to call SQLCMD.exe with SQL command to place OPC information in to MS SQL table.

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Manages Timer1.Tick
Covering(“& ldquo; C: \ Program Files \ Microsoft SQL Server \ Customer SDK \ ODBC \ 110 \ Devices \ Binn \ SQLCMD.exe -S (local) -d examination -Q “”& ldquo; & rdquo; insert into t1(v1, v2, v3, Time_Date) values (” & & rdquo; & & v(0) “& & ldquo; “, & rdquo;””& v(1)& & ldquo;, & rdquo; &

v(2) & & ldquo;, getdate ())& rdquo; & rdquo; & rdquo;-RRB- End Sub When argumment– S=Web Server Call “(Please note that if your SQL Server has & ldquo; \ SQLEXPRESS & rdquo; after computer system name after that you need to utilize (local)\ SQLEXPRESS ), –– d = Database Name, –– Q = SQL query/command. Instance over use SQL Insert command to place v( 0 ), v( 1 ), v( 2) and also present day time right into table t1 at related column.

You need to checking course of SQLCMD.exe in your system and change to over manuscript.

After running task, OPC data logged into MS sQL Server.


Leave a Reply

Your email address will not be published. Required fields are marked *