AConvertPreTrigData()

For products with pretrigger implemented in hardware (most products), this function converts the raw data collected by APretrig(). The APretrig() method can return either raw A/D data or converted data, depending on whether or not the ConvertData option was used. The raw data is not in the correct order as it is collected. After the data collection is completed, it must be rearranged into the correct order. This method also orders the data, starting with the first pretrigger data point and ending with the last post-trigger point.

Member of the MccBoard class.

Function Prototype

VB .NET

Public Function AConvertPreTrigData(ByVal preTrigCount As Integer, ByVal totalCount As Integer, ByVal adData As Short(), ByVal chanTags As Short()) As MccDaq.ErrorInfo



Public Function AConvertPretrigData(ByVal preTrigCount As Integer, ByVal totalCount As Integer, ByVal adData As System.UInt16(), ByVal chanTags As System.UInt16()) As MccDaq.ErrorInfo




C# .NET

public MccDaq.ErrorInfo AConvertPreTrigData(int preTrigCount, int totalCount, short[] adData, short[] chanTags)



public MccDaq.ErrorInfo AConvertPretrigData(int preTrigCount, int totalCount, ushort[] adData, ushort[] chanTags)



Deprecated methods

The following methods are deprecated, and should only be used for legacy applications. The methods above are preferred, and must be used for 64-bit application development.

VB .NET

Public Function AConvertPreTrigData(ByVal preTrigCount As Integer, ByVal totalCount As Integer, ByRef adData As Short, ByRef chanTags As Short) As MccDaq.ErrorInfo



Public Function AConvertPretrigData(ByVal preTrigCount As Integer, ByVal totalCount As Integer, ByRef adData As System.UInt16, ByRef chanTags As System.UInt16) As MccDaq.ErrorInfo



C# .NET

public MccDaq.ErrorInfo AConvertPreTrigData(int preTrigCount, int totalCount, ref ushort adData, out ushort chanTags)



public AConvertPretrigData(int preTrigCount, int totalCount, ref short adData, out short chanTags)

Parameters

preTrigCount

Number of pre-trigger samples (this value must match the value returned by the PretrigCount parameter in the APretrig() method).

totalCount

Total number of samples that were collected.

adData

Reference to data array (must match array name used in APretrig() method).

chanTags

A pointer to the start of the channel tag array (if available). Returns NULL if using a 16-bit board or if channel tags are not available. Refer to the note regarding 16-bit A/D boards below.

Returns

Notes

SampleCount& = 10000

Dim A_D_Data%(SampleCount& + 512)
Dim Chan_Tags%(SampleCount& + 512)

APretrig%(LowChan, HighChan, PretrigCount&, SampleCount&...)

WinBufToArray%(MemHandle%, A_D_Data%, SampleCount& + 512)
AConvertPretrigData%(Pretrig_Count&, SampleCount&, A_D_Data%, Chan_Tags%)