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

Similar Messages

  • How to get the entry point in the ActiveX/COM adaptor

    below is the description of the Demo of using the ActiveX/COM to call new seq . 
    API Demo
    1. Manually add a Message Popup step to the MainSequence of a
    new sequence file. Save the sequence file as launch.seq.
    2. Create another sequence file and save the file as caller.seq.
    3. In the MainSequence of the caller.seq file, add Action steps
    using the ActiveX/COM Adapter to call into the TestStand API and
    launch the launch.seq file in a new execution.You might need the
    following two methods to complete this step.
    . Engine.GetSequenceFileEx
    . Engine.NewExecution
    so the question as follows:
    1.i call the method of get sequencefileEx
    2. call the method of getmodlesequenceFile
    3.call the method of evalEntryPointNameExpression
    4.call the method of NewExecution.
    but at the step of 3. i haven't get the entry point.
    so how to solve this issue? thanks
    Attachments:
    QQ图片20140115200924.jpg ‏58 KB
    QQ图片20140115201708.jpg ‏100 KB

    This is a duplicate post of this:
    http://forums.ni.com/t5/NI-TestStand/How-to-get-the-entry-point-in-the-ActiveX-COM-adaptor/m-p/27005...

  • How to conect to remote ActiveX (COM) program

    Hi everybody.
    I want to comunicate between LabView and another program by using ActiveX (COM).
    If both - LabView and the other program is at my local machine - everything is fine.
    I use the "Automation Open"-VI to open the ActiveX conection.
    The problem is that if the other program is located at another PC (inside network) the "automation Open" -VI returns an error.
    How can I get an ActiveX connection to the other PC?
    Thanks for help.
    Best regards.
    RonnyMessage Edited by rfriedr1 on 05-23-2005 10:00 AM

    I'm afraid it isn't quite that easy. From LV all you need to do is specify the machine name to get the remote access. However, in order for that to work, all of the COM stuff must be configured correctly for remote access (DCOM) and all the security settings must be done correctly. And if you are running XP SP2 or 2003 Server, there are additional steps to take because those OS's have tightened up security and thus have additional steps to get it to work.
    SUMMARY
    =======
    If you don't know much about COM or don't have access to a COM guru that created the COM component you are trying to use, you might want to think about creating a little LV app that runs on the remote box and then use LV networking to remotely access it. DCOM isn't impossible, but it isn't easy - especially if you don't have a good grounding in non-LV COM interfacing.
    DETAILS
    =======
    Is the COM object you are trying to access a home grown one or 3rd party? Are the two computers both in the same NT Domain or are they in Workgroup configuration? DCOM uses NT security and thus you typically need to have both computers in the same domain and using a domain credential for communication.
    I'm afraid I can't give you step by step instructions on how to do this (I haven't needed to use DCOM in about 6 years) - but there are a lot of resources out on the web and books like Don Box's "Essential COM" walk you through most of it. For example, here are some references to look at
    http://support.microsoft.com/kb/176799/EN-US/
    http://support.microsoft.com/kb/158508/EN-US/
    Oh, and this might be handy - ran across this while looking for links for you...
    http://support.microsoft.com/default.aspx?scid=kb;en-us;249726
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Urgent Issue - Copy DTP and Process Chains in New Client Instance

    We have created new client Instance ( CLNT 510 ) based on our present client ( CLNT 500 ).
    We have all the process changes, application components from source system CLNT 500 and data ( both for master and transaction data ) in place for the CLNT 500.
    Now we need to use the CLNT 510 for our futher development. RFC connection has been established.
    Just want to know, do we need to create all the Application component trasfer , Transformation, DTP , Infopackages , Process chains again for the CLNT 510 data.
    please help.
    Thanks and Kind Regards,
    Pratap Gade.

    Hello Jr Roberto,
    Hello Jr Roberto,
    We have company implementing mutiple SAP Implementations in different countries.
    Client for BW Dev is 400.
    Source system for Client BWD :
    ECC Client ERP Dev - 500 ( for Holland Implementation )
    ECC Client EPR Dev - 510 ( for German Implementation  - Instance of ECC 500)
    We are completed with the Client 500 implementation.
    We are starting the german implementation and they have created a intance of Holland ECC Dev client 500 for german implementation with german data.
    Now they have setup 2 rfc connection in BWD 400.
    Also finally when they move to QAS client they are going to integrate the data of the both countries into one client.
    Presenlty I need to use ECC client 510 client for our german development.
    We have around 40 SAP BI reports in our first implementation. and around 10 in our second implementation.
    Just want to know, what are issues to be considered in loading master data ( will it overwrite the master data from the client 500, if i extract the master data from client 510 )...and all the other issues like can I copy all the process chains...etc  from client ECC 500 to ECC 510, without creating all transformation, DTP , Infopackages to load all the master from client 510 again.
    I need a broad understand on how to go about the development ...starting with Application Components transfer from source system Client 510 ....to report development. ( if possible using the already created objects....infopackages , DTP etc..)
    your help would be really appricated Mr Roberto.
    Thanks and Kind Regards,
    Shekar.

  • Programmatically Insert ActiveX/COM Step Using LabVIEW

    Hi,
    I would like to be able to create sequences like the one attached, using LabVIEW.
    This sequence has only 2 steps, a LabVIEW VI call, and an ActiveX/COM Adapter Call.
    I have been able to do this using an adaptation of the code here: https://decibel.ni.com/content/docs/DOC-36337
    However, I am struggling to add the ActiveX/COM step.
    Any help would be gratefully received.
    Thanks,
    Dan
    CLD
    Solved!
    Go to Solution.
    Attachments:
    Valve Control - Test 1.seq ‏6 KB

    Obviously there is a way if you look for it
    Since you have an existing object of the "Step" class you can also get a "Module" object for it. Afterwards you have to specify that this is an ActiveX module. If you do not know that - probably you need to get it from the "Adapter" object somehow... Our case is simplier, so you just cast it to the ActiveX module and ... set some properties like ServerId, ActiveXReferenceExpr and so on.
    I have attached an example for you. Interesting thing is the ServerId - I have just read this chain from the TS for similar step and reused it here so don't ask me how to obtain it automatically
    You still have to fill your "Properties" like "file" - but I will graciously leave this job for you =
    Best Regards,
    CLA, CTD, CLED @ Test & Measurements Solutions Poland
    Attachments:
    ActiveX Step_2.vi ‏24 KB

  • Commit_form creating issue with When-New-Record-Instance trigger

    Hello friends,
    I am using Oracle forms 6i . I have a multi-data block. I have written commit_form in when-new-record-instance of the data block. When I launch the form on my instance the form does not open.
    But when I comment out this code, the form opens on the instance. What could be the exact problem?
    Also is there any condition that I can specify if the whole data block is null when I open the form?

    Hi...
    In When-New-Record-Instance, check if the block status is NEW. If Not, then just apply COMMIT_FORM;
    try this code in your trigger
    IF :SYSTEM.BLOCK_STATUS = 'CHANGED'
    THEN
    COMMIT_FORM;
    END IF;
    Should work for you.
    Thanks....

  • Python ActiveX/COM - Which engine am I getting?

    Currently, I have TestStand calling some Python code to run some of our tests.  I'm wondering if it's possible to have the Python code manipulate variables from the running TestStand instance?  This post shows how to access the TestStand API from Python: http://forums.ni.com/t5/NI-TestStand/Exchange-data-with-TestStand-from-a-python-thread/m-p/1314571#M...
    Based on what I've read, it seems that when you get a handle on an ActiveX/COM Engine object, its not the same Engine as is currently running (that called the python script).  (see post 6 of this post: http://forums.ni.com/t5/NI-TestStand/using-C-as-User-Interface-in-TestStand/m-p/1404192#M31492).  
    If this is true, then the engine I get in Python isn't the engine I want.
    Can anybody confirm/deny?

    Ok. Probably the easiest way to pass a reference across processes is to use the TestStand synchronization step types and corresponding synchronization manager API. On the TestStand side, before launching your python process, create a queue or notification (using the corresponding synchronization step type), giving it a name that begins with an '*' character. Synchronization objects whose name begins with an '*' character are global per machine. Then before, launching your python app, either enqueue the reference you wish to pass to python or set the notification with such a reference. Then inside of your python code, create a new instance of the engine, and call GetSyncManager() on it with the name you used for your queue or notification. You also need to import the TestStand synchronization manager type library, which will then allow you to convert the sync manager reference to a SyncManager data type. Call GetQueue or GetNotification on it, then call the corresponding method on the queue or notification to dequeue or wait for the notification. You will need to create a destination object using the engine as follows: engine.NewPropertyObject(PropValType_Reference, false, "", 0). See the API help for teststand for more information.
    Hope this helps,
    -Doug

  • When-new-record-instance

    Hi All !
    I have a form, where in
    *Trigger:when new form instance*
    enter_query;
    *Block level Trigger :when-new-record-instance*
    :empaply.employeeid:=:global.employeeid;
    select employee_id,firstname into :empaply.employeeid,:empaply.employeename
    from pim_emplpersonalinfo where employee_id =:global.employeeid;
    if :empaply.leavetype='Casual Leave' then
    :empaply.status1:='Not Applicable';
    :empaply.status2:='Not Applicable';
    :empaply.status:='Pending Approval';
    elsif :empaply.leavetype='Earn Leave' then
    :empaply.status1:='Pending Approval';
    :empaply.status2:='Pending Approval';
    :empaply.status:='Pending Approval';
    elsif :empaply.leavetype='Earn Leave' and :empaply.status='Rejected' then
    :empaply.status1:='Not Applicable';
    :empaply.status2:='Not Applicable';
    elsif :empaply.leavetype='Earn Leave' and :empaply.status1='Rejected' then
    :empaply.status2:='Not Applicable';
    end if;And for a push button
    *Trigger: when button pressed*
    execute_query;Now my issue is the initial value i have set in the new record instance is not working automatically, it works when i click any other text box in my form or when i scroll down..
    What can i down to overcome this?
    Pls help !
    Thanks and Regards
    user 10685325
    Edited by: user10685325 on Jun 22, 2009 1:19 AM

    Hai,
    The NEW-RECORD-INSTANCE Trigger will work only when the cursor moves to that record.
    write in the POST-QUERY Trigger of the block.
    Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • WHEN-NEW-ITEM-INSTANCE TRIGGER NOT FIRING IN FORM PERSONLIZATION

    We are upgrading to R12, when-new-item-instance trigger written for radio group not firing. using USO-821 Order Administrator Responsibility the function order capture.After clicking on actions push button
    opening Copy Quote for this Form Personalization written.
    For Radio Group Copy-Group when-new-item-instance trigger written but this trigger not firing,but In 11i Instance its Firing.
    trigger-event: when-new-item-instance
    Trigger-object:copy_group
    condition:when copy_group='ALL'
    Action: showing message.
    The same when-new-instance trigger written in form item level and trigger execution hierarchy properties 'OVERRIDE'.
    Just I am thinking this overriding by Item level trigger of form.
    Please kindly help me quickly .What I need to do?
    How can I make trigger to Fire?
    Please kindly give solution.....Its very urgent Requirement.pls help me.
    Regards,
    Basavaraj

    Please kindly help me quickly .What I need to do?
    > Please kindly give solution.....Its very urgent Requirement.pls help me.
    Kindly log a SR for urgent issues.
    Thanks,
    Hussein

  • WHEN-NEW-ITEM-INSTANCE TRIGGER NOT FIRING IN FORM PERSONLIZATION(R12 UPGRAD

    We are upgrading to R12, when-new-item-instance trigger written for radio group not firing. using USO-821 Order Administrator Responsibility the function order capture.After clicking on actions push button
    opening Copy Quote for this Form Personalization written.
    For Radio Group Copy-Group when-new-item-instance trigger written but this trigger not firing,but In 11i Instance its Firing.
    trigger-event: when-new-item-instance
    Trigger-object:copy_group
    condition:when copy_group='ALL'
    Action: showing message.
    The same when-new-instance trigger written in form item level and trigger execution hierarchy properties 'OVERRIDE'.
    Just I am thinking this overriding by Item level trigger of form.
    Please kindly help me quickly .What I need to do?
    How can I make trigger to Fire?
    Please kindly give solution.....Its very urgent Requirement.pls help me.
    Regards,
    Basavaraj

    Please kindly help me quickly .What I need to do?
    > Please kindly give solution.....Its very urgent Requirement.pls help me.
    Kindly log a SR for urgent issues.
    Thanks,
    Hussein

  • How can i change the code in when new form instance trigger using JDAPI

    Hi all,
    Can anyone tell me how can i use JDAPI to modify the when-new-form-instance trigger in all my forms,coz we have around 500 FMB's ,if this is possible by using jdapi it will be better for us..
    Thanks in advance..
    Najeeb

    Hi Najeeb,
    The code I've given you should cover the basic steps - you will need to have a basic knowledge of Java if you want to use the JDAPI, there's no way around that unless you go and buy one of the off-the-shelf products for this kind of thing (I think there's one called orcltoolbox..?)
    I've written an application that does all kinds of things to Forms specific to our needs, so it's a bit tricky to just pull out the code you need, but again, the basics will be:
    String formName="C:\some_dir\some_form.fmb";
    FormModule mForm=FormModule.open(formName);
    Trigger myWNFITrig=Trigger.find(mForm,"WHEN-NEW-FORM-INSTANCE");
    String myText=myWNFITrig.getTriggerText();
    And there you have your trigger text, to do with what you please. You could put this code in the main() method of one class if you want to keep things really simple - but see how you get on, if you have any more specific questions, do come back.
    Eric - that's a very good point about using Regular Expressions. I haven't used them in my JDAPI app because I wanted to keep all my .fmbs 6i-compatible for the short-term, and a posting I saw somewhere recommended sticking to Java 1.3. Which rules out the regex facility, which only appeared in Java 1.4. Now, though, I think I needn't have worried - it surely shouldn't matter which version of Java I use to make the changes to the .fmbs. My stupid!
    James

  • How to undo update of checkbox after triggering when-new-record-instance

    Hi,
    I am using eBusiness Forms Personalization in 11.5.10 to alter the Receipts form in Purchasing. I want to prevent users checking the rcv_transaction checkbox if the destination is "Multiple" and, instead, click the "+" sign to explode the multiple record into it's many component records.
    I can do this by invoking the when-new-record-instance trigger to make the "multiple" record fields unalterable and issue a warning message when the user selects such records. However, my problem is that - if the user clicks the checkbox as the first field in a "multiple" record, then this updates the checkbox to "Yes" BEFORE the trigger fires, which then locks the record for update.
    What I need is a solution that either sets the checkbox to unalterable for "multiple" records BEFORE the user clicks into such records, OR a method of undoing the update of the checkbox after the record has been selected (I cannot do this by simply setting it to "No" by the trigger as this is still technically an update and locks the record).
    Cheers
    Graham

    Hi Navnit,
    Yes you are right, but it can work even we not plase quotation mark in it. But Yes I forget to place semi colon so now it is
    IF :System.Cursor_Record = 1 THEN
       :Block.Col1 := '02:00';
    ElsIF :System.Cursor_Record = 2 THEN
       :Block.Col1 := '07:00';
       ------and so on
    END IF;Danish

  • FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger

    Hi Guys,
    Can someone help me to find the root cause of my follwoing issue
    Issue
    My Sales Order was giving following error when trying to open the form
    'FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger '
    Bounced the instance the issue was resolved.
    Again today morning ,same issue started again after the daily bounce which is done bu a script.
    This time I bounced Form server and issue was resolved.
    Can someone help me in finding the root cause of this issue.
    This is issue is happening only on one form (Sales Order ) !!!!!
    Thanks

    Hi
    This is a Standard form using cusom.pll.
    This was working perfect for last 1 year.
    There where no changes made in the forms or in the environment.
    Only activity carried out was a rebooting of server.
    Surprising it is working fine after boucing!!!!
    any idea
    Thanks

  • WebUtil doesn't work when called from WHEN-NEW-FORM-INSTANCE trigger

    I need WEBUTIL_CLIENTINFO functions to know some information from the client, like IP, JavaVersion, Hostname, OS user, etc. This functions I call through WHEN-NEW-FORM-INSTANCE TRIGGER and this doesn't nor work. I obtain the next message and error:
    oracle/forms/webutil/clientinfo/GetClientInfo.class not found. WEBUTIL_CLIENTINFO.GET_IP_ADDRESS.
    But when I call this WebUtil functions through WHEN-WINDOW-ACTIVATED trigger or through a button it works. Why?. I need call WebUtils in the WHEN-NEW-FORM-INSTANCE trigger!
    Any help will be of great value.

    Basically make a timer...
    Do you have the wu_test_106.fmb file that comes with the webutil install?
    If you look in the wnfi trigger you will see this...
    declare
         fake_timer TIMER;
    begin
         -- Purpose of the fake timer is the we cannot call webutil in this trigger since the
         -- beans have not yet been instantiated.  If we put the code in a when-timer-expired-trigger
         -- it means that this timer will not start running until Forms has focus (and so the webutil
         -- beans will be instantiated and so call canbe made.
         fake_timer:= CREATE_TIMER('webutil',100,NO_REPEAT);
         --create_blob_table;
         null;
    end;And in the form level when-timer-expired you will see this...
         :global.user_home := webutil_clientinfo.get_system_property('user.home');
         :OLE.FILENAME := :global.user_home||'\temp.doc';
         SET_ITEM_PROPERTY('builtins.text_io_item',PROMPT_TEXT,'Write to '||:global.user_home||'\helloworld.txt');
         SET_ITEM_PROPERTY('files.userdothome',PROMPT_TEXT,:global.user_home);

  • How to setup new OC4J instance to host jdev business component (EJB)

    From Jdeveloper 9.0.3 I want to deploy a business component to an new oc4j instance running under 9ias version 9.0.3.
    In jdeveloper I have built and tested an application server connection (type=Oracle Application Sever Remote DCM) to my new oc4j instance on 9ias. My understanding is that the jdeveloper deployment profile wizard will help me construct a profile to build what is known as an "EJB session bean".
    Using EmWebSite, I have created and started the new oc4j instance, and i constructed a datasource to be used for the database connection.
    Is there anything else that I will need to do to the new 9ias oc4j instance prior to building the deployment profile in jdeveloper, and then running the deployment? For instance, does this new oc4j instance somehow have the necessary hooks in it to support this bc4j component? Do I need to install any missing jar files? Do I need to define rmi ports ? Do I need to configure BC4J support?
    BTW ... I have tried to pursue this topic from the Jdeveloper side but the support personnel are not familar with 9ias 903, nor are they familar with 9ias Remote DCM deployment.

    Yes, you should be able to deploy an BC4J application without making any other changes to an IAS instance. For standalone OC4J please look at http://otn.oracle.com/products/jdev/htdocs/config_oc4j_for_bc4j.html
    regards
    Debu

Maybe you are looking for

  • BI Admin Cockpit Selecting BI Systems

    Hi Experts, We have implemented the BI Admin Cockpit in my organization and it is working fine. My doubt is that in the left side panel of process status we do have an option of selecting the BI system in the dropdown box.  There it is showing only o

  • Won't Burn Music File

    Suddenly, I can't burn any of my audio files. When I insert the blank CD it initializes it then it "finishes burning" then I get the message that it wasn't able to burn the file. I tried a several music files. I don't think I've past the burn limit b

  • Solaris 10 u6 don't boot after updates installl (May 11)

    Hi: Yesterday at nigth I ran updatemanager and installed several updates. Then said to reboot in the updatemanager checkbox. After that, at boot started to apear a fast message saying on several lines something about something wrong with " ... IPv4 .

  • How to automatically clear the compiler log

    Does anyone know how to automatically clear the compiler log window immediately prior to compilation? "Upon compilation" might be a better way to say it. I couldn't find any preference settings that would enable this functionality. I'm using SQL Deve

  • Alternate color in Row footer

    alternate color not applied in Table footer. Can any one let me know how to acheive this?