Solution
There are two methods for calling LabVIEW code in CANape depending on how you need to package the code:
- If you are able to build your LabVIEW code into an executable, then you can call that executable in CANape using the CANape call() function. CANape's call function allows you to call a program or script with the program's path, and pass command line arguments to it. More information on the call() function can be found below.
- If you are unable to build your code into an executable, you will need to build it into a DLL. It's possible to import LabVIEW DLLs into CANape, since they're built on C++, but you will need to write a wrapper DLL to translate the LabVIEW DLL so it is understood by CANape and it's DLL structure. Generic information on calling C functions in CANape can be found here, and there are additionally two example programs that ship with CANape that describe how to create DLLs both for CASL (CANape's native language) and real-time C.