<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to OPC and Ms Access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8947b710b0/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8947b710b0/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/8947b710b0/</id><updated>2020-02-27T14:42:52.726000Z</updated><subtitle>Recent posts to OPC and Ms Access</subtitle><entry><title>OPC and Ms Access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8947b710b0/?limit=25#1042" rel="alternate"/><published>2020-02-27T14:42:52.726000Z</published><updated>2020-02-27T14:42:52.726000Z</updated><author><name>johanime</name><uri>https://forge.codesys.com/u/johanime/</uri></author><id>https://forge.codesys.comd9e5d592bb8b02821ad45078d9f0c3a9e502038d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you will give a go&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OPC and Ms Access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8947b710b0/?limit=25#b649" rel="alternate"/><published>2020-02-27T14:42:52.205000Z</published><updated>2020-02-27T14:42:52.205000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com6df1486af82bb91415cd59bff9895a081576142a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It is possible in MS Access to add vbscript code. This script can call e.g. a dll or .ocx.&lt;br/&gt;
There is a freeware OPC client component available on the internet called "opc_da20_components.exe".&lt;br/&gt;
When you install this you can call it from e.g. an Access Form with the following code:&lt;/p&gt;
&lt;p&gt;(PS, you can also use the SQL4Automation libraries to connect your PLC to any database supporting ODBC).&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Option Compare Database&lt;/p&gt;
&lt;p&gt;Option Explicit&lt;/p&gt;
&lt;p&gt;'Declare all the variables&lt;br/&gt;
Dim groups As Variant&lt;br/&gt;
Dim group As Variant&lt;br/&gt;
Dim Items As Variant&lt;br/&gt;
Dim Item1 As Variant&lt;br/&gt;
Dim opcauto As Variant&lt;/p&gt;
&lt;p&gt;Private Sub Form_Load()&lt;/p&gt;
&lt;p&gt;Me.TimerInterval = 1000&lt;/p&gt;
&lt;p&gt;'Get OPC Automation Reference&lt;br/&gt;
Set opcauto = CreateObject("OPC.Automation.1")&lt;/p&gt;
&lt;p&gt;'Connect to the server&lt;br/&gt;
opcauto.Connect ("YourOPCServername.xxx")&lt;/p&gt;
&lt;p&gt;'Plays with groups and items&lt;br/&gt;
Set groups = opcauto.OPCGroups&lt;br/&gt;
Set group = groups.Add("Device1.Group")&lt;br/&gt;
group.IsActive = True&lt;br/&gt;
Set Items = group.OPCItems&lt;br/&gt;
Set Item1 = Items.AddItem("Device1.Group1.Tag1", 1)&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Private Sub Form_Timer()&lt;/p&gt;
&lt;p&gt;'Read Item1 and display in Label&lt;br/&gt;
Item1.Read (1)&lt;br/&gt;
Label0_v.Caption = Item1.value&lt;br/&gt;
Label0_q.Caption = Item1.Quality&lt;br/&gt;
Label0_t.Caption = Item1.TimeStamp&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Private Sub Form_Unload(Cancel As Integer)&lt;/p&gt;
&lt;p&gt;opcauto.Disconnect&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OPC and Ms Access</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8947b710b0/?limit=25#f00d" rel="alternate"/><published>2020-02-27T14:42:50.730000Z</published><updated>2020-02-27T14:42:50.730000Z</updated><author><name>johanime</name><uri>https://forge.codesys.com/u/johanime/</uri></author><id>https://forge.codesys.com8413fc655301d5d6855f3bb3e19f24a7726ec670</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi&lt;br/&gt;
I am new to OPC and need some advice. I got the OPC running and when i check the tags with Matrikon Explorer all seems fine no bad connections . The problem is the next step How do I get the info from OPC to  Ms Access and back. Don't have a lot of knowledge about OPC . Is there a tutorial or guide available .Or if possible can I go direct from Ms access to codesys.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>