Promblem about inheritance and saving data

I have Product class (super class) and Kitchen class (sub class). When I want to create a Kitchen object and write it to a *.txt file. However the error occurs: "java.lang.NullPointerException". What is going wrong? Please help. Thanks
Product class
public Product(int aProductID, String aProductName, String aOriginalCountry,
                    double aWeight, double aPrice, String aProductCategory,
                    String aInputDate, String aExpiryDate, double aVatPrice,
                    String aManufacturerName, String aManufacturerAddress,
                    String aWarranty)
    productID = aProductID;
    productName = aProductName;
    originalCountry = aOriginalCountry;
    weight = aWeight;
    price = aPrice;
    productCategory = aProductCategory;
    inputDate = aInputDate;
    expiryDate = aExpiryDate;
    vatPrice = aVatPrice;
    manufacturerName = aManufacturerName;
    manufacturerAddress = aManufacturerAddress;
    warranty = aWarranty;
  }Kitchen class
public Kitchen(int aProductID, String aProductName, String aOriginalCountry,
                     double aWeight,
                     double aPrice, String aProductCategory,
                     String aInputDate, String aExpiryDate, double aVatPrice,
                     String aManufacturerName, String aManufacturerAddress,
                     String aWarranty)
   super(aProductID, aProductName, aOriginalCountry, aWeight, aPrice,
           aProductCategory, aInputDate, aExpiryDate, aVatPrice,
         aManufacturerName, aManufacturerAddress, aWarranty);
}The method that write the method to text file
public void writeInfo()
    try{
      PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter
      ("C:\\Documents and Settings\\Charles\\My Documents\\Kitchen.txt", true)));
      out.println();
      out.write(Integer.toString(productID));
      out.write("  ");
      out.write(productName);
      // More data to write...
      out.flush();
      out.close();
     catch(IOException ex)
        ex.printStackTrace();
}

This is the Product Class
package supermarket;
import java.io.*;
import javax.swing.*;
public class Product {
  // Declare variables
  protected int productID;
  protected String productName;
  protected String originalCountry;
  protected double weight;
  protected double price;
  protected String productCategory;
  protected String inputDate;
  protected String expiryDate;
  protected double vatPrice;
  protected String manufacturerName;
  protected String manufacturerAddress;
  protected String warranty;
  protected double originalPrice;
  protected double calculatedVATPrice;
  public Product() {
    productID = 0;
    productName = "";
    originalCountry = "";
    weight = 0.0;
    price = 0.0;
    vatPrice = 0.0;
    manufacturerName = "";
    manufacturerAddress = "";
    warranty = "YES";
  public Product(int aProductID, String aProductName, String aOriginalCountry,
                       double aWeight, double aPrice, String aProductCategory,
                       String aInputDate, String aExpiryDate, double aVatPrice,
                       String aManufacturerName, String aManufacturerAddress,
                       String aWarranty)
    productID = aProductID;
    productName = aProductName;
    originalCountry = aOriginalCountry;
    weight = aWeight;
    price = aPrice;
    productCategory = aProductCategory;
    inputDate = aInputDate;
    expiryDate = aExpiryDate;
    vatPrice = aVatPrice;
    manufacturerName = aManufacturerName;
    manufacturerAddress = aManufacturerAddress;
    warranty = aWarranty;
  public void writeInfo()
    try{
    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter
    ("C:\\Documents and Settings\\Charles\\My Documents\\testing.txt", true)));
    out.println();
    out.write(Integer.toString(productID));
    out.write("  ");
    out.write(productName);
    out.write("  ");
    out.write(originalCountry);
    out.write("  ");
   // and more data to save...
    out.flush();
    out.close();
    catch(IOException ex)
     ex.printStackTrace();
public void displayInfo(JLabel D1)
    try
      BufferedReader in = new BufferedReader(new FileReader
      ("C:\\Documents and Settings\\Charles\\My Documents\\testing.txt"));
      String fromAll = in.readLine();
      D1.setText(fromAll);
    catch(IOException ex)
    ex.printStackTrace();
}This is the Kitchen class
package supermarket;
import supermarket.Product;
import java.io.*;
import javax.swing.*;
public class Kitchen extends Product{
      private int productID;
      private String productName;
      private String originalCountry;
      private double weight;
      private double price;
      private String productCategory;
      private String inputDate;
      private String expiryDate;
      private double vatPrice;
      private String manufacturerName;
      private String manufacturerAddress;
      private String warranty;
      private double originalPrice;
      private double calculatedVATPrice;
     public Kitchen() {
     super();
  // The constructor is not working......
  public Kitchen(int aProductID, String aProductName, String aOriginalCountry,
                      double aWeight, double aPrice, String aProductCategory,
                     String aInputDate, String aExpiryDate, double aVatPrice,
                     String aManufacturerName, String aManufacturerAddress, String aWarranty)
   super(aProductID, aProductName, aOriginalCountry, aWeight, aPrice,
            aProductCategory, aInputDate, aExpiryDate, aVatPrice,
            aManufacturerName, aManufacturerAddress, aWarranty);
public void writeInfo()
    try{
      PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter
     ("C:\\Documents and Settings\\Charles\\My Documents\\Kitchen.txt", true)));
      out.println();
      out.write(Integer.toString(productID));
      out.write("  ");
      out.write(productName);
      out.write("  ");
      out.write(originalCountry);
      // and more data to save...
      out.flush();
      out.close();
catch(IOException ex)
  ex.printStackTrace();
public void displayInfo(JLabel E1)
   try
     BufferedReader in = new BufferedReader(new FileReader
    ("C:\\Documents and Settings\\Charles\\My Documents\\Kitchen.txt"));
     String fromAll = in.readLine();
     E1.setText(fromAll);
   catch(IOException ex)
     ex.printStackTrace();
}Is this look better? Please help. Thanks

