Description

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Description

mapp Services V5.16

This function block uses the MpLink from an MpJ1939Receive configuration.

This function block can be used to receive information from a readable PGN. For additional information, see Transmitting and receiving information.

The PGN specified on input parameter "PGN" is queried by the function block. The numerical value of the PGN must be specified. The buffer for the PGN must be provided on "Data". How to create this buffer is explained in section Memory management.

The priority of the PGN must be specified on input "Priority". This can be different for each PGN. The priority of a PGN can be taken from a J1939 database. For PGN DTBI1, for example, the priority is 5.

The requested information is indicated via the positive edge input parameter "Receive" = TRUE on parameter "Data". Output "CommandDone" set to TRUE indicates that the command was successful. This means that every positive edge at "Receive" requests the information at the specified PGN.

It is important to note that PGNs must be queried within a certain cycle time. For more information, see Timing.

Input parameter "DataLength" specifies the size of data buffer "Data".

If the information of a PGN has been received and a new PGN should be requested, the function block must be disabled via "Enable" = FALSE and re-enabled via "Enable" = TRUE. After re-enabling of the function block, a new PGN can be specified.

It is important to note that a PGN can have limit values, scaling and an offset. These must be taken into account when further processing the PGN. The limit values, offset or scaling of a PGN can be taken from a J1939 database that can be downloaded here.

If command "Receive" was executed successfully, the number of bytes received can be seen on parameter "ReceivedBytes" of the info structure.