wait_for_device_status(_c)

	has_status.i4.v = wait_for_device_status_c(device_index.i4.v,
						   status_value.i4.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 specified
	status value.

	device_index	device index of desired device
	status_value	status value to wait for
			(WAIT_FOR_ON -> wait for on status,
			 WAIT_FOR_OFF -> wait for off status,
			 WAIT_FOR_READY -> wait for ready status,
			 WAIT_FOR_TRIPPED -> wait for tripped status,
			 WAIT_FOR_REMOTE -> wait for remote status,
			 WAIT_FOR_LOCAL -> wait for local status,
			 WAIT_FOR_POSITIVE -> wait for positive status,
			 WAIT_FOR_NEGATIVE -> wait for negative status,
			 WAIT_FOR_RAMP -> wait for ramp status,
			 WAIT_FOR_DC -> wait for DC status)
	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 with the desired status
			required
	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			device has specified status
	CBS_INVARG		invalid status value specified
	DIO_NOATT		requested status value not supported for
				this device
	CBS_ABORT		user aborted
	CBS_TIMEOUT		timed out waiting for device
	otherwise		ACNET format 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(_c), wait_time_c

	C/C++ usage:

	int	has_status;
	int	device_index = 4976;
	int	status_value = WAIT_FOR_ON;
	int	wait = 0;
	int	num_tries = 1;
	void	*func_data = (void *) NULL;
	void	update_func(void *func_data);

	has_status = wait_for_device_status_c(device_index,status_value,wait,
					      num_tries,update_func,func_data);