Develop OPC Data Logger with COPC32 and Aesthetic Studio 2015 Express

COPC32 activeX control used for SCADA creation and also development. You can develop SCADA system (Graphic keeping track of & & control, Trending, Alarm, as well as much 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 summary COPC32 activeX control made use of for SCADA production and also growth. You can create SCADA system (Graphic monitoring & & control, Trending, Alarm system, and also much more.) within your favorite programs IDE such as Aesthetic Basic 6.0, Visual Studio.Net (VB.Net, C#), and also VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Trail version will stop working after a hr. You need to restart program to run it once again.

This example shows how to logging OPC information in to MS SQL Server 2014 Express using COPC32 and also Visual Studio 2015 Express.

Requirements

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

My data source name and table’& rsquo; s column revealed “listed below. & ldquo; id & rdquo; column is car increment.you can find more here COPC32 for windows from Our Articles

MS SQL Web server, instance name shown. It is MS SQL Server on same COMPUTER of my Visual Studio. Then I can utilize “& ldquo; (local)& rdquo; as reference name in manuscript. If your circumstances name is something like “& ldquo; ACER \ SQLEXPRESS & rdquo;, after that you might make use of & ldquo;(

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

job(135kb)Open up downloaded and install job and see to it you have insert COPC32 control on Tool kit of Visual Studio.

3 label utilized to reveal OPC tags value with Timer2 every 1 sec. Timer1 has logging script functioning every 5 sec.

Specify OPC Server on COPC32 ‘& lsquo; s home page.

As well as OPC tags.

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

Exclusive Below Timer2_Tick(sender As Things, e As EventArgs) Handles 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 usage covering to call SQLCMD.exe with SQL command to put OPC data in to MS SQL table.

Private Below Timer1_Tick(sender As Object, e As EventArgs) Manages Timer1.Tick
Covering(“& ldquo; C: \ Program Files \ Microsoft SQL Server \ Customer SDK \ ODBC \ 110 \ Devices \ 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 Name “(Please keep in mind that if your SQL Server has & ldquo; \ SQLEXPRESS & rdquo; after computer name after that you require to utilize (neighborhood)\ SQLEXPRESS ), –– d = Data source Call, –– Q = SQL query/command. Instance above use SQL Insert command to place v( 0 ), v( 1 ), v( 2) and present date time right into table t1 at related column.

You need to examining course of SQLCMD.exe in your system and change to over manuscript.

After running project, OPC data logged right into MS sQL Web server.


Categories

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Abrir chat