Each has its strengths, knowing how to assign roles, dedicated to the application and promotion of LabVIEW in the automotive industry. |


Disadvantages

CANoe is indeed useful, but relying entirely on CANoe, equipped with Vector all over, seems to expose our inertia of complacency, ignorance, and arrogance, sometimes even leading to unnecessary expenses and delays.
Fully leveraging the value of engineers, designing appropriate, low-cost, high-value testing solutions based on actual applications is the mission of R&D personnel, and it is imperative!
Purpose of This Article
-
1. For some functional testing, Vector tools are a must, and there are no alternatives, such as CANstress interference.
-
2. Integrators from the Vector faction will almost inevitably provide users with CAPL programming solutions, delivering CAPL programming functions and scripts.
When I deliver, it runs; whether you subsequently upgrade and maintain the CAPL is your business.
The CAPL functions or scripts delivered by the supplier are part of the existing resources and industry knowledge assets, and we need to find ways to utilize them.
-
3. For some functions, you may have previously implemented them, but not using CAPL programming, but LabVIEW. Now that you need to integrate Vector devices, it is necessary to apply LabVIEW to call CAPL technology.
-
4. For some functions, using CAPL is very inconvenient, such as reading and writing Excel, project management, web interface calls, etc.
-
5. Thanks to V Emperor, the most important thing is Vector’s open spirit, which is the premise of everything; its CAPL functions can be called externally, and the APIs are quite standardized.
Method Overview
int test_jia(int para1,int para2) { return para1+para2; }
Significance
If you casually open a CAPL file, you will find that all actions in CAPL can be encapsulated into CAPL functions; CAPL script actions are essentially CAPL functions.
In principle, CAPL functions can achieve almost all the functionalities of CANoe.
By encapsulating some standard actions into CAPL functions, you effectively create a series of CAPL drivers, and then use LabVIEW to build complex logic, achieving impressive and powerful functionalities.
Complex and professional tasks should be handled by CANoe, while tedious, frequently changing, and low-cost tasks can be handled by LabVIEW.
This gives us a broad space for development, expanding almost limitless possibilities.
The maintest() function can be deleted from now on because we choose to call from the outside.
Precautions
These insights were discovered after spending nearly a hundred months and encountering many pitfalls; they are key points. If you can’t figure this out, it is almost impossible to succeed.
1. OnInit
You must assign values to CAPL functions during the OnInit process.
2. Synchronizing initialization of multiple CAPL functions
Don’t worry about the OnInit phase not having enough time; in fact, it can initialize countless CAPL functions, and time will not run out.
We need to create a structure array, each structure containing at least a function name and a function reference, so that later when calling a function name, we can look up the reference by “name”.
Prerequisites
Of course, it is important to note that this requires the CAPL functions delivered by the supplier to be standardized, and it is better if there are no global variables inside the functions; otherwise, who knows what backdoors might exist…
Function black-box encapsulation is irrelevant; this is the supplier’s intellectual property, and it is understandable that they do not provide the source code. As users, our focus is not on the CAPL source code. Whether it is the functions provided by Vector or those developed by suppliers, as long as they can be called, it is fine.
If suppliers want to bind CAPL functions to Vector devices, it is also acceptable; just clarify it, as everyone needs to make money, and profit drives industry progress.
However, using global variables as backdoors in functions is the most detestable! Especially when the controlling party is also a non-standard, opaque, and wild software.
Countermeasures
Regarding this, everyone can create a CAPL TEST node during acceptance, using maintest() to individually test and combine test these functions to identify their authenticity.
If conditions permit, change to a new computer and start from the installation software to see which hardware and files are bound, so you can clarify.
For more knowledge on LabVIEW development and applications, feel free to contact us.
If you have previously struggled with this solution but have not succeeded, then after reading this article’s explanation of several difficulties, you should be able to handle it.
If after reading this article, you still cannot figure it out, it means you haven’t tried before. Even the best teachers can’t explain this matter more simply; you can purchase a video and follow the tutorial step by step, which will definitely work.
The detailed explanation of this tutorial is included in the “Vehicle Technology LabVIEW” course, and you are welcome to inquire.
Lecture 10 on Buses: The Best Excel2DBC Tool in the Eastern Hemisphere, Always Free to Offer