How To Read/Modify/Write Array?

Ive got a bunch of switches, where each switch represents a bit in a
word...
So from each switch, in the control panel, it goes throu a boolean to
integer vi, and then to a x*2^n vi.
I then set a constant for each n.. so that if the switch is true (x=1
after the conversion) and n = 5 for that switch,
then the output will be 1 * 2^5.
Finally, I add all 16 outputs together (x*2^0 to x*2^15) to create a
word.. I actually have so many switches
that I have a couple of words (each made up with the above scheme)!
So far, this works fine, however, my question is, I would like to have
a global array that contains these words. I
dont want to insert this word into the array, but rather, I'd like to
sort of latch the values...
If in the array's word, the n bit was already one (i.e. that switch at
one point was on), then I dont want to reset it
to 0, even though the switch is off now.
This probably sounds confusing, I know I am confused just reading that
back, anyhoot, if I could make a global
array (ten 16-bit unsigned words), that I can read any word from,
modify it and set it back to its same place,
that would be great!

Hi Anonoymous
Here's one quick example that does what you want, it functions like a function global and relies on boolean logic.
For your own experience I challenge you how to reset just one bit or word.
Also you have to connect the connector pane.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!
Attachments:
quickbitregister.vi ‏20 KB

Similar Messages

  • How to Read and write array data into notepad or lvm?

    Hello,
    I am new to Labview and i wanted to use it in my project where i get accelerometer values X,Y and Z serially into a notepad and then displaying those values in Labview as a 3D plot or graph.The problem i am facing is the use of Cover to dynamic data express VI and how to save the array in a notepad or a lvm file.i was testing a basic block of building x and y values separately.was successful in plotting it to  graph but dont know how to save those values in a file.Can some1 please help me out in his ??
    Solved!
    Go to Solution.
    Attachments:
    Capture.PNG ‏22 KB

    Thank you for looking into this. Since I was converting into dynamic data before writing it I thought you have to convert it after reading but then I got stuck as to whether build the array again so as to display it in the graph. Dennis I did what you said and the graph on reading is a bit funny just started today and I am kinda skipping the long tutorial due to shortage of time. sorry
    Attachments:
    Capture.PNG ‏32 KB
    Capture2.PNG ‏59 KB

  • 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

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

  • 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

  • How to read and write to file on server

    can any body tell how to read or write to a file on server, like where do i keep the file and what does the path look like......on server
    stand alone i am reading and writing into file but when it comes to server i am confused how it works...i mean the path
    thank you

    The Path needs to be absolute:
    For example in Unix it would look like:
    /usr/paz/Test.txtIn Windows it would look like:
    C:/Paz/Test.txtHope this helps.
    Thanks and regards,
    Pazhanikanthan. P

  • How to Read and Write .XML datas   (HELP Plz...)

    hai everybody
    how to read and write xml datas... plz give clean and simple example..
    bcoz me want to produce such type of module...
    if any one help me .. thats the only way me laid in software ladder
    plz....
    thank u in advance

    thank u for giving idiot..
    but before posting i search in google also..
    but i cant get what me expect..
    thus i posted...
    then who is ................?
    sorry javacoder01
    // plz help me
    Message was edited by:
    drvijayy2k2

  • How to read and write on ntfs partitions??

    Hello everyone, thanks for viewing my post.  I want to know how to read and write on ntfs partitions under sata hd on my arch64 system.  I'm using kde as my de and dolphin does sees it but can't access it anyway.  I didn't had problem so far on mounting usb drives it just automounts maybe because it is a fat partition not a ntfs?  Please I need your help...Thanks in advance:)

    You will most likely need to rework your fstab.  The one from my desktop is shown below. If you want regular users to be able to access the partition, then you will need to change the gid option as I have done. Although you could create a group just for people you want to have access.
    You will need to know the device that your windows partition is held on of course. In my case it is my first hard disk, first partition, hence /dev/sda1.
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    /dev/cdrom /media/cdrom auto ro,user,noauto,unhide 0 0
    /dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
    /dev/mapper/nvidia_fbgfhehd1 /boot ext2 defaults 0 1
    /dev/mapper/nvidia_fbgfhehd2 / reiserfs defaults 0 1
    /dev/mapper/nvidia_fbgfhehd3 /var reiserfs defaults 0 1
    /dev/mapper/nvidia_fbgfhehd5 /opt reiserfs defaults 0 1
    /dev/mapper/nvidia_fbgfhehd6 swap swap defaults 0 0
    /dev/mapper/nvidia_fbgfhehd7 /home reiserfs defaults 0 1
    /dev/sdd1 /mnt/andromeda vfat defaults 0 0
    /dev/sda1 /mnt/windows ntfs-3g defaults,user,gid=users 0 0
    My XP partition is set to mount automatically, as I regularly interchange documents between the OS's.
    Hope that helps.

  • How to read and write data in to a specified range of cells(it include multiple row & columns) in excel

    How to read and write data in to a specified range of cells(it include multiple row & columns) in excel

    CVI Comes with a sample project that explains how to read/write to a Excel file: choose "Explore examples..." in CVI welcome page and navigate to <cviSampleDir>\activex\excel folder where you can load excel2000dem.prj.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to read and write(a file .txt) from a URLConnection

    I try to read and write on one URLConnection. Is it possible ? How can i make it ?
    The reading part of my application work's but not the writting part
    That's a part of rhe code that i use to write :
    String Line = "Hi";
    MyUrl = new URL(this.getCodeBase(), FichierEvenement) ;
    Con = MyUrl.openConnection() ;
    Con.setDoOutput(true);
    Con.setDoInput(true);
    Con.setUseCaches(false);
    Dos = new DataOutputStream(new BufferedOutputStream(Con.getOutputStream( )));
    Dos.writeUTF(Line);
    Please help me :)

    What are you doing with the bytes written to the OutputStream? This info would help, but i do have a suggestion. I ran into this problem when trying to write strings using writeUTF. The output was all screwed up. So, maybe change your string to a character array. That way Unicode is displayed properly. This in conjunction with writing to an .html file instead of to the connection itself might work.

  • 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 do I modify an Array into a collection

    Hi I'm havin a real hard time modifying an Array into a collection, heres the code I'm working with
    I have to modify all the Arrays of this code....
    public class Student {
         private String           name;
         private float []      grades;
         private int           finalGrade;
         public Student(String name) {
              this.name      = name;
              this.grades = new float[5];
              for (int i = 0; i < grades.length; i ++) {
                   grades[i] = 0.0f;
              finalGrade = 0;
         public String toString() {
              String studentInfo = " Grades for " + name + ": ";
         for (int i = 0; i < grades.length; i ++)
         studentInfo += " " + grades;
         studentInfo += "\n final grade: " + getFinalGrade();
         return studentInfo;
         private void setFinalGrade() {
              float temp = 0.0f;
              for(int i = 0; i < grades.length; i++)
                   temp += grades[i];
              finalGrade = Math.round(temp/grades.length);
         public int getFinalGrade() {
              this.setFinalGrade();
              return finalGrade;
         public void setGrade( int index, float grade) {
              this.grades[index] = grade;
         public float[] getGrades() {
              return grades;
         public String getName() {
              return name;

    I'm kind of new at this I just started to learn about
    that, is there an example u could give me to inspire
    me ?
    Object[] o = new String[]{"one", "two", "five"};
    Collection ascollection = Arrays.asList(o);
    //the returned Collection (List) is unmodifiable,
    //so if we want to remove or add items, we need
    //a copy:
    Collection copy = new ArrayList(ascollection);
    copy.remove("two");
    String[] backagain = (String[]) copy.toArray(new String[copy.size()]);

  • How to read or write cookies within Applets?

    To make a session between an Applet and a Servlets I want to read and write cookies with an Applet.
    Does anyone know if an Applet is allowed to read and write cookies? And how to make it?

    All you have to do is type cookies in the search box and click search and you'll find topics such as the one posted below:
    http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/cookie_support.html
    V.V.

  • How to read and write Unicode text with MS Access?

    Hi all, I'm new to Java, so please forgive me if my question is too ... ^_^
    I'm writing a small program that read and write data with MS Access. However, when I insert Unicode text into the database, it has wrong encoding like this "h?y l? n?m".
    Please tell me how to fix this.
    Thanks in advance!

    The following forum thread might be enlightening:
    http://forum.java.sun.com/thread.jspa?threadID=573855&messageID=2870785
    I myself do not use MS Access, but a PreparedStatement is in general the best option.
    You can set parameters in the SQL which then get converted and even protected against SQL injection hacking.

  • Full memory control: how to read and write memory on any address?

    I am programming in Visual Basic Express a long time, and now i want something more. I need to read and write bytes in memory on any possible address, and also to get a handle or first byte's addres of any declared object(Integer, String, Bitmap, ...) and
    to declare an object to some memory addres. Does anybody know some API function (function that copies blocks of memory from one to another place and gives an address of an object) or any other way to do this, and if knows please write an example code that
    CAN be used and it's VALID in Visual Basic 2010 Express or Visual Studio 2013 Express or similar .net basic tools.
    Thanks

    Hello Donaastor,
    the OS might prevent you from writing/reading to "any possible address" because you could read others memory which is not allowed. You will get a security Exception :)
    But of course you can read/write every part of "your" memory. Than you should use Joel's answer.
    © 2015 Thomas Roskop
    Germany // Deutschland

Maybe you are looking for

  • KIN One m won't receive mms messages

    My KIN ONEm won't receive mms messages, I've had the problem once or twice before and every time it's happened it shows this error message "someone sent you a message but it can't be retrieved right now" with the error code "3-4003" it's fixed itself

  • Upgrade from 11.1.2.1 to 11.1.2.3

    Hi,    We are planning to upgrade from 11.1.2.1 to 11.1.2.3. What are best practices that we can follow to upgrade. As we all know that there is no client for HFM.Ours is classic HFM application. Can we upgrade classic to classic to classic? or do we

  • What are the best ear-bud headphones under $50?

    I’m going to Europe for about a year and (of course) taking my iPod with me. The problem is, Apple’s ear-buds that come with the iPod get pretty uncomfortable after about an hour. I’m looking for a pair of ear-buds headphones that are good quality, p

  • Battery drains very fast after Mountain lion upgrade

    After I upgraded the OS from Lion to Mountain Lion battery drains very fast in my MacBook Pro 13" (Mid 2010). Drains approxymately 1% every minute. I am now on 10.8.2 Any solutions? Any Help?

  • Annoying baloon pops up after text selection

    I often read longer internet text in a way to select/higlight small portions of text (it is much easier for eyes). After updating on firefox 24.2.0, selecting any text makes small baloon pops up on end of selection, and cover some words... Baloon has