Develop OPC Data Logger with COPC32 and Visual Studio 2015 Express

COPC32 activeX control used for SCADA creation and also development. You can create SCADA system (Graphic monitoring & & control, Trending, Alarm, as well as much more. )within your favorite programs IDE such as Aesthetic Fundamental 6.0, Aesthetic Studio.Net (VB.Net, C#),

and VBA (MS Excel, Word, & hellip;-RRB-. COPC32 1.7 full description COPC32 activeX control utilized for SCADA creation and advancement. You can produce SCADA system (Graphic keeping an eye on & & control, Trending, Alarm system, and also a lot more.) within your preferred programming IDE such as Aesthetic Standard 6.0, Aesthetic Studio.Net (VB.Net, C#), and VBA (MS Excel, Word, & hellip;-RRB-. COPC32 Path version will stop working after an hour. You have to reactivate program to run it again.

This instance demonstrates how to logging OPC data in to MS SQL Server 2014 Express making use of COPC32 and also Aesthetic Studio 2015 Express.

Demands

  • MS SQL Server/ MS SQL Server Express
  • Visual Studio 2015 Express (download right here)
  • COPC32 (it is not complimentary, download test here). As well as you have to setting up COPC32.
  • OPC Server

My data source name and also table’& rsquo; s column revealed “below. & ldquo; id & rdquo; column is vehicle increment.you can find more here bitCOPC32 Download from Our Articles

MS SQL Web server, instance name revealed. It is MS SQL Server on same COMPUTER of my Visual Studio. After that I can utilize “& ldquo; (neighborhood)& rdquo; as recommendation name in manuscript. If your circumstances name is something like “& ldquo; ACER \ SQLEXPRESS & rdquo;, then you might use & ldquo;(

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

project(135kb)Open downloaded task and make sure you have insert COPC32 control on Tool kit of Visual Workshop.

Three label used to show OPC tags worth with Timer2 every 1 sec. Timer1 has logging script working every 5 sec.

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

As well as OPC tags.

In Timer2’& rsquo; s code, obtaining OPC information into global variable v( 0) to v( 2) (see downloaded and install instance code, will see global variable declared). As well as additionally reveal information on labels.

Private Below Timer2_Tick(sender As Item, 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 Sub

I have usage covering to call SQLCMD.exe with SQL command to place OPC data in to MS SQL table.

Personal Below Timer1_Tick(sender As Things, e As EventArgs) Handles Timer1.Tick
Shell(“& ldquo; C: \ Program Documents \ 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 Below When argumment– S=Web Server Name “(Please note that if your SQL Web server has & ldquo; \ SQLEXPRESS & rdquo; after computer system name then you need to make use of (regional)\ SQLEXPRESS ), –– d = Database Call, –– Q = SQL query/command. Example above use SQL Insert command to put v( 0 ), v( 1 ), v( 2) as well as current date time into table t1 at associated column.

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

After running job, OPC data logged right into MS sQL Server.

Develop OPC Data Logger with COPC32 and Visual Studio 2015 Express

Leave a Reply

Your email address will not be published. Required fields are marked *