With the method StartCalibrationSingleSegment, you can start the process of calibrating one segment of a Lexium™ MC multi carrier track.
The calibration area comprises three segments: one segment behind the selected segment, the selected segment and one segment in front of the selected segment. For the calibration of a track segment, only one carrier is allowed in the calibration area. This carrier is selected for the segment calibration. The other carriers can stay on the track.
Preconditions for the calibration process:
Define the working direction of the track (not inverted or inverted) by the parameter Direction in the user function TrackGeometry of the track object . The default value for the parameter Direction is Not inverted / 1. (For more information on the parameter Direction, refer to the Lexium™ MC multi carrier Device Objects and Parameters Guide.)
Ensure that there is not more than one carrier without tool and product in the calibration area.
Ensure that there are no mechanical obstacles for the carrier in the calibration area.
i_dwPosP := 500
i_dwVelP:= 2000
i_dwVelI := 500
Perform the Init_Track routine of the project Multicarrier Example.
Ensure that the carrier and the function block FB_Multicarrier are successfully enabled.
Select the calibration mode in the enumeration ET_ModeTrackCalibration, depending on the working direction of your Lexium™ MC multi carrier track in automatic operation mode.
Select the segment index number (topological address) of the segment that you want to calibrate. The order of the segment index numbers is independent from the working direction of the track (not inverted or inverted). For more information on segment numbering, refer to the description of the linear coordinate system.
Calibration process:
By calling the method StartCalibrationSingleSegment, you start the calibration process that runs without further user action. You can verify the status of the process through the property etState (see FB_TrackCalibration).
The calibration process includes the following stages:
The carrier moves to the initial position, which is the middle position of the segment behind the selected segment, seen in moving direction.
The measurement is started.
The carrier moves from the middle of the segment behind the selected segment to the middle of the segment in front of the selected segment, seen in moving direction. (The motion parameters are defined inside the library).
The calibration values are calculated internally.
The parameters are written to the segment.
The enumeration ET_StateTrackCalibration displays the status TrackCalibrationSuccessful.
i_udiSegmentIndex = 2
i_etMode = MCR.ET_ModeTrackCalibration.Forward
Working direction: not inverted
Calibration area: Segments 1, 2, 3
Carrier 3 moves from the middle of segment 1 through segment 2 to the middle of segment 3.
The calibration run ends at segment 3.
i_udiSegmentIndex = 2
i_etMode = MCR.ET_ModeTrackCalibration.Backward
Working direction: not inverted
Calibration area: Segments 3, 2, 1
Carrier 3 moves from the middle of segment 3 through segment 2 to the middle of segment 1.
The calibration run ends at segment 1.
i_udiSegmentIndex = 2
i_etMode = MCR.ET_ModeTrackCalibration.BothDirections
Working direction: not inverted
Calibration area: Segments 1, 2, 3
Carrier 3 moves from the middle of segment 1 through segment 2 to the middle of segment 3 and then back from the middle of segment 3 through segment 2 to the middle of segment 1.
The calibration run ends at segment 1.
i_udiSegmentIndex = 7
i_etMode = MCR.ET_ModeTrackCalibration.Forward
Working direction: not inverted
Calibration area: Segments 6, 7, 8
In the calibration area, two carriers are present.
q_xError is set to TRUE.
q_etResult: diagnostic information ET_Result.TrackCalibrationNumberOfCarriers (see ET_Result)
i_udiSegmentIndex = 4
i_etMode = MCR.ET_ModeTrackCalibration.Forward
Working direction: not inverted
Calibration area: Segments 3, 4, 5
In the calibration area, no carrier is present.
q_xError is set to TRUE.
q_etResult: diagnostic information ET_Result.TrackCalibrationNumberOfCarriers (see ET_Result)
i_udiSegmentIndex = 2
i_etMode = MCR.ET_ModeTrackCalibration.Forward
Working direction: inverted
Calibration area: Segments 3, 2, 1
Carrier 1 moves from the middle of segment 3 through segment 2 to the middle of segment 1.
The calibration run ends at segment 1.
i_udiSegmentIndex = 2
i_etMode = MCR.ET_ModeTrackCalibration.Backward
Working direction: inverted
Calibration area: Segments 1, 2, 3
Carrier 1 moves from the middle of segment 1 through segment 2 to the middle of segment 3.
The calibration run ends at segment 3.
i_udiSegmentIndex = 2
i_etMode = MCR.ET_ModeTrackCalibration.BothDirections
Working direction: inverted
Calibration area: Segments 1, 2, 3
Carrier 1 moves from the middle of segment 3 through segment 2 to the middle of segment 1 and then back from the middle of segment 1 through segment 2 to the middle of segment 3.
The calibration run ends at segment 3.
i_udiSegmentIndex = 7
i_etMode = MCR.ET_ModeTrackCalibration.Forward
Working direction: inverted
Calibration area: Segments 8, 7, 6
In the calibration area, two carriers are present.
q_xError is set to TRUE.
q_etResult: diagnostic information ET_Result.TrackCalibrationNumberOfCarriers (see ET_Result)
i_udiSegmentIndex = 4
i_etMode = MCR.ET_ModeTrackCalibration.Forward
Working direction: inverted
Calibration area: Segments 5, 4, 3
In the calibration area, no carrier is present.
q_xError is set to TRUE.
q_etResult: diagnostic information ET_Result.TrackCalibrationNumberOfCarriers (see ET_Result)
Input |
Data type |
Description |
---|---|---|
i_etMode |
ET_ModeTrackCalibration |
Access to the enumeration ET_ModeTrackCalibration for selecting the track calibration mode, depending on the working direction of the track in automatic operation mode. |
i_udiSegmentIndex |
UDINT |
Selecting the segment index number (topological address) of the segment that you want to calibrate. The order of the segment index numbers is independent from the working direction of the track (not inverted or inverted). |
Output |
Data type |
Description |
---|---|---|
q_xError |
BOOL |
Indicates TRUE if an error has been detected. For details, refer to q_etResult and q_sResultMsg. |
q_etResult |
Provides diagnostic and status information as a numeric value. |
|
q_sResultMsg |
STRING [255] |
Provides additional diagnostic and status information as a text message. |