Using LabView via the CANape COM Interface Version 1.0 2017-12-05 Application Note AN-IMC-1-036 Author Knoll, Steffen Restrictions Public Document Abstract The Application Note shows how to create a client application in LabView using the CANape COM interface to access the ECU. Table of Contents 1 Overview ........................................................................................................................................2 1.1 Requirements .......................................................................................................................2 2 Include the CANape COM Interface into the LabView environment ........................................3 3 Set up the communication between CANape and LabView......................................................7 3.1 Instantiation ..........................................................................................................................7 3.2 Initialization ..........................................................................................................................8 3.3 Attach an ECU device ........................................................................................................10 4 Set up a measurement in LabView ............................................................................................11 4.1 Select an ECU measurement mode ..................................................................................11 4.2 Selection of the ECU measurement signals ......................................................................11 4.3 Measurement start in LabView ..........................................................................................13 4.4 Receiving the measurement data ......................................................................................13 4.5 Stopping the measurement ................................................................................................14 4.6 Closing the measurement session .....................................................................................15 5 Contacts .......................................................................................................................................15
15
Embed
Using LabView via the CANape COM Interface · Using LabView via the CANape COM Interface Version 1.0 2017-12-05 Application Note AN-IMC-1-036 Author Knoll, Steffen Restrictions Public
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Using LabView via the CANape COM Interface Version 1.0
2017-12-05
Application Note AN-IMC-1-036
Author Knoll, Steffen
Restrictions Public Document
Abstract The Application Note shows how to create a client application in LabView using the CANape COM interface to access the ECU.
2 Include the CANape COM Interface into the LabView environment ........................................ 3 3 Set up the communication between CANape and LabView...................................................... 7
4 Set up a measurement in LabView ............................................................................................11 4.1 Select an ECU measurement mode ..................................................................................11 4.2 Selection of the ECU measurement signals ......................................................................11 4.3 Measurement start in LabView ..........................................................................................13 4.4 Receiving the measurement data ......................................................................................13 4.5 Stopping the measurement ................................................................................................14 4.6 Closing the measurement session .....................................................................................15
To attach the ECU to CANape additional information is needed from LabView. The used driver type e.g. CCP or XCP and the ECU description file (*.a2l) must be defined.
Add a stacked sequence element and redo the same steps as previously described to add a
“CANAPELib.Devices” instance. Add then the different elements as shown in Figure 11 and connect
the previously defined String Input Elements to the interface connectors.
Figure 16
The wire of “IApplication” is delivered by the previous frame (Figure 16). The first step is to read out
the “IDevices” interface using the property IApplication.Devices”.
To attach a new device the method “IDevices.Add” has to be used. This method has four
parameters. The first parameter describes the information about the device name. The second
parameter describes the name and location of the *.a2l file. The third parameter defines the used
protocol, e.g. CCP or XCP and the last parameter defines the CAN channel which is used to connect
the ECU to CAN hardware.
In this example, the Vector CCPsim ECU Simulator is used. Therefore, the driver “CCP” is used as
“DriverType” and CAN channel 1 is defined as communication interface between CANape and the
ECU.
With these settings in LabView the CCPSim ECU simulator can be accessed by CANape.