menu 1
menu 2
menu 3
menu 4
menu 5
menu 6
 

DIGITIZING WAVEFORMS
PROGRAMMING > PROGRAMMING TECHNIQUES >

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

ResetChannelList()
AddToChannelList()
Set_iNet_TIMING_Parameters()
Set_iNet_TRIGGER_Parameters()
DigitizeListOfChannels()
GetDigitizedSegment()
PutEnabledChInDigitizeList()
Stop_iNet_Digitizing()
ThisIsAlreadyInChannelList()

Reset the list of channels to digitize
Add channel to list of channels to digitize
Set digitize timing parameters
Set digitize trigger parameters
Tell instruNet to begin digitizing
Get a little segment of digitized data
Place enabled channels in digitize list
Tell instruNet to stop digitizing
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(1,1,1,1, &digiBuffer[ numCh++ ][ 0 ], BUFF_PTS * sizeof(iNetFLT32)); Add 'Ch1 Vin' to list, at address {1,1,1,1}
e = AddToChannelList(1,1,1,4, &digiBuffer[ numCh++ ][ 0 ], BUFF_PTS * sizeof(iNetFLT32)); Add 'Ch4 Vin' to list, at address {1,1,1,4}
e = AddToChannelList(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( set the timing options

(iNetFLT32) 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(
TRUE /* allowMouseDownToStopDigitize */,
TRUE /* processOneScanAtATime */,
&last_scanNum_base1_pulled_inFull_oneCtlr);
digitize the channels in the channel list and return when 1 scan has been digitized.


CONTACT US | | PRINT THIS PAGE | NEW WINDOW | COPYRIGHT gwi '05