beautypg.com

AMETEK Lx Series II Programming Manual User Manual

Page 53

background image

Programming Manual

Lx \ Ls Series II

49

'get data less exponent sign bit
c(1) = c(1) And &H7F
mantisse = c(1) * &H10000 + c(2) * &H100 + c(3)
mant_f = mantisse / MANT_MAX
'Process exponent
If (expo <> 0) And (expo <> &HFF) Then
expo = expo - 127
mant_f = mant_f + 1
expo_val = 2 ^ Abs(expo)
If (expo > 0) Then mant_f = mant_f * expo_val
If (expo < 0) Then mant_f = mant_f / expo_val
Else
If (mant_f <> 0) Then
If expo = 0 Then
mant_f = mant_f / EXPO_MAX
Else
mant_f = mant_f * EXPO_MAX
End If
End If
End If
'Append number sign and return value
If sign Then mant_f = -mant_f
StringToIEEEFloat = mant_f
Exit Function
'=============================================================

FloatConvError:
'Conversion errors are truncated to zero
StringToIEEEFloat = 0
Exit Function

End Function

MEASure:ARRay:VOLTage?
FETCh:ARRay:VOLTage?

Phase Selectable

These queries return an array containing the instantaneous output voltage in volts. The data
returned in arbitrary block data format as follows:

#5.....

where b0,b1,b2,b3 are four hex bytes represent IEEE single precision floating number, where b0
is the most significant byte and b3 is the least significant byte. The number of bytes returned is
contained in the data block header

which always starts with the “#” pound character followed by a

single decimal character indicating the number of digits that make up the block length of the data.
Thus, “#516384…” indicates that there are 5 digits that follow containing the number of bytes in
the data block (excluding the header and length information). The actual number of bytes in this
case is 16384 or 16Kbytes.

The output voltage and current are digitized whenever a measure command is given or whenever
an acquire trigger occurs. If digitization is caused by a measure command, the time interval
between samples is determined by the output frequency. For frequencies greater than 45 Hz, the
time interval is 10.4 microseconds. If digitization is caused by an acquire trigger, the time interval
is set by SENSe:SWEep:TINTerval, and the position of the trigger relative to the beginning of the
data buffer is determined by SENSe:SWEep:OFFSet:POINts.

This command has two optional parameters. The first one may be used to specify the number of
256 data sample blocks to transfer. Valid parameter values are from 1 through 16. The second
parameter may be used to specify the offset in number of 256 data sample blocks from which to
start the data transfer. Valid offset values are from 0 thorugh 15. If both parameters are omitted,
all 16 blocks are transferred starting from offset 0 (first block).