Create OPC Information Logger with COPC32 and Visual Workshop 2015 Express

COPC32 activeX control utilized for SCADA production and growth. You can produce SCADA system (Graphic checking & & control, Trending, Alarm, as well as more. )within your favorite programming IDE such as Visual Basic 6.0, Aesthetic Studio.Net (VB.Net, C#),

and VBA (MS Excel, Word, & hellip;-RRB-. COPC32 1.7 complete summary COPC32 activeX control utilized for SCADA development as well as advancement. You can create SCADA system (Graphic checking & & control, Trending, Alarm, and also more.) within your favorite programming IDE such as Visual Fundamental 6.0, Aesthetic Studio.Net (VB.Net, C#), as well as VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Route variation will quit working after a hr. You need to restart program to run it once more.

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


  • MS SQL Web Server/ MS SQL Web Server Express
  • Visual Studio 2015 Express (download right here)
  • COPC32 (it is not totally free, download trial here). And also you need to installing COPC32.
  • OPC Server

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

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

local)\ SQLEXPRESS & rdquo;. Download OPC Data logging instance

project(135kb)Open downloaded job as well as make certain you have insert COPC32 control on Tool kit of Visual Studio.

Three tag made use of to reveal OPC tags value with Timer2 every 1 sec. Timer1 has logging manuscript working every 5 sec.

Define OPC Web Server on COPC32 ‘& lsquo; s home web page.

As well as OPC tags.

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

Personal Below Timer2_Tick(sender As Things, e As EventArgs) Manages 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 Below

I have usage shell to call SQLCMD.exe with SQL command to insert OPC data in to MS SQL table.

Exclusive Sub Timer1_Tick(sender As Item, e As EventArgs) Deals With Timer1.Tick
Shell(“& ldquo; C: \ Program Documents \ Microsoft SQL Web Server \ Customer SDK \ ODBC \ 110 \ Tools \ Binn \ SQLCMD.exe -S (regional) -d test -Q “”& ldquo; & rdquo; insert into t1(v1, v2, v3, Time_Date) worths (” & & rdquo; & & v(0) “& & ldquo; “, & rdquo;””& v(1)& & ldquo;, & rdquo; &

v(2) & & ldquo;, getdate ())& rdquo; & rdquo; & rdquo;-RRB- End Below When argumment– S=Web Server Call “(Please keep in mind that if your SQL Web server has & ldquo; \ SQLEXPRESS & rdquo; after computer system name after that you require to use (neighborhood)\ SQLEXPRESS ), –– d = Data source Call, –– Q = SQL query/command. Example above usage SQL Insert command to place v( 0 ), v( 1 ), v( 2) and also existing date time right into table t1 at relevant column.

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

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


Leave a Comment

Your email address will not be published.