dio_primary_to_scaled_custom_c

	status.i4.v = dio_primary_to_scaled_custom_c(primary_values.g.v,
						     values.g.v, errors.i2a.r,
						     num_devices.i4.v,
						     convert_type.i4.v,
						     num_values.i4a.r,
						     common_indices.i4a.r,
						     constants.r8a.r,
						     num_constants.i4a.r,
						     same_values.u4.v)

	Ths routine converts raw reading or setting data to its corresponding
	scaled value using caller-supplied scaling information.  This
	routine is especially useful when scaling structured devices which
	require different scaling transforms for different fields.

	primary_values	primary reading or setting values
	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
	convert_type	type of scaling conversion desired
			(DIO_COMMON -> return common engineering units as
				       single precision floats,
			 DIO_COMMON_DOUBLE -> return common engineering units
					      as double precision floats)
	num_values	number of values or array of number of values
			to be scaled (*)
	common_indices	common (engineering) scaling index or array
			of indices (*)
	constants	constants to be used in the common transform
			scaling (*)
	num_constants	number of constants per device or array of numbers
			(maximum is DIO_PDB_MAX_CONSTANTS per device) (*)
	same_values	argument interpretation flag
			(TRUE -> use the same scaling information for every
				 device (all arguments marked by "(*)"),
			 FALSE -> use individual scaling information for
				  each device)

	This function returns status values as follows:

	OK			success
	DIO_BADARG		invalid conversion type, number of values,
				or number of constants 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:

	cns_data_structs_h, diolib_h, acnet_errors_h

	Related functions:

	dio_raw_to_scaled_custom_c, dio_primary_to_scaled_data_c,
	dio_raw_to_scaled_data(_c), dio_raw_to_value_text_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,
	error_in_list(_c)

	C/C++ usage:

	short	errors[NUM_DEVICES];
	int	status;
	int	num_devices = NUM_DEVICES;
	int	convert_type = DIO_COMMON;
	static const int	num_values[NUM_DEVICES] = {1, 1};
	static const int	common_indices[NUM_DEVICES] = {4, 4};
	static const int	num_constants[NUM_DEVICES] = {2, 2};
	int	same_values = FALSE;
	static const float	primary_values[NUM_DEVICES] = {5.0, 5.0};
	float	values[NUM_DEVICES];
	static const double	constants[2*NUM_DEVICES] = {{1, 1}, {1, 1}};

	status = dio_primary_to_scaled_custom_c((void *) primary_values,
						(void *) values,errors,
						num_devices,convert_type,
						num_values,common_indices,
						(void *) constants,
						num_constants,same_values);