How to store data from Host.vi in cRIO-9074

TejasKumar Patel
I implemented a advance Measurement and Control system using cRIO-9074
with c-Series I/O cards( NI 9217, 9411, 9264)
I have some questions about it,
(1)- Data rate from FPGA targate to host vi is too low. how can I increase
it, when I run my host VI, sometimes all temperature sensor update at
same time and sometimes one by one, can you please give me some hint, how
can I correct it, I used two FIFOs for NI-9411 digital pulses, I put all
Digital input and all analog output and input in a seperate while loop in
FPGA targate VI.
(2)- I have to write that data to analyse for further result. I tried all
possible way to write data including wite to spreadsheet.vi, write to
text.vi, Data storage.vi, Write to measurement.vi. All this VI work
efficientlywhen it run individualy, But when I connect this VI to
writedata from FPGA host VI. than it always give empty file.
I saw your post in NI discussion forum about how to write data from
Host.vi, But still I am confuse that how can I creat a protocol between
host VI and Fpga target vi. to write the data in a file. I have nearabout
38 channel to write data.
(3)- I have to measure time difference between two digital pulses, to find
a flow rate. I am using counter for it with risisng edge shot.vi, but when
i get a timestemp when there is risisng edge for the second rising edge
how can I get timestemp. Its like i have to measure time between two
pulses, I triend waveform measurement.vi to find cycle period. but it not
worked. any other was to measure it.
I am stuck in this question since from last one month. I already followed
NI-discussion forum solution but it doesnt work. I think the way I applied
is may be wrong. 
Looking forward to hear from you soon.
Plese send an additional email copy to [email protected]
Thank you and Best Regards, 

Thanks Joseph for your support,
1-      If I count the ticks between the pulses it always seems different ….because this method I already tried, but it does not work,  like some times it shows 9099 tick and at the second pulse it shows like some more or less ticks not the same ticks every time. To complete my project, the biggest problem is the data storage.
2-      As you gives the solution in NI forum, “low level file I/O Vis such as Write to text file” FPGA target not support this VI. And mainly I want to write data from HOST.vi, because I am process those data …and I need to store it. For to figure out my result.
3-      If I use “Write to text file. VI (Sub-VI ) to FPGA.vi, it not support because it support string data and I have FIXpoint data. And can you explain me what is low level file IO, and how can I use in fpga.vi??
4-      Yes, for my project time stamp it really necessary, for data analysis.
5-      I need the time stamp to find out what was the system response at the time.  As our project based on weather temperature, I need time stamp.
Waiting for your reply,
Thanks and Regards,
Patel

