Properties and methods
Some of the properties of the axes are standard variables (e.g. iNcSampleAxis.Name
of type STRING
) and the required information can be processed directly. Other properties are so-called CoreFunctions and return a type INTERFACE
to the CoreFunction itself.
For example, the axis has a property of type I_Power
with the name Power, which is the INTERFACE
of FB_Power
. This interface can be used to access properties and methods provided there.
The constantly active algorithms for cyclic calls are not executed in the main part (body) of the FBs, but in its cycle method. An axis is therefore only executed if its Cyclic()
methods are called. In addition, the cycle method of an axis should be called exactly once for each PLC cycle, as these can also execute setpoint generation and control algorithms.
// CoreFunction method calls
iNcSampleAxis.Power.DoPower(TRUE)
iNcSampleAxis.Power.FeedEnable(TRUE, TRUE);
// CoreFunction property access
bEnabled := iNcSampleAxis.Power.Status;
// Cyclic call of the axis
iNcSampleAxis.Cyclic();