MC_InitAxisFeedback
Function A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - initializes a PLCopen A vendor -and product- independent worldwide association active in Industrial Control and aiming at standardizing PLC file formats based on XML Digitizing Axis position data.
A call to this function is automatically generated when the application is compiled, based on the data entered in the PLCopen Axis Data dialog.
Figure 7-122: MC_InitAxisFeedback
Arguments
See Function Blocks - General Rules for more information about how inputs and outputs work.
Input
En |
Description |
Request to Initialize a PLCopen Digitizing Axis. This input is only applicable to FFLD programs. |
Data type |
BOOL | |
Range |
0,1 | |
Unit |
N/A | |
Default |
- | |
AxisNumber |
Description |
Digitizing Axis Number |
Data type |
UINT | |
Range |
[1,256] | |
Unit |
none | |
Default |
- | |
FeedbackPDOIndex |
Description |
The object Index through which the feedback data is sent. |
Data type |
UINT | |
Range |
[0,65536] | |
Unit |
N/A | |
Default |
- | |
FeedbackPDOSubIndex |
Description |
The sub index of the object through which the feedback data is sent to controller. |
Data type |
UINT | |
Range |
[0,255] | |
Unit |
||
Default |
||
FeedbackDataResolution |
Description |
The resolution of the Encoder |
Data type |
UINT | |
Range |
[1,32] | |
Unit |
N/A | |
Default |
- |
Output
OK |
Description |
Indicates the initialization is complete. This output is only applicable to FFLD programs. See Function - General Rules for more information. |
Data type |
BOOL |
|
ErrorID |
Description |
Indicates if the call failed or succeeded. If the call succeeds, will be set to 0. |
Data type |
DINT |
Example
Structured Text
(* MC_InitAxisFeedback ST "Structured text" A high-level language that is block structured and syntactically resembles Pascal example *)
// Initialize the digitizing Axis (Axis #3) with the Feedback object 0x60E4 subIndex 2.
Encoder resolution is 25bits.
ErrID := MC_InitAxisFeedback(3, 16#60E4, 16#02, 25);
FBD Example