Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 555
  • Last Modified:

VB.NET OPC READ to slow...

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
kavvis
Asked:
kavvis
  • 6
  • 2
1 Solution
 
Minh Võ CôngCommented:
You can use thread to retrive data
0
 
kavvisAuthor Commented:
Hi, I´m pretty new as this can you explain some more?

Maybe show me some example...  What will this thread to?
0
 
kavvisAuthor Commented:
Hi upload a picture abput the "Read" function.. maybe somone can se somthing I have mist...

I only intressted in .Value
Read.JPG
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
kavvisAuthor Commented:
Ok, So you belive that if a manage to do this to a threed just this sub then I should be faster?
0
 
kavvisAuthor Commented:
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
 
kavvisAuthor Commented:
I still haven´t found any solution to this... some more tips please...
0
 
kavvisAuthor Commented:
thank you for you took your time..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now