Gocator 2300 & 2880 Series
Gocator Web Interface • Measurement • 207
Function Description
Parameters:
id – Value ID
void Memory_ClearAll() Erases all values from persistent memory
Function Description
long long Stamp_Frame() Gets the frame index of the current frame.
long long Stamp_Time() Gets the time stamp of the current frame.
long long Stamp_Encoder() Gets the encoder position of the current frame.
long long Stamp_EncoderZ() Gets the encoder index position of the current frame.
unsigned int Stamp_Inputs() Gets the digital input state of the current frame.
Stamp Functions
Function Description
float sqrt(float x) Calculates square root of x
float sin(float x) Calculates sin(x) (x in radians)
float cos(float x) Calculates cos(x) (x in radians)
float tan(float x) Calculates tan(x) (x in radians)
float asin(float x) Calculates asin(x) (x in radians)
float acos(float x) Calculates acos(x) (x in radians)
float atan(float x) Calculates atan(x) (x in radians)
float pow (float x, float y) Calculates the exponential value. x is the base, y is the exponent
float fabs(float x) Calculates the absolute value of x
Math Functions
Example: Accumulated Volume
The following example shows how to create a custom measurement that is based on the values from
other measurements and persistent values. The example calculates the volume of the target using a
series of box area measurement values.
/* Calculate the volume of an object by accumulating the boxArea measurements*/
/* Encoder Resolution is 0.5mm. */
/* BoxArea Measurement ID is set to 1*/
long long encoder_res = 500;
long long Volume = Memory_Get64s(0);
Memory_Set64s(0, Volume);
if (Volume > 1000000)
{
Output_Set(Volume, 1);