Extending/compressing a curve description
At runtime, a read-in or designed curve description can be extended or compressed to fit the application.
The object of the type "CamDescription" provides the following methods for this purpose:
ScaleX
Scaling of the cam description in X-direction. The curve is scaled with the transferred value in X-direction. In the following example, the curve is extended by scaling in the X-direction with a factor of 2.0:
|
The "ScaleX" method is called at the "CamDescription" object:
ScaleY
Scaling of the cam description in Y-direction. The curve is scaled in Y-direction with the transferred value. In the following example, the curve is extended in Y-direction with a factor of 2.0:
|
The "ScaleY" method is called at the "CamDescription" object:
The methods perform scaling with each successful call. A successful call is processed within one PLC cycle. This is why it is important that the method is not called in several subsequent cycles.
The following sample code shows the scaling of a curve description in X-direction. The prerequisite is a curve description created via the Cam Editor that has been loaded onto the MOVI-C® CONTROLLER.
Changing on the fly
Changing the original curve to the scaled curve on the fly may involve a jump in position because the boundary points of the curve may have changed.
|