bpm_get_tbt_data_c

	status.i4.v = bpm_get_tbt_data_c(detector.i1a.r, positions.r4a.r,
					 time_stamps.u4a.r, num_turns.i4.r,
					 filter_data.i4.v, time.u4.r
					 [,intensities.r4a.r] [,scale_it.i4.v]
					 [,readout_spec.s.r] [,attributes.u4.r]
					 [,metadata.g.v] [,max_turns.i4.v])

	This routine retrieves BPM turn by turn data for the machine last
	requested by a call to bpm_machine_c.

	detector	ASCII detector name (BPM_TBT_NAME_LEN characters)
	positions	returned turn by turn positions in millimeters
			(BPM_NUM_TBT_VALUES values)
	time_stamps	returned turn by turn time stamps in microseconds
			since cycle reset
			(BPM_NUM_TBT_VALUES values)
	num_turns	returned number of valid turns
	filter_data	filter data flag
			(TRUE -> filter out or mark bad data,
			 FALSE -> return data as it is)
	time		timestamp in clinks when the data was taken
			(A value of NULL may be passed if this value is
			 not desired.)
	[intensities]	returned turn by turn intensities
			(BPM_NUM_TBT_VALUES values)
	[scale_it]	flag indicating whether or not to scale the returned
			positions to engineering units (only used for
			BPM_RECYCLER)
			(TRUE -> scale positions (default),
			 FALSE -> return unscaled or normalized values)
	[readout_spec]	readout specification
			(BPM_RECYCLER -> structure of type
					 BPM_RECYCLER_READOUT_SPEC,
			 BPM_TEVATRON -> structure of type
					 BPM_TEVATRON_READOUT_SPEC,
			 BPM_TEV_DEVL -> structure of type
					 BPM_TEVATRON_READOUT_SPEC,
			 BPM_MAIN_INJECTOR -> structure of type
					      BPM_MI_READOUT_SPEC,
			 BPM_MI_DEVL -> structure of type
					BPM_MI_READOUT_SPEC)
			(default is NULL)
	[attributes]	returned data attributes
			(BPM_ATTR_CALIB_DATA -> data is calibration data)
			(default is NULL)
	[metadata]	returned metadata structure
			(BPM_TEVATRON -> structure of type
					 BPM_TEVATRON_METADATA,
			 BPM_TEV_DEVL -> structure of type
					 BPM_TEVATRON_METADATA,
			 BPM_MAIN_INJECTOR -> structure of type
					      BPM_MI_METADATA,
			 BPM_MI_DEVL -> structure of type
					BPM_MI_METADATA)
	[max_turns]	maximum number of turns to return
			(default is BPM_NUM_TBT_VALUES)

	This function returns ACNET status values as follows:

	OK			success
	CBS_NOTYET		not supported for the currently selected
				machine
	CBS_INVARG		invalid detector requested
	CBS_NODAT		no turns are available
	CBS_CORRUPT		raw data from BPM is corrupt
	otherwise		other ACNET error

	This function requires the following include files:

	ul_cbsaux/bpmuti.h, acnet_errors_h

	Related functions:

	bpm_machine_c, bpm_get_tbt_intensity_c, bpm_get_raw_tbt_data_c,
	bpm_data_source_c, bpm_get_tbt_names, bpm_get_tbt_crates_and_channels,
	bpm_enable_tbt_trigger_c, bpm_get_tbt_timing_c, bpm_set_tbt_timing_c,
	bpm_get_global_tbt_timing_c, bpm_set_global_tbt_timing_c,
	bpm_is_tbt_trigger_enabled

	C/C++ usage:

	static const char	detector[BPM_TBT_NAME_LEN+1] = "HE11";
	int	status;
	int	num_turns;
	int	filter_data = TRUE;
	int	scale_it = TRUE;
	int	max_turns = BPM_NUM_TBT_VALUES;
	unsigned int	time_stamps[BPM_NUM_TBT_VALUES];
	unsigned int	time;
	unsigned int	attributes;
	float	positions[BPM_NUM_TBT_VALUES];
	float	intensities[BPM_NUM_TBT_VALUES];
	void	*readout_spec = (void *) NULL;
	void	*metadata = (void *) NULL;

	status = bpm_get_tbt_data_c(detector,positions,time_stamps,&num_turns,
				    filter_data,&time,intensities,scale_it,
				    readout_spec,&attributes,metadata,
				    max_turns);