Slow imc COM (ActiveX)-libraries inside LabView

Hi
I'm using the imc COM (ActiveX)-libraries inside labview. The key command is the "automation open" block from LabView and selecting the desired ActiveX class.
Here his the definition of one of this function:
Function DChannel.GetDataDouble( StartIndex As Long, Count As Long,
                Data As Double() ) As Long
Copies the specified samples in an array of 8Byte real numbers.
Parameters
StartIndex
Index of the 1st sample to copy. The first sample in a channel has an index of 1.
Count
Number of samples to copy.
Data
Array to receive the values. See remarks section.
Return Value
Number of valid samples in <Data>. May be smaller than <count>, when there are not enough samples in the channel (StartIndex + Count -1 > Length).
The problem and also question is why the parameter Data apears as a variant when I use a invoke node for the above method (should be double()??)
When using large Data arrays the libraries are very slow in comparison with VB6. I tested the same functions in VB6 and LabView. In VB6 the COM libraries are very fast! Does anybody know how to improve performance with COM Variants?
Thank you

I'm not sure you can do anything about the speed as long as you use ActiveX. At least that was the answer I got when I asked a similar question here. It seems that there is a lot of data copying between memory spaces that goes on between ActiveX and LabVIEW and, if there is much data involved, it can take a while. Search these forums for the terms safearray or "safe array" or marshal data and you will find more info on what you are up against.

