FunctionMLSmpConECATPipe Network motion icon

Description

Connects a sampler block to the specified CoE object. The CoE object must be included in a PDOClosed PDO is a type of protocol frame used in some fieldbuses. A PDO contains one or more object dictionary entries, which define the application data transferred between devices. for the specified EtherCATClosed ***EtherCAT 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 device.

Using this function, you can use any EtherCAT data source as input for the specified sampler block.

Figure 7-106: MLSmpConECAT function

This function can also be programmed from within the PipeNetwork block. Simply right-click on the block and select Properties.

Related Function Blocks

MLSmpConnect, MLSmpInit

Arguments

Input

BlockID Description ID Name of the Sampler function block in the Pipe Network
  Data type DINT
  Range [-2147483648, 2147483648]
  Unit N/A
  Default
DeviceAddr Description The EtherCAT address of the slave device. The first node usually has the value '1001'. Alternately, you can use the members of the EtherCATCode structure to specify a device's address.
  Data type INT
  Range
  Unit N/A
  Default
Index Description The CoE index of the object to be connected with the Sampler block.
  Data Type UINT
  Range
  Unit N/A
  Default
SubIndex Description The CoE sub-index of the object to be connected with the Sampler block.
  Data Type UINT
  Range
  Unit N/A
  Default

Output

Default (.Q)

Description

FunctionClosed 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. block is operational

See more details here.

  Data type BOOL
  Unit N/A

Return Type

BOOL

Example

Structured Text

//Connect a Sampler pipe block named “EncoderMaster” to an ECAT Index Object defined by  variable “CoE_SubIndex” with the SubIndex defined by variable “CoE_SubIndex”, from a device with  Ethercat Address defined by “ECAT_Addr”
MLSmpConECAT(PipeNetwork.EncoderMaster, ECAT_Addr, CoE_Index, CoE_SubIndex );

Ladder Diagram

Function Block Diagram