Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

CAM parameter expressions

Collin_Korver
Advocate

CAM parameter expressions

Collin_Korver
Advocate
Advocate

So I am trying to make a CAM expression that includes a round function. My example being the following 

round((restMaterialCutterDiameter-tool_diameter)/2*1/maximumStepover)

 

However, I cannot find any documentation concerning functions syntax that can be inputted into the CAM expressions.

I presume there is a table for the syntax of sin() cos(), round(), etc but am unable to find said table.

0 Likes
Reply
256 Views
1 Reply
Reply (1)

jeff.pek
Community Manager
Community Manager

Pardon the geeky way for answering this, but this is the set of functions that are supported in the "Math" category of the expression parser. I think their behavior should be fairly self-explanatory.

 

You can use this, as in: Math.PI or Math.round(foo)

 

IRON_PARSER_VALUE(ParserMath, double, PI);
IRON_PARSER_METHOD_2(ParserMath, double, minimum, double, double);
IRON_PARSER_METHOD_2(ParserMath, double, maximum, double, double);
IRON_PARSER_METHOD_1(ParserMath, double, sqrt, double);
IRON_PARSER_METHOD_1(ParserMath, double, sin, double);
IRON_PARSER_METHOD_1(ParserMath, double, asin, double);
IRON_PARSER_METHOD_1(ParserMath, double, cos, double);
IRON_PARSER_METHOD_1(ParserMath, double, acos, double);
IRON_PARSER_METHOD_1(ParserMath, double, tan, double);
IRON_PARSER_METHOD_1(ParserMath, double, atan, double);
IRON_PARSER_METHOD_1(ParserMath, double, floor, double);
IRON_PARSER_METHOD_2(ParserMath, double, floorto, double, double);
IRON_PARSER_METHOD_1(ParserMath, double, ceil, double);
IRON_PARSER_METHOD_2(ParserMath, double, roundToSignificant, double, int);
IRON_PARSER_METHOD_1(ParserMath, double, normalizeAngleDegrees, double);
IRON_PARSER_METHOD_2(ParserMath, double, ceilto, double, double);
IRON_PARSER_METHOD_1(ParserMath, double, round, double);
IRON_PARSER_METHOD_2(ParserMath, double, roundto, double, double);
IRON_PARSER_METHOD_1(ParserMath, bool, isnan, double);
IRON_PARSER_METHOD_1(ParserMath, bool, abs, double);

 

Jeff

0 Likes