This subroutine converts a point value from engineering units to the raw value. This function is necessary for those applications that accept (or compute) a point value in engineering units format and need to download that point to a PLC as a RAW value. This is the normal scenario for points that have engineering units conversion. Point values are sent to and received from point management as integers, and are converted to or from engineering units (floating point values) by the application.

If the point is configured with CUSTOM conversion, you must configure a Reverse expression for the point.

If the point is configured with LINEAR conversion, a Reverse expression is automatically created for the point.


int PTMAP_rev_eu_conv ( point_id, eu_value, result,

                        ret_stat )

char        *point_id;

double      eu_value;

PTM_DATA    **result;

COR_STATUS  *ret_stat;

Input Arguments


Point identifier for conversion.


The floating-point value for conversion.

Output Arguments


A pointer to the address of a PTM_DATA struct that will receive the result of the computation.


For example, result = PTMAP_alloc_eu_data.


Engineering units string from configuration data.


Pointer to status structure. The following errors may be returned (see Appendix A for an explanation of this code):





Return Value

The contents of retstat.status.

More information

Point Management API subroutines.