« Close

Datasheets and User Guides

App Notes

Software & Driver

 

5.3.6 - StreamConfig

Not supported over UDP. Stream mode operates on a table of channels that are scanned at the specified scan rate. Before starting a stream, you need to call this function to configure the table and scan clock.

Table 5.3.6-1. StreamConfig Command Response

Command:          
Byte          
0 Checksum8       
1 0xF8        
2 NumChannels + 3       
3 0×11        
4 Checksum16 (LSB      
5 Checksum16 (MSB      
6 NumChannels       
7 Resolution       
8 SettlingTime       
9 ScanConfig       
    Bit 7: Enable scan pulse output.    
    Bit 6: Enable external scan trigger.  Minimum Minimum W/
    Bits 4-3: Internal stream clock frequency.  Scan Freq Divisor
      b00: 4 MHz 61.1 0.239
      b01: 48 MHz 733 2.87
      b10: 750 kHz 11.5 0.045
      b11: 24 MHz 367 1.44
    Bit 1: Divide Clock by 256     
10-11 Scan Interval (1-65535)       
12 ChannelNumber       
13 ChannelOptions       
    Bits 3-0: BipGain      
           
Repeat 12-13 for each Channel        
           
           
Response:          
Byte          
0 Checksum8       
1 0xF8        
2 0×01        
3 0×11        
4 Checksum16 (LSB      
5 Checksum16 (MSB      
6 Errorcode       
7 0×00        
  • NumChannels: This is the number of channels you will sample per scan (1-128).
  • Resolution: Determines the resolution setting for all analog inputs (12-16). See Section 3.2. This function does not support the high-resolution converter on the UE9-Pro.
  • ScanConfig: If you enable the scan pulse output, Counter1 will pulse low just before each scan (master mode). If you enable the external scan trigger, the UE9 scans the table each time it detects a falling edge on Counter1 (slave mode). Valid combinations for bits 6 and 7 are b00, b01, or b10. You cannot pass b11. Counter1 is automatically enabled and disabled by the stream functions. To provide the highest timing resolution, the scan clock is generally set to the highest setting possible.
  • ScanInterval: (1-65535) This value divided by the clock frequency defined in the ScanConfig parameter, gives the interval (in seconds) between scans.
  • ChannelNumber: 0-143 for analog input channels or 193-224 for digital/timer/counter channels.
  • ChannelOptions: Contains the bipolar setting and gain options for the channel. Following are the nibble values for various gains:

Table 5.3.6-2. Nibble values for various gains

Gain Unipolar Bipolar
*1 0×00 0×08
*2 0×01 NA
*4 0×02 NA
*8 0×03 NA