wait_for_device(_c)

	in_range.i4.v = wait_for_device(device_index.i4.r, minimum.r8.r,
					maximum.r8.r, wait.i4.r
					[,num_tries.i4.r] [,update_func.f.v]
					[,func_data.g.v])

	in_range.i4.v = wait_for_device_c(device_index.i4.v, minimum.r8.v,
					  maximum.r8.v, wait.i4.v
					  [,num_tries.i4.v] [,update_func.f.v]
					  [,func_data.g.v])
 
	This routine will wait for for a device to have a value within
	a specified range.

	device_index	device index of desired device
	minimum		minimum acceptable value
	maximum		maximum acceptable value
	wait		waiting period
			(>0 -> check for "wait" seconds,
			  0 -> check forever,
			  high order bit set -> try until TCLK event indicated
						by low byte occurs)
	[num_tries]	number of consecutive samples in desired range
			required (default is 1)
	[update_func]	user-supplied function to be called once per
			sample loop (roughly 4 times per second)
			(called as: update_func(func_data.g.v))
			(default is NULL)
	[func_data]	user-supplied data to be passed to the update function
			(default is NULL)

	This function returns status values as follows:

	TRUE			value in range
	CBS_ABORT		user aborted
	CBS_TIMEOUT		timed out waiting for device
	otherwise		DIO (ACNET error)

	This function requires the following include files:

	ul_clib_h:cnsparam_h, ul_cbsaux_h:auxlib_misc_h, ul_clib_h:acnet_errors_h

	Related functions:

	wait_for_device_status_c, wait_time_c

	C/C++ usage:

	int	in_range;
	int	device_index = 4976;
	int	wait = 0;
	int	num_tries = 1;
	double	minimum = 0.0;
	double	maximum = 0.0;
	void	*func_data = (void *) NULL;
	void	update_func(void *func_data);

	in_range = wait_for_device_c(device_index,minimum,maximum,wait,
				     num_tries,update_func,func_data);