This chapter explains what steps have to be taken to operate a Lexium P Robot in the program.
The following libraries are required:
SchneiderElectricRobotics
SchneiderElectricRobotics Parameters
Robotic or RoboticModule
Every Lexium P Robot requires its own instance of SER.FB_RoboticPSeries. (for example fbP4S0R : SER.FB_RoboticPSeries) and its instance of ROB.FB_Robot (for example fbRobot : ROB.FB_Robot) or an instance of the RM.FB_RoboticModule.
Initialize the Lexium P Robot by calling the method fbP4S0R.InitializeRobot().
If the output q_xRotationalAxisRequired is TRUE, then the robot you selected has a rotational axis and you have to call fbP4S0R.InitializeRotationalAxis().
Connect the FB_RoboticPSeries to the FB_Robot by configuring the FB_Robot. Call fbRobot.ifConfiguration.SchneiderElectricRobot() for the RoboticModule and accordingly stRobotInterface.iq_ifConfiguration.SchneiderElectricRobot(). At the input i_ifRobot, assign fbP4S0R.ifSchneiderElectricRobot.
The configuration is completed by calling the methods SetEmergencyParameter() and ConfigDone().
The Lexium P Robot can be adapted with several methods:
SetKinematicParameter()
SetControlLoopParameter()
Call the program SER.SR_SlowCyclicExecution in a task with task interval 10 ms.
The program has to be called only once, even if several robots of SchneiderElectricRobotics are used.
VAR
ifConfiguration : ROB.IF_RobotConfiguration;
//ifConfiguration : RM.IF_Configuration;
fbPSeries : SER.FB_RobotPSeries;
etDiag : GD.ET_Diag;
etDiagExt : ROB.ET_DiagExt;
//etDiagExtRm : RM.ET_DiagExt;
etDiagExtSer : SER.ET_DiagExt;
etDiagExtSerp : SERP.ET_DiagExt;
sMsg : STRING[80];
xRotationalAxisRequired : BOOL;
lrPeriodStart : LREAL;
lrPeriodLength : LREAL;
END_VAR
// Get interface instance
ifConfiguration := fbRobot.ifConfiguration;
// ifConfiguration := stRobotInterface.iq_ifConfiguration;
// Initialize P-Series
fbPSeries.InitializeRobot(i_etRobotType := SERP.ET_RobotPSeries.VR,
i_ifDriveA := DRV_RobotDriveA,
i_ifDriveB := DRV_RobotDriveB,
i_ifDriveC := DRV_RobotDriveC,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg,
q_xRotationalAxisRequired => xRotationalAxisRequired);
IF xRotationalAxisRequired THEN
fbPSeries.InitializeRotationalAxis(i_ifDrive := DRV_RobotDriveRotAx,
i_lrPeriodStart := lrPeriodStart,
i_lrPeriodLength := lrPeriodLength,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
END_IF
// Configure P-Series
ifConfiguration.SchneiderElectricRobot( i_ifRobot := fbPSeries.ifSchneiderElectricRobot,
q_etDiag => etDiag,
q_etDiagExt => etDiagExtSer,
q_sMsg => sMsg);
// Call configuration method for the emergency parameter
ifConfiguration.SetEmergencyParameter( i_lrMaxDeceleration := 10000.0,
i_lrRamp := 25.0,
q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
// Sign config done
ifConfiguration.ConfigDone(q_etDiag => etDiag,
q_etDiagExt => etDiagExt,
q_sMsg => sMsg);
Parameter |
A |
B |
C |
RotationalAxis |
---|---|---|---|---|
|
FALSE |
FALSE |
FALSE |
|
|
1 |
1 |
1 |
1 |
|
50 |
50 |
50 |
10 |
|
1360 |
1360 |
1360 |
825 |
|
'P-0-1069.0.0' |
'P-0-1069.0.0' |
'P-0-1069.0.0' |
'P-0-1069.0.0' |
|
360 |
360 |
360 |
360 |
Parameter |
A |
B |
C |
RotationalAxis |
---|---|---|---|---|
|
FALSE |
FALSE |
FALSE |
|
|
2 |
2 |
2 |
1 |
|
77 |
77 |
77 |
10 |
|
5500 |
5500 |
5500 |
875 |
|
'P-0-1069.0.0' |
'P-0-1069.0.0' |
'P-0-1069.0.0' |
'P-0-1069.0.0' |
|
360 |
360 |
360 |
360 |
Parameter |
A |
B |
C |
---|---|---|---|
|
1.0 |
1.0 |
1.0 |
|
10.0 |
10.0 |
10.0 |
|
0.0 |
0.0 |
0.0 |
|
50.0 |
50.0 |
50.0 |