Hello, is there any important system variables someone getting started with expert programming should know?
I know a few e.g.:$out, $in, $PRO_MODE, $OV_JOG
Hello, is there any important system variables someone getting started with expert programming should know?
I know a few e.g.:$out, $in, $PRO_MODE, $OV_JOG
Any System variable is important depending on what you are trying to do.
Look up System variables documentation and study bas.src, because that is what inlineforms do to convert your program to expert krl code.
Fubini
$ACCU_STATE to monitor backup batteries
$POS_ACT, $AXIS_ACT to get the current commandend cartesian/axes position
$POS_ACT_MES to get the current measured cartesian position
$POS_INT, $AXIS_INT to get the position at the last interrupt event
$TORQUE_AXIS[1-6] to get the current motor torque
inside custom.dat
$CP_VEL_TYPE if set to #VAR_ALL will not trigger the over speed error near singularities
then, i use this function to limit the torque of the axes
DEF limit_torque(ax:IN,percent:IN)
INT ax
REAL percent
DECL TorqLimitParam limits
IF percent>0 THEN
limits.monitor = #off
limits.max_lag= 30
limits.max_vel= 250
limits.lower = -$TORQUE_AXIS_MAX[ax]*(percent/100)
limits.upper = $TORQUE_AXIS_MAX[ax]*(percent/100)
SET_TORQUE_LIMITS(ax, limits)
ENDIF
END
Display More
and
to reset torque to default