DPA RP1210 and Native Driver Sample Source Code
DPA RP1210 Sample Source CodeWe have recently developed sample source code for engineers that are new to RP1210 development. The sample source code and the compiled version of the code can be found at the link below.
This code is easy to understand and is well commented. It is in one contiguous source file, and runs under a DOS command prompt. Ensure when running the program that your DOS prompt is set to 150 characters wide.
It allows the user to connect to a DPA on either the J1708 or J1939 data bus and displays all bus traffic (both sent or received). It decodes one J1939 PGN into English text values (61444 - EEC1 - Electronic Engine Controller #1) and also decodes one J1587 PID into English text values (190 - Engine Speed). The program also sends a request for either the J1939 PGN 65260 (VIN) or J1587 PID 237 (VIN) every 15 seconds.
DPA Native Driver Sample Source Code(Note: Not applicable to the Industrial DPA)
- DPA Sample Applications (ZIP, 82K). Contains three examples, written in C++ for the DPA Native Drivers using library version 8.3. All examples are described in the code.
Note: Unzip the file so the paths are re-created.
DPA Send/Receive Example. This example is written for a DPA. You can press several keys to transmit messages on J1850, J1939, or J1708. All received messages are displayed on the screen.
DPA Periodic Transmit Example. This example is written for a DPA. It shows you how to transmit periodic messages on J1939, J1708, or J1850. A keypress lets you transmit on each protocol. Receive Messages are also displayed.
DPA Filter Example. This example is written for a DPA. It displays received messages on J1939, J1708, and J1850 that match the filter criteria in the code.
DPA J1939 (CAN) Transport Protocol Example. This example is written for a DPA. It shows you how to send and receive J1939 messages. This application enables the DPA's Transport Protocol Features for J1939. This allows the DPA to send/receive messages that are larger than 8 databytes. When this feature is enabled, all aspects of the J1939 transport protocl are handled by the DPA hardware. See the DPA manual for other transport protocol settings.
Note: This example illustrates the RTS/CTS J1939 transport protocol model.
- Initialize the CAN Datalink (PDF, 96K)
- Initialize the J1708 Datalink (PDF, 89K)
- Create a receive mailbox using a callback routine (PDF, 88K)
- Create a receive mailbox using the ReceiveMailBox function (PDF, 91K)
- Create a transmit mailbox using the TransmitMailBox function (PDF, 87K)
- Create a transmit mailbox used to transmit once when created and then on command (PDF, 88K)
- DPA Visual Basic example (ZIP, 144K)
- DPA "IntDPA CVI sample (ZIP, 78K)
- DPA 1210 VB project (ZIP, 8K)