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

Similar Messages

  • 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

  • How to implement a StateSpace-Controller in Labview

    I have to implement a StateSpace-Controller in Labview. What is the
    best way of doing it?
    I have tried two versions -- a continous SS-Controller and a discrete
    Version. The Problem is, they show different results, and I can't find
    the mistake.
    If you have a solution at hand, I would appreciate if you could send
    me the file!
    Thank you very much!

    I started a post to your other thread:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HFORCEKWTID=65816:5&HOID=506500000008000000B4900000&HExpertOnly=&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

  • How to implement a callback function using LabView's Call Library Function Node?

    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    The SDK.h deacribes the function as:
    //  Function:   SdkSetPropertyEventHandler
    SdkError SDKAPI SdkSetPropertyEventHandler(
                SdkCameraRef                    inCameraRef,
                SdkPropertyEvent                inEvnet,          
                SdkPropertyEventHandler         inPropertyEventHandler,
                SdkVoid*                        inContext );
    //  Description:
    //       Registers a callback function for receiving status
    //          change notification events for property states on a camera.
    //  Parameters:
    //       In:    inCameraRef - Designate the camera object.
    //              inEvent - Designate one or all events to be supplemented.
    //              inPropertyEventHandler - Designate the pointer to the callback
    //                      function for receiving property-related camera events.
    //              inContext - Designate application information to be passed by
    //                      means of the callback function. Any data needed for
    //                      your application can be passed.
    //      Out:    None
    //  Returns:    Any of the sdk errors.
    A separate header file called SDKTypes.h contains the following data:
    typedef  SdkUInt32  SdkPropertyEvent;
    typedef  SdkUInt32  SdkPropertyID;
    typedef  void       SdkVoid;
    typedef  struct __SdkObject*    SdkBaseRef;
    typedef  SdkBaseRef    SdkCameraRef;
     SdkPropertyEventHandler
    typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
                        SdkPropertyEvent        inEvent,
                        SdkPropertyID           inPropertyID,
                        SdkUInt32               inParam,
                        SdkVoid *               inContext );
    Thanks for your help.
    Alejandro
    Solved!
    Go to Solution.

    alejandroandreatta wrote:
    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-11-2009 08:00 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How RMI implements multithreading in Server-side?

    In [http://my.execpc.com/~gopalan/java/rmi_internals.html] says:
    "On the server side, when a client connects to the server socket, a new thread is forked to deal with the incoming call. The original thread can continue listening to the original socket so that additional calls from other clients can be made."
    I have traced Java source code (jdk-6u18-ea-src-b05-jrl-18_nov_2009.jar) , but i could not find where and how Java RMI do it.
    Could anyone give me some hint? Thanks!

    In [http://my.execpc.com/~gopalan/java/rmi_internals.html] says:
    The status of that site is zero. All you can rely on is the RMI specification.
    "On the server side, when a client connects to the server socket, a new thread is forked to deal with the incoming call. The original thread can continue listening to the original socket so that additional calls from other clients can be made."That accurately describes the Sun implementation of RMI as of 1.5, the latest source code I have looked at. It doesn't accurately describe the IBM implementation nor I suspect the Sun 1.6 implementation.
    I have traced Java source code (jdk-6u18-ea-src-b05-jrl-18_nov_2009.jar) , but i could not find where and how Java RMI do it. So? Why does it matter? The RMI specification tells you what the multi-threading guarantees of RMI are. They are all you can rely on.

  • How to implement a psophometric filter in Labview software without uising Sound and vibration toolkit?

    Someone know the method to implement a psophometric or weighted filter in Labview software Without using Sound and Vibration Toolkit?
    Thanks

    The simplest way to implement a psophometric filter is to use the Sound and Vibration toolkit.
    Anyway if you don't want to purchase it, you can have a look at this forum discussion and this one.
    Serena Monti
    Applications Engineer
    National Instruments

  • HELP: How to implement Model Predictive Control in LabVIEW?

    Hi, everyone
    I have a problem on realizing model predictive control algorithm in LabVIEW 7.1.1.
    What I have now is a linear model predictive control algorithm designed with Matlab -- Model Predictive Control Toolbox. Under simulation in SIMULINK, it works well.
    Now I need to implement this algorithm with hardwares such as sensors and actuaors by LabVIEW.  Initially, I try to use the NI Simulation Interface Toolkit (SIT) 2.0 connect the simulink module with my LabVIEW interface to get the model calculation out of matlab, then send them into LabVIEW. It failed, because SIT can only help me design a simulation interface in LabVIEW based on Matlab model. Not the parrallel working mode I need. I am wondering,  does any  people here have experience dealing with the similar problems? 
    Thanks! Appreciate your time and help!

    Thanks Jarrod.
    With your suggestion, I tried LabVIEW simulation module. It seems the Model Predictive Control (MPC) block I developed in Matlab/SIMULINK cannot be supported by LabVIEW simulation translator. 
    The parrallel mode means I want to use the input from DAQ card as the input for MPC block (Basically, it is just a control algorithm with I/O), and I would like to use the output from MPC block as my actuator output to external device. However, when I use Simulation Interface Toolkit to import my MPC block from Matlab to LabVIEW. It is completely sealed. I mean I cannot pull the I/O ports out from this block in LabVIEW. That is the problem where I am now.
    BTW: I found there is optimization function in Simulation module of LabVIEW.  But Why I cannot find that function in my Simulation module (LabVIEW 7.1.1 + Simulation Module 1.0) ?
    Do I need to upgrade my LabVIEW to 8.0, since I heard about several powerful math functions there. And I am hoping with these math tools, I could realize MPC by myself in LabVIEW.
    Anyway, Thanks a lot for your help!!!

  • How to implement general error handler in labview projects

    Thanks,

    Hello,
    You may also find these links useful:
    Custom Error Handling In LabVIEW
    http://zone.ni.com/devzone/conceptd.nsf/webmain/de​4f036f22c4b9f286256fee0010b6fd
    LabVIEW Introduction Course - Six Hours (has a section on error handling)
    http://zone.ni.com/devzone/learningcenter.nsf/03f7​c60f17aad210862567a90054a26c/55974411828f779086256​...
    Hope this helps!
    Charlie S.
    Visit ni.com/gettingstarted for step-by-step help in setting up your system

  • How to implement a kerberos server system

    Hi
    I want to develop a simple kerberos system which has just one client and one service server. I couldnt find any tutorials about kerberos. Could you please help me

    You may also want to look at JAAS. http://java.sun.com/developer/technicalArticles/Security/jaasv2/
    It's probably a tad overkill for some JSP applications, but it would give you an additional layer of protection for documents, i.e., you can control access to actual files based on roles. I say it's a bit of overkill because Tomcat incorporates most of the ideas into their realms.

  • How to implement a psophometric filter in Labview software

    I am trying to implement a psophometric filter in software for a noise measurment on a telephony system.

    Hi Jake8,
    I don't know about your situation, but my use for a psophometric filter
    was to filter the audio before a sinad measurement. I didn't find a filter
    algothym in the time domain, but I did find the filter shape in the
    frequency domain. My SINAD meter calculates the SINAD from FFT data, so
    the all i had to do was apply the filter shape over the FFT data, and so
    filtering it, then calculate the SINAD.
    It is possible to synthesise a FIR filter from frequency domain data, but
    I couldn't make it work. The problem with FIR's, is they do take a lot of
    processing compaired to IIR's for the same frequency responce.
    If their is an engineer out there that can synthesise a suitable FIR or
    IIR filter, I can forward the articles that have the freq responce.
    Tim
    Jake8 wrote:
    > I am trying to implement a psophometric filter in software for a noise
    > measurment on a telephony system.

  • How to implement this code in labview?

    How do implement this pseudo code in labview? Please keep in mind "a" and "c" in the code below ARE VARIABLES
    for i =0 to i=maxvalue
           if i <= a 
               output = output2
           else if i > a AND i<=c
               output = output2
           else if i < c 
               output = output3
           else i = d
               output = output4
    I understance i can use a case structures and modify the label, but i do not know how to make the label dependent on a variable value. 
    Thanks 

    Try an array of boudaries and use threshold array. See this old example:
    Now just iterate over an array of values using a FOR loop.
    LabVIEW Champion . Do more with less code and in less time .

  • How to implement wafer mapping using LabVIEW?

    Hello LabVIEW Masters!
    I am having an incoming project which includes controlling and gathering information from a PROBER. One of the difficulties I am having now is how to implement a WAFER MAP using LabVIEW. According to my customer requirements, the wafer element ranges from 6k to 23k. I guess doing all the element (one die = one led ctl/indicator) will be a hell of a task, especially on how to effectively manipulate each elements. Does anyone have better idea on how to this?
    Please, I badly need your help.. 
    Thanks and Regards,
    Dennis DG
    Solved!
    Go to Solution.

    Hi Dennis,
    Is it okay if you send to me the working VI also?
    No, it's not ok. I made that program for my customer...
    As I am not too familiar in using intensity graph.
    That's no reason to hand over programs for free...
    My customer also request me that if the cursor hover on the wafer map, he wants the x,y corrdinates to be displayed.
    I also have such a feature. Did you notice the little yellow cursor near the center of the wafer? One could easily change that to use a MouseMove event instead...
    He also wants to select some elements in the wafer map and come up with the coordinate values to do some testing.
    That's related to the cursor thing...
    Some points:
    - You have a customer that pays you. Why should I offer work for free?
    - You can send me contact dates of your customer, I will make him an offer...
    - When you take an job to provide software you should be able to code the software...
    - The VI(s) are now some years old. I didn't code so well back those days and don't want to hand out those VIs as they are right now.
    - I included some "license management" deep inside that program, I would have to remove this and spend time on testing afterwards...
    - The VIs are based on the PROBER output format used by the customer. All the file handling has to be changed for/by you...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I force TestStand to create multiple instance of an activex server instead of share the same reference?

    Hi, All:
         I am trying to migrate a application coded by VC++ to TestStand+CVI. This application opens multiple serial com ports and send commands to test targets, and get responses from these targets. The VC++ application creates multiple thread, and every thread create an activeX server instance which is responsible for opening serial port,sending test commands ,and getting response. It works fine as every thread has itsown activeX instance, so data and commands can be handled in the right serial port successfully.
         Yet when I works on TestStand, I got problems. I choose parallel model as the process model. I create a activeX object reference with AxtiveX/COM Adapter, and store the reference in a sequence local varialbe. If there is only 1 testsocket, It is OK. But if there are multiple test sockets, and communication between the application and test targets will be directly to the last test target. I try to popup a message within a execution to indicate the value of the activeX object reference, and all of them are identical. But this is not the behavior I want.
        So, is it possible to force TestStand to create independent instances of an activeX server? How can I make it work?
    Thanks

    Thanks for your comment, Dan.
          Yet I do get problems as none of us know how to program an activeX server so that it can be forced to be a single-instance or multiple-instance.
    As I mentioned earlier, there is existing application which is written by VC++ can create multiple instances of this activeX server, all I have to do is to create multiple threads, and initiate an instance of this server to contrl multiple test targets.
         My colleague said he creates the server with VC++ ATL, and cofigure it to be dual-interface and STA. And in the VC++ application side(client side), I use smart-pointer in threads to create an instance of the server:
     IMySerialServer pIMySerialServer;
      HRESULT hr = pIMySerialServer.CreateInstance("UUTCmd.MySerialServer");
      if(FAILED(hr))
       AfxMessageBox("Fail to create instance.");
    And then I got multple instances of the activeX server. Every thread can have itsown com port, can send/receive commands indepently. I have no idea how can I make it work on TestStand. Would you show me some reference documents or sample codes?
    Thank you
    Cipher

  • How can I force the close of a third party ActiveX server.

    We have a third party ActiveX executable that refuses to shut itself down once in a while. And when I say once in a while, I mean one out of every 20-30 times it's attempted. All termination commands are being sent and recieved properly, and all refnums are being closed. No errors are ever generated, all operations report successful, but the thing just won't die. Problem is of course, that if we attempt to restart our software after the ActiveX app fails to terminate, it generates server execution errors when trying to open a new instance. We are not expecting a speedy resolution from the third party, but it is becoming a great inconvenience for our customers. I would like to be able to kill the process thro
    ugh the OS as a last resort. Problem is, to do that I need a ProcID. Is there any way to retrieve a ProcID for the ActiveX server through LabVIEW? Alternatives and suggestions are welcome.

    Hello codeman,
    Thank you for your inquiry regarding closing a third party ActiveX server. It sounds like the third party application is having trouble closing. There are several Windows Utility VIs available that could help in this case. One of the Utility VIs is called Get Window Refnum and should return an instance of a Windows window. The following links are great resources when dealing with this issue.
    http://digital.ni.com/public.nsf/websearch/136F6B1​F34CBB76E852563FC007AEFC7?OpenDocument
    http://sine.ni.com/apps/we/niepd_web_display.displ​ay_epd4?p_guid=B45EACE3EF4556A4E034080020E74861&p_​node=DZ53008&p_submitted=&p_rank=&p_answer=&p_sour​ce=External
    Other responses similar to these can be found on the ni.com website by clicking the support tab at the top
    of the home page. Then search for �refnum instances� from Technical Resources at the top of the page or topics similar to this. I hope these resources help. Let me know if I can further assist you.
    Shea C.
    Applications Engineering

  • Labview activex server registration incomplete.

    I made an ActiveX server using LabVIEW. The server should communicate with Excel. During installation of the server I register the server: "Server.exe /RegServer". When I try to call the server from Excel/VBA, it responds with "Run-time error '429': ActiveX component can't create object". The server is only recognized by Excel after I have started and stopped the server once.
    When investigating the registry, it appears that the difference between registering with /RegServer and just starting and stopping the server are the following registry keys:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application.6
    To my opinion the /RegServer commandline option does not do the whole job.
    Also /UnRegServer does not remove the above mentioned registry keys.
    Is this a bug or just normal behaviour?
    Has it been solved in newer LabVIEW versions (I use 6.0.2)?

    Hi,
    I've tried to call a with LabVIEW 7.1.1 created activeX server. This works without any errors. I've attached my code. 
    As for the register keys, this seems to be the default behaviour of ActiveX, each server has a key without version number e.g.
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application
    And one or more with a version number:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application.6
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ServerName.Application.7 Kind regards,
    Karsten
    Applications Engineer
    National InstrumentsMessage Edited by KvZ on 07-27-2005 02:37 PM
    Attachments:
    ActiveX Server.zip ‏45 KB

Maybe you are looking for

  • Intermittently slow load times from iTunes, while Netflix

    TV shows from iTunes sometimes take a long time to load, while content from Netflix & Hulu seem fine. Why does iTunes sometimen indicate that it may take over an hour to load a 45min TV show?

  • How do I transfer photos in iPhoto to Photoshop?

    Currently running iMac with Mavericks operating system. Need to transfer all my photos from iPhoto (version 9.5) to Photoshop CS5. Would appreciate any help!

  • Need output of below query

    WITH rcv_transactions      AS (SELECT 1001      TRANSACTIONS_ID,                 -1        PARENT_TRANSACTION_ID,                 'RECEIVE' TRANSACTION_TYPE,                 NULL      LPN_ID,                 'LPN01'   TRANSFER_LPN_ID          FROM  

  • Picking list output in VL70 for the outbound deliveries picked via WM

    Hi Experts ,           How to take Picking list output in VL70 for the outbound deliveries picked through transfer Orde(WM). Generally, we ll genreate picking list in VL70 directly giving from the outbound delivery. Then , system wll confirm the Pick

  • HTTP Get Keepalive Wait Time

    Does anyone know how long is the wait time for the built in http get keepalive before it determines there's no answer and marks the service as dying? And is this configurable somewhere? I have an App owner who thinks the load balancer may not be wait