Similar Messages

  • ActiveX COM issue in new LabVIEW instance

    I have a rather peculiar problem I'm running into with using a COM library from a company to read proprietary binary files. I'm not very familiar with this type of Labview programming, I just followed their examples and experimented, a lot. I have talked for hours with the software engineer at the company who provides the "FSCOM Server" as they call it (Orbit F/R) and he can't figure out what is going on either. His expertise is not in Labview, but in text-based languages (I had to explain how to wire things in Labview over the phone).
    I use this FSCOM to read the contents of antenna pattern files stored in a binary format (frustrating). Everything works fine and as expected after weeks of experimenting and direction from Orbit. The problem is when I shut down Labview completely and open the code in a brand new instance, I run it on a data file and It errors out with "The server threw an exception." The weird part is nothing has changed from when it worked 30 seconds ago when I was programming it before I shut down Labview. The way to get it working again? Delete just 1 wire somewhere, anywhere then re-wire it. Now it works, everytime.
    Does anyone that knows COM/ActiveX have any idea how I can get this to work so I can make it an executable to distribute to other workstations?
    PS. It currently won't run in executable form, I've tried.
    Jamie
    Attachments:
    FileSystemCOM_Server_1.x.zip ‏4115 KB
    folder.zip ‏502 KB
    Block Diagram.png ‏286 KB

    Thank you for the tips, like I said I'm new to ActiveX objects so it's good to know how to properly handle them. I was using the attached code as my example on how to use their COM server so anymore information on how to use them or if they were not following a "best practice" is welcome.
    However, I don't think the closing references out of order explains this problem because when the code works, as in when I delete a wire and re-wire it, it works perfectly.
    If I open it in a fresh Labview, it won't get past case structure "4" (Read Azimuth / Elevation Angles) as in it doesn't seem to successfully read the data file as that is the first bit that looks inside the actual file.  This made me think its a file/COM server issue which is why I spent over an hour on the phone yesterday with the developer of this COM server and he actually re-created this problem.  Sadly he couldn't figure out why it would work if you just played with the wires a bit first.
    So this is why I'm here to see if there is anything blatently wrong with how I'm doing this according to Labview standards and not MatLab or some other languages' standards. I'm hoping that whenever you or someone else gets a minute to try my .vi's they will run into the same problem and can maybe direct from there.
    It is a strange thing to have working code, but only if you change it first.
    Also I know this would be a lot cleaner if the case structures were subvi's instead but I tried that when I first started programming this and couldn't get the reference of the COM Server to read out/read in correctly from on subvi to the next. I wired it up like I do any other vi and like so many NI drivers are out there, but it wouldn't work with this COM server and I just had to get it working so I moved on. I may revist the subvi aspect later after its built and working for everyone and just make it an update later to clean up the code a bit.
    Jamie
    Attachments:
    FSCOM Example - BD.png ‏67 KB

  • What type of component do Labview developers prefer? COM/ActiveX, C++ DLL, C DLL?

    The last time I used Labview was about 5 years ago and I have not kept
    up with the changes.
    I assume Labview can use COM components, ActiveX (COM with a GUI), C
    DLL's, and possibly C++ DLLs. Of these types, which do Labview users
    prefer?
    Background
    I need to develop a component that can be used by both VB and Labview
    users.

    Ed,
    LaBVIEW can use COM/ActiveX components, C dll's and C++ dll provided that the c++ dll has direct function calls(you can always use a wrapper dll to call functions inside a class)
    As far as what labVIEW users prefer, this is kind of a difficult question to answer since it is mostly dependant on the users knowledge of each of those components.here are a few links that may interests you.
    http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/5401be584fbaeece862567c2006d36c7?OpenDocument
    http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/7f41004ee990d4da86256a9d0064d522?OpenDocument
    http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/3a1f4b7cbc68b636862567cc004d5cca?OpenDocument
    and more gener
    ally
    http://zone.ni.com/devzone/devzone.nsf/webcategories/4161F118BF99CCE686256AB7006A68EB?opendocument&node=DZ53001_US
    Regards,
    Cyril Bouton
    Applications Engineer
    National Instruments
    Cyril Bouton
    Active LabVIEW Developper

  • How to implement an ActiveX server in LabVIEW

    My task is to implement an ActiveX server in LabVIEW 8.0 that will be called from a data management software (DXE).
    The LV server will take care of data acquisition and control.
    I have been looking for tutorials and example code at the NI developer zone and elsewhere without any progress. Information is either to general or code is to old (LV 5.1) to give any help.
    Please, show me to a good example of an ActiveX server in LV 8 properly commented or with attached explanations.
    Alternatively, suggest any tutorial, short course or books with practical instructions.
    Specific information is most welcome.
    I suppose that it is possible to write a ActiveX client in LabVIEW to verify the functions of the ActiveX server ?

    rolfk wrote:
    skalis wrote:
    Thank You. Good to know that I am on the right track.
    However,
    Your sentence "If You look at the several shipping examples..." make me
    little concerned. I am not able to find any example of a LV ActiveX
    server in my LV 8.0 installation. I would be very grateful of You can
    send me any.
    Basically you can not create your own
    Active X server with your own object hierarchy and methods in LabVIEW.
    LabVIEW however can export a predefined Active X server interface that
    is just another access method to its internal VI server interface.
    With this interface you can determine what VIs are available to
    control, load specific VIs from disk if you know their path and,
    execute those VIs and passing parameters to it and receiving outputs.
    So if your software allows you to script the Active X access to an
    Active X server in some ways such as VBA or similar you should be fine.
    If your software expects a specific Active X interface you have to
    implement in the server application, you are out of luck with LabVIEW,
    without using an external component such as an extra Active X server
    DLL that translates between the expected interface and the exported
    LabIVEW interface. But this last method is quite likely not worth the
    hassle.
    Rolf Kalbermatter
    While I did follow the link mentioned above and found the Interop.LabVIEW.dll that is included in the C# project for the purpose of calling VIs from C#, I am frustrated that these methods are 'buried' in a .dll that you have to go and find on the NI web site, and are not ActiveX methods that are available in an ActiveX Object that is installed when you install LV 8.20 PDS. 
    Rolf, I don't know that you will get this email, but are you refering to the methods inside of the Interop.LabVIEW.dll in what you are saying above, and if so, how did you become aware of this .dll? 
    Is anyone aware of any documentation for these ActiveX methods?
    Thanks,
    Wes
    Wes Ramm, Cyth UK
    CLD, CPLI

  • Looking for NI-CAN Libraries for LabVIEW 6.1

    Hi,
    I'm looking for the NI-CAN Libraries for LabVIEW 6.1 environment. Actual driver installation did install the nican-Libraries in LabVIEW 7.1 and LabVIEW 8.6 directory only but not in LabVIEW 6.1 (..\LabVIEW 6.1\vi.lib\nican\...).
    Can anybody help? Thank you in advance.
    Kind regards
    Christian
    Test Engineering
    digades GmbH
    www.digades.com

    Hi
    I hope your OS is one of the following...
    NI-CAN 2.3 - Windows XP/2000
    http://joule.ni.com/nidu/cds/view/p/id/274/lang/de
    The readme file   "http://ftp.ni.com/support/softlib/can/driver/ni-ca​n/2.3/readme.htm"  says:
    Supported
    Development Environments
    The NI-CAN software supports the
    following development environments:
    LabVIEW
    6.1, 7.0, and 7.1
    Give it a try and please let me know if it works...
    Regards
    Chris

  • How to use g++ to build shared libraries for labview in linux?

    does anyone knows if it's possible to compile a shared library in linux with g++ that could be recognized by labview?
    thks
    JP

    Hi JP,
    Yes you can use g++ to build shared libraries that labview can use. You'll want to give your C++ library a C interface. This is really common practice. You can do this by simply declaring functions as 'extern "C"'. Here is a link with more information:
    http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-30.8
    I've personally worked on projects that do exactly what you want to do.

  • ActiveX to configure LabVIEW and webDAQ

    I'm trying to use ActiveX in LabVEIW to fetch data from a webDAQ/100. I have configured the webDAQ, put I need help to communicate with the webDAQ from LabVEIW (using ActiveX). I've never tried anything like this before, and I would really appreciate some help here

    Margann,
    The best help we can offer is to point you to the ActiveX shipping examples in LabVIEW. This will show you how to use the ActiveX functionality of LabVIEW. If you need help deciding what methods and properties to call on the ActiveX object, then I would contact webDAQ.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Using a Visual Basic ActiveX DLL in LabVIEW

    I' like to use some code written in Visual Basic into LabVIEW. I think the best way to do this is making a dll_activeX. I've seen an example on NI site: http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B123AE0CB992111EE034080020E74861&p_node=DZ52048&p_submitted=N&p_rank=&p_answer=&p_source=External.
    When I use the dll present in the "zipped" file it works (I've registered the dll as described in the article).
    If I compile in a DllActiveX the Visual Basic project (Visual Basic 6.0), present in the zipped file, and I try to use, after the unregistrtion of the old one and the registration of new one, it doesen't work.
    I received the following error:
    error 3005Occurred at automation open: Object specified is
    not creatable in a ActiveX Dll with LabVIEW.vi
    Some ideas?
    Thank you.

    Paolo,
    I am not sure why you are getting the error. I downloaded the zip file re-built the dll and then registered it. I originally had LabVIEW open, so I closed and re-opened it so that it would see the new object. I then pointed the ActiveX refnum to the Project1 class. I still had a few broken wires so I hit ctrl-shift-Run Arrow to force a recompile.
    After all that I ran the VI at it worked great. Once that was done I unregistered it and ran the VI. I got an error as expected. I then re-registered the dll and ran it again. No error.

  • Nivbai activex call to labview missing step result's?

    I'm traying to call NIVBAI script in labview using activex calls to get step measurment information. For some steps 
    I'm geting good valuses, but for some steps in vision builder script wher I'm using calculator or global variable, the values of steps are 0.
    can someone advise me how to correct that problem? attached picture explains my problem. sorry for may englisch.
    Thank's in advance! 
    Attachments:
    problem.PNG ‏39 KB

    Hi antz24,
    Which version of LabVIEW are you using?  This example was developed and verified for Visual c++ 6.0 and LabVIEW 7.1.  If you are using a different version of LabVIEW, it is likely that the ActiveX methods have changed.  Below are the ActiveX methods for LabVIEW 2012:
    http://zone.ni.com/reference/en-XX/help/371361J-01/axprop/vi_class_method/
    Here is some documentation on calling LabVIEW VIs using different programming languages.
    http://www.ni.com/white-paper/5719/en#toc1
    Also, what exactly is it that you are trying to do?  In most cases, your application would probably be best served if it interfaced with your LabVIEW VI as a DLL.
    Andrew T.
    National Instruments

  • Updating filter setting in Hottinger HBM software CATMAN from inside LABVIEW

    I know how to update CATMAN by itself. Does anybody have an idea how to change filter setting on the fly from inside Labview without having to stop my application and opening CATMAN doing the update then starting Labview back up. 

    Hi Hobart,
    Could you please describe a bit more as to how you are accessing the instrument or if you're using any drivers from the Instrument Driver Network?
    Aashish M
    Applications Engineer
    National Instruments
    http://www.ni.com/support/

  • Lost ActiveX connection with LabVIEW server

    I have called LabVIEW in TestStand and tried to execute the test cases .
    While executing I got the following error:  ( Lost ActiveX connection with LabVIEW server.
    The LabVIEW adapter will try to reconnect on the next execution attempt.-18001; An error occurred accessing the LabVIEW ActiveX automation server.).

    Same error.  Is anyone from NI going to bother commenting on this?  It's been >8 months...

  • How can i use activeX Control in labview?

    how can i use activeX Control in labview?
    please describe me step by step.
    thanks.

    Well..that was quite helpful..but now I'm encountering certain problems. I've attached the VI I've made.
    I don't need sound at the moment so I dropped it. (Although I tried to play it..but all I could hear was a very annoying sound.) Secondly I don't want to display any date or time..so i dropped that property too.
    Now when I run this Vi...the webcam turns on, the screen of videocapx pops up..then the webcam light goes off..and another pop up appears saying..labview is not responding..and i have to close it reluctantly.
    I haven't placed the stop capture property in this vi. i checked it by placing it too..but that doesn't work.
    I would like to notify that my actual task is to acquire image and then compare it with another one already present on my pc. I want you to please help me out..solve my first query then I'll proceed with the latter part.
    Attachments:
    activexvideocaps.vi ‏20 KB

  • Reference Assemblies Dialog in VS2013 - why are hidden COM type libraries included?

    Why are COM type libraries that have the hidden attribute displayed in Visual Studio when you add a COM type reference to a .Net project? These hidden type libraries are not displayed in VBA, and the hidden attribute is supposed to prevent their display
    in UI tools. Is this dialog ignoring that flag and if so why?  I've created several type libraries that I do not wish to have displayed in this dialog.  Is there another way to accomplish this?
    As an example, look at the Accessibility type library.  The flags for the type library include LIBFLAG_FHIDDEN (4), yet it is still displayed.
    Thanks.

    Hi simdoc,
    Actually this forum is to discuss:
    Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
    >>Why are COM type libraries that have the hidden attribute displayed in Visual Studio when you add a COM type reference to a .Net project?
    To make this issue clearly, could you share us a screen shot about the real results in your side about the VBA and VS references dialog?
    Actually I’m not very sure that whether it is the correct forum for this issue since this forum is to discuss the VS IDE, but to really repro this issue, could you share us a simple COM library or a sample? So we could repro this issue in our side. Please
    also tell us the real VS version and windows Environment, you could share us a sample with one drive. I will test it in my side using the same Environment as yours, of course, please also share us a screen shot about the real result.
    >> These hidden type libraries are not displayed in VBA,
    Not the VBA expert, maybe just the VBA has this limitation:
    http://msdn.microsoft.com/en-us/library/office/gg278797(v=office.15).aspx
    http://stackoverflow.com/questions/1070863/hidden-features-of-vba
    To know that why it is the VBA feature, maybe you could get more information from the VBA forum:
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=isvvba
    Of course, if you could share me a simple sample, I will repro it in my side usint the same VS IDE as yours.
    If there's any concern, please feel free to let me know.
    Sincerely,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Calling C libraries in labview embedded for ARM

    Hello,
          I wish to use the library
    functions written by Luminary micro for their cortex-m3
    controllers. If i wish to use these libraries written in C language in
    Labview, what i should do? There are large number of libraries 
    available in their websites, if used in labview embedded, would be very helpfull and make programming very easy. If any one has implemented these libraries
    in labview please write to me. 
    Nabhiraj

    You can use the Call Library Function node.
    study here and here
    Start your work. Post if you stuck up anywhere. People here will help you a lot.
    All the Best.
    Mathan
    Message Edited by mathan on 04-02-2009 02:52 AM

  • Creating Active controls using opengl libraries in LabVIEW

    Hi,
    I want to create a 3D representation of the some geographic data on LabVIEW GUI. The need is to achieve something beyond the dumb representation. I would like to be able to choose any one of the points represented on the 3D GUI and do some activity like give a POP-UP etc.
    I believe labview 3D picture control allows to create the view in various ways like mesh and bars etc. But doesn't allow to create a active control.
    Attaching a sample pic. Of what am I expecting. I want to be able to click on each of the intersection points in the graph and get the pop-up.
    Since this seems to be not possible just using inbuilt 3D picture capabilities of LabVIEW, plan is to use a opengl libraries to achieve this.
    Will it be possible to create this in LabVIEW?
    Has some one done this before? A sample code will be of great help.
    Attachments:
    Example 3D view.JPG ‏69 KB

    Ayman
    Take a look at this thread http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2391  where Joe Hoskins has kindly donated his collection of activex vi's for excel.
    There are a couple of examples shipped with labview. Goto menu Help -> Find Examples. The NI Example finder will appear. Goto the search tab and search for excel.
    And, there are plenty of examples on the forum you just need to search for them.
    Trying to get you started ...
    David

Maybe you are looking for

  • Officejet 7410 All-in-One photo printing thin white lines

    I haven't had this problem before. First, I had 2 thin white lines near the left edge of the paper -- 1st, 1 1/4 inches from left edge;  2d, 2 1/2 inches from left edge.  I cleaned the cartridges automatically.  Then, I had only one thin white line,

  • Using property with geocode in record filters/range filters

    Hi All We have created a property called "Location" with data type as "Geocode" and we are able to use the same in sorting.And ,this will generate two dynamic properties by name "Kilometers_to_Location and "Miles_to_location".Is there a way to use th

  • Insert , Update & Delete Not working in BDB Berkley Database

    Hi, Anybody has used Oracle ADF & BDB ,to insert/ update & delete? imported db.jar,dbexample.jar,sqlite.jar ,derby.jar. still not working (Only Query working) Pls lets us know

  • How to deploy a web service into a WAS JAVA

    hello, we have  Netweaver 2004s AS Java with SP 11.  I need to know how we can deploy or start up a web services into WAS. It is possible? how? Any document to help me? please thanks! Gaby

  • Dimension image size.. (noob)

    hello guys, i am trying to make a large poster for the banner thats on top of a shop on photoshop cs6 i have the dimension in meters and centimeters and im just wondering if i put these in correctly, will this sure be the right size i need? because i