Cicode Programming Reference > Cicode Function Categories > Miscellaneous Functions Introduction > EngToGeneric

EngToGeneric

Gets a variable in the CitectSCADA generic scale format. CitectSCADA uses this scale to display trends. It calls this function automatically for trends defined in the project. If you want to display a trend using Cicode you need to call this function.

Syntax

EngToGeneric(Value, EngLow, EngHigh)

Value:

The value to convert to the CitectSCADA generic scale format.

EngLow:

The engineering units zero scale.

EngHigh:

The engineering units full scale.

Return Value

The variable (in the range 0 - 32000).

Related Functions

DspBar, DspTrend

Example

/* Using trend definition 5 at AN20, display the value of Tag1 on 
Pen1 of the trend. Tag1 has an engineering scale of 0 to 100. */
DspBar(20,5,EngToGeneric(Tag1,0,100));

See Also

Miscellaneous Functions