Similar Messages

  • How should we be going about creating and saving and/ or exporting our ODC files using Excel 2013 for use in Project Server 2013 Online?

    Hi I need your guidance on how I should go about setting up my Excel 2013 reports so that others in our Project Online 2013 environment can access and updates these reports of mine.
    My questions are as follows:
    I presume I need to create and save my ODC files in a PWA > Data Connections folder.  I have English and French users in our environment.  Do I need save them twice?  Once in the French and again in the English Data Connections folder?
     Likewise for the Excel file? 
    How should I go about creating my ODC files within Excel?  By default, the ODC files are being created on my PC's > My Documents > My Data Sources folder.  I presume I need to get them saved or exported to the PWA > Data Connections
    folder. So, How should I be going about creating and saving and/ or exporting the ODC files???
    FYI...My oData Feeds that I wish to use and join in this particular Excel file are as follows:
    https://cascades.sharepoint.com/sites/pwa/_api/projectdata/AssignmentTimephasedData01T00:00:00'
    https://cascades.sharepoint.com/sites/pwa/_api/projectdata/Projects()?$select=ProjectId,ProjectName,CAS_Classification,CAS_PCO,CAS_IT_Department,CAS_Program,CAS_SubProgram
    https://cascades.sharepoint.com/sites/pwa/_api/projectdata/TimeSet()?select=TimeByDay,TimeDayOfTheWeek$filter=TimeByDay ge datetime'2014-10-19T00:00:00'
    https://cascades.sharepoint.com/sites/pwa/_api/projectdata/Resources()?$select=ResourceId,ResourceName,Programs,Supplier,Source,Role,CostType
    Thanks in advance,
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

    Thank you Guilaume.  May I ask you to help clarify a bit more for me?  If I have to do it for both languages (the reports and ODC files), do I simply copy the same ODC files from e.g., the English to French folder in PWA (Odc files)?  Or does
    that defeat the purpose?  Or, do I need to create a new set of oData Feed Connection files with a French version of Excel 2013 and save them to the French Data Connections folder in PWA?  Do I need to have a French version of Excel 2013 to create
    French ODC files and ultimately French based reports and/ or vice versa?
    I did notice that the following oData metadata command from within a browser produces different results (ie., English versus French metadata returned) depending on who runs it (i.e., French or English user, etc).  As you can see I am a bit confused.
     Any help you can provide would be greatly appreciated.
    https://XXXXX.sharepoint.com/sites/pwa/_api/projectdata/$metadata
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

  • Question about iphone apps and saved data.

    So let's say I'm playing a game from the app store on my iphone and I beat it. Now I want to buy a new game but I don't have enough space to keep them both on my phone. So I delete the old one from my phone knowing it will still be on my mac. Then I play the new game and beat it and I start wanting to play that old game again. So I put the old one back on my phone and I lost everything I did before. Why? Is there a way I can take an app off my iphone without losing all the saved data?

    Here's how it works (from page 179 of the iPhone iOS4 User Guide).  You can delete apps you install from the App Store. If you delete an app, data associated with the app is no longer available to iPhone, unless you reinstall the app and restore its data from a backup.
    You can reinstall an app and restore its data as long as you backed up iPhone with iTunes on your computer. (If you try to delete an app that hasn’t been backed up to your computer, an alert appears.) To retrieve the app data, you must restore iPhone from a backup containing the data.
    To restore from a backup, see page 257 of the iPhone iOS4 User Guide

  • I have a acrobat reader, can I import text delimited data format to a PDF Form so that it can auto fill into forms that was created? If not, what about FDF and XML data

    I have a acrobat reader, can I import text delimited data format to a PDF Form so that it can auto fill into forms that was created? If not, what about FDF and XML data

    Yes, you can do all of that via Tools - Forms - More Form Options - Import Data, if you have Acrobat.
    If you only have the free Reader then you can still do it, but it requires a script.

  • From hdd to ssd: what about os and all data?

    Hello everybody.
    I know there are a lot of discussion about it and i read lots of them,
    But maybe because english is not my first language, i have some problems in understanding the right things to do.
    Also, i am pretty new with mac world as i just have my mb pro since last november.
    so i hope you can help me with easy words, thanks.
    here's the list of what i have:
    - MacBook Pro 2.5ghz, 4gb ram, 500gb hdd
    - os x mavericks (installed 2 days ago)
    - all my documents/photos/music in my MB Pro
    ... and:
    - crucial ssd 480gb
    - an external hd enclosure usb 3.0
    - the 17 in 1 tool kit
    What do i have to do first?
    And how will i transfer/install the os x from hd to ssd? or it "remains" somewhiere in my MB Pro?
    I know there is a link from crucial with the procedure for removing hd and installing ssd, is this all i have to do?
    Really hope you can help me... thanks in advance!
    F.

    Follow these steps:
    Make certain that you have your data backed up as a precaution.
    Attach the SSD to the MBP and open Disk Utility>Erase.  Format the SSD to Mac OS Extended (Journaled).
    Open Disk Utility>Restore and in the 'Source' field drag the internal HDD from the left hand column.
    In the 'Destination' field, drag the SSD from the left hand column.
    Click on the 'Restore' button.
    Depending upon the amount of data, this process may take a couple of hours.
    When finished, restart your MBP holding doen the OPTION key.  The display should show the internal HDD and the external SSD (yellow in color).  Click on the SSD and if it boots the MBP, the clone has been successful.
    Perform the physical swap.  Your MBP should be ready to go.  All of your data will be on the SSD exactly as it was on the HDD.
    Ciao.
    Message was edited by: OGELTHORPE

  • Different values beetween front page and saved data

    Hello,
    I have problems to saved data correctly. I acquire data with Labview 6.0 and a counter/timer card. These data appear on my front page. But when I save them in a table file, their format is modified, rounded.
    For exemple: on my front page values are 20.675 , 21.012 and in my saved file these values are 20.750 and 21.000, even if I checked all the numbers format in the diagram, and declare them in extended precision.
    Where is my mistake ?
    Thank you for your help

    Hello shadok,
    that's strange :-)
    Try this simple example. If this works, then something with your data is wrong...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Test_Save.vi ‏12 KB

  • A question about inheritance and overwriting

    Hello,
    My question is a bit complicated, so let's first explain the situation with a little pseudo code:
    class A {...}
    class B extends A{...}
    class C extends B {...}
    class D extends C {...}
    class E extends B {...}
    class F {
      ArrayList objects; // contains only objects of classes A to E
      void updateObjects() {
        for(int i = 0; i < objects.size(); i++)
          A object = (A) objects.get(i); // A as superclass
         update(A);
      void update(A object) { ... }
      void update(B object) { ... }
      void update(D object) { ... }
    }My question now:
    For all objects in the objects list the update(? object) method is called. Is it now called with parameter class A each time because the object was casted to A before, or is Java looking for the best fitting routine depending on the objects real class?
    Regards,
    Kai

    Why extends is evil
    Improve your code by replacing concrete base classes with interfaces
    Summary
    Most good designers avoid implementation inheritance (the extends relationship) like the plague. As much as 80 percent of your code should be written entirely in terms of interfaces, not concrete base classes. The Gang of Four Design Patterns book, in fact, is largely about how to replace implementation inheritance with interface inheritance. This article describes why designers have such odd beliefs. (2,300 words; August 1, 2003)
    By Allen Holub
    http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html
    Reveal the magic behind subtype polymorphism
    Behold polymorphism from a type-oriented point of view
    http://www.javaworld.com/javaworld/jw-04-2001/jw-0413-polymorph_p.html
    Summary
    Java developers all too often associate the term polymorphism with an object's ability to magically execute correct method behavior at appropriate points in a program. That behavior is usually associated with overriding inherited class method implementations. However, a careful examination of polymorphism demystifies the magic and reveals that polymorphic behavior is best understood in terms of type, rather than as dependent on overriding implementation inheritance. That understanding allows developers to fully take advantage of polymorphism. (3,600 words) By Wm. Paul Rogers
    multiple inheritance and interfaces
    http://www.javaworld.com/javaqa/2002-07/02-qa-0719-multinheritance.html
    http://java.sun.com/docs/books/tutorial/java/interpack/interfaceDef.html
    http://www.artima.com/intv/abcs.html
    http://www.artima.com/designtechniques/interfaces.html
    http://www.javaworld.com/javaqa/2001-03/02-qa-0323-diamond_p.html
    http://csis.pace.edu/~bergin/patterns/multipleinheritance.html
    http://www.cs.rice.edu/~cork/teachjava/2002/notes/current/node48.html
    http://www.cyberdyne-object-sys.com/oofaq2/DynInh.htm
    http://www.gotw.ca/gotw/037.htm
    http://www.javajunkies.org/index.pl?lastnode_id=2826&node_id=2842
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=001588
    http://pbl.cc.gatech.edu/cs170/75
    Downcasting and run-time
    http://www.codeguru.com/java/tij/tij0083.shtml
    type identification
    Since you lose the specific type information via an upcast (moving up the inheritance hierarchy), it makes sense that to retrieve the type information ? that is, to move back down the inheritance hierarchy ? you use a downcast. However, you know an upcast is always safe; the base class cannot have a bigger interface than the derived class, therefore every message you send through the base class interface is guaranteed to be accepted. But with a downcast, you don?t really know that a shape (for example) is actually a circle. It could instead be a triangle or square or some other type.
    To solve this problem there must be some way to guarantee that a downcast is correct, so you won?t accidentally cast to the wrong type and then send a message that the object can?t accept. This would be quite unsafe.
    In some languages (like C++) you must perform a special operation in order to get a type-safe downcast, but in Java every cast is checked! So even though it looks like you?re just performing an ordinary parenthesized cast, at run time this cast is checked to ensure that it is in fact the type you think it is. If it isn?t, you get a ClassCastException. This act of checking types at run time is called run-time type identification (RTTI). The following example demonstrates the behavior of RTTI:
    //: RTTI.java
    // Downcasting & Run-Time Type
    // Identification (RTTI)
    import java.util.*;
    class Useful {
    public void f() {}
    public void g() {}
    class MoreUseful extends Useful {
    public void f() {}
    public void g() {}
    public void u() {}
    public void v() {}
    public void w() {}
    public class RTTI {
    public static void main(String[] args) {
    Useful[] x = {
    new Useful(),
    new MoreUseful()
    x[0].f();
    x[1].g();
    // Compile-time: method not found in Useful:
    //! x[1].u();
    ((MoreUseful)x[1]).u(); // Downcast/RTTI
    ((MoreUseful)x[0]).u(); // Exception thrown
    } ///:~
    As in the diagram, MoreUseful extends the interface of Useful. But since it?s inherited, it can also be upcast to a Useful. You can see this happening in the initialization of the array x in main( ). Since both objects in the array are of class Useful, you can send the f( ) and g( ) methods to both, and if you try to call u( ) (which exists only in MoreUseful) you?ll get a compile-time error message.
    If you want to access the extended interface of a MoreUseful object, you can try to downcast. If it?s the correct type, it will be successful. Otherwise, you?ll get a ClassCastException. You don?t need to write any special code for this exception, since it indicates a programmer error that could happen anywhere in a program.
    There?s more to RTTI than a simple cast. For example, there?s a way to see what type you?re dealing with before you try to downcast it. All of Chapter 11 is devoted to the study of different aspects of Java run-time type identification.
    One common principle used to determine when inheritence is being applied correctly is the Liskov Substitution Principle (LSP). This states that an instance of a subclass should be substitutible for an instance of the base class in all circumstances. If not, then it is generally inappropriate to use inheritence - or at least not without properly re-distributing responsibilities across your classes.
    Another common mistake with inheritence are definitions like Employee and Customer as subclasses of People (or whatever). In these cases, it is generally better to employ the Party-Roll pattern where a Person and an Organization or types of Party and a party can be associated with other entities via separate Role classes of which Employee and Customer are two examples.

  • Measuremen​t, visualizat​ion and saving data in parallel: Performanc​e question

    Hello,
    I have written an application with 3 loops running in parallel.
    The first loop does only measure and analyze measurement values from a DAQmx device (3 analog input signals from 3 sensors with 1000 Hz).
    The second loop does only do the visualization with a graph per sensor continously. The data will be sent from the first loop through a queue.
    The third loop only saves the data to a file after a measurement has finished. The data will be sent at the end of a measurement from the first loop, too.
    There are 3 measurements running asynchronous.
    That means it could be that only one sensor will be read, but it also could be that 3 sensors will be read. The duration of each measurement phase and the beginning/end is asynchronous.
    Now I have the following problem:
    Measurement 1 starts
    A short time later measurement 2 starts
    Measurement 2 will end, the measurement values will be saved into a binary file
    Measurement 1 is still running but the visualization of measurement 1 stops for about 1 second during the saving process. After the data is saved, the visualization runs normally again (no data is lost because of the queue).
    Why does tha graph stop its visualization during the saving process (I have a dual core cpu)?
    How can I do this in a way, the user does not see any lags?
    It all works fine but the "interrups" look very unprofessional.
    Regards
    Matthias

    Hello,
    I'm using the producer/consumer pattern.
    Maybe it could be, that the dll calls I'm using for saving will interrupt the whole program: http://lavag.org/files/file/212-sqlite-labview/
    When I use the LabVIEW File-I/O vis all is fine. But when I use these database vis my application will lag.
    Any ideas why this is so? Could it be that the dll calls freeze the application during the saving process (LabVIEW 2011)?
    Here are thze dll settings:
    Attachments:
    dll_settings.PNG ‏50 KB

  • Question about MAXCPU and clearing data cache

    Hi all,
    We're running MaxDB 7.6.03.15 and have following questions. I apologize for not grouping them together with my earlier set of questions along the similar lines.
    1. What would be an appropriate value for our application for MAXCPU when running on a quad processor machine. The application consists of the MaxDB along with 4 windows services and an instance of tomcat. Can we use 4 for MAXCPU or does it always need to be something less than the total number of CPUs on the machine (less than 4 here?). Please advise.
    2. When we're doing query execution time analysis we need to be able to clear data cache in between query runs. We achieve this so far by simply bringing the database offline and then online again. The problem with this approach is its time consuming and if we do 100 query runs a lot of time is spent in waiting for the database go from online to offline to online again. Please let us know if there's an alternative faster way to achieve the same.
    Thanks for your time.
    Sincerely,
    Sameer

    > 1. What would be an appropriate value for our application for MAXCPU when running on a quad processor machine. The application consists of the MaxDB along with 4 windows services and an instance of tomcat. Can we use 4 for MAXCPU or does it always need to be something less than the total number of CPUs on the machine (less than 4 here?). Please advise.
    Of course you may set MAXCPU to 4 - but you risk that the four Usertask UKTs will use up all CPU resources on your system then.
    So it is usually better to be rather defensive with this. If you're unsure about the CPU needs of your other services better try out and check starting with MAXCPU 2.
    > 2. When we're doing query execution time analysis we need to be able to clear data cache in between query runs. We achieve this so far by simply bringing the database offline and then online again. The problem with this approach is its time consuming and if we do 100 query runs a lot of time is spent in waiting for the database go from online to offline to online again. Please let us know if there's an alternative faster way to achieve the same.
    Well, x_cons pagecache_release should do that for you.
    But I never was able to really see the effect of it (e.g. reading the pages in again).
    If I'm not mistaken in this point - which is pretty easy because the command is rarely used and sparsely documented - it just moves the pages to the lower end of the lru list and thereby making them candidates for getting moved out of cache but not actually doing it.
    However why don't you just use the resource monitor to figure out how many pages are touched by your statements?
    Then you don't have to bounce your instance.
    regards,
    Lars

  • Fundamental Question about Lightroom and saving images

    I have to laugh as I get ready to pose this question because I've been working with the program for two weeks with Scott Kelby's book and with Lynda.com, and I'm still profoundly confused about what is happening to the photo. To wit: I open a camera raw file in lightroom and start playing with it, even taking snapshots at various stages along the way. If I don't export the photo to Photoshop and save it there, what becomes of these changes? Do they stay with the photo always? Do they disappear when I shut down the program? There's no SAVE button with Lightroom which just plain flummoxes me! Can anyone 'splain this to me, please? Thanks.

    To clarify. Nothing happens to your originals. Lightroom stores the edits in a database (and if you wish alongside the original in a xmp sidecar file) as a set of instructions that the program uses to recreate the end product by following the instructions. These instructions are changed in the database while you're changing parameter values in Lightroom, so there is no need to save. Also, Lightroom stores a history of changes you did, so you can always go back. Both Lightroom and Adobe's camera raw plugin for photoshop can be used to follow the set if instructions. This way, you always get the highest fidelity image and you can always go back to your development choices without loosing any quality or having to dig up backups. Because of this, you can create multiple virtual copies with different development approaches without having to make a copy of the original and therefore saving you gobs and gobs of disk space. When you need a file for consumption such as a jpeg for a web page, simply export a copy, which burns in your development changes in a developed copy (just like printing a negative would have in the olden days) and trash the copy when you're done with it. You can always recreate it very quickly. This is a radically different approach than you're probably used to.

  • High sample rate data acquisition using DAQ and saving data continuously. Also I would like to chunck data into a new file in every 32M

    Hi: 
      I am very new to LabView, so I need some help to come up with an idea that can help me save data continuously in real time. Also I don't want the file to be too big, so I would like to crete a new file in every 32 mega bytes, and clear the previous buffer. Now I have this code can save voltage data to TDMS file, and the sample rate is 2m Hz, so the volume of data increase very fast, and my computer only have 2G ram, so the computer will freeze after 10 seconds I start to collect data. I need some advise from you briliant people.
    Thanks very much I really appreciate that. 
    Solved!
    Go to Solution.
    Attachments:
    hispeedisplayandstorage.vi ‏33 KB

    I am a huge proponent of the Producer/Consumer architecture.  But this is the place I advise against it.  The DAQmx Configure Logging does all of it for you!
    Note: You will want to use a Chart instead of a graph here.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    hispeedisplayandstorage_BD.png ‏36 KB

  • Issue in mail trigerring and saving data in backend(HCM Processes and Forms

    Friends,
         I am facing problem in workflow with HCM... Tell me what is the use of TS17900100 Process form.. After this TS17900100 task i have email step that telling 'Data has been updated successfully' but i haven't wriiten any activity after TS17900100 . with the process form, is it possible to save data in backend..

    Hi,
    This task does the automatic update if the config is designed to do so in backend. Else it will just modify the 'procstat' variable and depending on that you can proceed further. Let me know what exactly error you are facing.
    Thanks & Regards,
    Manas

  • Filtering and saving data simultaneously on FPGA (NI 9223)

    Hi, I'm trying to use the NI 9223 Module to save my measured data and to filter it simultaneously. The example I use is "Ni 9223 User-Controlled IO Sampling". I'm able to write the data into the FIFOs at the desired sampling rate, but I can't figure out how to filter the data at the same time. The filtered data should not go into the FIFO, but back to our PLC. Also I only save the data after a trigger, but need to filter all the time.
    I already tried writing the data into local variables. But since I get an "overwrite" error, I think this is not fast enough. I attached the Host and FPGA file. MAybe someone as an idea for this problem.
    Regards
    Annika
    Attachments:
    NI 9223 User-Controlled IO Sampling (Host).vi ‏306 KB
    NI 9223_test_2.vi ‏242 KB

    I attached the project with it's SubVI's. I hope I did not forget anything since the project look pretty messy. This is my first time working with LabView and I haven't figured out how to get organized.
    I'm using the cRio 9075  with four modules: 9411, 9223, 9263 and 9474.
    When  I  start the programm from the Host I can see that my Trigger works, and as soon as the data aquision starts I get the overwrite error.
    Attachments:
    NI 9223.zip ‏1662 KB

  • Question about inheritance and  casting

    according to the java api it said Calendar() is a super-class of GregorianCalendar(). with that said it means GC inherits all members of C(). i hope everyone agrees with me here.
    why is it necessary to do this:
    Calendar c = new GregorianCalendar();//by the way this is called implicit casting per the java tutorial.if GC inherits everything from C, and if you need members from both classes, then wouldn't it be enough to just do
    GregorianCalendar gc = new GregorianCalendar();why is it necessary to declare a variable of the parent class and assign a subclass reference to that variable?

    then why does the tutorial show this?Why not? It's legal Java. It's what I would probably write, unless I knew I was going to use some methods that were in GregorianCalendar and not in Calendar.

  • Noob question about JWT and saving/loading midlet states

    Hi,
    I am currently playing with a midlet in JWT - it's actually a Java game. I want to "save" particular states of the midlet and then load them. For example, while playing the game, a multiple choice question appears. I want to save the exact progress up until that point in time, choose one of the answers, view the feedback and then load the saved state and try again with another answer.
    I used a lot of game console to PC emulators, and almost all of them support saving and loading states. Does JWT have such a feature? If not, do you know of any Java ME emulator that has it?
    Cheers,
    Tiberiu

    Yes, I am aware. But that does not answer my question.

Maybe you are looking for

  • Device caching with Flash Lite

    Hi, could anyone give me some info on content caching when using Flash Lite on a device? I have some swf's that sit on a server and are loaded by a client.swf that sits on my Nokia N70. Each of the swf's from the server use shared fonts that reside w

  • Adobe Exchange panel not installing update

    I am on OS X 10.8.5 trying to get Illustrator CC 2014 to update its Exchange panel. I have been trying to get it to update for the past hour and it downloads through Illustrator just fine, but it won't finish installing. I currently have Extension Ma

  • Trouble with TV shows to new iPod

    I just purchased a new 160GB iPod Classic and some of my TV shows will not transfer over.  I get an error message that reads "was not copied to iPod because it cannot be played on this iPod" 

  • What is going on!?!?

    Why does iPhoto keep attempting to republish my albums randomly!??! I made one gallery and after several unexpectely quits and what not and several complete from the beggining repulishes(it just started on its own didn't check to see what was already

  • Error in fileto file scenario

    im working on a file to file scenario.   My scenario is not posting the output file in the destination.I have few doubts. 1.in a file to file scenario, I have used just one business system 2.How do I check whether my communication channels are workin