473,385 Members | 1,834 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,385 software developers and data experts.

Array Alternative

Hi,

I am writing an application that reads data from a PLC in a
manufacturing plant.
I use a control to communicate with the PLC, that returns an array of
Short values.

I do not always know the length of the data block that will be returned,
and so cannot declare a suitable array. (As well as that, I believe
re-dimensioning an array in VB.Net is very inefficient)

Can anyone suggest a way of storing this data so it can then be manipulated?
I am using .Net 1.1 and VS 2003
Thankyou.

Paul Cheetham
Feb 10 '06 #1
2 1833
Paul Cheetham wrote:
Hi,

I am writing an application that reads data from a PLC in a
manufacturing plant.
I use a control to communicate with the PLC, that returns an array of
Short values.

I do not always know the length of the data block that will be returned,
and so cannot declare a suitable array. (As well as that, I believe
re-dimensioning an array in VB.Net is very inefficient)

Can anyone suggest a way of storing this data so it can then be
manipulated?
I am using .Net 1.1 and VS 2003
Thankyou.

Paul Cheetham

sounds like an arraylist is exactly what you need.
take a look at it. Also some of the collection classes may help.
Chris
Feb 10 '06 #2


declaring the array with the result should work in my opinion

pseudo code :::

Dim shorts() As Short = Returningdata

regards

Michel Posseth [MCP]

"Paul Cheetham" <PA******@dsl.pipex.com> schreef in bericht
news:OK**************@TK2MSFTNGP14.phx.gbl...
Hi,

I am writing an application that reads data from a PLC in a manufacturing
plant.
I use a control to communicate with the PLC, that returns an array of
Short values.

I do not always know the length of the data block that will be returned,
and so cannot declare a suitable array. (As well as that, I believe
re-dimensioning an array in VB.Net is very inefficient)

Can anyone suggest a way of storing this data so it can then be
manipulated?
I am using .Net 1.1 and VS 2003
Thankyou.

Paul Cheetham

Feb 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Laphan | last post by:
Hi All I'm using .getRows() with a local var array instead of doing a recursive loop so that I'm being a good ASP newvbie and closing my object i/o's (the recordset in this case) as quick as...
4
by: Haydnw | last post by:
Hi, I'd like to put a load of database results (several rows for 5 fields) into a two-dimensional array. Now, this may be a really stupid question, but can someone give me a pointer for how to...
7
by: Jan | last post by:
hi there, How can i copy the entire content of an array in to another array? I think for a pro user of vb.net it must be a easy question but not for a starter like me Thank you very much
5
by: al | last post by:
I tried to look for the control array in VB.NET but didin't find any. Tried tab index but didn't work. What is the alternative in .net?? MTIA, Grawsha
19
by: Tom Jastrzebski | last post by:
Hello, I was just testing VB.Net on Framework.Net 2.0 performance when I run into the this problem. This trivial code attached below executed hundreds, if not thousand times faster in VB 6.0...
11
by: TG | last post by:
Hi there. I'm trying to create a simple class called Vector which inherit from array. class Vector(array): def __init__(self,length): """initialize a vector of random floats of size length....
4
by: Cleverbum | last post by:
I have created a class Particle which has a method toString() that prints out all the useful information. In my main program I create an array of these objects and once I've fiddled with them a bit...
7
by: lovecreatesbea... | last post by:
K&R 2, sec. 5.11 says that no need to precede function and array names with address-of operators &, why?
4
by: Peskov Dmitry | last post by:
class simple_class { int data; public: simple_class() {data=10;}; simple_class(int val) : data(val){} }; int main() {
9
by: =?Utf-8?B?VHJlY2l1cw==?= | last post by:
Hello, Newsgroupians: I've an optimization question for you all really quick. I have a stream that I am reading some bytes. At times, the stream can contain a small amount of bytes such as 50...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.