Solved

VB.NET OPC READ to slow...

Posted on 2011-09-19
8
502 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
 
LVL 15

Accepted Solution

by:
Minh Võ Công earned 500 total points
ID: 36559186
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now