COPC32 activeX control utilized for SCADA production and also development. You can develop SCADA system (Graphic keeping an eye on & & control, Trending, Alarm system, and more. )within your favored programming IDE such as Visual Basic 6.0, Aesthetic Studio.Net (VB.Net, C#),

as well as VBA (MS Excel, Word, & hellip;-RRB-. COPC32 1.7 full description COPC32 activeX control utilized for SCADA development and development. You can produce SCADA system (Graphic monitoring & & control, Trending, Alarm system, and also a lot more.) within your preferred programming IDE such as Visual Fundamental 6.0, Visual Studio.Net (VB.Net, C#), as well as VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Route variation will certainly stop working after an hour. You need to reboot program to run it once again.

This instance demonstrates how to logging OPC data in to MS SQL Web server 2014 Express making use of COPC32 as well as Visual Workshop 2015 Express.

Needs

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

My data source name and also table’& rsquo; s column shown “listed below. & ldquo; id & rdquo; column is automobile increment.At site COPC32 Download from Our Articles

MS SQL Server, instance name revealed. It is MS SQL Server on exact same COMPUTER of my Visual Workshop. Then I can use “& ldquo; (regional)& rdquo; as recommendation name in manuscript. If your instance name is something like “& ldquo; ACER \ SQLEXPRESS & rdquo;, after that you might make use of & ldquo;(

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

job(135kb)Open up downloaded job and also make certain you have insert COPC32 control on Tool kit of Visual Studio.

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

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

Along with OPC tags.

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

Personal Below Timer2_Tick(sender As Things, e As EventArgs) Manages Timer2.Tick
For i = 0 To 2
v(i) = Axcopc1.GetVl(i)
Following

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 information in to MS SQL table.

Private Sub Timer1_Tick(sender As Item, e As EventArgs) Takes Care Of Timer1.Tick
Shell(“& ldquo; C: \ Program Documents \ Microsoft SQL Server \ Client SDK \ ODBC \ 110 \ Tools \ Binn \ SQLCMD.exe -S (local) -d examination -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 Sub When argumment– S=Web Server Name “(Please keep in mind that if your SQL Server has & ldquo; \ SQLEXPRESS & rdquo; after computer name after that you require to make use of (local)\ SQLEXPRESS ), –– d = Database Call, –– Q = SQL query/command. Example over usage SQL Insert command to put v( 0 ), v( 1 ), v( 2) and present date time right into table t1 at related column.

You need to examining path of SQLCMD.exe in your system as well as change to above manuscript.

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