Create OPC Data Logger with COPC32 and also Visual Studio 2015 Express

COPC32 activeX control used for SCADA production as well as development. You can develop SCADA system (Graphic keeping track of & & control, Trending, Alarm system, and more. )within your favored programs IDE such as Visual Fundamental 6.0, Visual Studio.Net (VB.Net, C#),

and VBA (MS Excel, Word, & hellip;-RRB-. COPC32 1.7 full description COPC32 activeX control utilized for SCADA creation and development. You can produce SCADA system (Graphic checking & & control, Trending, Alarm system, and also much more.) within your favored shows IDE such as Visual Standard 6.0, Aesthetic Studio.Net (VB.Net, C#), and VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Route version will stop working after a hr. You have to reboot program to run it once again.

This instance shows how to logging OPC information in to MS SQL Web server 2014 Express utilizing COPC32 and Aesthetic Studio 2015 Express.


  • MS SQL Server/ MS SQL Web Server Express
  • Visual Studio 2015 Express (download below)
  • COPC32 (it is not cost-free, download and install test below). And also you need to mounting COPC32.
  • OPC Server

My data source name as well as table’& rsquo; s column revealed “below. & ldquo; id & rdquo; column is vehicle link COPC32 website

MS SQL Web server, instance name revealed. It is MS SQL Web Server on very same COMPUTER of my Visual Studio. Then I can use “& ldquo; (local)& rdquo; as referral name in manuscript. If your circumstances name is something like “& ldquo; ACER \ SQLEXPRESS & rdquo;, after that you could make use of & ldquo;(

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

job(135kb)Open downloaded and install project and make sure you have insert COPC32 control on Tool kit of Visual Workshop.

3 label utilized to show OPC tags value with Timer2 every 1 sec. Timer1 has logging script functioning every 5 sec.

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

In addition to OPC tags.

In Timer2’& rsquo; s code, getting OPC data right into international variable v( 0) to v( 2) (see downloaded and install example code, will see worldwide variable proclaimed). As well as also show data on tags.

Personal Below Timer2_Tick(sender As Object, e As EventArgs) Handles 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 usage shell to call SQLCMD.exe with SQL command to put OPC data in to MS SQL table.

Exclusive Sub Timer1_Tick(sender As Things, e As EventArgs) Manages Timer1.Tick
Covering(“& ldquo; C: \ Program Documents \ Microsoft SQL Web Server \ Client SDK \ ODBC \ 110 \ Tools \ Binn \ SQLCMD.exe -S (neighborhood) -d test -Q “”& ldquo; & rdquo; insert right 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=Server Name “(Please note that if your SQL Server has & ldquo; \ SQLEXPRESS & rdquo; after computer name after that you require to utilize (local)\ SQLEXPRESS ), –– d = Data source Call, –– Q = SQL query/command. Instance above usage SQL Insert command to place v( 0 ), v( 1 ), v( 2) and existing day time into table t1 at associated column.

You have to checking course of SQLCMD.exe in your system as well as replace to over manuscript.

After running task, OPC data logged right into MS sQL Web server.

Deja una respuesta