Jump to content

lordsathish

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by lordsathish

  1. GregR & asbo, thanks for your responses.

    TestStand does control VI lifetime through references. They open the references from TestStand itself so they are in control of when they close those references.

    TestStand doesn't seem to be keeping a VI running to keep the VI's loaded. Does that mean that, if you are using a C#/.net application that opens the VI reference through LabVIEW ActiveX, your VI reference will be valid as long as the thread that opened it is running ?

  2. Hi Ppl,

    I'm trying to reserve a VI for execution. I couldn't find any property/method that does it, in VIServer. LabVIEW ActiveX does expose a method to reserve the VI.

    But my problem is how to keep the VI in memory even after the VI that opened the reference stops running. I was wondering how TestStand does this. TS loads VI's into memory and reserves them. If TS used some code that open's these VI's ref, after that code stops these VI's should go out of memory. But that doesn't seem to happen.

  3. Now, on the flip side, NI might decide to move vi.lib out of Program Files under such a scenario. There's lots of possibilities here. So, it's not necessarily a showstopper, but I'd suggest you investigate MS' Windows 8 plans before deciding this issue.

    Does NI has plans to move vi.lib to ProgramData ? This seems to be a likely plan for NI. If addons have to be installed into vi.lib, it should be outside Programfiles for other applications to have access. Then there is a possibility that user.lib is separate for each user and is moved to AppData of each user. If Addons go into user.lib that is different for each user, that doesn't make sense. That could be the reason why NI is recommending Addons to be moved into vi.lib

    I'm making lot of guess. Someone should comment on what part of it is really possible.

  4. Such use of the ini file is a nice solution for parameters that should be somewhat configurable, but which do not require to be changed frequently. For parameters you would want to change often you should make a user interface in the application that reads and writes to separate configuration files instead. Those files should be stored in the directories dedicated by the OS to application data (on Windows this would be the Appdata or ProgramData folders).

    As you mentioned if the application wants to write configuration to a file, the best place to keep it would be Application Data or Program Data. But the Application.ini still has to be parallel to the Application(exe). If the EXE wants to modify any value in the Application.ini(for example the vi server port) it might not have write access to the Application.ini if the EXE is installed into the program files. I feel the application.ini should not be restricted to be parallel to the exe alone. We should be able to keep it somewhere in the Application Data or Program Data and link the EXE to this Application.ini

  5. Hey smarlow,

    Any progress in your idea of the community effort ? The code that you have uploaded does not work with Chrome 14. The hand shakes have changed in the recent version of chrome. I tried fixing the handshakes. But still I couldn't get the code working. The onclose callback gets called when I stop the LabVIEW code, but I think the onmessage callback is not getting triggered. I'm new to SVG, HTML5 stuff. Can someone post an update to this code to get it working on chrome 14.

  6. Hi ppl,

    I've been for long time How Express VI's work with TestStand. I came across couple of methods in TestStand step.LabVIEWModule.ExportVI() and ImportVI(). The ExportVI method was creating a wrapper to the Express with the configured values set as default to the controls that are wired to the ExpressVI. Looking at this, it seems like TestStand is executing such wrapper VI's to these expresses during execution. While searching the sequence file saved in XML format. I came across a section that has this express VI configuration. This part was not in a Human readable format, and seemed to be junk data.

    Are there any clear documentation on how Expresses work in TestStand. I couldn't find much help.

    Thanks,

    Sathish

  7. Hey asbo,

    TestStand could be crashing if you had not installed the patch for TestStand 4.2.1. Its available here.I also tried the type option, but couldn't make out how to proceed with that. I got the same error with that approach as well.

    Thanks,

    Sathish

  8. Hi Ppl,

    I have an array of clusters in LabVIEW. The cluster has two elements a boolean and a numeric. When I try to set this array of clusters from LabVIEW to TestStand using the TestStand API's I get an error that the type does not match.

    To explain in detail I have an Local Array of containers with three elements. Each container element has a boolean and a numeric. I have a equivalent array of clusters in LabVIEW. In a LabVIEW action step I use the to variant node to convert the array to a cluster and use the setvaluevariant method to set the local. But it does work.

    SequenceContext.AspropertyObejct.SetValueVariant(variant, "Locals.ArrayofContainers",0)

    Thanks,

    Sathish

    This is what I'm trying to do. See the attachments.

    Test.seq

    test.vi

  9. Hi Ppl,

    I'm reading ActiveX data from an application(TestStand) in LabVIEW. The data I get is of the type ActiveX Variant. When I use variant to data node I'm able to convert the data to the corresponding data type. Howevere in my application the data type varies dynamically and I cannot use the variant to data node.

    I will have to flatten it to string. But the flatten to string node does not work with ActiveX variants. It only works with LabVIEW variant types. So is there any way that i could convert ActiveX variant types to LabVIEW variant. I tried the to variant node too. I too does not convert it as expected.

    To throw more light on why I want the ActiveX variants to be flattened to string:

    I'm actually storing the control values of a VI in TestStand Properties(locals/file global). I use Get/SetValVariant TS API to get/set these values. So when I retrieve these values stored in the TestStand properties I actually get them as ActiveX/OLE Variants as I have mentioned. When I set the value as variant(using value property in LabVIEW) for basic data types like boolean, numeric, string these work fine. But for Arrays and clusters I actually get the reference to the container. So I'm having to get the indivdual elements of the container as variants and build this individual variants into variant cluster, so that this variant cluster can be set to the control using the value property.

     I tried using the OpenG\lvdata\lvdata.llb\Array of VData to VCluster__ogtk.vi that converts array of variant to varinat cluster. But realized it does not work with ActiveX variants as this function internally uses variant to flatten string which doesn not work with ActiveX variants.

    Thanks,

    Sathish

    Here is how both the variant types differ

    Activex variant (boolean):

    '': OLE Variant

    Variant Type -> VT_BOOLValue -> FALSE

    LabVIEW variant(boolean):

    'Boolean': boolean (TRUE or FALSE)

    FALSE

  10. Hi Ppl,

    I recently came across xnodes. There weren't much info on the xnodes since its not supported by NI. But I found few examples developed from the community. I came across the info on the LabVIEW wiki, but that isn't enough for some one new to get started in developing a xnodes. Can you guys point me to the right location where I can get some help on this topic.

    Thanks,

    Sathish

  11. Hi Ppl,

    I'm trying to call LabVIEW VI's from python using the LabVIEW ActiveX or the LabVIEW run time engine ActiveX that can be enabled in Advanced options of application builder.

    The problem that I'm facing is: I'm using the VirtualInstrument.Call() method to execute VI's and pass parameters to and from the VI"s. While using this method I'm able to pass arguments to simple controls easily ex. arrays, numerics booleans

    However when I tried to pass data to a cluster as in the attachment Data 1 in this form I'm getting 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="C:\Users\Sathish\Desktop\Calling LabVIEW VIs from Python using LVRTE\Complex Data.vi"

    #Get VI Reference

    Application._FlagAsMethod("GetVIReference")

    VirtualInstrument = Application.GetVIReference(VIPath)

    #Open VI front panel in hidden mode

    VirtualInstrument._FlagAsMethod("OpenFrontPanel")

    VirtualInstrument.OpenFrontPanel(True,3)

    #Call VI

    print ("Calling LabVIEW VI\n")

    VirtualInstrument._FlagAsMethod("Call")

    VirtualInstrument.Call(ParameterNames,Parameters)

    ...

    ...

    ...

    Error Msg:

    VirtualInstrument.Call(ParameterNames,Parameters)

    File "<COMObject <unknown>>", line 2, in Call

    com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147352571), 2)

    However the same code works for the second attachment Data 2

    What I infer is that Python is not able to differentiate a 2D array data type from a cluster having sub clusters with same number of elements, as in our example a top level cluster having two sub clusters with 3 numeric. Is there any way to solve this problem. How do I explicitly tell python that this is a cluster and not an array ?

    Thanks,

    Sathish

    post-18003-096213900 1281710241_thumb.jp

    post-18003-038523500 1281710261_thumb.jp

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.