getInputBit
Top  Previous  Next

err = getInputBit ( integer Bit )

Use this function to
read the state of the specified general purpose input bit (GPIN) on the currently selected framegrabber.

Parameters

Bit  
Integer specifying the zero-based index of the input bit.  
 
 
Return value
 
TRUE if the bit is set or FALSE otherwise.  
 
 
Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example
 
This set of statements performs the continuous acquisition when input bit #0 is set, and stops it when the bit is reset.  
 
do  
wait(5)  
if getInputBit(0)=TRUE then  
grabim(1)  
endif  
loop  

Remark
 
If you use BitFlow framegrabbers, the valid values of the input bit index are 0 for RoadRunner and R3 Diff boards, 0-2 for R3 CL, 0-5 for Raven and 0-6 for R64.