MLMotionStart
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. - Starts the motion engine, motion bus driver In computing and electronics, a driver is a software component allowing higher-level computer programs to interact with a computer hardware device. A driver typically communicates with the device through the computer bus or communications subsystem to which the hardware is connected., clears the EtherCAT Ethernet ofr Control Automation Technology. EtherCAT® is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT is to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs. diagnostic registers of all nodes, and initializes EtherCAT network to operational mode.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
|
BOOL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remarks
- Applicable to PLCopen A vendor -and product- independent worldwide association active in Industrial Control and aiming at standardizing PLC file formats based on XML. and Pipe Network motion engines.
- MLMotionStart does not clear any pre-existing error conditions.
- Returns TRUE if the function succeeded.
- Returns FALSE if the motion engine is in the Error state.
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
//Initialization code to start EtherCAT network.
//First initialize network with MLMotionInit command
//Then wait for command to finish by monitoring MLMotionStatus output
//Once initialized, create any cam profiles The position of a slave axis is mathematically linked to the position of a master axis. Example: A system where two rotating drums turn at a given ratio to each other. A more advanced case of electronic gearing is electronic camming. With electronic camming, a slave axis follows a profile that is a function of the master position. This profile need not be linear but it must be a mathematical function. and PLCopen or Pipenetwork devices
//Then call MLMotionStart and monitor MLMotionStatus again before beginning rest of program The act of performing a sequence of instructions or commands.
FirstCycle := TRUE;
On FirstCycle DO //Initialize the motion engine
MLMotionInit( 1000);
END_DO;
MotionEngineStatus := MLMotionStatus();//Check the current status of the motion engine
//Once motion engine is initialized, create CAM profiles and defined Axis, then start the motion engine
ON MotionEngineStatus = MLSTATUS_INITIALISED DO
Profiles( MLPR_CREATE_PROFILES );
PLCopen( 0 );
MLMotionStart();
END_DO;
IF MotionEngineStatus = MLSTATUS_RUNNING THEN
bMotionEngineStarted := TRUE;
ELSE
bMotionEngineStarted := FALSE;
END_IF;
See Also