Similar Messages

  • How to store data from textfile to vector and delete a selected row.

    Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
    Do someone has an idea? :)

    nemesisjava wrote:
    Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
    Do someone has an idea? :)What's the problem? What have you done so far? What failed?
    What you described should be pretty easy to do.

  • How to store data from a complex query and only fresh hourly or daily?

    We have a report which runs quite slow (1-2 minutes) because the query is quite complicate, so we would like to run this query daily only and store in a table so for those procedures that need to use this complex query as a subquery, can just join to this table directly to get results.
    However, I am not sure what kind of object I should use to store data for this complex query. Is data in global temp table only persist within transaction? I need something that can persist the data and be access by procedures.
    Any suggestions are welcome,
    Cheers

    Thank you for your reply. I looked at the materialized view earlier on, but have some difficulties to use it. So I have some questions here:
    1.The complex query is not a sum or aggregate functions, it just need to get data from different tables based on different conditions, in this case is it still appropriate to use meterialized view?
    2.If it is, I created one, but how to use it in my procedure? From the articles I read, it seems I can't just query from this view directly. So do I need to keep the complex query in my procedure and how the procedure will use the meterialized view instead?
    3. I also put the complex query in a normal view, then create a materialized view for this normal view (I expect the data from the complex query will be cache here), then in the procedure I just select * from my_NormalView, but it takes the same time to run even when I set the QUERY_REWRITE_ENABLED to true in the alter session. So I am not sure what else I need to do to make sure the procedure use the materialized view instead of the normal view. Can I query from the Materialized View directly?
    Below in the code I copied from one of the article to create the materialized view based on my normal view:
    CREATE MATERIALIZED VIEW HK3ControlDB.MW_RIRating
    PCTFREE 5 PCTUSED 60
    TABLESPACE "USERS"
    STORAGE (INITIAL 50K NEXT 50K)
    USING INDEX STORAGE (INITIAL 25K NEXT 25K)
    REFRESH START WITH ROUND(SYSDATE + 1) + 11/24
    NEXT NEXT_DAY(TRUNC(SYSDATE), 'MONDAY') + 15/24
    enable query rewrite
    AS SELECT * FROM HK3ControlDB.VW_RIRating;
    Cheers

  • How to store data from file

    hi all
    u some data on text file i want to store that data in my table
    data in a.txt is
    name date reason country
    and i ean to store that data in my table with four colums

    this script from asktom can be used to load a .pdf, .xls, .doc and .txt. just creat a procedure for each file you want to up load.
    here is for pdf loading.
    create or replace directory myfiles as 'C:\TEST'
    create table mypdfs (
    id number(38) primary key,
    theblob blob not null);
    declare
    l_blob blob;
    l_bfile bfile;
    begin
    insert into demo values ( 1, empty_blob() )
    returning theBlob into l_blob;
    l_bfile := bfilename( 'MYFILES', 'ora_log.pdf' ); --here you can add the file name and the extension
    dbms_lob.fileopen( l_bfile );
    dbms_lob.loadfromfile( l_blob, l_bfile,
    dbms_lob.getlength( l_bfile ) );
    dbms_lob.fileclose( l_bfile );
    end;
    create or replace package getpdfs
    as
    procedure pdf(p_id in mypdfs.id%type);
    end;
    create or replace package body getpdfs
    as
    procedure pdf(p_id in mypdfs.id%type)
    is
    l_lob blob;
    l_amt number := 32767;
    l_off number := 1;
    l_raw raw(32767);
    begin
    select theblob into l_lob
    from mypdfs where id = p_id;
    owa_util.mime_header('TEST/pdf');
    begin
    loop
    dbms_lob.read(l_lob, l_amt, l_off, l_raw);
    htp.prn(utl_raw.cast_to_varchar2(l_raw));
    l_off := l_off + l_amt;
    end loop;
    exception
    when no_data_found then
    null;
    end;
    end;
    end;
    My favourite is intermedia. You can upload any file and images.
    Good luck

  • How temporary store data from CRio?

    Hi,
    I am using a CRio to control a system. I am finding that there is a little variation in readings from the ADC module of the CRio, so the reading on the screen is a little eratic. The input signal is more stable than what the reading is making it out to be, so i know it is to do with a sampling error in the CRio (Which is to be expected). To solve this problem, i want to apply a simple filter. Where i record 4 or 5 readings and take the mean average. The 4-5 readings are continuously rolling, so as soon as the CRio has taken a new reading. The value enters the stack and the oldest reading is removed.
    Now the way i would like to do this is to use a shift register. If a shift register is able to store values and not just boolean?
    I've seen other posts in hear talking about a shift register but i can't find it (I've even searched for it but the results doesn't return anything to do with a shift register). Where should i be able to find it?
    I have the CRio sampling the inputs using a flat sequence structure. Where i have a timer in the first section and everything else that is related to it in the next section. Obviously, the timer in the first section sets the frequency that CRio samples the data. If i increase the timer and therefore decrease the frequency, would the length of time that the CRio takes to samples the data naturally increase? The longer the ADC card takes to sample the signal, the ADC card is therefore given more time to settle and will naturally filter itself.
    Failing both of these, is there another way i can do what i want to achieve?

    A shift register is a fundamental LabVIEW concept.  It allows you to store any type of value from one iteration of a loop to the next.  Search the LabVIEW help for shift registers.  One common approach to your problem is to store an array of values in the shift register.  Inside the while loop, on each iteration, rotate the array (there's a function for this), then replace the first element with the new data.  This works well for a small array (for example 4-5 previous values); there are faster but more complicated approaches if your array is larger.  If you're doing this in the FPGA on the cRIO you might need a different approach as well: keep track of an array index, insert the new value at that index, increment the index, and reset to zero when you reach the array length.
    LabVIEW also provides a number of built-in filter VIs that manage all the previous values for you; see if one of those will do what you want.
    Changing your loop rate will not affect the sample time; as far as I know, the sample time is fixed, or at least not easily accessed.

  • How to store data from channels into constants

    Hi
    I currently have a six channel data acquisition system for LVDTs. The way the process works is we do a calibration run on the LVDTs and store the values we get and then use these baseline values during actual measurement. My question is how do I acquire these values and store them in constants within the program itself ? I know we can write these values to an external excel file or text file but can we store them within the program so that I have them available even if I close and open the program again?

    Perhaps this will work for you.
    Attachments:
    Set_and_Save_Defaults.zip ‏26 KB

  • How to store data from a hashtable into textfile?

    let say i have 10 data in a hashtable, how can i store these data to a textfile? thanks a lot

    try to use Properties instead of HashTable,
    it has an operation store(OutputStream out, String header)
    using which we can write content of Properties to a file
    Also load content of a file using load(InputStream inStream),
    This is pretty simple operation.
    Renjith.

  • How to store data from xml in oracle database

    Hello All
    Could anyone tell me ways of storing XML in Oracle and whats the best one in terms of performance issues.
    any URL to this q/s would be great.
    thanks
    kedar

    Ben,
    The following link as some information regarding DOM API and XSQL.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2923508047773696280::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:17309127931717
    For XML DB, you may want to create an XMLSchema and build a table off the schema definition. Then use WEBDAV to load the xml into a folder (ie object table) Once the xml is in the database you could build a view for a relational look at the data.
    Example from XMLDB Techical White Paper doc.
    create or replace view PURCHASEORDER_MASTER_VIEW
    (reference, requestor, userid, costcenter,...)
    as select extractValue(Value(p),'/PurchaseOrder/Reference'),
    extractValue(value(p),'/PurchaseOrder/Requestor'),
    extractValue(value(p),'/PurchaseOrder/User'),
    extractValue(value(p),'/PurchaseOrder/CostCenter'),...
    from PURCHASEORDER p

  • How to store data from database & display

    I am trying to connect to the database Northwind through sqlserver.
    My code is as follows
    public String data() {
            try {
                System.out.println("Control is in fieldlist.data::::::::");
              Context context = new InitialContext();
              Map sessionMap=FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
              FieldList flist=(FieldList)sessionMap.get("fieldList");
              DataSource dataSource =
                (DataSource)context.lookup("java:comp/env/jdbc/Northwind");
                System.out.println("dataSource::::::::"+dataSource.toString());
              Connection connection = dataSource.getConnection();
              System.out.println("connection::::::::"+connection);
              Statement statement = connection.createStatement();
              String query = generateQuery1();
              System.out.println("In data ::query::::::::"+query);
    /* Problem Starts here */
             ResultSet resultSet = statement.executeQuery(query);
    Result result=ResultSupport.toResult(resultSet);
    System.out.println("result::::::::::::"+result);        
              return "success1";
            } catch(Exception e)
                System.out.println("Connection error "+e);
                return(null);
      }So on calling the method data() the above code is getting executed.
    Here I am also able to print the value of result which comes in hexadecimal format.
    But I am not able to display the data when I run the application.
    May I know what I am doing wrong here.

    Thanks.
    But I want to know what is the method to extract values from ResultSet
    while(resultSet.next())
                      //what should be the method here.
              }

  • What is a cube? how we store data in that? how we fetch data from cube?

    Hi,
    What is a cube? how we store data in that? how we fetch data from cube?
    Regards.
    venkat

    >
    venkey B wrote:
    > Hi,
    >
    >
    > What is a cube? how we store data in that? how we fetch data from cube?
    >
    >
    > Regards.
    >
    > venkat
    Hi Venkat,
    I guess you mean an infocube from the SAP BI product. I propose to look at the forum for Business Intelligence to find your answers.
    E.g. SAP POS DM writes the sales data in infocubes.....

  • How to store data in ipad from computer

    please explain me how to store data (music video & pictures) in  ipad from any personal computer...kindly explain me in simple steps...

    The iPad can only sync with one computer.  To do this you need to have iTunes installed on the computer and have it associated with your Apple ID.  you can then use iTunes to transfer music, movies and pictures from that computer, and that computer only.
    iOS: Syncing your data with iTunes
    http://support.apple.com/kb/ht1386
    If you need to get files from other computers, you would need a 3rd party App that can handle the formats you wish to transfer, and possibly transfer them either through iTunes file sharing or Wifi transfer depending on what the App supports.
    iOS: About File Sharing
    http://support.apple.com/kb/ht4094

  • How to extract data from Chart History?

    Dear all, I have read a lot of posts, but still don't understand how to extract data from Chart history.
    Suppose you acquired 1024 points of data every time, then use "build array" to build an array, then send to intensity chart to show, then save the history into a .txt file,  but how to extact data from the file?
    How Labview store the data in the 2D history buffer?
    Anybody has any examples?

    The simplest would be to save the 2D array as a spreadsheet file, the read it back the same way.
    Maybe the attached simple example can give you some ideas (LabVIEW 7.1). Just run it. At any time, press "write to file". At any later time, you can read the save data into the second history chart.
    If you are worried about performance, it might be better to use binary files, but it will be a little more complicated. See how far you get.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IntensityChartHistorySave.vi ‏79 KB

  • How to store data (in tdm files)

    I'm looking for advice on how to store data in tdm/tdx files.
    The main challenge is like this: At regular time intervals there is new data available (say every 10 minutes there are 10 minutes of new data available). All data is time based. So every ten minutes I may create a new tdm/tdx file containing this data segment. However, when i want to analyze the data i dont necessarily want to view 10 minutes of data from all channels, but maybe 20 hours of data from one particular channel.
    The way I've achieved this so far is to manually load each 10 minute segment of this particular channel and then add these parts together. This is both time consuming and cumbersome. Is there a better way to do this that I've simply not discovered yet? Is there a better way to store data to simplify this process?
    One solution is of course to save data from several 10-minute frames in one file, but seeing as there is a never ending supply of data i cant simply save all data in one giant file, it has to be split up at some point, and the problem will still remain.
    One factor to have in mind here is that this is rather large amounts of data (maybe 10GB each day), so the option to simply load all the data into memory goes out the window rather quickly.
    Feel free to ask if I've not made myself very clear

    Hi salte,
    If your test ever ended, and if you had LabVIEW 8.20 or higher, I would recommend using a TDMS file, which handles data appeands flawlessly.  DIAdem 10.1 now also does data reduction and index windowing during file loading for TDM / TDMS / DataPlugin files, so that you could easily load out only the part of the file you wanted to look at.  But since you describe your data acquisition as never stopping and amassing 10 GB per day, I agree that it would be impractical to use only 1 data file.  So we are stuck with some number of files which each contain a part of your measurement.  This approach can have advantages, since you can save operational properties for each "buffer" such as average value, dominant frequency, ambient room temperature, etc., and later on you can use the DataFinder to query out only the data buffers which meet specific conditions based on these properties.  The problem remains to load and assemble data based on multiple files.  This is an old problem in DIAdem, and one for which I have an efficient and I hope satisfactory workaround application.  It does what you describe already doing in the minimum amount of time and with the minimum amount of user interaction, and it can be highly parametrized to suit your particular situation.  The ideal way to start the application would be as part of a ResultsList custom menu.  This would enable you to query out the buffers you wanted, highlight those rows in the ResultsList, right-click and choose your custom menu, and WHAM! the selected buffers for your queried channel(s) are automatically appended together in the DataPortal.  Launching from a ResultsList custom menu would mean that you could skip the file dialog and just read out the data sources directly from the ResultsList selection.
    Let me know what you think,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Importing Data from Multiple DataPlugin Files.zip ‏198 KB

  • How to pass data from one internal session to another

    Hi SAP Experts,
    How to pass data from one internal session to another and from One external session to another external session. I used import and export parmeter and SPA/GPA parameters. What is the other way to pass data?
    Please tel me urgently
    Thank you
    Basu

    Memory Structures of an ABAP Program
    In the Overview of the R/3 Basis System you have seen that each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
    The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session.
    Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.
    The memory area of each session contains an area called ABAP memory. ABAP memory is available to all internal sessions. ABAP programs can use the EXPORT and IMPORT statements to access it. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    All ABAP programs can also access the SAP memory. This is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters are often used to preassign values to input fields. You can set them individually for users, or globally according to the flow of an application program. SAP memory is the only connection between the different sessions within a SAPgui.
    The following diagram shows how an application program accesses the different areas within shared memory:
    In the diagram, an ABAP program is active in the second internal session of the first main session. It can access the memory of its own internal session, ABAP memory and SAP memory. The program in the first internal session has called the program which is currently active, and its own data is currently inactive on the stack. If the program currently active calls another program but will itself carry on once that program has finished running, the new program will be activated in a third internal session.
    Data Clusters in ABAP Memory
    You can store data clusters in ABAP memory. ABAP memory is a memory area within the internal session (roll area) of an ABAP program and any other program called from it using CALL TRANSACTION or SUBMIT.
    ABAP memory is independent of the ABAP program or program module from which it was generated. In other words, an object saved in ABAP memory can be read from any other ABAP program in the same call chain. ABAP memory is not the same as the cross-transaction global SAP memory. For further information, refer to Passing Data Between Programs.
    This allows you to pass data from one module to another over several levels of the program hierarchy. For example, you can pass data
    From an executable program (report) to another executable program called using SUBMIT.
    From a transaction to an executable program (report).
    Between dialog modules.
    From a program to a function module.
    and so on.
    The contents of the memory are released when you leave the transaction.
    To save data objects in ABAP memory, use the statement EXPORT TO MEMORY.
    Saving Data Objects in Memory
    To read data objects from memory, use the statement IMPORT FROM MEMORY.
    Reading Data Objects from Memory
    To delete data clusters from memory, use the statement FREE MEMORY.
    Deleting Data Clusters from Memory
    please read this which provide more idea about memory
    Message was edited by:
            sunil kumar

  • How to get data from MS Access?

    How can select data from MS Access datafile, stored on some computer in local network? How to connect Oracle database to MS Access datafile? I tried use ODBC, but unsuccefull. Any idea? Some link to some guide?

    mihaelradovan wrote:
    How can select data from MS Access datafile, stored on some computer in local network? How to connect Oracle database to MS Access datafile? I tried use ODBC, but unsuccefull. Any idea? Some link to some guide?How were you "unsuccessful"?
    You set up an ODBC connection to the MS Access file, then use Oracle Heterogeneous services and configure those to point to the ODBC connection and use that.
    Here's an example I already have for an MS Excel file...
    1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
    2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
    EXCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
    (CONNECT_DATA =
    (SID = EXCL)
    (HS = OK)
    Here SID is the name of data source that you have just created.
    3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = <hs_sid>)
    (ORACLE_HOME = <oracle home>)
    under SID_LIST_LISTENER like:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = d:\ORA9DB)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = ORA9DB)
    (ORACLE_HOME = d:\ORA9DB)
    (SID_NAME = ORA9DB)
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = EXCL)
    (ORACLE_HOME = D:\ora9db)
    Dont forget to reload the listener
    c:\> lsnrctl reload
    4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
    In this file set following two parameters:
    HS_FDS_CONNECT_INFO = excl
    HS_FDS_TRACE_LEVEL = 0
    5- Now connect to Oracle database and create database link with following command:
    SQL> CREATE DATABASE LINK excl
    2 USING 'excl'
    3 /
    Database link created.
    Now you can perform query against this database like you would for any remote database.
    SQL> SELECT table_name FROM all_tables@excl;
    TABLE_NAME
    DEPT
    EMPOr refer to this Article...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206

Maybe you are looking for

  • Error in starting weblogic portal9.2 MP1

    Hi all, I m facing following errror in starting the weblogic portal 9.2MP1 "Unable to create the Content FullTextSearch database" I have followed the following steps for starting the weblogic 1)Installed WLS Application Server 9.2 MP1on solaris 10 sy

  • Can't make an incremental backup in PSE 10 Organizer

    I don't understand why I can't make an incremental backup in PSE 10 Organizer. I made my first full backup to my external drive a week ago. Today I tried to make an incremental backup. After selecting Incremental Backup from the file menu, a new scre

  • Itunes wont re install

    Itunes wont re install, says i need to log on as administrator.  I am administrator, there is no other log in id for the computer.

  • Cashflow reporting based on TB as per IFRS

    Hello, I have a client who recently migrated from SAP Business one 8.81 to 9.0 PL8. They have been using the cash flow selection criteria to create a cash flow statement based on the Chart of Accounts and then make manual adjustment to fit  IFRS repo

  • How to stop sound from playing everytime we go to 1st frame ?*

    Hi everyone, my app has 3 frames and a sound playing on background so everytime i go to 1st frame the music play's over himself, is easy to get 5 instances of the music playing at same time. How to stop this behavior ? Music file imported to library.