status.i4.v = dio_scaling(device_indices.i4a.r, properties.i2a.r,
				  primary_indices.i4a.r, common_indices.i4a.r,
				  comm_constants.r4a.r, errors.i2a.r
				  [,primary_text.i1a.r] [,common_text.i1a.r]
				  [,num_devices.i4.r] [,data_lengths.i4a.r]
				  [,display_lens.i4a.r] [,display_types.i4a.r]
				  [,is_controlled.i4a.r] [,is_motor.i4a.r]
				  [,num_constants.i4a.r] [,handler_codes.i4a.r]

	This routine returns reading and/or setting scaling information for
	a device or list of devices.
	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.)
	primary_indices	returned primary transform index or array of indices
			(If primary index data is not needed, a value of NULL
			can be passed for this argument.)
	common_indices	returned common transform index or array of indices
			(If common index data is not needed, a value of NULL
			can be passed for this argument.)
	comm_constants	returned common transform constants
			(DIO_NUM_SCALING_CONSTANTS single precision real
			 constants per entry)
			(If transform constants are not needed, a value of NULL
			can be passed for this argument.)
	errors		returned ACNET status value or array of returned
			status values (A status of DBM_NOREC indicates that
			the requested PDB does not exist.)
	[primary_text]	returned primary units text
			(LEN_DEV_UNITS characters per device) (default is NULL)
	[common_text]	returned common units text
			(LEN_DEV_UNITS characters per device) (default is NULL)
	[num_devices]	number of devices in list (default is 1)
	[data_lengths]	returned raw data lengths for scaling (1, 2, or 4 bytes)
			(default is NULL)
	[display_lens]	returned default display lengths (DIO_SHORT_DISPLAY_LEN
			or DIO_LONG_DISPLAY_LEN characters or length for
			special display type)
			(default is NULL)
	[display_types]	returned default display types
			(DIO_STANDARD_NOTATION -> display values in standard
			 DIO_SCIENTIFIC_NOTATION -> display values in
						    scientific notation,
			 otherwise -> special display type (negated CNV_ type))
			(default is NULL)
	[is_controlled]	returned controlled setting flags (Note: This is only
			meaningful for the setting property.)
			(TRUE -> it is a controlled setting device,
			 FALSE -> normal setting device)
			(default is NULL)
	[is_motor]	returned motor control flags (Note: This is only
			meaningful for the setting property.)
			(TRUE -> device is a stepper motor,
			 FALSE -> device is not a stepper motor)
			(default is NULL)
	[num_constants]	returned number of constants defined
			(default is NULL)
	[handler_codes]	returned data handler codes
			(DIO_HANDLER_NONE -> no special data handling,
			 DIO_HANDLER_SWAP_BYTES -> swap adjacent bytes,
			 DIO_HANDLER_SWAP_WORDS -> swap adjacent words)
			(default is NULL)
	[options]	retrieval options
			(DIO_OPT_NONE -> no options selected (default),
			 DIO_OPT_ALLOW_OBSOLETE -> return data for obsolete

	This function returns status values as follows:

	OK			success
	DIO_BADARG		invalid property index passed
	DIO_MEMFAIL		memory allocation failure
	negative value		other ACNET format error
	positive value		number of devices in error

	Function returns ACNET error status.
	If positive, return value is number of devices with errors

	This function requires the following include files:

	dbprops_h, diolib_h, acnet_errors_h

	Related functions:

	dio_is_display_dec(_c), dio_is_display_short(_c), dio_scaling_len(_c),
	dio_scaling_length_list_c, dio_scaling_transforms_c, dio_units_text_c,
	dio_get_pdb, dio_pdb_sts, dio_pdb_ctl, dio_get_historic_scaling_c,
	dio_pdb_to_scaling_info_c, dio_data_type_info_c, error_in_list(_c)

	C/C++ usage:

	char	primary_text[NUM_DEVICES][LEN_DEV_UNITS];
	char	common_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	primary_indices[NUM_DEVICES];
	int	common_indices[NUM_DEVICES];
	int	num_devices = NUM_DEVICES;
	int	data_lengths[NUM_DEVICES];
	int	display_lengths[NUM_DEVICES];
	int	display_types[NUM_DEVICES];
	int	is_controlled[NUM_DEVICES];
	int	is_motor[NUM_DEVICES];
	int	num_constants[NUM_DEVICES];
	int	handler_codes[NUM_DEVICES];
	unsigned int	options = DIO_OPT_NONE;

	status = dio_scaling(device_indices,&properties,primary_indices,
			     common_indices,(float *) comm_constants,
			     errors,(char *) primary_text,(char *) common_text,