<< Click to Display Table of Contents >> Navigation: »No topics above this level« Communication with motor control device |
mapp Services V5.16
An X90 controller is installed in an excavator, which functions as a control device for the entire excavator.
This communicates with the motor control device via the CAN interface and the J1939 protocol. Since the X90 controller is the central logic of the excavator, it must be able to transmit setpoints such as the speed setpoint and maximum torque to the motor control device as well as read back actual values such as the current speed or oil temperature.
•Function block list
•MpJ1939Generic (own MpLink): With this function block, PGNs can be received and sent via the J1939 protocol.
In order to communicate with the motor control device via the CAN interface and the J1939 protocol, the MpJ1939Generic configuration is added.
The address used for unique identification in the CAN network must be specified under "Own device address". 1 has been defined. The CAN interface is specified under "CAN interface". In this case, IF7 is defined.
The address of the motor control device in the CAN network must be specified under "Device address". 0 has been defined.
Information can be sent and received via PGNs. The setpoints of the motor control device, such as speed setpoint and maximum torque, should be determined. This can be defined via the PGN TSC1. The PGN EEC1 is used to receive the actual values of the motor control device. "Receive" and "Transmit" are set accordingly. PVs must then be specified for receiving or transmitting the information. The PVs must therefore have the correct data types. For more information, see here.
Function block MpJ1939Generic is added and configured. The PGNs defined in the configuration are transmitted or received automatically.
In order to transmit or receive a PGN correctly, Timing must be observed. If different PGNs should be received/transmitted, they can be called in a task class that contains the fastest cycle time for a PGN.
TSC1 is queried in a cycle time of 10 ms and EEC1 in 20 ms. For this reason, function block MpJ1939Generic is called in a task located in a 10-ms task class.
The values defined on variable "Send_TSC1" are automatically sent to the connected motor control device. The actual values of the device are displayed on variable "Receive_EEC1". Function block MpJ1939Generic automatically controls the transmission and reception of PGNs without starting an additional command.
If signals in PGNs have scaling or an offset, they are automatically adjusted when transmitting and receiving the PGN. For example, signal EngRequestedSpeed_SpeedLimit in PGN TSC1 has a factor of 0.125. This factor is automatically taken into account when transmitting and receiving the PGN!