New B&R package

    Bertus de Groot  

MotoLogix for B&R is back on track with this v2.1.0 update.

This update finally brings the latest MotoLogix features to the B&R PLC platform.

The package is created using AS 4.2 AS 4.3.

Fieldbus

In the project you now find two POWERLINK devices:

  1. Inpact - PCIe board, used in YRC1000 and YRC1000micro controllers.
  2. PL-IB300 - PCI board, used in DX200 and YRC1000 controllers.
The XDD files can be found on the download portal .

IO data conversion

For platform compatibility, the MLxCommunicationRead/Write functions now use an array of USINT for the IO. As the mapped data from/to the POWERLINK slave is an array of UDINT, this requires a conversion.

Before v2.1.0 this conversion was done inside the functions.
VAR
  MLX_0_Input : ARRAY[0..108] OF UDINT; (*data from MotoLogix Runtime*)
  MLX_0_Output : ARRAY[0..108] OF UDINT; (*data to MotoLogix Runtime*)
  MLX_0_Input_byte : ARRAY[0..435] OF USINT; (*data from MotoLogix Runtime*)
  MLX_0_Output_byte : ARRAY[0..435] OF USINT; (*data to MotoLogix Runtime*)
END_VAR
// convert data from powerlink interface
brsmemcpy(
  pDest:= ADR(MLX_0_Input_byte[0]),
  pSrc:= ADR(MLX_0_Input[0]),
  length:= SIZEOF(MLX_0_Input_byte));

FB_CommunicationRead(
  FirstScan:= FirstScan,
  MLX_Input:= MLX_0_Input_byte,
  MLX:= MLX[0]);
FB_CommunicationWrite(
  FirstScan:= FirstScan,
  MLX_Output:= MLX_0_Output_byte,
  MLX:= MLX[0]);

// convert data to powerlink interface
brsmemcpy(
  pDest:= ADR(MLX_0_Output[0]),
  pSrc:= ADR(MLX_0_Output_byte[0]),
  length:= SIZEOF(MLX_0_Output_byte));

Pages built with Hugo - 23 Apr 2024 11:54 CEST