How to save input and output in file

hi ni
i have program that has some input and some output
i try to save the input and output in file word office or excel like this
error
extended
ideal
value
wq
wp
value
xq
xp
0.857143
0.7
0.6
2
0.5
1
1
thank in advace 
best regards
m.s
lab view  2011
hi ?Q>
Solved!
Go to Solution.
Attachments:
adder in exteded stochastic.vi ‏37 KB

johnsold wrote:
Read from and Write to Spreadsheet File VIs should do what you want.
I did not take the time to try to decipher what your program is doing, but I think you could replace all those feedback nodes and Build Arrays with an integer data type and the Rotate function from the Numeric >> Data Manipulation palette.  You will still need one shift regsiter or rfeedback node for each of the four signals.
You have duplicated code: Divide by 65535, multiply by 2, and subtact 1 followed by a > comparison.  Make that a subVI and place 4 instances on your block diagram.
Those simple changes will make you diagram understandable, reduce its size to the size of a postcard, and make any future changes easier.
Lynn
thank
hi ?Q>

Similar Messages

  • How to control (the input and output) EXE file after I call it using exec?

    Hi,
    I knew that I can use runtime.exec() to call one EXE file, and this works. But this EXE has two characteristics:
    1. After this exe starts, it asks user to input number such as 1 or 2 onto computer screen, then press return. Then the exe will start the calculation.
    2. after it starts calculation, it prints 3 columns of numbers onto the screen.
    My two questions are:
    1. How to use java to input the number such as 1 or 2 automatically? this EXE can not work like this in DOS command line:
    C:> file.exe parameter
    The parameter is the number such as 1 or 2 that I wanna input.
    2. how to redirect the 3 columns of numbers from computer screen to txt file?
    My colleague can solve these two questions using Mathematica. So I know that definitely there is at least one solution for it. I just can not do it using Java. This wierd exe file bothered me a lot and I really wish that I can get help from someone in java community.
    Thank you!
    Tony

    When you call Runtime.exec, you get a Process object. (I presume something similar happens when you use ProcessBuilder.) Process has methods with names getOutput, getInput, and getError. These correspond to the standard input, standard output, and standard error streams of the spawned process.
    You can read and write to the process on the streams corresponding to input and output that the process writes to the console.
    [add]
    In fact, you should be grabbing and reading the output/error streams anyway, because of the points raised by the Traps article. Google "Java Runtime exec traps" and you'll probably get a link to this JavaWorld article, which describes common Runtime.exec problems and how to solve them.
    Edited by: paulcw on Jun 15, 2010 4:09 PM

  • How to temporally match/save Input and Output Channels's data?

    Hello, I have a voltage-input, voltage-output SISO system, and need to indentify its dynamic response (or transfer function) as a reference to a PID control. Without using the system identification toolbox, my goal is to generate/provide a sine sweep input (ranging 1Hz-5kHz for 10sec) to the system and to save the corresponding output response signal as well as the sweep input signal simultaneously.
    I got a sample program online and am trying to modify it as attached, but I really need your advices/comments concerning several problems I am facing with:
    1) With the below setting, the number of the acquired Input channel samples obtained is 5461, which is smaller than expected (i.e., 10000). What would I be missing in setting parameters?
    - H/W: NI-USB-6341 DAQ
    - AO: continuous samples with the waveform timing (1k sampling, 10000 samples => 10 sec, slower sampling just for testing purpose)
    - AI: continuous samples, samples to read: 30k, rate: 1k
    2) I am using flat sequence structure as a way to making the start point of saving AI and AO data same, but wonders if this is a right method or if there is other better approaches. (I had an idea of using an internal clock with "1-sample mode" for sync, but this may not work at the high speed sine sweep like 5kHz, right?)
    3) I just want to provide the sine sweep just once to the system and do not require the "reset" functionality implemented in the original sample program. I failed to remove this "reset" part as I did not fully understand the sample code. If I run the attahed, the generated AO signal is periodically provided to the system. Please give me any advice to modify the program as I want.
    Thanks for your help and valualble time.
    Attachments:
    siso.vi ‏230 KB

    Hi J. Kim,
    To begin, you say you want to synchronize your analog input and output so that they start at the exact same time, yes? To achieve tight synchronization, you need to use DAQmx VIs instead of the DAQ Assistant. There's a good overview of DAQmx VIs  here. There's also a document that deals specifically with synchronization in DAQmx here. Additionally, if you go to Help>>Find Examples in the LabVIEW example finder, you can see many other examples of acquiring data using DAQmx.
    As for your configuration, you have your analog input DAQ assistant wired far before your analog output DAQ assistant in your sequence strucutre, so the dataflow of the program will cause the analog input DAQ Assistant to execute before the output. They cannot be in different sequences if they are executing simoultaneously, and I would not use flat sequences here except to start the two tasks in DAQmx. Where did you find this example?
    Best,
    Dan N
    Applications Engineer
    National Instruments 

  • How to get input and output using math interface toolkit

    Hi,
    I am fairly new to labview and i am trying to convert my labview code
    into matlab mex files using math interface toolkit. I cant see any
    input or output terminals when i try to convert the code to mex files
    even though my vi has plenty of inputs and outputs that should be
    available during conversion.
    just to cross  check i made another vi in which i inputted an
    array of data to an fft and outputted it to an array again. i tried to
    convert this code to mex files but was still not able to see any input
    or output terminals, which makes me believe that i must be doing
    something wrong at the very basic level and inspite of trying really
    hard for some days now i have not been able to figure out that might be.
    So please help.
    I am attaching the basic vi that i created along with the link that i followed for converting labview code to mex files.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/EEFA8F98491D04C586256E490002F100
    I am using labview 7.1
    Thanks
    Attachments:
    test.vi ‏17 KB

    Yes, you've made a very basic mistake. You have front panel controls and indicators but none of them are connected to the VI's connector pane. right click on the VI's icon and select "Show Connector". You use the wiring tool to select a connection there and then select a control or indicator. Use the on-line help and look up the topic "connector panes". There are some sub-topics on how to assign, confirm, delete, etc.

  • SQL PLUS log input and output to file

    What is the way to log every activity in sqlplus, input and output to a file (interactively).
    I managed to do it using rlwrap and tee but the only problem is, it is displaying the password and logging it into file as well :D. I can remove it from the logfile but am unable to prevent from showing the password.
    I hope many might have wanted to do this, and some might have been succeeded. Please share your ideas!

    N:\tools>sqlplus siva
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 19 03:12:04 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password: password
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining optionsThe password is displayed on screen and it is in the log file as well.
    Here is the some environmental setup;
    I've installed cygwin with rlwrap package
    I've renamed the original sqlplus.exe to _sqlplus.exe
    I've placed mysqlplus.bat and sqlplus.bat in N:\tools and this location includes in the pathwhere sqlplus.bat contains
    @echo off
    rlwrap -a"Enter" mysqlplus.bat %*perhaps this is more related to linux commands but I want to log input and output of sqlplus!
    :)

  • Different input and output xml files [encoding]

    Welcome. I write a little code that connect to ftp server, log in, than search an input xml file. That file is input for BufferedReader. This data are writing to local file. Im from poland and i wish use polish fonts and that fonts are broken in this output file (input is ok, it's write in editor that support utf-8 encodding)
    Code of my program:
    http://www.piotrkow.net.pl/~loko/xml_java/java_pyt.html
    Input file:
    http://www.piotrkow.net.pl/~loko/xml_java/agreeting[input].xml
    Output file (totaly broken):
    http://www.piotrkow.net.pl/~loko/xml_java/agreeting[output].xml
    How do I fix this? Please help.
    PS: Documentation used ftp libraries:
    http://jvftp.sourceforge.net/docs/api/

    Problem has been solved :)
    --> http://www.piotrkow.net.pl/~loko/xml_java/java_solved.html

  • Input and output to file

    Hi all java programmers:
    I've few questions about java
    1. I have complex number class(a+bi, f+di), how can I send those numbers in file("file1.txt")
    2. how can I read those numbers again from (file1.txt)file
    If anyone can help me, i'd appreciate..

    There is no "stock" class for this - it is being considered - but there are a number of 3rd party existing classes and approaches to writing one yourself. See this search list:
    http://www.google.com/search?num=100&hl=en&lr=lang_en&ie=ISO-8859-1&q=java+%22complex+number%22

  • How to save input from a text file in to array

    I got this assignment, and almost have no clue, and my teacher doesn't even teaches us anything
    This is what i am suppose to do
    5. The program must store the following data about each student in this Talent Show:
    * The student's name (store as a String)
    * The student's average time score [only for the events they competed in] (store as a Double)
    Note: Some of the data comes directly from the text file, and some of the data must be calculated from the data that is read from the file.
    6. The program must search through all of the student's scores to find the student who has the minumum average time of all students.
    7. You must calculate how many events each student played. Zero values are not counted.
    8. You must then generate a report on the screen that prints out
    * the total number of students in the competition,
    * the winning student's ...
    o name
    o times
    o average time (rounded to one decimal places)
    Sample output
    btw this is the data file
    Bart Simpson
    7.5
    12.3
    7.8
    19.2
    9.9
    5.3
    8.5
    11.8
    2.2
    4.6
    Stewie Griffin
    9.5
    29.7
    7.8
    22.5
    9.9
    12.6
    8.5
    0
    8.2
    0
    Pinky
    2.5
    0
    1.8
    0
    3.9
    0
    6.5
    0
    5.2
    12.1
    Rocky N Bullwinkle
    10.0
    22.2
    9.5
    17.5
    9.9
    1.5
    8.7
    23.7
    9.2
    11.0
    Angelica Pickles
    5.5
    11.1
    6.8
    12.2
    7.9
    13.3
    8.1
    5.1
    7.2
    7.9
    Pink Panther
    8.5
    5.5
    8.8
    6.6
    8.9
    7.7
    9.9
    8.8
    2.2
    9.9
    Josie
    9.5
    0
    8.8
    12.2
    9.9
    0
    8.5
    0
    9.2
    5.3
    Rogue
    8.5
    1.1
    7.8
    2.2
    7.9
    3.3
    7.5
    4.4
    8.2
    5.5
    Usagi Tsukino
    8.5
    15.5
    8.8
    30.1
    9.9
    19.7
    9.5
    11.0
    8.2
    8.6
    Yosemite Sam
    0
    15.2
    0
    29.5
    3.9
    0
    0
    16.0
    0
    7.7
    My code so far
    import java.io.*;
    public class test
        public static void main (String [] args)
            FileInputStream File1;
            DataInputStream In;
            String fileInput = "";
            try
               File1 = new FileInputStream ("data.txt");
                In = new DataInputStream (File1);
                while (In.available () > 0)
                    fileInput = In.readLine ();
                    System.out.println (fileInput);
                In.close ();
            catch (FileNotFoundException e)
                System.out.println ("Error - this file does not exist");
            catch (IOException e)
                System.out.println ("error=" + e.toString ());
    }My question, how do i save the data in to an array, and how do i seperatly save names in to different array, and their scores in to different arrays
    bte he said you can use scanner class
    Thanks
    Edited by: supahsain08 on Mar 26, 2008 2:55 PM

    supahsain08 wrote:
    Well, you are not in my class and you don't even know my teacher
    who are you to judge meHe is jaded by our experiences here. 99% of posters who complain that the teacher doesn't teach have adequate (note that I didn't say good) teachers, but it's the student who is failing to take responsibility for his own education. It is after all your responsibility and complaining won't help you any.
    Good luck.

  • Input and Output to file in an applet

    Is it possible to read and write data from and to a txt file when running an applet so that some initial data can be used in the applet program? Can I do the same thing as in applications? Where I just use FileInputStream/InputStreamReader classes and the FileOutputStream/OutputStreamWriter classes. Thanks.

    The answer is yes... and no. An applet can't (by default) access the host's operating system or file system. This is part of the built in security of the Java language. There are cases, though, where an applet can get access to the filesystem and that is through signed applets. To create a signed applet, just JAR your sourcecode into a *.jar file and use the jarsigner utility to generate a certificate for your jar file (and applet). I'm not completely up to date on what is and isn't allowed in signed applets, but a good place to find out is:
    http://java.sun.com/docs/books/tutorial/applet/problems/index.html

  • How to change the input and output schema in BPEL process

    hi',
    Please tell me how to change the input and output schema in BPEL process after the process is made.
    thanks
    Yatan

    If your intention is just changing the content you are passing to bpel/returning from bpel
    Here is another way
    just update your default created xsd files with new elements, update wsdl elements in message definition and chnage bpel code to reflect new elements in activities
    Regards,
    Praveen

  • Wrong input and output files path?

    When i tried to run my code i got wrong path of input and output files, why it was and where is the mistake? I did not meant the path \tmp\xorout.txt and C:\jar\org\joone\samples\engine\xor\xor.txt in the source code - where are they from? :
    * XOR.java
    * Sample class to demostrate the use of the Joone's core engine
    * see the Developer Guide for more details
    * JOONE - Java Object Oriented Neural Engine
    * http://joone.sourceforge.net
    package org.joone.samples.engine.xor;
    import java.io.File;
    import org.joone.engine.*;
    import org.joone.engine.learning.*;
    import org.joone.io.*;
    import org.joone.net.NeuralNet;
    public class XOR implements NeuralNetListener {
    /** Creates new XOR */
    public XOR() {
    * @param args the command line arguments
    public static void main() {
    XOR xor = new XOR();
    xor.Go();
    public void Go() {
    * Firts, creates the three Layers
    LinearLayer input = new LinearLayer();
    SigmoidLayer hidden = new SigmoidLayer();
    SigmoidLayer output = new SigmoidLayer();
    input.setLayerName("input");
    hidden.setLayerName("hidden");
    output.setLayerName("output");
    /* sets their dimensions */
    input.setRows(2);
    hidden.setRows(3);
    output.setRows(1);
    * Now create the two Synapses
    FullSynapse synapse_IH = new FullSynapse(); /* input -> hidden conn. */
    FullSynapse synapse_HO = new FullSynapse(); /* hidden -> output conn. */
    synapse_IH.setName("IH");
    synapse_HO.setName("HO");
    * Connect the input layer whit the hidden layer
    input.addOutputSynapse(synapse_IH);
    hidden.addInputSynapse(synapse_IH);
    * Connect the hidden layer whit the output layer
    hidden.addOutputSynapse(synapse_HO);
    output.addInputSynapse(synapse_HO);
    FileInputSynapse inputStream = new FileInputSynapse();
    /* The first two columns contain the input values */
    inputStream.setAdvancedColumnSelector("1,2");
    /* This is the file that contains the input data */
    inputStream.setInputFile(new File("c:\\xor.txt"));
    input.addInputSynapse(inputStream);
    TeachingSynapse trainer = new TeachingSynapse();
    /* Setting of the file containing the desired responses,
    provided by a FileInputSynapse */
    FileInputSynapse samples = new FileInputSynapse();
    samples.setInputFile(new File("c:\\xor.txt"));
    /* The output values are on the third column of the file */
    samples.setAdvancedColumnSelector("3");
    trainer.setDesired(samples);
    /* Creates the error output file */
    FileOutputSynapse error = new FileOutputSynapse();
    error.setFileName("c:\\xorout.txt");
    //error.setBuffered(false);
    trainer.addResultSynapse(error);
    /* Connects the Teacher to the last layer of the net */
    output.addOutputSynapse(trainer);
    NeuralNet nnet = new NeuralNet();
    nnet.addLayer(input, NeuralNet.INPUT_LAYER);
    nnet.addLayer(hidden, NeuralNet.HIDDEN_LAYER);
    nnet.addLayer(output, NeuralNet.OUTPUT_LAYER);
    nnet.setTeacher(trainer);
              FileOutputSynapse results = new FileOutputSynapse();
    results.setFileName("c:\\results.txt");
    output.addOutputSynapse(results);
    // Gets the Monitor object and set the learning parameters
    Monitor monitor = nnet.getMonitor();
    monitor.setLearningRate(0.8);
    monitor.setMomentum(0.3);
    /* The application registers itself as monitor's listener
    * so it can receive the notifications of termination from
    * the net.
    monitor.addNeuralNetListener(this);
    monitor.setTrainingPatterns(4); /* # of rows (patterns) contained in the input file */
    monitor.setTotCicles(2000); /* How many times the net must be trained on the input patterns */
    monitor.setLearning(true); /* The net must be trained */
    nnet.go(); /* The net starts the training job */
    public void netStopped(NeuralNetEvent e) {
    System.out.println("Training finished");
    public void cicleTerminated(NeuralNetEvent e) {
    public void netStarted(NeuralNetEvent e) {
    System.out.println("Training...");
    public void errorChanged(NeuralNetEvent e) {
    Monitor mon = (Monitor)e.getSource();
    /* We want print the results every 200 cycles */
    if (mon.getCurrentCicle() % 200 == 0)
    System.out.println(mon.getCurrentCicle() + " epochs remaining - RMSE = " + mon.getGlobalError());
    public void netStoppedError(NeuralNetEvent e,String error) {
    ERROR:
    C:\jar>java -cp joone-engine.jar org.joone.samples.engine.xor.XOR C:\\xor.txt C:
    \\xorout.txt
    [main] [ERROR] - org.joone.io.FileOutputSynapse - IOException in Synapse 6. Mess
    age is : \tmp\xorout.txt (The system cannot find the path specified)
    Training...
    [Thread-0] [WARN] - org.joone.io.FileInputSynapse - IOException in Synapse 3. Me
    ssage is : C:\jar\org\joone\samples\engine\xor\xor.txt (The system cannot find t
    he path specified)
    [Thread-0] [WARN] - org.joone.io.FileInputSynapse - IOException in Synapse 3. Me
    ssage is : C:\jar\org\joone\samples\engine\xor\xor.txt (The system cannot find t
    he path specified)
    java.lang.NullPointerException
    at org.joone.io.StreamInputSynapse.getStream(StreamInputSynapse.java:176
    at org.joone.io.StreamInputSynapse.readAll(StreamInputSynapse.java:288)
    at org.joone.io.StreamInputSynapse.fwdGet(StreamInputSynapse.java:106)
    at org.joone.engine.Layer.fireFwdGet(Layer.java:212)
    at org.joone.engine.Layer.fwdRun(Layer.java:1225)
    at org.joone.net.NeuralNet.stepForward(NeuralNet.java:1015)
    at org.joone.net.NeuralNet.fastRun(NeuralNet.java:970)
    at org.joone.net.NeuralNet.fastRun(NeuralNet.java:937)
    at org.joone.net.NeuralNet$1.run(NeuralNet.java:890)
    at java.lang.Thread.run(Thread.java:534)

    c:xor.txt
    c:/xor.txt
    i think c:xor stands for somthing else like a virtual drive but ima not sure

  • 3.1 Input and Output File Repositories

    I am having an issue with setting the input and output file repositories in 3.1.
    When I go into the CMC under servers and select them I go to the bottom of the properties and change the File Store Directory location.
    Once I do that there is a second box that says Current: %DefaultInputFRSDir% and a note in Red that I must restart the server for settings to take effect.
    I have restarted all the BO services and restarted the physical server and yet the note remains and the setting doesn't appear to take effect.
    Does anyone know what I am doing wrong?
    Also, our repositories are on a file server, and in XI R2 we changed the services in Windows to run as a user account that had access to them. How do you do that in this version?

    Got it.
    Changed the ID used to run the SIA and everything is working now.

  • How can I use a different driver for audio input and output?

    I did a search of course, and came up with something about an aggregate. I have no idea what this is, how to do it, or if it would even work for me.
    What I am trying to do is:
    1) Record into Logic Express using my Tascam US-122.
    2) Have playback come out of my computer sound system, not the Tascam.
    If I go over to the Audio setup window, I can only record when the driver is set to Tascam US-122. Likewise, I can only listen to sound when my Built-In Audio is selected. It gets rather annoying going between the two.
    So, would this aggregate thing solve my problem? If so, how do I do it? Thanks for any help!
    -allen

    Yes it should do what you want.
    Go to "Audio Midi Setup", and go to the Audio menu and click "Open Aggregate Device Editor". The interface is pretty simple but if you do get stuck, just use the help function in Audio Midi Setup, as it has a step by step guide.
    Then when you return to logic, go to the Preferences>Audio>Drivers section and select Aggregate Device as the new driver rather than either the built in sound or the tascam. Then the inputs and outputs will apply to BOTH devices.

  • SSIS: How to use one Variable as Input and Output Parameter in an Execute SQL Task

    Hello,
    i need your help,I'm working on this issue since yesterday and have no idea how to deal with it.
    As I already said in the tilte i want to start a stored procedure via a Execute SQL Task which has around 15 prameters. 10 of these should be used as input AND output value.
    As an example:
    i have three  Variable:
    var1    int        2
    var2    int     100
    var3    int     200
    the stroed procedure:
       sp_test
          @var1 int
          @var2 int output
          @var3 int output
       AS
       BEGIN
            SET @var2 = @var2 * @var1
            SET @var3 = @var3 + @var1
       END
    So in the Execute SQL Task i call the Stored Procedure as follwos:
        Exec sp_test  @var1 = ?, @var2 = ? output, @var3 = ? output
    (I use an OLE DB Connection)
    The parameter mapping is as follows:
    User::Var1        input                   numeric              0                 -1
    User::Var2        input/output         numeric              1                 -1
    User::Var3        input/output         numeric              2                 -1
    Now my problem. If i set  Var2 and Var3 as Input parameter the values are still the same after running the package. If i set them to a output value the are both Null because the procedure doesnt get any values.
    I already tried to list them a second time - like
        User::Var2        input                  numeric              1                 -1
        User::Var2        output                 numeric              1                 -1
    or i use a new variable
        User::Var2                  input                  numeric              1                 -1
        User::Var2Return        output                 numeric              1                 -1
    but i alwas get the error
    "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
    Has anybody an idea how I can solve this problem?
    Thanks a lot.
    Kind Regards,
    Alice

    Hi Alain,
    thx for your answer.
    I have around 15 procedures called one after the other to calculated and modify my values. Each procedure is responsible for an other but overlapping set of variables. So i thought it would be a good idea to call them one after the other with the needed variables via a execute sql task.
    So if i use a result set, how i get my stored procedure to return 10 values? I would have to use a Function instead of a procedure, wouldn't i?
    As if i have 15 procedures this would be a lot of work.
    But thanks a lot for the idea. I think an other idea would be to create one function which calls all stored procedures and returns all the calculated values as a result set, wouldn't it?.
    Kind Regards.
    Alice

  • How to use a bluetooth cellphone for audio input and output

    Hello, I was wondering how to set-up my Mac Book so that I can use my bluetooth cellphone for audio in and audio out. Ideally, I would like to use my handset for talking on iChat and Skype. Has anyone had any luck doing this? When I bond my cellphone these optiosn do not appear. I know that this is easy to do on a Windows machine but I am not sure about how to do it on my Mac Book.
    Thanks!

    Yes it should do what you want.
    Go to "Audio Midi Setup", and go to the Audio menu and click "Open Aggregate Device Editor". The interface is pretty simple but if you do get stuck, just use the help function in Audio Midi Setup, as it has a step by step guide.
    Then when you return to logic, go to the Preferences>Audio>Drivers section and select Aggregate Device as the new driver rather than either the built in sound or the tascam. Then the inputs and outputs will apply to BOTH devices.

Maybe you are looking for

  • ITunes isn't moving the music to the right folder.

    I direct it to D:\Music and it creates and puts it in D:\Music\Music, if I put it in D:\ it will put the music in D:\. It won't do D:\Music. Anyone know the issue?

  • Urgh...wrong album cover art...how do I take it off

    I have?a Zen Vision M, 30gb, and I have a problem removing unwanted cover art. I suppose it's not that big of a deal in the grand scheme of things...the songs play, and they're where their supposed to be. But I find this HELLA annoying !!! Since I've

  • TREX does not index all documents fro document class SOLARGNSRC

    Hi all, I've setup a connection between a TREX server (which is also used by a portal system) and Solution Manager. I've gone through the settings in SAP Note 750623 and I was able to create a index, the queue and even bypass the basic authentication

  • Multiple record insertion

    Hi I already raised this question longtime back but i havenot recieved any replies. following is the query. In my aaplication i want to insert an approximate of 20000 records for a single transaction. Is there any special method to insert this record

  • How to sync iPad and iphone4

    How to sync iPad with iPhone 4