How many ways to read and write a local variable in a called VI?

Ciao!
I'm producing my first TestStand sequence. It is called "FirstAttempt" and it is made by a single step which calls a VI. One of the first dilemmas i encountered realizing this sequence is how to read and write a local variable (created going in Variables -> Locals ('FirstAttempt') -> <right click to insert local>) in the called VI.
The first way (the only one i tried) is to create a control and an indicator on the VI front panel, connect them to their respective terminals in the connector pane and then specify (going in Step Settings -> Module) that these connectors (shown in the Parameter Name column) are linked to the local variable (selected in the Value column).
The second way (not tried) consists in using TestStand API: create a Sequence Context reference on the VI front panel, link it to a property node in the block diagram, select the property "Locals" and extract from this the local variable name and value which, i think, can be readable and writable.
So...
Are the shown ways correct?
Are there other ways?
Knowing that a "local" variable can be considered "global" within the whole sequence, is there the possibility to simply create a reference to the local variable and use the reference in the called VI block diagram in order to save space in the connector pane (if using method 1) or in the block diagram (if using method 2)?
Thanks!
Message Edited by aRCo on 09-17-2009 05:09 AM

Hi,
Before TestStand 3 you would use the second way you quoted as its the only way.
But now you would use the first way you quoted. You may still what to pass the SequenceContext if you were going to use the TestStand API. For TestStand 3.x and above you would use this way as the first chose. (Personnelly, I would not pass the SequenceContext into a VI if I know it was never going to be used in that VI.)
Not sure I understand your final comment, maybe you are liking it to passing the reference of a control to a subVI so that the control can be updated from within the subVI.
If this is the case and you had a situation where you had a step that was running in parallel with the rest of the steps in the sequence either as a separate thread or execution and were dependent on the contents of the  local variable changing from that parallel running step, then you would have to use the API SetVal method to change the local.
Hope this is clear.
Regards
Ray Farmer
Regards
Ray Farmer

