473,399 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How can I read data from an OPC group on an OPC server?

I´m using this function
---------------------------------------------------------

Public Function Request_Word(ByRef MyOPCServer As OPCAutomation.OPCServer, ByRef MyOPCGroup As String, ByRef ServerHandles() As Integer, ByRef NumberItems As Integer) As OPCItem

Dim vValue() As Integer
Dim lErrors() As Integer
Dim vQuality As Object
Dim vTimeStamp As Object

Call MyOPCServer.Connect(OPCServerType, OPCServerName)

MyOPCServer.OPCGroups.Item(MyOPCGroup).SyncRead(OP CAutomation.OPCDataSource.OPCCache, NumberItems, ServerHandles, vValue, lErrors, vQuality, vTimeStamp)'DEBUG CODE LINE

With Request_Word
.Name = MyOPCServer.OPCGroups.Item(MyOPCGroup).OPCItems.It em(1).ItemID
.Value = vValue(1)
.Quality = vQuality(1)
.TimeStamp = vTimeStamp(1)
End With
End Function
--------------------------------------------------------

But I´m having a debug on the bold code line, "ArgumentException was unhandle", "Values does not fall within the expected range"
Dec 17 '16 #1
0 1402

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Belinda | last post by:
Hello All I need to read a SQL Server table into a Web Page and within the Web Page to permit my users to make changes to the records, delete or add new records and then save the entire contents...
4
by: Mike Dole | last post by:
I'm working on a client - server application based on the 'How to Sockets Server and How to Sockets Client' code from the Visual Basic ..NET Resource Kit. Since I want to be able to send 'big...
4
by: Josema | last post by:
Hi to all, Im searching a hand to solve an Exception that i get when i try to give the user to a gmail account... Any help would be appreciated.. Thanks in advance This is a piece of my...
5
by: Arno | last post by:
reposted with the right microsoft managed newsgroup ID: Sorry for the inconvinience Hi, I've written a class for client-socket connection, but I get a lot of times the error message "Unable...
4
by: Francois Stander | last post by:
Hi, hope someone can help me. It seems imposible to read data from a server, however, I can read the validation data from the server and hold it in dataviews . datasets or data tables in my asp...
1
by: Terrance | last post by:
I'm trying to create a small messenger program that uses the tcpclient and tcplistenter objects. When I start the application and run the thread that fires the tcplistener; once the client sends...
2
by: Giulio Petrucci | last post by:
Hi everytbody, I'm experiencing some problems trying to asynchronously read data from a Socket object. What I do now is: 1) call th BeginReceive(...) method on the Socket object; 2) within the...
6
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql...
0
by: abhishek | last post by:
Hello group, i am running a web server on cherrypy 2.2.0 using python2.5 and turbogears1.0. I have a client application in C#.NET which uploads the data on to web server over HTTP. Very...
4
by: Waqas Danish | last post by:
Hello, I am using standard socket functions to send and receive data on a client/server model. I am using K-Develop under Ubuntu 10.04 OS. The application works fine locally but when I deploy it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.