dio_raw_to_scaled_historic_c

	status.i4.v = dio_raw_to_scaled_historic_c(device_indices.i4a.r,
						   properties.i2a.r,
						   clinks.u4.v,
						   raw_data.g.v,
						   values.g.v, errors.i2a.r
						   [,num_devices.i4.v]
						   [,units_text.i1a.r]
						   [,convert_type.i4.v]
						   [,lengths.i4a.r])

	Ths routine converts raw reading or setting data to its corresponding
	scaled value using scaling data from a particular date in the past.

	device_indices	device index or array of device indices
	properties	property index or array of property indices
			(PRREAD -> reading property,
			 PRSET -> setting property)
			(If the first value is less than zero, all devices
			 use a property index which is equal to the absolute
			 value of this argument.)
	clinks		date of interest in clinks
	raw_data	raw reading or setting data returned by a previous
			call to dio_get_raw(_c) or dio_get_lst_raw(_c)
	values		returned scaled floating point value or array of values
	errors		returned ACNET status value or array of returned
			status values
	[num_devices]	number of devices in list (default is 1)
	[units_text]	returned units text (default is NULL)
			(LEN_DEV_UNITS characters per device)
	[convert_type]	type of scaling conversion desired
			(DIO_COMMON -> return common engineering units as
				       single precision floats (default),
			 DIO_COMMON_DOUBLE -> return common engineering units
					      as double precision floats,
			 DIO_PRIMARY -> return primary units as single
					precision floats,
			 DIO_PRIMARY_DOUBLE -> return primary units as double
					       precision floats)
	[lengths]	device length or array of lengths for support of
			array devices  (If the first value is less than zero,
			all devices will use a length which is equal to the
			absolute value of this argument.)
			(default is NULL which results in using the database
			 minimum size for each device)

	This function returns status values as follows:

	OK			success
	DIO_BADARG		invalid property index or conversion type passed
	DIO_MEMFAIL		memory allocation failure
	DIO_INVLEN		an invalid device length was requested for
				one or more devices
	negative value		other ACNET format error
	positive value		number of devices in error

	This function requires the following include files:

	dbprops_h, diolib_h, acnet_errors_h

	Related functions:

	dio_get_historic_scaling_c, dio_historic_raw_data_type_c,
	dio_historic_data_length_c, dio_raw_to_scaled_data(_c),
	dio_raw_to_scaled_custom_c, dio_raw_to_value_text_c,
	dio_primary_to_scaled_data_c, dio_primary_to_scaled_custom_c,
	dio_scaled_to_raw_data(_c), dio_scaled_to_raw_custom_c,
	dio_get_dev(_c), dio_bld_get(_c), dio_get_lst, dio_get_raw(_c),
	dio_bld_get_raw(_c), dio_get_lst_raw(_c), dio_get_pdb,
	dio_raw_to_status_c, dio_raw_to_status_extended_c,
	dio_raw_to_status_text, dio_raw_to_status_text_extended_c,
	dio_data_type_info_c, error_in_list(_c)

	C/C++ usage:

	char	raw_data[TOTAL_LENGTH];
	char	units_text[NUM_DEVICES][LEN_DEV_UNITS];
	short	errors[NUM_DEVICES];
	short	properties = -PRSET;
	int	status;
	static const int	device_indices[NUM_DEVICES] = {14430, 14431};
	int	num_devices = NUM_DEVICES;
	int	convert_type = DIO_COMMON;
	int	*lengths = (int *) NULL;
	unsigned int	clinks = DATE_IN_CLINKS;
	float	values[NUM_DEVICES];

	status = dio_raw_to_scaled_historic_c(device_indices,&properties,
					      clinks,(void *) raw_data,
					      (void *) values,errors,
					      num_devices,(char *) units_text,
					      convert_type,lengths);