Similar Messages

  • Fast way to read and write console

    hi guys
    what's the fastest way to read and write from console?
    For writing I'm using (I think thats the fastest way)
    System.out.println(foo)and I have to read the following - all numbers are ints (that means m + n + 1 lines):
    1 * "<n> <m>"
    n * "<a> <b> <c>"
    m * "<a> <b>"Actual I'm reading (the second line for example) with
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] items = br.readLine().split("[^\\-\\.0-9]+");
    Target mainTarget = new Target(Integer.parseInt(items[0]), Integer.parseInt(items[1]), Integer.parseInt(items[2]));
    for (int i = 1; i < m; i++) {
        items = br.readLine().split("[^\\-\\.0-9]+");
        mainTarget.addTarget(Integer.parseInt(items[0]), Integer.parseInt(items[1]), Integer.parseInt(items[2]));
    } But that isn't really fast...
    have you any idea?
    grz faetzminator

    faetzminator wrote:
    right, I have 1 + 1 + 1 =3 up to 10^6-1 + 10^6-1 + 1 =2*10^6-1 input lines with max 4999997 integers (and I have to store 2999999 of them)
    ok, if that is the fastest way... (maybe the reading of the input file is so slow; I run eg "java Foo < input > output")All those br.readLine calls where you never check if the return is null are dangerous.
    I really don't understand what you are doing. You mentioned System.in at first and now reading from files.
    I also am pretty sure that you are in fact running out of memory.

  • How to increase disk read and write speed after installing new SSD (2009 Macbook Pro)? Why not as fast as advertised?

    Hi everyone,
    I just installed a Crucial MX10512 GB SSD into my 2009 Macbook Pro. It's definitely much faster, but the read and write disk speed is around 200 Mb/s for both versus the 300-500 Mb/s that the SSD advertised. Any ideas as to why? And is there anything I can do to make it faster? Before I installed it, it was between 80-90 Mb/s.
    Specs:
    - currently have about 460 of 511 GB of storage available
    - am using 2GB of memory
    - running on 10.10.2 Yosemite
    Thanks!

    nataliemint wrote:
    Drew, forgive me for being so computer-incompetent but how would I boot from another OS? And shouldn't I be checking the read speeds on my current OS (Yosemite) anyways because I want to know how the SSD is performing on the OS I use? And finally, what kind of resources would it be using that would be slowing down my SSD?
    Sorry for all the questions - I'm not a Macbook wiz by any means!
    You could make a clone of your internal OS onto an external disk. Hopefully you already have a backup of some form
    A clone is a full copy, so you can boot from it. It makes a good backup as well as being useful to test things like this.
    Carbon Copy Cloner will make one or you can use Disk Utility to 'restore' your OS from the internal disk to an external one.
    Ideally the external disk is a fast disk with a fast 'interface' like Thunderbolt, Firewire 800 or USB3. USB2 can work, but it is slow & may effect the test.
    You connect the clone, hold alt at startup & select the external disk in the 'boot manager'. When the Mac is finished booting run the speed tester.
    Maybe this one…
    https://itunes.apple.com/gb/app/blackmagic-disk-speed-test/id425264550
    Test the internal & compare to the previous tests
    A running OS will do the following on it's boot disk…
    Write/ read cache files from running apps
    Write/ read memory to disk if memory is running low
    Index new files if content is changing or being updated
    Copy files for backing up (Time Machine or any other scheduled tasks)
    Networking can also trigger read/ write on the disk too.
    You may not have much activity that effects a disk speed test, but you can't really be sure unless that disk is not being used for other tasks.
    Disk testing is an art & science in itself, see this if you want to get an idea …
    http://macperformanceguide.com/topics/topic-Storage.html
    Simply knowing that it's about twice the speed would be enough to cheer me up

  • How do I make Read and Write 10 Gold work with Firefox? I have the latest Firefox 10.0.1 but it keeps saying "Please upgrade your version of Mozilla Firefox. The minimum version supported by Read&Write is version 3.0."

    I just loaded Moxilla Firefox on my Windows 7 PC today and tried to use my Read and Write 10 Gold text help software but it just does not seem to work with this browser (works fine on Internet Explorer) as it keeps saying "Please upgrade your version of Mozilla Firefox.
    The minimum version supported by Read&Write is version 3.0." but this versions is higher than 3.0!

    We have a solution available for anyone needing to run Firefox 10 with Read&Write v10 Gold, please email us directly for this temporary resolution- [email protected]

  • How well does mac read and write with FAT32

    Hi there,
    I have heard that an external hard drive formatted in FAT32 from a windows machine will work with a mac. Is it a seemless read and write while using an application. i have both a pc and a mac and want both to use the same harddrive.
    Thanks,
    WayneAdams

    Hi,
    as brianking said, you won't be able to boot from it, but for an external drive fat32 works like a charm. I share three 250 GB external drives with my colleagues at work and we only once had a problem of destroyed FAT which might have been caused by the Mac, but was never examined since it did not happen again.
    volker

  • Best way for read and write?

    Hello
    I'm working on project with labview .
    with this program i connecting PC to the MCU through sreial RTU modbus .
    in this program there are some data need to be read and some data need to write .
    what i need is most of my time reading polet exuted exept when some of  control element (like edit box) has changed by user .
    when ever some thing changed by user write polet excuted .
    now what is the best way to do this ?
    Best Regards.
    Solved!
    Go to Solution.

    mori64 wrote:
    What uou said sound complicated to me .
    i'm trying to undrestand your solution .
    i'll be happy if you upload sample program .
    State Machine
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Reading and Writting to sharedd variable is so slow

    I am using shred vairable to make a connection between 2 VI's. when writting to the variable at a VI, it take much time(5 seconds) in order to respon to the value chane in the second VI.
    I am using LabVIEW 8.6
    my operating system is WINDOWS VISTA, PREMUIM EDITION
    my processor is Dual CORE 2.0
    Solved!
    Go to Solution.

    Hello,
    i am using binary shared variables. network-published. on the same computer. (PXI 8106 controller)
    But I am more intersted in a project that I have attached in this message.
    Description of the project: I have made double shared variable and ebnabled alarming (HI). I have also made 2 VI's in one i have changed tha value of the shared varaible and in the other I have made an event structure to respond to the alram (HI).
    The problem is : the 2 VI's ran with out errors, but the second VI doesnt responded to the alarm when I have wrote the alarm value to the shared variable in the first VI.
    Another Question regarding shared variables :
    when I bind a shared variable to an Digital Input  channel, does the change of the input provokes a change in the value of the shared variable during the run time of the VI or it just takes tha last value before the VI run and any new change will not considered.
    Another Questions regarding event-driven programing:
    I would like to make an event to respond to a change in a digital Input channel. How I can do that.
    best Regards!   
    Attachments:
    Untitled 1.vi ‏8 KB
    Untitled Library 1.lvlib ‏4 KB
    Untitled Library 1.lvlib ‏4 KB

  • Fastest way to read and write to/from muliple DAQ channels

    I'm developing an application in which multiple DAQ channels will be monitored, for example, displacement, load, strain, temperature and so on. My question is what is the fastest and most efficent way to check the value of these inputs, compare them to user inputs and then decide whether or not to write a different voltage to an output. I'm using LV 7.1 on Win 2000.

    I guess my first question would be are all these channels going to be on one card? Are you going to just make single measurements (are you interested in instantaneous values vs. "waveforms")? Doing a "Sample channels" for instance will make a single measurement of several channels (on the same board) and present you with an array of the resulting data, one element per channel. How fast do you need to sample, are all of the signals going to be on the same board? The latest NI-Daq allows configuring tasks that mix channel types (T'couples, straight voltage measurements, etc.) which makes configuring the DAQ easier.
    If you can give us a little more information regarding what you are trying to accomplish it will help.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • How Can I get read and write permission for NTFS formatted external Hard Drive?

    How can I use my external formatted disk on MAC with full permissions?

    Install software such as Paragon NTFS on the computer.
    (63161)

  • File read and write operations

    how do use file read and write operations?
    can anyone give simple program?

    http://www.tutorialspoint.com/cplusplus/cpp_files_streams.htm
    http://www.cplusplus.com/doc/tutorial/files/
    check this
    and with mfc
    http://www.functionx.com/visualc/fileprocessing/serialization.htm
    https://msdn.microsoft.com/en-us/library/6337eske.aspx
    http://www.informit.com/library/content.aspx?b=Visual_C_PlusPlus&seqNum=90

  • Read and Write Permissions in Dreamweaver CS3

    I have searhed the web endlessly for what seems like a simple question? How do you set read and write permissions for an upload folder in dreamweaver cs3?
    I finally came accross one forum which described.
    You go to the files panel and change the drop down menu from "Local View" to "Remote View".
    Then you select the upload folder you created and right click on it.
    A pop up menu appears and you select "set permissions"
    This is where I am ok to. My defualt permissions are set to 666. Does anyone know the number to set it to if i would like visitors to my site to be able tp upload files?
    ps I am using windows vista and dreamweaver cs3.

    My defualt permissions are set to 666. Does anyone know the number to set it to if i would like visitors to my site to be able tp upload files?
    Try 775 first, but you will probably need to use 777, which is the least secure set of permissions. Normally, if you want to allow people to upload to your website, you should create a login system and allow only registered users to upload to a folder that has permissions set to such a weak level. Otherwise, you could lay yourself open to all sorts of abuse.

  • I have over 1200 songs in my iTunes library that have always synced fine, I have added a new album to my list from one of my CD's, synced to add it to my library but less that 100 songs are now on my device and no matter how many ways I try its not worked

    I have over 1200 songs in my iTunes library that have always synced fine, I have added a new album to my list from one of my CD's, synced to add it to my library but less that 100 songs are now showing on my device and no matter how many ways I try its not able to show any more.
    Does anyone know why this is happening and how to rectify the situation as I have tried every help setting for the last 4 hours.

    I have tried everything I have read on the Internet about sync issues and restore etc and not there isn't a single song on my iPad or iPod touch. All of the songs are listed in my iTunes but are all greyed out, some have the cloud symbol next to them but lots don't and some say waiting.
    Long and short is nothing will save to my devices at all.....HELP !!!!!!!?

  • How to read and write a string into a txt.file

    Hi, I am now using BEA Workshop for Weblogic Platform version10. I am using J2EE is my programming language. The problem I encounter is as the above title; how to read and write a string into a txt.file with a specific root directory? Do you have any sample codes to reference?
    I hope someone can answer my question as soon as possible
    Thank you very much.

    Accessing the file system directly from a web app is a bad idea for several reasons. See http://weblogs.java.net/blog/simongbrown/archive/2003/10/file_access_in.html for a great discussion of the topic.
    On Weblogic there seems to be two ways to access files. First, use a File T3 connector from the console. Second, use java.net.URL with the file: protocol. The T3File object has been deprecated and suggests:
    Deprecated in WebLogic Server 6.1. Use java.net.URL.openConnection() instead.
    Edited by: m0smith on Mar 12, 2008 5:18 PM

  • How to read and write data from json file from windows phone7 app

    Hi
    I am developing wp7 app for the use of students my questions are
    How can i write a code to read and write the json/text file for the wp7.
    I am using windows 7 OS, VS 2010 Edition.
    This is my code below:
    xaml:
    <Grid>
                        <TextBlock Height="45" HorizontalAlignment="Left" Margin="7,18,0,550" Name="textBlock1" Text="Full
    Name: " />
                        <TextBox Width="350" Height="70" HorizontalAlignment="Left" Margin="108,1,0,0" Name="txtName"
    Text="Enter your full name" VerticalAlignment="Top" />
                        <TextBlock Height="45" HorizontalAlignment="Left" Margin="6,75,0,0" Name="textBlock2" Text="Contact
    No: " VerticalAlignment="Top" />
                        <TextBox Width="350" Height="70" HorizontalAlignment="Left" Margin="108,61,0,480" Name="txtContact"
    Text="Enter your contact number" MaxLength="10" />
                        <Button Content="Register" Height="72" HorizontalAlignment="Left" Margin="10,330,0,0" Name="btnRegister"
    VerticalAlignment="Top" Width="190" Click="btnRegister_Click" />
                    </Grid>
    xaml.cs:
    private void btnRegister_Click(object sender, RoutedEventArgs e)
                string name, contact;
                name = txtName.Text;
                contact = txtContact.Text;
                try
                    if (name != "" && contact != "")
                        string msg = name + " " + contact;
                        MessageBox.Show(msg);
                        Student stud = new Student
                            Name= name,
                            Contact = contact,
                        string jsonString = JsonConvert.SerializeObject(stud);
                        MessageBox.Show(jsonString);
                    else
                        MessageBox.Show("Input Proper Information", MessageBoxButton.OK);
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
    I have download NewtonSoft.json version 5.0.8.
    So, I am able to convert input data into json format, but how can I able to write and read this data from a json/text file.
    How can I do?
    Thank you in adv and please, reply soon.

    We don't have many samples left for Windows Phone 7 + Azure, the closest one to what you want to do is probably:
    Using Local Storage with OData on Windows Phone To Reduce Network Bandwidth
    this sample uses the local database feature: 'LINQ to SQL', available to Windows Phone 7.1 and 8.0 Silverlight applications, instead of simple file storage but even if you choose to stick with simple file storage I believe you should be able to adapt the
    networking related portions of the sample to your particular application.
    Eric Fleck, Windows Store and Windows Phone Developer Support. If you would like to provide feedback or suggestions for future improvements to the Windows Phone SDK please go to http://wpdev.uservoice.com/ where you can post your suggestions and/or cast
    your votes for existing suggestions.

  • How to read and write a data from extrenal file

    Hi..
    How to read and write a data from extrenal file using Pl/sql?
    Is it possible from Dyanamic Sql or any other way?
    Reagards
    Raju

    utl_file
    Re: How to Create text(dat) file.
    Message was edited by:
    jeneesh

Maybe you are looking for