Solved

VB.NET OPC READ to slow...

Posted on 2011-09-19
8
523 Views
Last Modified: 2012-05-12
Hi...
I need som tips..
I use the " Imports OPCAutomation "
The read and write works verry good but it takes to long time..
about 5 sec for every tagg..

I just made som code to show how I use it...

 

        Dim tagggg(50) As OPCItem
        Dim i As Integer = 1
 
       For i = 1 To 30
            tagggg(i) = plcReadTest1Group.OPCItems.Item(i)
           tagggg(i).Read(OPCAutomation.OPCDataSource.OPCDevice)    ' <---- This line takes about 5 sec...
            MainForm.resultat(i) = "'" + tagggg(i).Value.ToString() + "'"
        Next i
I hope somone have som tips how I can fix this.. can i read from other way?

Please ask me if my question isen´t clear....



0
Comment
Question by:kavvis
  • 6
  • 2
8 Comments
 
LVL 15

Expert Comment

by:Minh Võ Công
ID: 36559138
You can use thread to retrive data
0
 

Author Comment

by:kavvis
ID: 36559156
Hi, I´m pretty new as this can you explain some more?

Maybe show me some example...  What will this thread to?
0
 

Author Comment

by:kavvis
ID: 36559178
Hi upload a picture abput the "Read" function.. maybe somone can se somthing I have mist...

I only intressted in .Value
Read.JPG
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 15

Accepted Solution

by:
Minh Võ Công earned 500 total points
ID: 36559186
0
 

Author Comment

by:kavvis
ID: 36559354
Ok, So you belive that if a manage to do this to a threed just this sub then I should be faster?
0
 

Author Comment

by:kavvis
ID: 36560320
Maybe I can make only one read from the OPC..  like I read a array... and then sort the data..

Have anyone done a Array read from a OPC-Server?
0
 

Author Comment

by:kavvis
ID: 36565715
I still haven´t found any solution to this... some more tips please...
0
 

Author Closing Comment

by:kavvis
ID: 36990894
thank you for you took your time..
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run time Error 4 48
Set value of dynamically created checkboxlist 2 34
Help with converting xml file to excel using VB.NET 3 20
MVC DDL Json Not Binding to Model 2 13
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question