Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

displaying min and max value using visual basic

im using PC-6014 to take some continous input from a photodiode. the input is in step form due to the different light intensity result different output voltage from photodiode. i wish to display the minimum and miximum value of the waveform. attached is my code. thanks
0 Kudos
Message 1 of 2
(5,725 Views)
Hi,

There are a couple of functions in Measurement Studio that you can use. The CWArray contains a method that you can use to get the min and max of an array. Here is a piece of code take from the help file:

Sub MinArray_Example()
'Find the minimum value in the array
Dim a (0 to 4, 0 to 5) as Double
Dim j,k as Variant
Dim result as Variant
For j=0 to 4
For k=0 to 5
a(j,k) = j*k
Next k
Next j
result = CWArray1.MinArray(a) 'result = 0
End Sub

Almost the same code works for MaxArray; I hope this helps you get started.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(5,725 Views)