Build ActiveX servers in LabVIEW

Hello

I'm trying to implement an ActiveX Server is the "out-of-process Server" type (which means that it is a program (.exe file) windows executable) in LabVIEW.  I have seen tons information that the way which use LabVIEW as a client ActiveX and even several examples of creating a shared library (dll) with LabVIEW that other applications can access (but are in-process servers) and some examples of LabVIEW as an activeX server, but nothing on how to create ActiveX with LabVIEW objects.  I need information on how to specify the CLSID of the COM object so that the user of the object can create an instance of it.  I also need to implement the methods that can be called using IDispatch.

I searched all LabView day and same ordinate: Advanced Programming Techniques, second edition from Amazon.com to try to find examples.  The best information I've found is how exactly to what I'm trying to do with LabWindows.  The link to this article is here-->http://www.ni.com/white-paper/2714/en.  Is there something similar for LabVIEW?

Everything else, I read, simply go to tools--> VI server and check the Active X.  I also found this link, but I'm looking for information much more than what is expected

http://zone.NI.com/reference/en-XX/help/371361H-01/lvhowto/activating_lv_activex_srv/  (I couldn't find examples that this link refers to "Consult the files VBToLV.frm, VBToLV.vbp and VBToLV.vbw in labview\examples\comm for an example of calling LabVIEW as a Server ActiveX in Microsoft Visual Basic.")

I was really hoping to find information on how to build ActiveX objects in LabVIEW and to implement a COM object as an executable file.  Is this possible in LabVIEW?

glstill wrote:

I was really hoping to find information on how to build ActiveX objects in LabVIEW and to implement a COM object as an executable file.  Is this possible in LabVIEW?

I'm 99% positive, the answer is no. Historically, the level of interaction LV has had with the operating system has never been so high that he was seen with other languages, probably due to a combination of being supported on multiple platforms, a quite different programming paradigm and a relatively low interest rate charged.

The ActiveX Server LV has, as explained in the link you gave, is a way to connect to some of the hierarchy of classes from LV itself, not to the user creates the classes.

You have other alternatives are the construction of standard in DLLs LV functions or in .NET interop assemblies (which I suppose is better for you, if you want that managed code). I have no practical experience with either.

Tags: NI Software

