Create OPC Data Logger with COPC32 as well as Visual Studio 2015 Express

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

and VBA (MS Excel, Word, & hellip;-RRB-. COPC32 1.7 full description COPC32 activeX control made use of for SCADA production and also growth. You can produce SCADA system (Graphic checking & & control, Trending, Alarm, and also more.) within your favorite programming IDE such as Visual Basic 6.0, Aesthetic Studio.Net (VB.Net, C#), as well as VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Route version will stop working after a hr. You have to reactivate program to run it once more.

This example demonstrates how to logging OPC data in to MS SQL Web server 2014 Express making use of COPC32 and also Aesthetic Studio 2015 Express.


  • MS SQL Server/ MS SQL Web Server Express
  • Visual Studio 2015 Express (download below)
  • COPC32 (it is not totally free, download test here). As well as you have to mounting COPC32.
  • OPC Server

My database name and table’& rsquo; s column shown “below. & ldquo; id & rdquo; column is car can find more here COPC32 free download from Our Articles

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

regional)\ SQLEXPRESS & rdquo;. Download and install OPC Data logging instance

job(135kb)Open downloaded and install job as well as make certain you have insert COPC32 control on Toolbox of Visual Studio.

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

Specify OPC Web Server on COPC32 ‘& lsquo; s residential or commercial property page.

Along with OPC tags.

In Timer2’& rsquo; s code, getting OPC information into global variable v( 0) to v( 2) (see downloaded instance code, will see global variable proclaimed). As well as likewise reveal information on tags.

Private 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 Below

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

Exclusive Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Shell(“& ldquo; C: \ Program Files \ Microsoft SQL Server \ Client SDK \ ODBC \ 110 \ Tools \ Binn \ SQLCMD.exe -S (regional) -d test -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 Below When argumment– S=Server Call “(Please note that if your SQL Server has & ldquo; \ SQLEXPRESS & rdquo; after computer name then you require to make use of (local)\ SQLEXPRESS ), –– d = Database Name, –– Q = SQL query/command. Example above usage SQL Insert command to place v( 0 ), v( 1 ), v( 2) as well as present day time right into table t1 at relevant column.

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

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



Fale com nosso representante via WhatsApp ou envie um e-mail para