Hidden Hidden Hidden Hidden
 
 

DIGITIZING WAVEFORMS
PROGRAMMING > PROGRAMMING TECHNIQUES >

The subroutines shown below are used to simultaneously digitize any number of instruNet channels.

ResetChannelList()
Reset the list of channels to digitize.

AddToChannelList_32or64()
Add channel to list of channels to digitize.

Set_iNet_TIMING_Parameters_32or64()
Set digitize timing parameters.

Set_iNet_TRIGGER_Parameters()
Set digitize trigger parameters.

DigitizeListOfChannels_32or64()
Tell instruNet to begin digitizing.

GetDigitizedSegment_32or64()
Get a little segment of digitized data.

PutEnabledChInDigitizeList_32or64()
Place enabled channels in digitize list.

Stop_iNet_Digitizing()
Tell instruNet to stop digitizing.

ThisIsAlreadyInChannelList()
Returns true if ch is already in list.

These routines are exposed through the iNet32.DLL and through the INET_INT.C interface file; and are documented in file INET_INT.C. An example use of these functions in C is shown in file INET_EX3.C. The following C code, from file INET_EX3.C, demonstrates how to digitize one 100 point scan of 3 channels at 100samples/sec/channel in oscilloscope mode. For an example of C code that processes a continuous stream, please see INET_EX3.C.

numScansToDigitize = 1; # of scans to digitize
sampleRate = 100.0; sample rate
doStripChartMode = FALSE; do strip chart mode
e = ResetChannelList(); clear the list of channels to digitize
numCh = 0; start out with no channels in the list
e = AddToChannelList_32or64(1,1,1,1, &digiBuffer[ numCh++ ][ 0 ], BUFF_PTS * sizeof(iNetFLT32)); Add 'Ch1 Vin' to list, at address {1,1,1,1}
e = AddToChannelList_32or64(1,1,1,4, &digiBuffer[ numCh++ ][ 0 ], BUFF_PTS * sizeof(iNetFLT32)); Add 'Ch4 Vin' to list, at address {1,1,1,4}
e = AddToChannelList_32or64(1,1,1,7, &digiBuffer[ numCh++ ][ 0 ], BUFF_PTS * sizeof(iNetFLT32)); Add 'Ch7 Vin' to list, at address {1,1,1,7}
e = Set_iNet_TIMING_Parameters_32or64( set the timing options

sampleRate,
BUFF_PTS,
numScansToDigitize,
doStripChartMode,

sample rate (pts/sec/ch)
number of pts in 1 scan, for 1 channel
number of scans that are digitized
if TRUE (1) we do Strip Chart Recorder work with Continuous Scans, otherwise if FALSE (0) we do Oscilloscope mode (non-Coninuous Scans)

ion_gSaveDataPopup_ToRamBuffer
TRUE,
TRUE);

Save digitize data in ram buffer
show alert on buffer overflow
accurate channel switching
Stop_iNet_Digitizing(); Make sure we are NOT digitizing, prepare to digitize the channels in the channel list and return when 1 scan has been digitized.
e = DigitizeListOfChannels_32or64(
TRUE /* allowMouseDownToStopDigitize */,
TRUE /* processOneScanAtATime */,
&last_scanNum_base1_pulled_inFull_oneCtlr, etc..);
digitize the channels in the channel list and return when 1 scan has been digitized.