Similar Questions

  • Build the program in LabVIEW 8.6

    Hello

    How can I build a program in LabVIEW 8.6?

    Then, you use the application builder.  It comes with the edition of professional development of LabVIEW, or an add-on to the Full Development Edition or the basic edition.

    You must create a project file with your VI.  Search the help of LabVIEW for 'building a stand-alone Application '.  Also search the forums on the subject.  It is repeated several times before.

  • Programmatically insert step of ActiveX/COM using LabVIEW

    Hello

    I would like to be able to create sequences like the one set using LabVIEW.

    This sequence has only 2 steps, a LabVIEW VI call and an adapter of ActiveX/COM call.

    I was able to do using an adaptation of the code here: https://decibel.ni.com/content/docs/DOC-36337

    However, I am struggling to add the step of the ActiveX/COM.

    Any help would be welcome.

    Thank you

    Of course, there is a way, if you look for it

    Since you have an existing 'Step' class object, you can also get a 'Module' object for her. Subsequently, you will need to specify that it is an ActiveX module. If you do not know which - probably you need to get the object 'map' somehow... Our case is simpler, so just cast to the ActiveX module and... to set certain properties like ServerId, ActiveXReferenceExpr and so on.

    I've attached an example for you. Interesting thing is the ServerId - I just read this chain of the TS for similar action and reused it here so do not ask me how to get automatically

    You will need to complete your 'properties' as 'file' - but I'll gracefully leave this work for you =.

    Best regards

  • Is it possible to build a project with Labview 2010 on a Windows XP system, which is useful for a system with windows 7 on it?

    Hello

    I intend to use Labview 2010 in no time.

    But before I go to use it I have a few questions.

    1. I know that it is possible to run Labview 2010 in an XP environment. But is it also possible, when running Labview 2010 on an XP system, to build a project for a version that is useful in a Windows 7 environment?
    2. Or should I run Labview 2010, when I want to build a project that is useful on a Windows 7 system, on a system with Windows 7?

    Please give me some information.

    I hope to hear from you soon.

    Kind regards

    Kenny

    the file (.exe) is also compatible with xp and seven, no need to change anything...

    Concerning

  • Can I build an application with Labview 2009 for Windows 7?

    Hello

    I use Labview 2009 SP1 and the application builder 2009 SP1. If I install the app on win7 this message:

    Engine run LabVIEW depends on failure to upgrade (...) version 9.0.301, language {} code that is not in the distribution.

    Is it a problem with Windows 7, having two records of installation of 32 bit (C:\Program Files (x 86)) and 64 bit (C:\Program Files)?

    I had an application built on a XP machine and installed on a Windows 7 computer that was looking for the files in C:\Program Files when they were actually installed in C:\Program Files (x 86) - because it was 32-bit application.  After the installation I had to move the files to 1 place to another to make it work.

  • Error 5008 opening with ActiveX Automation in LabVIEW

    I use a VI Open Automation to communicate with a Server ActiveX in LabVIEW.  I chose the ActiveX class that I created in my Refnum Automation. When I run my code, I get the following error:

    What can I do to fix this?

    What ActiveX Server?

    Mike...

  • Display ActiveX Image on LabVIEW front [method returns 'handler' (stdole - IPictureDisp. (Photo)]



  • LabVIEW oop build warining!

    Hello!

    I write a labview program with the method of OOP (object oriented programming), and the program is very well. But when I build to exe, the manufacturer of labview display warning message: "LabVIEW has prevented a file name collision during the build. Names of duplicate files can be copied to the same destination. You can rename the files as part of the build process to avoid name conflicts. »

    I know it's certant this file duplicate name when to use 'Class', and how I can display the warning message when build.

    Pre-LabVIEW 2009 EXE has a flat directory.  All controls in the screw and outbuildings were in an EXE file and there is no record in this EXE.  For this reason, you cannot have 2 files in your project with the same name (because they can't go in the same directory without overwriting a).  From 2009 to fix it NOR allowed EXEs have directories so screws can have the same name on disk, but in memory, they can have a different name, by adding the class, or the name of the library itself.  So you can have PowerSupply.lvclass:Init.vi and CAN.lvclass:Init.vi both disk just as Init.vi

    In the new versions of LabVIEW, you can use the old file structure by defining the Layout 8.x to true in the specification to build the EXE file (under Advanced), but you really want to do because of the collision problem you see.

    EDIT: and it seems that your code has been registered in 8.6 before the existence of this feature.

  • ActiveX - LabView from c#

    Hello

    I create a program in LabView in a program already developed in c# that uses ActiveX to control a laser machine.

    The first thing I see in the program is the initialization of the ActiveX Server and equipment system:

    Laser = new LaserAxApp();

    LaserSystem = Laser.System;

    I found a refNum in labview with LaserAxApp, but in their properties, I found systems within the ILaserAxApp property. But also, I found a different refNum called laserengineLib.ISystem which is another reference to class as AxApp.

    which choose to continue implementing my program of c#?

    Thanks in advance,

    Stavrosyt wrote:

    Hello

    I create a program in LabView in a program already developed in c# that uses ActiveX to control a laser machine.

    The first thing I see in the program is the initialization of the ActiveX Server and equipment system:

    Laser = new LaserAxApp();

    LaserSystem = Laser.System;

    I found a refNum in labview with LaserAxApp, but in their properties, I found systems within the ILaserAxApp property. But also, I found a different refNum called laserengineLib.ISystem which is another reference to class as AxApp.

    which choose to continue implementing my program of c#?

    Thanks in advance,

    Thanks anyway... I managed to find the answer.

    It works with the properties and methods in the ActiveX menu in Labview. To answer my own question, the result is to use iLaseraxapp and ilasersystem refnums.

    Here is better explained:

    (1) start the laser with refnum laserengineLib.ILaserAxApp

    (2) use the open automation to open and

    (3) bind it with a node of the system IlaserAxApp (true visible) property.

    And that's all. Then you can use lib system even for event reminder reg and ilaserdoc for loading a file of xlp laser.

  • Vision Builder - error creating LabVIEW Code

    Hello!

    I use Vision Builder 3.5 and LabVIEW 8.5.1. Vision Development module is also installed.

    I've built several routines inspection with the Vision Builder. Then I tried to create .vi-files. Then I hit tools-> Inspection migrating to LabVIEW...

    In the next box I select:

    1-version of LabVIEW: LabVIEW 8.5 - NEITHER Vision 8.5.0

    2 - the directory I want vi-files to be.

    The migration begins, but it is never finished. There is always the following error message:

    Error during creation of LabVIEW Code #3

    I have not found additional information about this error code. So maybe someone is able to help.

    Thanks in advance.

    It seems that the error occurs when you try to play a file which contains the parameters of control of that Vision Builder AI generates. This file may have been corrupted and Vision Builder AI fails to write correctly. I have attached a simple VI to determine where this file lives. Make sure that the file is not present before generating the code and that you have write access to this directory.

    Hope this helps,

    Brad

  • Call dll ActiveX in Labview

    Hello

    I'm a new starter in c# .net.  I have a control dll ActiveX (control of vision of NOR -> CWIMAQ). I need to call dll functions in Labview. I searched for articles on this subject. Everyone talks about single thread and register the dll.  I have no idea about these things. Can any body give me a helping hand. How does it work?

    Thanks for any info

    Best regards.

    To use an ActiveX control in LabVIEW, you place an ActiveX container on the front panel and locate the control to put it in. Then use the nodes property and/or call nodes of the ActiveX palette to set properties and call methods.

    To register a DLL open a command prompt, navigate to the folder where your ActiveX control is normally the Windows system32 folder and type

    regsvr32 .

    In LabVIEW use help > type in the search and find examples... tab ActiveX.

  • Different methods of ActiveX appear when you reference an inside or outside of Labview VI

    My question is about the methods that are available for a VI referenced via ActiveX.

    I am particularly interested in the method "Run a VI", which appears in Labview using reference open Vi, then call node.

    In particular, this method of 'Run a VI' has a parameter "Wait until the fact" that I need to.

    In Labview, I managed to adjust this setting and run the VI in the background (see first photo).

    Now, I get confused when you reference this VI through Labview /outside/ ActiveX (Matlab in my case).

    Function Matlab (see second photo), the VI referenced has a method called 'Run', but not 'run VI '.

    This command runs the VI, but I do not see any parameter 'wait until what". In fact, there is only one listed setting (it appears as Run (handle, Variant (Optional)), which means that outside of the object itself, there is only an Optional Variant type value).

    (I've highlighted the method in green on the second photo).

    In fact, when looking at the methods that appear in the image of Matlab, it seems many are different from those which are accessible in Labview through the node invoke.

    Is this normal? If so, how can I set the value of the parameter 'Wait until done' for the 'Run' / method of "Run a VI" via ActiveX on outside Labview?

    Is this normal? Yes. Why? Because the first method is not ActiveX. It uses the VI server. Totally different beast. Therefore, the interface will be different.

    LabVIEW documentation indicates the real signature must be:

    Syntax

    object. Run ([Async])

    Parameters

    Name Type Description
    Async Boolean If it is TRUE, there is no need to wait for the VI finish the race. The default value is FALSE.

    I don't know why you see the signature as "Run (handle, Variant (Optional))"from Matlab. "

  • How to create own IDE for LABVIEW (such as vision builder)

    Hi all

    My pretty funny question, I know that.

    I like to create Labview Application IDE like Vision Builder.

    How to do this?

    As far as I know that Vision Builder is developed with LabVIEW, the source code of course is not public... But why do you want to create a new IDE for LabVIEW? LabVIEW is an IDE, no?

    I think also Vision Builder uses a lot of scripts and sub-panels, I can't help you much more than that.

    For us - outside NI - script cannot be used in an EXE file, they reserve that for their applications not it will be a difficult task.

  • The appeal of LabVIEW VI of Python

    Hi Ppl,

    I'm calling python LabVIEW VI using LabVIEW ActiveX or the LabVIEW run engine of ActiveX that can be enabled in the advanced options of the application builder.

    The problem that I am facing is: I use the VirtualInstrument.Call () method to run VI and pass parameters to and from the VI's. When you use this method, I am able to pass arguments to simple controls easily tables e.g., Boolean numerics

    However when I tried to transfer data to a cluster as in the attachment data 1. jpg in this form I get errors:

    Python code:

    ...

    ...

    #Parameters

    Channel_1 = [1,2,3]

    Channel_2 = [1,2,3]

    Data = [Channel_1, Channel_2]

    Read = 'TRUE '.

    ParameterNames = ("Data", "Read")

    Parameters = [data, read]

    VIPath = "Screw LabVIEW C:\Users\Sathish\Desktop\Calling of Python using LVRTE\Complex Data.vi"

    Reference #Get VI

    Application._FlagAsMethod ("GetVIReference")

    VirtualInstrument = Application.GetVIReference (VIPath)

    Front #Open VI in hidden mode

    VirtualInstrument._FlagAsMethod ("OpenFrontPanel")

    VirtualInstrument.OpenFrontPanel(True,3)

    #Call VI

    Print ("VI\n LabVIEW call")

    VirtualInstrument._FlagAsMethod ("Call")

    VirtualInstrument.Call (ParameterNames, Parameters)

    ...

    ...

    ...

    Error Msg:

    VirtualInstrument.Call (ParameterNames, Parameters)

    File ""> ", line 2, the call"

    com_error: (-2147352567, "Exception occurred.", (0, zero, zero, zero, 0,-2147352571), 2)

    However, the same code works for the second data attachment 2.jpg

    What I gather is that Python is not able to distinguish a data type of table 2D in a cluster having subclusters with the same number of elements, as in our example, a high-level group with two subclusters with 3 numeric characters. Is there a way to solve this problem. How explicitly I tell python that's a cluster and not a table?

    Thank you

    Sirot

    Data 1

    Data 2

    I modified your original Python script to work with comtypes. Here it is:

    #######

    types import *.
    import comtypes.client

    ComTypes. CoInitialize()

    # Path to the type library.
    TypeLibPath = "C:/Program Files / National Instruments/LabVIEW 8.6/resource/labview.tlb.

    # Attention: For the first reason of type import library through
    # GetModule() fails if comtypes.client.gen_dir is set to a directory.
    # Workaround: Set it to zero so all imported data is kept in memory.
    ComTypes.client.gen_dir = None
    comtypes.client.GetModule (TypeLibPath)

    Try:
    Request = comtypes.client.CreateObject ("LabVIEW.Application.8", zero, zero, comtypes.gen.LabVIEW._Application)

    #Parameters
    Channel_1 = [1,2,3]
    Channel_2 = [4,5,6]
    Data = [Channel_1, Channel_2]
    Read = 'TRUE '.
    ParameterNames = ("Data", "Read")
    Parameters = [data, read]
    VIPath="C:\zjmwi\ComplexData86.vi".

    Reference #Get VI
    VirtualInstrument = Application.GetVIReference (VIPath)

    Front #Open VI in hidden mode
    (VirtualInstrument.OpenFrontPanel (True, 1)#3)

    #Call VI
    Print ("VI\n LabVIEW call")

    VirtualInstrument.Call (ParameterNames, Parameters)

    except:
    VirtualInstrument = None
    Request = None

    # Sunrise again the exception to get the trace full on the console
    lift

    VirtualInstrument = None
    Request = None

  • Call2 method not found (ActiveX VI method)

    I have the following problem. I have an executable Server ActiveX is enabled.

    the code below is a calling VI. the code worked correctly before. When I inserted a new node called on the block diagram, I can't see not all methods.

    I think that the image below says a lot.

    Help, please!

    Thank you

    RENN

    LV2010Sp1 32-bit

    Hi Moritz M.

    you don't know. I'm happy to post the solution.

    Normally, the ActiveX Server is registered automatically at startup of the executable.

    But since the EXE EXE of old and new has the same name, at first, I had to cancel registration of the old activeX Server (see link: http://support.microsoft.com/kb/297279) save the new one manually.

    Its NEITHER too well documented on support page.

    How can I register type libraries, ActiveX controls and ActiveX servers?

    http://digital.NI.com/public.nsf/allkb/4F811A9B23F1D46E862566F700615B7A

    I got the diagram broken in appellant VI (that I've posted before) because the activeX Server (in my case the executable file) was not registered.

    Thanks for the reply

    RENN

Maybe you are looking for