Larry.Nelson@chirondiag.com wrote:
>
> I am attempting to scan data into a matrix. This would be a two
> dimensional array with the number of rows and columns set by constants
> defined by the unit I am testing. I had no problem setting up an array
> but the matrix is giving me problems. I want to do a nested looping
> structure with two counters but I have not been able to figure out how
> to do this in HP-VEE. In Basic I would use nested for - next loops but
> can this type of thing be done in HP-VEE?
>
> Larry
Larry,
An alternative to using loops, which can be time consumming, is using a
>From String object. If your scanned data is in a 1D array (which most
DAQ cards return) and say the array is a 5 channel by 10 sample scan,
or 5x10 2D array, you simply send the 1D array into the From String
object but set the array size (in the I/O transaction box) to 2D with
with a size of (5,10) and your output will be a 5x10 2D array. I hope
this is useful. VEE is very capable when it comes to manipulating
arrays!
>
> I am attempting to scan data into a matrix. This would be a two
> dimensional array with the number of rows and columns set by constants
> defined by the unit I am testing. I had no problem setting up an array
> but the matrix is giving me problems. I want to do a nested looping
> structure with two counters but I have not been able to figure out how
> to do this in HP-VEE. In Basic I would use nested for - next loops but
> can this type of thing be done in HP-VEE?
>
> Larry
Larry,
An alternative to using loops, which can be time consumming, is using a
>From String object. If your scanned data is in a 1D array (which most
DAQ cards return) and say the array is a 5 channel by 10 sample scan,
or 5x10 2D array, you simply send the 1D array into the From String
object but set the array size (in the I/O transaction box) to 2D with
with a size of (5,10) and your output will be a 5x10 2D array. I hope
this is useful. VEE is very capable when it comes to manipulating
arrays!
--- On Mon, 7 Jul 1997 15:34:47 -0500 Larry.Nelson@chirondiag.com wrote:
> I am attempting to scan data into a matrix. This would be a two
> dimensional array with the number of rows and columns set by constants
> defined by the unit I am testing. I had no problem setting up an array
> but the matrix is giving me problems. I want to do a nested looping
> structure with two counters but I have not been able to figure out how
> to do this in HP-VEE. In Basic I would use nested for - next loops but
> can this type of thing be done in HP-VEE?
>
> Larry
>
---------------End of Original Message-----------------
Larry,
Attached is are 2 simple examples of nested loops. I wrote the example in VEE 3.21 (not everyone has upgraded to
4.0 yet). If you are using VEE 4.x the set values objects can be replaced by assignments in formulas.
Hope this helps,
Tom Sanders