12-28-2012 06:21 PM - edited 12-28-2012 06:23 PM
@john83793 wrote:
LabView can be compiled, I am not aware that it is compiled if you run it on windows. Robot Raconteur is somewhat like ActiveX but far more powerful. I am looking to develop something similar to the class interface that LabView provides for C#.
It is being recompiled every time you change something in the VI that is other than cosmetic. That's why you get the broken arrow right away, instead of having to click the "compile" button to see if everything is okay in other languages.
12-28-2012 08:56 PM
@john83793 wrote:
LabView can be compiled, I am not aware that it is compiled if you run it on windows. Robot Raconteur is somewhat like ActiveX but far more powerful. I am looking to develop something similar to the class interface that LabView provides for C#.
As previously mentioned, LabVIEW is always compiled.
I'm not usually a Microsoft fan, but it is unlikely that an incomplete product from a small research team is "far more powerful" than a mature technology developed and supported by Microsoft for years. It might be accurate to say they have different strengths.
Are you asking if there's a way to provide access to a DLL through an interface that resembles the one used for ActiveX, .NET, and VI server? There is no way to do this. The only way to call functions in a DLL is through Call Library Function Node.
12-28-2012 09:05 PM
12-28-2012 10:10 PM
ActiveX is quite clumsy and limited in its capalibities. Writing an ActiveX server is very complicated and not portable to different operating systems and devices. Robot Raconteur is targeted specifically for automation systems and can run a server on very limited embedded devices that do not run an OS or on a full computer. My question on this forum is specifically about using LabView. It has been fairly easy to integrate with MATLAB and I'd like to do something similar with LabView.
12-28-2012 10:53 PM
I'm still a bit confused as to what you're trying to do. When you write, "It has been fairly easy to integrate with MATLAB" - what is "it"? Are you trying to integrate RobotRaconteur with LabVIEW? The website makes it appear that LabVIEW is already supported, through .NET. Or, are you citing RobotRaconteur as being similar to your library?
Can you share any actual code, perhaps in MATLAB if not in LabVIEW, or a diagram of what you're hoping to have appear in LabVIEW?
It sounds like what you want to do is write a .NET class instead of a C++ library, so that you can access it in LabVIEW through the .NET interface.
The only way in LabVIEW to have a VI adapt to its inputs is to use a polymorphic VI, and even then the ability is limited to the specific instances of the VI that have been defined. An example is the config file VIs - the Config File Read will adapt to the datatype that is wired to it, so long as its one of the supported datatypes.
12-28-2012 11:12 PM
When you write a Simulink S-function, you define a function mdlInitializeSizes in C that allows you to arbitrarily change the number and types of input and output ports using C. In the rest of the functions you get raw pointers to the input and output data. This allows the blocks to be customized at runtime based on the parameters and connections of the blocks. I'd like to do something similar with LabView however I am not sure how this can be done. There is the raw DLL interface and CIN, but I don't know if they can provide the same capability. The VI scripting would be useful but I don't expect most users to have that available because it is part of the very expensive package.
12-29-2012 11:15 AM
I need a much more specific description of what you're trying to do in order to provide any more help. That means function prototypes for the DLL functions you're trying to call, an example series of calls to those functions, code from another language in which it's already working.
Your first post started by asking about a way to change the number of inputs and outputs at edit-time, similar to the .NET interface. Your last post mentions changing the number of inputs and outputs at runtime. Which is it?
Any function in a DLL that you can call from MATLAB, you can probably also call from LabVIEW, so long as that function does not in turn call functions that are specific to the MATLAB environment.
You can work with raw pointers in LabVIEW. You would probably not want to expose them to your users, but you might work with them within the VIs that you supply. If you have not already seen it, you may want to start with Calling C/C++ DLLs from LabVIEW.
12-30-2012 04:09 AM
Perhaps describing why you want this will make it clearer.
There are two elements to the .net jnterface.
Property Nodes: These are expandable nodes to set different properties, you can make your own if you package your code into a LV Class.
Invke Nodes where you select a function to run and see the inputs and outputs. It depends what you want from this, in terms of selecting methods polymorphic VIs kind of do this, but it is more normal in LabVIEW just to have the functions on the palette. If it is the terminal names you can right click on a subVI and press view as icon. This gives a view similar to express VIs but this means it takes a lot of space.