COPC32 activeX control made use of for SCADA production and also advancement. You can develop SCADA system (Graphic checking & & control, Trending, Alarm system, and more. )within your favored programming IDE such as Aesthetic Basic 6.0, Visual Studio.Net (VB.Net, C#),
and VBA (MS Excel, Word, & hellip;-RRB-. COPC32 1.7 full description COPC32 activeX control used for SCADA creation and growth. You can develop SCADA system (Graphic keeping an eye on & & control, Trending, Alarm system, and much more.) within your favored 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 have to reactivate program to run it once again.
This instance demonstrates how to logging OPC information in to MS SQL Server 2014 Express making use of 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 cost-free, download and install trial right here). As well as you have to setting up COPC32.
- OPC Web server
My data source name as well as table’& rsquo; s column revealed “below. & ldquo; id & rdquo; column is car increment.Join Us free COPC32 download website
MS SQL Server, instance name revealed. It is MS SQL Server on same PC of my Visual Studio. Then I can utilize “& ldquo; (local)& rdquo; as recommendation name in script. If your instance name is something like “& ldquo; ACER \ SQLEXPRESS & rdquo;, after that you can make use of & ldquo;(
local)\ SQLEXPRESS & rdquo;. Download and install OPC Information logging example
task(135kb)Open downloaded and install job and also make certain you have insert COPC32 control on Toolbox of Visual Workshop.
Three label used to reveal OPC tags worth with Timer2 every 1 sec. Timer1 has logging manuscript working every 5 sec.
Specify OPC Web Server on COPC32 ‘& lsquo; s property page.
In addition to OPC tags.
In Timer2’& rsquo; s code, obtaining OPC information right into worldwide variable v( 0) to v( 2) (see downloaded and install instance code, will certainly see international variable proclaimed). As well as also reveal data on labels.
Personal Sub 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()
I have usage covering to call SQLCMD.exe with SQL command to place OPC information in to MS SQL table.
Personal Sub Timer1_Tick(sender As Object, e As EventArgs) Takes Care Of Timer1.Tick
Covering(“& ldquo; C: \ Program Data \ Microsoft SQL Web Server \ Client SDK \ ODBC \ 110 \ Tools \ Binn \ SQLCMD.exe -S (neighborhood) -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=Server Call “(Please keep in mind that if your SQL Web server has & ldquo; \ SQLEXPRESS & rdquo; after computer system name after that you need to use (regional)\ SQLEXPRESS ), –– d = Data source Call, –– Q = SQL query/command. Example over use SQL Insert command to put v( 0 ), v( 1 ), v( 2) and also present date time into table t1 at associated column.
You have to examining course of SQLCMD.exe in your system and also replace to over script.
After running project, OPC information logged right into MS sQL Server.