Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB.NET OPC READ to slow...

Posted on 2011-09-19
8
Medium Priority
?
549 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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 15

Accepted Solution

by:
Minh Võ Công earned 1500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

783 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