Write teststand globals from labview

Hi all,
i just started using teststand and i am not too familiar with the program up to now.
What I want to do is, writing teststand station globals from a vi that i started asynchronously. What steps do i need to execute in teststand before starting the vi? A small example would also be great.
thanks for your help.
Walter

When using instruments in LV code modules, the code module itself presents a lock (default execution setting of LV VIs when not changed to reentrant execution).
So if the instrument is used in a single code module (which is used several times in your TS sequence(s)), there is nothing you have to worry about.
If the instrument is used in multiple (different) LV code modules (by passing its handle from module to module), you might require to include some locking.
I recommend you to provide the lock in TestStand. Use the Lock steptype in the synchronization palette to do so.
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.

Similar Messages

  • Opening TestStand Ref from LabView sometimes fails

    I'm having an intermitten problem when opening a TestStand reference from LabView.  The error explaination just says, "LabVIEW:  (Hex 0x80004005) Unspecified error."  Attached is a little vi that can reproduce the problem when set to run continuously. 
    Any idea on how to fix this?  Thanks a lot.
    Note that because of compatibility requirements I have to use TestStand 2.0 with LabView 7.1.
    Attachments:
    TS_Ex.vi ‏24 KB

    Attached is a screen shot of the error message.  This is one of at least 2 error messages.  I will get the other one when I can get time on the equipment.  Right now, I would like to get the error log (mentioned in the screen shot), but I can't find it.  Where should it be?
    Unfortunately, the equipment is being shared and I haven't received time to debug it more.  But this is what I have seen. 
    Trying to Highlight Execution with breakpoints seemed to point the vi closing the reference to TestStand as the source of the error message.  Using the Simplified TestStand Operator Interface vi that came with TestStand, and some fake tests, we did not have this error.  Only when we use our customized OI with dynamic test sequence generation do we get the error.  This error doesn't occur with LabView 6.1.  So I think it may be another incompatibility between LV 7.1 and TS 2.0.
    Thanks for your help.
    Attachments:
    Exit-Crash-1.doc ‏24 KB

  • Passing TestStand Globals to LabView parameters

    Hello All,
            We store our operator entered test info in TestStand Globals, and then pass them to LabView parameters.  Is there a way to default the Labview parameters to always have the TestStand Global name?  So we won't have to select those same globals for each test.  Thanks.

    Hey Bill,
    Thanks for clarifying.  The first option really isn't an option.  It's more of an explanation that the steps should always use the StationGlobals as parameters if when you Specify the Module you set the parameters as StationGlobals.WhateverVariable. 
    It's important to note the 4 actions of creating a step-
    1- Choose the Adapter (LabVIEW, CVI, C++ etc...)
    2- Choose the StepType (PassFail, Action, Numeric Test, String Test etc...)
    3- Specify the Module (point the step to the code you want to call)
    4- Set the step properties (preconditions, post action, expressions, run options etc...)
    In your case you would choose the LabVIEW adapter, Choose the StepType, Specify the Module to point to some LabVIEW code (I'm assuming these are prewritten), and then set some step properties.  Now the issue here is that you want TestStand to automatically assume that you want to pass StationGlobals as parameters to your step.  This is done in step 3 of the process.  However, TestStand cannot assume what to put as the parameters to a LabVIEW module because most LabVIEW modules have different inputs and outputs.  Do all your LabVIEW modules have the same inputs and outputs? 
    Option1- If you have TestStand 4.0 or later then you can use Templates.  I really like this new feature of TestStand.  It's very handy because all you do is follow the process to creating a step and then drag that step to your templates window.  Then whenever you want to place a step with the same or very similar setup just drag it from your templates onto your sequence.  This way you don't have to go through the entire process every time.  And the parameters will remain the same.
    Option 2- So for the 4 Test StepTypes (Pass/Fail, Numeric Limit, Multiple Numeric Limit and String Value) and the Action step there are something called Code Templates.  A code template is simply a skeleton piece of code that gets created when you click the create VI button in your specify module tab.  This is not new in TS 4.0 but an older feature as well.  These templates are stored here: C:\Program Files\National Instruments\TestStand 4.0\CodeTemplates\NI and are managed by the StepType properties.  I recommend copying them to your C:\Program Files\National Instruments\TestStand 4.0\CodeTemplates\User folder before editing them.  As this is the proper way to do it and you don't lose your default templates.  TS will always look in the User folder first.  If it's not there then it will go to the NI folder.  The names of the folder are pretty intuitive.  Basically you have DefaultLabVIEW.  Which is for the Action Step Type.  Or you have NumericLimitLabVIEW which is for the Numeric Limit Step Type.  Whichever type you want to change the template for then you open that folder and edit the LabVIEW skeleton code to resemble what you want with the correct inputs and outputs.  Then you save it and go into TS and go to your type palette.  No the problem I have here is that you cannot change the parameters for the default NI step types.  So you will have to copy the StepTypes and create your own.  Trust me though- you don't want to dink around with the NI defaults.  It's messier later.  So when you create your own step type you can then edit the properties by Right Click-> Edit Properties.  There should be a Code Template tab.  you can set up everything including the parameters for that code template.  So then the next time you insert a step and click the create VI button from the Specify Module tab it will automatically contain your own parameters.  In your case StationGlobals. 
    Ok so it's obvious that Option 2 is not ideal.  But if you have TS 3.5 or older then it's the only way other than copying and pasting steps.  If you want more info on Code Templates go to the TS help and read about them.  Or let me know if you have specific questions.
    Hopefully this info will help you out and please let me know if you are confused or need more info.
    Best Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How do i read the Shift register value of a vi which is written in the teststand sequence from labview exe

    Dear All..
    My Qusetion is ... I have a VI in which I can writ the data to shift register and I can read( Differenent cases). I am Running the VI in write mode to write SAY '100' in the shiftreg( VI will be In teststand Sequence) . And I am reading the VI in read mode using Labview. I am getting the data in labview.
    When i conver my Reading Vi which is having that Read/Write vi in to EXE even then the test stand is writing the data to VI is Unable to reflect in labview.
    Please Help me out with some solution.
    Thanks
    bhargav

    I'm confused by your question:
    Are you trying to transfer data from an Exe to TestStand and vice versa?
    Or are you changing existing, working VIs into EXEs and then wondering why they won't behave the same?
    Can you clarify some what your goal is?
    There may be a better way to do what you want.
    Thanks,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Running a teststand seqwunce from labview

    HI all
    I want to build a user interface in Labview to execute number of sequences in teststand.
    I already had a look at the examples shipped with TS. But in my case my UI will  be different that the default UI of teststand.
    I want user to select number of sequences(at one time from list box or tree) and then when clicked on execute button , one by one each sequence should get executed.
    For this I need provide seq file path to the invoke/property node before execution. But I am not able to find the current method/property for the same.
    Can someone please help on this?

    By this method you can do the following ( no need to change User interface code -- use the default one ) :
    1) A (Main GUI.vi) vi when executed calls a predfined master sequence to automatically open and run in TestStand.
    2) This predfined master sequence uses a vi to get sequences ( simulating user selected sequences)
    3)The sequences selected are stored in a TestStand string array and run one by one.
    4)TestStand is automatically closed in the end. ( no user intervention is required)
    Setup :
    1) Unzip the files and put it to c:\temp\LVUSER1 ( This path is hardcoded in vi and testsequences )
    2) Go to TestStand menu --> configure --> station options -> user manager and enable automatically login windows user
    3) Create a new user with windows credentials in TestStand using the user manager.( This is to avoid login popup)
    4)Enable report in TestStand if you need a report.
    Run :
    Run the MAIN GUI.vi
    Changes if required :
    1) I have copied CVI user interface from C:\Program Files (x86)\National Instruments\TestStand 4.2.1\UserInterfaces\Full-Featured ( This is because i tested this in )TS 4.2.1
    Feel free to copy any of the user interfaces that you are familiar with from the respective TestStand folder.
    2) Correct the paths if required in vi and test sequences.
    Hope this example will be helpful to you.
    Regards,
    Ravi
    Attachments:
    LVUSER1.zip ‏469 KB

  • Add limits to step settings via TestStand API from LabVIEW

    Dear LabVIEW and TestStand Community!
    I'm trying to add FileGlobal Variables as limits to TestStand step NumericLimit programmatically, via LabVIEW, via TS API. I attach screenshot of the code, which I use (part of it - the module, which only sets values to low and high limit of the step), and also I attach, what I manage to get.
    In TS, when I open sequence file, after running of the code, I can see in the description line of the test, that it accepted limits, which I set from LV - you can see it from the screenshot, it is marked with yellow. But in the Tab "Limits", there are still default numeric values, not FileGlobal Variables.
    Could anyone explain, what doest it mean, and how to set up them correctly?
    Thanks a lot in advance!
    Solved!
    Go to Solution.
    Attachments:
    Limits.PNG ‏33 KB
    Add Limits.PNG ‏15 KB

    It's kind of sequence generator what I'm doing now...
    Thank you very much for fast reply, but when I setup "UsexxxExpr" to true, it doesn't change the situation... Could you, please, check my attachment? Maybe, some mistake in syntax?
    Attachments:
    Add Limits.PNG ‏23 KB

  • How can I programatically modify a teststand sequence global in Labview ?

    Hello,
    I am automating some tasks using Labiew to modify data in a Teststand sequence file. How can I programatically modify the value of a Sequence Global from labview ?
    Thanks,
    Sam

    You have to pass in the TestStand variable RunState.ThisContext to the vi through the connector pane.  I'm not sure about the exact variable name because I don't have TestStand loaded at this time.  But  there is a variable for the sequence context in TestStand and this has to be passed to the vi.  Note that you cannot run the vi stand alone.  You must run it from TestStand in order to get the proper sequence context.
    - tbob
    Inventor of the WORM Global

  • How to read and write data from Excel to TestStand without using LabVIEW VIs

    Hi,
    How can I read in columns of data from Excel into a TestStand array and write columns of data to Excel from TestStand without using LabVIEW VIs?
    I don't think the Property Loader custom step type in TestStand will work because the data I would like to read in from Excel is in a column that is thousands of rows long and the data has to be in the proper format to use the Property Loader to load in an array from Excel.
    Thanks for your help.

    That example does not use LabVIEW and it does about 40% of what you need to do by calling Excel through ActiveX. If you don't know how to use Excel through ActiveX then you'll need to brush up on that.
    http://www.microsoft.com/en-us/download/details.aspx?id=16250
    http://support.microsoft.com/kb/141759
    http://support.microsoft.com/kb/302084
    CTA, CLA, MTFBWY

  • I would like to build I data base in teststand which collect data from labview , if you have example (sequence) that give me some way to build sequence

    I would like to build a data base in teststand which collect data from labview program , if you have example (sequence) that give me some way to build sequence that have step of action for labview and step
    data base

    There is an example in the \TestStand\Examples\Database directory. Basically there are two ways to connect to your database.
    1. You can use the TestStand database step types. There are steps for opening/closing a database connection, opening/closing an SQL statement, and a step for performing a data operation.
    2. The other way is to use the TestStand database logging capability to write your results to the database. This is the way I would recommend. With database logging, you use the step results container to record all your results as the sequence runs. (This is done automatically by TestStand). When the sequence is complete, the process model calls a "Log to Database" sequence that will write the results to the database. You must define your datab
    ase schema using Configure->Database Options. There are some default (or example) schema definitions already defined. Refer to chapter 18 of your TestStand manual.
    Another way to log the data as the sequence is running is shown in the \TestStand\Examples\OnTheFlyReports. This has the advantage of recording data as it is obtained, but it is not as efficient in terms of using a database connection. I don't recommend using this method.
    Please post again if you have any more questions. If you are using stored procedures with your database, I can probably give you some tips.
    Mark

  • How can I pass in continuous value from labview to teststand?

    Hello
    I want to run a vi using teststand. I want this vi to send values to teststand. My problem is that the value is only updated at the end of the vi execution and I want to get the value before the end of the vi execution. If somebody can help me ...
    Thanks
    Corentine 

    Corentine,
    you can think of TestStand calls to LabVIEW-VIs just like functioncalls in C/C++. The main continues running only if the subroutine is fully executed. Furthermore, LV returns values to the parameters (connector block) only at the end of the execution of the VI.
    So you cannot use "simple VI calls" in your sequence if you need datatransfer during execution from steps. If you like to do something like this, the easiest way would be to create a VI which runs continuously in the background and supplies data via mechanisms like Queues (if executed in the same instance) or TCP/IP. In the stepmodules you can retrieve the data when needed.
    hope this helps,
    Norbert B.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • I want to write a program in LabView then pass the test results to teststand to check if it pass or fail without displaying the test stand program,

    I want to write a program in LabView and create an execute but I want to be able to pass test results to test stand to find it the unit pass ar fail the test then save the data to a database. How would i go about it.

    What's confusing is your statement that you want to do this "without display the test stand program". You can minimize the TestStand UI to the task bar but if you don't want TestStand to be running, how can TestStand evaluate the result. Explain a little more please.
    In the message body of your post, you just say you want to create a LabVIEW exe and pass the results to TestStand. What I would recomend is that instead of an exe, you create a dll and use TestStand's DLL adapter to call it and return the results. TestStand will evaluate it and do the logging.

  • Write to Citadel database from LabVIEW?

    Hi. I'm a newbie when it comes to Lookout and the Citadel database... so here's my question for you all:
    We have various labview applications that log data from instruments. We would like to be able to take this data and store it as "tags" in a Citadel database.
    What do you think is the best way to do this?
    There are ODBC drivers for the Citadel database, but they appear to only allow you to query the database to retrieve values... you can't write data to the database (so its read-only).
    Are they any "Lookout VIs" or Citadel VIs that can write to the Citadel DB from LabVIEW? Or a DLL or something?
    Any ideas?
    regards,
    John Paul

    Very nice question John Paul. I take it you already have Lookout and LabVIEW. In this case, with the latest versions of either, simply use the LabVIEW datasocket to publish the items on your front panel. Lookout then can subscribe to these once you register the LabVIEW computer. Once you have subscribed to them in Lookout, you are then able to set up logging. You may need to create an expression object to route the data to citadel.
    If you just want to use LabVIEW and the Citadel database, you might try VI Logger. This works in our configuration utility - MAX, and also comes with a set of VIs for LabVIEW. One caveot, the Citadel database in VI logger is newer (and faster) than the Citadel database in Lookout. I believe NI is working to synchronize
    the version in the future, and its hard to say when. So till then, you would not be able to merge data in the dislike citadel databases. However, you can always use and ODBC call set to extract from both and store in a more permanent SQL database such as access, oracle, ms back office, etc.
    Good Luck,
    Preston Johnson
    Business Development Manager
    Industrial Applications
    National Instruments
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • How to Pass Container in a queue from LabVIEW to TestStand?

    I was succussful to pass simple type(string, number) using queue from LabVIEW to TestStand base on the example: Use TestStand Queue.seq.
    I want to pass a container variable from LabVIEW to TestStand. But there are some errors happen.
    Anyone who can help on this issue?
    Thanks in advance.
    Attachments:
    Sequnce and VI.zip ‏28 KB
    VI Error.jpg ‏61 KB
    Run_time Error -17001.jpg ‏41 KB

    You ought to have a listener somewhere that calls a function
    to then set up the loaded swf. In that function you can do this
    kind of thing:
    var ldrmc:MovieClip;
    function swfloaded (e:Event) {
    ldrmc = null;
    if (e.target.content is MovieClip) {
    ldrmc = e.target.content as MovieClip;
    If the swf was published for AS3, then ldrmc will end up
    being a pointer to the root of the swf, and you can call functions
    or set variables however you like. If it was an AS2 swf, ldrmc
    would be null.
    Inside the loaded swf you could try trace statements, to make
    sure you're looking up the hierarchy far enough. Like this:
    trace(MovieClip(parent.parent));
    If that doesn't trace MainTimeLine, then maybe you're not
    looking up far enough. Don't forget that the swf itself is in a
    loader, and so may be one level down from where you thought it was.

  • Modify TestStand Step parameters from LabVIEW in runtime

    Hi all,
    I try to change parameter values of a TestStand step in LabVIEW. When I return from the modifying vi (Learn Barcode Template), the following happens:
    1. I watch RunState.SequenceFile.Data..., I see the changed parameter
    2. I watch RunState.Sequence.Main..., which is basically the same target as mentioned above, but here the parameters are unchanged.
    3. I need the changed parameters in the Read Barcode.vi. This vi returns an error, because the parameters are unchanged.
    4. When I restart the sequence, and halt at the first step, and watch again both parameters (the sam parameters but different path), the changed values appear.
    Is there a method, which enables to refresh the changed parameters immediately? I tried for example IncChangeCount, but it just marks the sequence as changed. In the learn Barcode Template.vi I open and close the references properly.
    regards
    MB
    Attachments:
    screenshot_01.JPG ‏140 KB

    Hi,
    the parameters will be tranfered when the code module execution is finished. I don't understand what exactly you're changing inside your VI, possibly you can post the VI for getting some more information.
    When you change your parameters inside the file you're calling in the first step, it's normal that the parameter in TestStand first will be refreshed when you execute the sequence once again in my understanding.
    When you use the ActiveX API inside the LV VI and want to change values in TestStand, you can use variables. Parameters will be transfered when calling the code module or returning from the code module.
    Another point is the interactive execution, is there a special reason why you execute without a process model? Possibly there could be changes in the runstate property object also...
    regards,
    Nikolai

  • Write data on database ACCESS from labview

    Hi!
    I want to write on a table of database from labview... I have already succeeded in opening the base and the table but I don't know how write on it... I know that I must use
    with Table
    .Addnew
    Table.Fields(0)=what I want to write
    .update
    end with
    But how do it with labview ???
    Thanks in advance
    hasna
    Attachments:
    lecture_de_la_base.vi ‏35 KB

    Hi Kiki,
    I believe you have another Developer Exchange Forum open for this issue. To keep them similar, I am attaching an updated version of your VI. It is wired to read any errors which occur in the VI. I received error -2147221164. This does not help too much, because the meaning of this error depends upon the ActiveX server. You will want to run this VI yourself, see which error you get, and then consult the ActiveX Server documentation to find the meaning of the error.
    J.R. Allen
    Attachments:
    criture_de_la_base.vi ‏37 KB

Maybe you are looking for

  • Spry UI 1.7 slideshow images cascade down page in design view

    When I put in the Spry slideshow all the images go down the page in bullets.  It works fine in the browsers, so it is no problem.  But... it is SO annoying because I am trying to finish off the page and do some stuff under this slideshow but i can se

  • App-V 5 package ignores environment variable included in virtual registry

    Hey all, I'm experiencing following problem with one of my virtual packages - it keeps ignoring system environment variable included in virtual registry. During sequencing, i've added system variable on the machine, sequencer picked it up and include

  • Premium Channels

    Verizon's Premium Channel selections are horrible. I pay for all of the premium channels.. and there is not ONE movie I want to watch.. ok so HBO added avatar.. I've watched it.. now what.. nothing.. their HBO list is short, they show the same movies

  • "no such file or directory"--but file's listed with ls -al

    How do you delete a file which is listed with "ls -al" in Terminal, but when you try to 'sudo rm' it, you get "no such file or directory"? The file in question is a troublesome temporary Excel spreadsheet file--something like "~$TroublesomeFile.xlsx"

  • Want to change the sld option after installatio

    Hi,               We installed nw2004s EP7.0 SPS09.At the installation time by mistake instead of selecting local system we selcted existing system sld as we dont have any existing sld.How to change the option to local system? Thanx Naresh