With the method
, you can add code to calibrate a robot. Calibration is necessary if, for example, a motor or gearbox was replaced.The method i_ifCalibration: SER.IF_RobotPSeriesCalibration) and an output (q_xRequest).
has an input (If you want to execute a calibration, the output q_xRequest has to be set to TRUE and has to remain TRUE during calibration.
With setting q_xRequest to TRUE, the robot is disabled so that the robot does not use the drives.
If the robot is disabled, the i_ifCalibration is validated, and you can use i_ifCalibration to execute a calibration.
i_ifCalibration.xDone gives feedback if calibration is finished.
If you add variables to methods, these variables are volatile variables and are reinitialized with every call of the method. If you need variables that save their data, refer to Data Exchange with ModuleInterface\Save Data.
If you need variables to control your code, refer to Data Exchange with ModuleInterface.
Calibration method example:
(left side):
i_xEnableCalibration and i_xCalibrationStandard are input variables created to control calibration. Refer to Data Exchange with ModuleInterface.
etDiagCalibration, etDiagExtCalibration, sMsgCalibration, xCalibrationDone, and xCalibrationStarted are variables, for example, to read present state. Refer to Data Exchange with ModuleInterface\Save Data.
method (right side):
Use the variables, created in
, in the method .
Verify that i_ifCalibration is valid before using it. (For example, line 3 of implementation of method : IF (i_ifCalibration <> 0) THEN
).
A method to start calibration (for example
) must only be called once, not cyclically. (Line 4 to 9 of implementation of method ).i_ifCalibration.xDone gives feedback if calibration has been executed. For further information on calibration, refer to SchneiderElectricRobotics Library Guide.
Update your call of the robot. (Add i_xEnableCalibration and i_xCalibrationStandard to the call of the robot).
If you use the code generation option for Non Template robots, the call of the robot is updated automatically.
To start this calibration example, you must set the inputs i_xEnableCalibration and i_xCalibrationStandard to TRUE. i_xEnableCalibration must be set to TRUE during calibration.
You can use the method ConfigDone.
for additional configuration, for example, to add a tracking system. This method is called once beforeWith the method
, you can add code, for example, to support robot motion.The method i_etRotationalAxis) and an input/output (iq_stRoboticModuleItf).
has an input (The input i_etRotationalAxis provides information which robot component (AuxAx) is used as rotational axis (if you have configured a robot with rotational axis).
Otherwise it is 0 (ROB.ET_RobotComponent.None). This information is necessary, for example, for a IF_Motion.MoveSync or a IF_RobotMotion.MoveAsync command.
With the input/output (iq_stRoboticModuleItf) you access, for example, IF_RobotMotion to set move commands or to IF_RobotFeedback to receive information of the status of the robot.
If you want to use variables of IF_RobotFeedback outside of the method (for example for a trace), you can add a variable of type ROB.IF_RobotFeedback to the and copy iq_stRoboticModuleItf.iq_ifFeedback of to the new variable.
Verify that interface is valid before using it (for example iq_stRoboticModuleItf.iq_ifFeedback <> 0).
If you add variables to methods, these variables are volatile variables and are reinitialized with every call of the method. If you need variables that save their data, refer to Data Exchange with ModuleInterface\Save Data.
If you need variables to control your code, refer to Data Exchange with ModuleInterface.