EasyManua.ls Logo

LMI Technologies Gocator Series - Page 242

Default Icon
533 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Gocator Line Profile Sensors: User Manual
Gocator Web Interface 242
Function Description
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.
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);
}
else
{
Output_Set(Volume, 0);
}

Table of Contents

Related product manuals