I am new to CAN Bus communication and need help with a basic example to read few parameters from a simulator. I have purchased the ECUSim 2000, device that has basic and advanced information. ( https://www.scantool.net/dev-tools/ecusim-family/ecusim-2000.html ), image attached.
The protocol on the device is setup as follows:
OBD Protocol ISO 15765-4
CAN ID Type 11 bit
CAN Baud Rate 250.0 kbps
(it also supports 29bit type and 500Kbps)
It has the following ECUs:
0 ECU1-EngineControl 7E0,7DF
1 ECU2-Transmission 7E1,7DF
2 ECU3-AbsControl 7E2,7DF
How do a write a simple CAN Message to read the engine RPM, or speed, or anyting. I am using the G120 on a custom board with the SN65HVD230QD CAN transceiver IC, and have option for the 120Ohm resistor if needed in the circuit to be used or not.
When I try to run the simple example CAN code from the support section, I get nothing. If I turn on/off the simulator while connected to the CAN on the board, I get the Error message fired and that is all I get.
var can = new ControllerAreaNetwork(ControllerAreaNetwork.Channel.Two, ControllerAreaNetwork.Speed.Kbps250);
can.ErrorReceived += can_ErrorReceived;
can.MessageAvailable += can_MessageAvailable;
can.Enabled = true;
can.SendMessage(new ControllerAreaNetwork.Message() {
Data = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }, ArbitrationId = 0x12345678,
Length = 8, IsRemoteTransmissionRequest = false, IsExtendedId = true });
How do I go about sending a simple message to get the engine RPM, or speed etc.