COPC32 activeX control made use of for SCADA creation and also development. You can create SCADA system (Graphic keeping an eye on & & control, Trending, Alarm, and much more. )within your preferred programs IDE such as Visual Basic 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 also advancement. You can produce SCADA system (Graphic keeping an eye on & & control, Trending, Alarm, and also more.) within your favored programs IDE such as Aesthetic Fundamental 6.0, Visual Studio.Net (VB.Net, C#), as well as VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Path variation will certainly quit working after an hour. You need to reactivate program to run it again.
This example demonstrates how to logging OPC information in to MS SQL Web server 2014 Express utilizing COPC32 as well as Aesthetic Workshop 2015 Express.
- MS SQL Web Server/ MS SQL Server Express
- Visual Studio 2015 Express (download here)
- COPC32 (it is not totally free, download and install trial right here). And you have to setting up COPC32.
- OPC Server
My database name and also table’& rsquo; s column revealed “listed below. & ldquo; id & rdquo; column is automobile increment.Read here COPC32 Download for Windows At our site
MS SQL Server, circumstances name shown. It is MS SQL Web Server on very same COMPUTER of my Visual Workshop. After that I can use “& ldquo; (regional)& rdquo; as referral name in script. If your circumstances name is something like “& ldquo; ACER \ SQLEXPRESS & rdquo;, then you might make use of & ldquo;(
neighborhood)\ SQLEXPRESS & rdquo;. Download OPC Data logging instance
job(135kb)Open downloaded task and make certain you have insert COPC32 control on Tool kit of Visual Workshop.
3 tag made use of to show OPC tags worth with Timer2 every 1 sec. Timer1 has logging script functioning every 5 sec.
Define OPC Server on COPC32 ‘& lsquo; s residential property page.
In addition to OPC tags.
In Timer2’& rsquo; s code, getting OPC information into worldwide variable v( 0) to v( 2) (see downloaded and install example code, will see international variable declared). And additionally show information on labels.
Private Below Timer2_Tick(sender As Item, 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()
I have use shell to call SQLCMD.exe with SQL command to insert OPC information in to MS SQL table.
Exclusive Below Timer1_Tick(sender As Item, e As EventArgs) Deals With Timer1.Tick
Covering(“& ldquo; C: \ Program Files \ Microsoft SQL Server \ Client SDK \ ODBC \ 110 \ Tools \ Binn \ SQLCMD.exe -S (local) -d examination -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=Web Server Call “(Please note that if your SQL Server has & ldquo; \ SQLEXPRESS & rdquo; after computer name after that you require to use (regional)\ SQLEXPRESS ), –– d = Data source Call, –– Q = SQL query/command. Instance over use SQL Insert command to place v( 0 ), v( 1 ), v( 2) and also current date time right into table t1 at associated column.
You need to inspecting path of SQLCMD.exe in your system as well as change to above manuscript.
After running job, OPC information logged into MS sQL Server.