LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transfer Visual C application to labview.

Hi all

 

I have made the interface of DAQ card on Visual C++ . The application needs .Net framework to run. Can I make the interface of DAQ card on labview without doing anything on labview ? just the labview uses my code which i wrote in Visual C++ . I want to develop a HMI on labview because labview's HMI is far better than the HMI which i developed in Visual C++.

0 Kudos
Message 1 of 4
(3,603 Views)

Is this question related to this?

 

Your question is not clear. Are you asking about how to call .NET assemblies in LabVIEW, or are you asking how to control a .NET application that has already been written?

 

If you're asking about how to call .NET assemblies, then do you have a .NET control, or just a class? If you have a control, then use the .NET container to place your control on a LabVIEW front panel and then you can call its methods and properties. If you have a class then you will need to call the constructor. The .NET functions for LabVIEW are in the .NET palette. Examples ship with LabVIEW to show you how to use .NET. 

 

If you're asking about how to control a .NET application, then this depends on how the .NET application has been written. Search the forum as questions on this scenario have come up before. 

 

 

Message 2 of 4
(3,596 Views)

Hi smercurio_fc

 

 I am not familiar with .Net framework . My question is that i have made a usb daq card based on pic18f4550. The coding is in C++ language.  what i do is just go in the Release folder . It contains the executable file , i just click on that executable file and HMI appears on the screen which contains controls like sliders ,checkboxes etc to control the usb DAQ card. It is necessary to keep the MPUSBAPI.dll  file in the RELEASE folder.

 

please Just tell me the way to control this DAQ card in labview or i mean to say that the HMI which appears when i click the exe file in the release folder  , I want the same HMI in labview such that  Whatever changes i do in my VI , must be seen on DAQ card. I dont want to do much work on labview . i want to use this pre - built  application.

 

I have also viewed the previous posts regarding my topic in the forum but did not make out what the exact and user friendly should be.

 

One more thing, i want to mention that i have installed visual studio 2000 in my pc. I dont know why but it is necessary to install .NET FRAMEWORK v 3.0 or the later in order to run this application in the RELEASE FOLDER.

0 Kudos
Message 3 of 4
(3,563 Views)

You are mixing apples and oranges. The MPUSBAPI DLL is irrelevant as far as the .NET interface is concerned. If you create a .NET wrapper assembly library around the DLL then you would use the .NET functions in LabVIEW to call your .NET assembly library. If you've created a full-blown .NET application, then that's an entirely different matter.

 

If you want to write the GUI in LabVIEW, but you said:



I dont want to do much work on labview . i want to use this pre - built  application.

 

You can't control the .NET application from LabVIEW unless you've programmed the .NET application to have public method and properties to perform the same actions it would do if you manipulated the controls on the .NET application. If, instead, you create a .NET wrapper assembly library then you would be providing a more programmer-friendly way to access the functions in the DLL that you are using.

 

I don't know how you've written your .NET assembly, but if you can separate out the GUI part from the actual operation part, you can make the actual operation part its own .NET assembly so you can use it either in a .NET application, or from another environment, like LabVIEW. 

 

0 Kudos
Message 4 of 4
(3,554 Views)