COPC32 activeX control made use of for SCADA production and also development. You can create SCADA system (Graphic keeping track of & & control, Trending, Alarm system, and extra. )within your preferred shows 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 summary COPC32 activeX control used for SCADA creation and development. You can produce SCADA system (Graphic keeping an eye on & & control, Trending, Alarm system, and a lot more.) within your preferred programming IDE such as Aesthetic Standard 6.0, Visual Studio.Net (VB.Net, C#), and VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Route version will quit working after an hour. You need to restart program to run it again.
This example shows how to logging OPC data in to MS SQL Web server 2014 Express using COPC32 and Visual Workshop 2015 Express.
- MS SQL Web Server/ MS SQL Web Server Express
- Aesthetic Studio 2015 Express (download right here)
- COPC32 (it is not free, download and install trial here). And also you need to mounting COPC32.
- OPC Web server
My database name and table’& rsquo; s column shown “listed below. & ldquo; id & rdquo; column is vehicle increment.Read more COPC32 At website Articles
MS SQL Web server, circumstances name shown. It is MS SQL Web Server on very same COMPUTER of my Visual Studio. Then I can use “& ldquo; (regional)& rdquo; as recommendation name in manuscript. If your circumstances name is something like “& ldquo; ACER \ SQLEXPRESS & rdquo;, then you could use & ldquo;(
local)\ SQLEXPRESS & rdquo;. Download OPC Information logging instance
job(135kb)Open downloaded and install project and make sure you have insert COPC32 control on Tool kit of Visual Studio.
3 label used to show OPC tags worth with Timer2 every 1 sec. Timer1 has logging manuscript functioning every 5 sec.
Specify OPC Web Server on COPC32 ‘& lsquo; s home web page.
Along with OPC tags.
In Timer2’& rsquo; s code, obtaining OPC information into global variable v( 0) to v( 2) (see downloaded example code, will see international variable proclaimed). And additionally reveal information on labels.
Private Sub Timer2_Tick(sender As Things, e As EventArgs) Takes Care Of 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 put OPC data in to MS SQL table.
Private Below Timer1_Tick(sender As Item, e As EventArgs) Deals With Timer1.Tick
Shell(“& ldquo; C: \ Program Data \ Microsoft SQL Server \ Customer SDK \ ODBC \ 110 \ Devices \ 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 Sub When argumment– S=Web Server Name “(Please keep in mind that if your SQL Server has & ldquo; \ SQLEXPRESS & rdquo; after computer name then you need to utilize (neighborhood)\ SQLEXPRESS ), –– d = Data source Name, –– Q = SQL query/command. Instance over usage SQL Insert command to place v( 0 ), v( 1 ), v( 2) and existing day time right into table t1 at relevant column.
You need to inspecting course of SQLCMD.exe in your system and replace to above script.
After running task, OPC data logged into MS sQL Server.