LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to call and edit the source code of a dll from a VI front panel?

Hi, I'm building a user interface for a certain controller in LabVIEW and I want to make it possible so that the user can reach the source code of the dll and edit it accordingly. Is there any way to call the c-code in CVI from the front panel, so that you can edit the code and recompile the dll while the VI is running? (obviously, the VI that contains the DLL node must be restarted once the DLL is updated, so I am planning to do the task in a separate VI)
0 Kudos
Message 1 of 3
(3,229 Views)
Muhibbi,

The way you would do this is through ActiveX and regular text editing. You would first need to edit the .c file by having LabVIEW open up Notepad or some other text editting program and pass it command line functions to open the file you want to edit. Then the user can edit the source code and save it. At this time you would then either have some sort of button to recompile the code or some other way of the user letting you know they are done editing and then, through ActiveX, you can Open CVI, Open the Project, send command line functions to rebuild (refer to CVI Help file for list of command line functions) and the DLL would be rebuilt. With this, CVI will still need to be installed on the machine that runs this LabVIEW VI. The only thing it really streamlines is having to open the CVI project and build, everything else is almost the same as just openning and editting in CVI.

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 2 of 3
(3,213 Views)


@Muhibbi wrote:
Hi, I'm building a user interface for a certain controller in LabVIEW and I want to make it possible so that the user can reach the source code of the dll and edit it accordingly. Is there any way to call the c-code in CVI from the front panel, so that you can edit the code and recompile the dll while the VI is running? (obviously, the VI that contains the DLL node must be restarted once the DLL is updated, so I am planning to do the task in a separate VI)


Also make sure to load the VI that accesses the DLL functions dynamically. LabVIEW locks any DLL that is loaded into memory and you won't be able to replace the old DLL with a new one as long as any VI accessing one of the DLL functions is in memory.

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(3,182 Views)