101
ifm
Programming Manual
ecomatmobile
CabinetController (CR0301) Runtime System V05
2016-04-21
ifm function elements
ifm function elements for the device CR0301
>
J1939_x_GLOBAL_REQUEST
4315
x = 1...n = number of the CAN interface (depending on the device,
→ Data sheet)
Unit type = function block (FB)
Unit is contained in the library
ifm_J1939_
x
_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
2301
J1939_x_GLOBAL_REQUEST is responsible for the automatic requesting of individual messages
from all (global) active J1939 network participants. To do so, the parameters PG, PF, PS and the
address of the array DST in which the received data is stored are assigned to the FB.
Info
PGN = [Page] + [PF] + [PS]
PDU = [PRIO] + [PGN] + [J1939 address] + [data]
13790
NOTICE
Risk of inadmissible overwriting of data!
► Create a receiver array with a size of 1 785 bytes.
This is the maximum size of a J1939 message.
► Check the amount of received data:
the value must not exceed the size of the array created to receive data!
► For every requested message use an own instance of the FB!
► To the destination address DST applies:
Determine the address by means of the operator ADR and assigne it to the FB!
► In addition, the priority (typically 3, 6 or 7) must be assigned.
► Given that the request of data can be handled via several control cycles, this process must be
evaluated via the RESULT byte.
•
RESULT = 2: the POU is waiting for data of the participants.
•
RESULT = 1: data was received by a participant.
The output LEN indicates how many data bytes have been received.
Store / evaluate this new data immediately!
When a new message is received, the data in the memory address DST is overwritten.
•
RESULT = 0: no participant on the bus sends a reply within 1.25 seconds.
The FB returns to the non-active state.
Only now may ENABLE be set again to FALSE!
► For the reception of data from several participants at short intervals:
call the POU several times in the same PLC cycle and evaluate it at once!
Summary of Contents for Ecomat 100 Mobile CR0301
Page 212: ......