FunctionMLMotionStartPLCopen motion iconPipe Network motion icon

Description

Starts the motion engine, motion bus driver, clears the EtherCATClosedEtherCAT is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT was 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. Applicable to PLCopenClosedA vendor -and product- independent worldwide association active in Industrial Control and aiming at standardizing PLC file formats based on XML and PipeNetwork motion engines. MLMotionStart does not clear any pre-existing error conditions. Returns TRUE if the function succeeded. If motion engine is in the Error state, MLMotionStart will return FALSE.

See also: MLMotionStop, MLMotionRstErr, MLMotionStatus

Return Type

BOOL

Example

ST

//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 and PLCopen or Pipenetwork devices
//Then call MLMotionStart and monitor MLMotionStatus again before beginning rest of program

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;

FBD

FFLD

Go back to the top of the page [Top]