Can I use RunState.ProcessModelClient.Data.Seq[0].Locals.MyVariable in batch model to set variables in a client sequence?

I have used RunState.ProcessModelClient.Data.Seq["MainSequence"].Locals.MyVariable to set Locals variables in client sequences running in a sequential model but it doesn't seem to work with the batch model. Using a breakpoint I found that RunState.ProcessModelClient.Data.Seq is a container listing all of the sequences in the client sequence with the Main Sequence being index 0.
I tried using RunState.ProcessModelClient.Data.Seq[0].Locals.MyVariable to set the variables in my client sequence and it worked fine.
My question: is this method reliable or am I doing something that might cause problems down the road?
Thanks,
Steve

A few issues from doing it this way-
1- You should try an make your process model such that it can handle almost any sequence file thrown at it.  MainSequence may not a) contain that local variable and b) be at array element 0.  Unless you do some serious error checking then using your process model elsewhere will be a problem because it will throw errors.
2- It all depends on where you are changing that variable at.  Remember with the Batch Model that you are dealing with multiple copies of your client sequence.  If you change a Locals in the process model which threads does it actually affect?
3- Locals is to be used for the sole purpose of the sequence it resides in.  Just like in text based programming where you have a function call:
MyFunc(int x, int y){
string foo;
foo is local and really shouldn't be changed outside of MyFunc.  x and y are parameters and should be how data is shared among different sequences in TestStand.  There are variables for bigger scopes as well (i.e. StationGlobals, FileGlobals). 
I recommend using either a StationGlobal or passing the data as a parameter. 
In the end you are the engineer and the flexibility that TestStand gives you makes it so you can do things however you want. 
My 2 Cents,
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~

Similar Messages

  • Why runstate.sequencefile.data.seq.mysequence.mystep.result.numeric doesent contain a measurement value when i use this in a post uut callback?

    Hello
    I want to write a csv file witch contains all measurement values and limits from my machine. So i try to give the values in post uut callback to a vi. The limits are working and the csv contains all my limit values but the measurement values are all 0. I used runstate.sequencefile.data.seq.mysequence.mystep.result.numeric
    I would not like to do it with FileGlobals because they are much values.
    Thanks for any advices for this problem.
    Solved!
    Go to Solution.

    There's probably a better way to accomplish what you want.  But to make your life easier I'll give you the hacky solution:
    Use: Runstate.ProcessModelClient.Data.Seq.MyStep.Result.Numeric
    The funny thing is the report should contain all the information you want. I would just create an engine to convert it to your csv look.  If you are using 2012 then this seems like a perfect candidate for a plugin.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • If i buy a T-mobile's unlocked, contract-free iPhone 6 in US at Apple's website, can i use it in China with a local carrier?

    if i buy a T-mobile's unlocked, contract-free iPhone 6 in US at Apple's website, can i use it in China with a local carrier?

    The Model 1586 / 1524 happens to be the one most compatible with China
    http://www.apple.com/iphone/LTE/
    If the phone is primarily for use in China - I would look to getting an unlocked version of that
    There are contradicting theories about Sprint for international use - so I would stay away from the Sprint model in the US

  • HT3224 What cable can I use to transfer data from a 2008 MacBook Pro to a new MacBook Pro with thunderbolt?

    What cable can I use to transfer data from a 2008 MacBook Pro to a new MacBook Pro with thunderbolt?

    You should also ask this in the MacBook Pro forum. This is the forum for the 13” white and black plastic MacBooks that were discontinued in 2010. You should also post this question there to increase your chances of getting an answer.
    https://discussions.apple.com/community/notebooks/macbook_pro

  • Can we use the AdventureWorks2008R2 data for the real time project.

    Hi,
    In our project we are trying to do the data scrambling on First name, last name and middle name...
    In the regular practice we use to update the names as
    First Name = FN+<PERSON_SNO>
    Last Name = LN+<PERSON_SNO>
    Middle Name = MN+<PERSON_SNO>
    The Problem is the names are not looking realistic, so I thought of applying some logic and updating our PERSON table names based on Person.Person table in adventure works.
    My question is can we use the AdventureWorks2008R2 data for the real time project. Is there any cop right issue.
    Someone please help me solve this issue.
    Thanks
    Karthikeyan Jothi.

    Please read this link content:
    Adventure Works Sample Site
    sqldevelop.wordpress.com

  • Can I use USB 3G data Modem on my iPad MINI as wifi is not Available everywhere?

    Can I use USB 3G data Modem on my iPad MINI as wifi is not Available everywhere, I have just purchased one.

    You can't connect a USB 3G dongle to an iPad, it won't be recognised. You can use an iPhone as a personal hotspot for the iPad (if you phone carrier supports it), or you can get mifi devices which act as mobile hotspots

  • I need use the line data(basle​r spl2048 camera,NI1​433 board) to perform FFT transform ,how can i use transforme​d data to construct an image

    hello everyone! as what i haved mentioned in the title.In optical coherence tomography system ,i need to perform for every line data whick accquired by NI1433,how can i use
    the transformed data tto construct an depth image .

    This is no longer my main area of expertise, but here is results of brief search:
    Spectral Domain Optical Coherence Tomography System Design: sensitivity fall-off and processing speed enhancement
    look at Chapter 5
    https://circle.ubc.ca/bitstream/id/91474/ubc_2010_​fall_chan_kenny.pdf
    Ultrahigh-resolution, high-speed, Fourier
    domain optical coherence tomography and
    methods for dispersion compensation
    http://www.opticsinfobase.org/oe/abstract.cfm?uri=​OE-12-11-2404
    hope this helps,
    Curt
    Curt Corum, Ph.D.
    Center for Magnetic Resonance Research
    University of Minnesota

  • TS4079 Can I use the cellular data from my I phone 4 to get directions from Siri

    Since I have Siri on my iPad when the location device is turned on, can I use my cellular data from my iPhone 4 to use Siri for driving directions?

    I think you can.
    I did it when I bought my iPhone 3Gs. If you have a copy of your iPod it should work.
    Greetz

  • Can I use JDeveloper for Data mining

    Can I use JDeveloper for Data mining, instead of using stand-alone data miner.
    Secondly, if I can, do we require to create another schema and run all the required scripts for data miner or it is not necessary.
    Thanks in advance.

    ODM 9i provided a JDeveloper Pluggin called DM4J. In ODM 10g, this was replaced by the standalone Oracle Data Miner GUI. In 10g, you can use the API in JDeveloper, but there is no support via wizards or viewers.
    However, models that you create via the API through JDeveloper could be used in Oracle Data Miner for testing, scoring, and model detail viewing.

  • Use Members on Data Form is unvalid if the Run on Save setting is not on

    Hi, I found a problem of the setting Use Members on Data Form is unvalid if the Run on Save setting is not on. It will just get the default value of the variables but not the form members, I don't know whether it is a bug or a normal behavior. Does anyone have experience to fix it or avoid it? Thanks.

    Hi,
    If you are running your rule simply double clicking on the name of it at the botom left corner, that's the normal behaviour I would expect.
    However, instead of running it that way, if you create a menu, attach the rue to a menu item, add the menu to your form and then run it by right clicking on your form, it will pass all selected form members to your variables.
    Cheers,
    Alp

  • Upgrade IOS 7.1 -- Can't use / open 3G / Data

    When I upgrade IOS7.1 -- I can't use / open Data / 3G??
    WHY????

    Try here:
    Find your AppleId: http://support.apple.com/kb/HT5625?viewlocale=en_US&locale=en_US
    You can get your appleID password reset at iforgot.apple.com,

  • How can i use exisitng user data(Id, password) for user mapping

    Hi All,
    For User mapping , we can import user mapping data for many users from user administration. and for each user
    we can maintain mapping data in the standard format.
    eg:
    [User]
    uid=user2
    $usermapping$:BCE:user=ext_user2
    $usermapping$:BCE:mappedpassword=password
    i am clear till this point.
    this all works if we know the userid and passowrd on the system 'BCE'.the passwords on the system 'BCE', are encrypted . so there is no chance for me to know the passwords.
    so how can i use the existed userid/passowrd on the system 'BCE' for the mapped user and mapped password on the portal while doing usermapping.
    Thanks in Advance,
    Lakshmi

    Hi,
    I think this should work.
    1. Setup SSO with SAP logon tickets first. How to do this is described many places, e.g. http://help.sap.com/saphelp_nw04/helpdata/en/d3/41c8ecb31d11d5993800508b6b8b11/content.htm
    This SSO will not work at first, because the username is different in the back-end system. So what you need to do is to get the back-end username into the ticket (don't need a password because that is done by the SAP logon ticket)
    2. Create a portal component which uses the usermanagement API to create a usermapping which only consists of the username and a blank password. You can do this manually I think if you have no reference system defined.
    IUserMappingService umap =(IUserMappingService)PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);
    //this is the currently logged in user. You might another user
    IUserContext user = request.getUser();
    //Get the existing data (think it can be null)
    IUserMappingData userMapping=umap.getMappingData(systemAlias, user);
    HashMap map = new HashMap();
                             map.put(IUserMappingService.UMAP_KEY_USER, backEndUserName);
    //add blank password               map.put(IUserMappingService.UMAP_KEY_PASSWORD, "");
    //store the values                    userMapping.storeLogonData(map);
    Voila, this should allow you to do SSO using SAP logon tickets, but with another name that you use against the portal. I am uncertain if this will work if you have multiple usermappings in the sap logon ticket
    PS since the sap logon ticket is issued at logon time, you need to relogon to get the changes done by the code
    Regards
    Dagfinn

  • Whether PXI can be used for Event data logging in an electrical Substation ?

    Whether the NI PXI system can be used for recording digital event data with 1 ms accuracy ?Whether its DI boards support onboard timestamping ? Whether PXI can be synchronized with time pulses from a GPS receiver ?

    Yes indeed, there is a digital event recorder example in developer zone, search for "digital time interval" on NI developer zone, or follow this link: http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3DCA356A4E034080020E74861&p_node=DZ52336&p_submitted=N&p_rank=&p_answer=&p_source=External
    In addition, we have done additional work to create a template for the LabVIEW FPGA, http://sine.ni.com/apps/we/nioc.vp?cid=11829〈=US
    which has 96 digital I/O lines as well as 8 analog in. With the NI-7831R you are able to combine analog and digital events in the electrical substation.
    Further, using PXI, we can synchronize with a GPS time stamp such as IRIG-B, and perform these functions all in a headless - real-time OS LabVIEW.
    I woul
    d be happy to discuss your application in more detail and offer a complete solution, or a recipe to create the solution yourself.
    Thanks for the question,
    Preston Johnson
    Business Development Manager - Industrial Applications
    National Instruments
    512-683-5444
    [email protected]
    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

  • Can we use the test data dictionery saved for a FM for any other FM

    Hi experts,
    i want to use the test data dictionary which i have maintained for a FM. now i want to use the same data for another FM.
    Can i use that saved dictionary. if yes then how.
    Points are sure.....
    Thanks
    Ashish

    Amit,
    Yes i can, but this fm is calling from some another  applications (front end) and that is a big scenario. and that will be really vary time consuming so i want to do in this way.
    If this is not possible then the last way i have to opt is to do excercise again .
    Thanks

  • Can I use a usb data cable from a classic ipod with my 3rd generation iTouch?

    I can't find the usb data cable for my 3rd generation iTouch but I have an old cable from my old ipod classic. It appears to be similar but is it electrically identical for syncing and charging or not?

    If it looks the same it should be OK. Some older iPods used Firewire so it the cable has an extra connector (more that the dock connector at one end and a USB connector on the other end) do not use it.

Maybe you are looking for