Reading Data from a Queue - Store in Fast Loop, Display in Slow Loop

Here's my BD below.  I am queueing data in a faster loop (either 100 ms or 50 ms) and sending that data to a 250 ms loop.  I need to be able to display the data in the slower loop (so that the FP doesn't have to update every 50 ms).
Problem I'm having:  How do I empty the data?  It builds and builds and eventually I'm looking at a chart that has data that's 1 minute old.  I've tried writing my own flush code (attached).  I've tried to use variables to pass data and use an array to parse...not working.  Any help would be appreciated.
Nathan - Certified LabVIEW Developer
Solved!
Go to Solution.
Attachments:
FlushQueuebyNathan.vi ‏21 KB

If you need all of the data to go into the chart, I would use the flush queue and write to the chart in a FOR loop (autoindexing with the elements array from the flush queue).  You may set the Defer Front Panel Updates before the FOR loop and reset it after, but I'm not sure that will buy you that much.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Read data from .xls and store it in blob

    Hi,
    I am getting the file using CLIENT_GET_FILE_NAME. I need to read the data from the .xsl file and convert it into blob. The file should not be stored in DB.
    Please help me by providing suggestions / solutions.
    Thanks.
    Edited by: tharini on 10-Aug-2010 04:16

    InoL,
    You can use an OLE Container or you can use a database stored procedure to write the file to the BLOB or extract the file from the BLOB. Then, using WebUtil you can serve the file to the the user. Of course, you would use WebUtil to allow the user to upload the document to the server so you can call the stored proc to load the file into the BLOB.
    The file should not be stored in DB.Hence my question:
    Why do you want to store the raw data from the spreadsheet in a BLOB instead of the file in a BLOB?What is the business requirement and how do you plan on using the data once it is stored in the BLOB?
    If it is a hard requirment to not store the file, then tharnini has to figure out how to take the contents read from the .xls file using WebUtil and store this in the BLOB. More importantly, how do you take the contents of the file stored in the BLOB and write it back out to a file in the same format as the original file so the user can view the information.
    I've not done this using the aforementioned method - I've not done using the OLE container either. ;-)
    Craig...
    Edited by: CraigB on Aug 10, 2010 12:49 PM

  • How to read data from qRFC queue entry

    As we know already that qRFC is to queue & execute RFC function modules asynchronously. From any qRFC queue having entries, is it possible to read the content of a particular entry? Here content means, i am more intersted to know the singnature of a particular RFC function module waiting in the queue. Is there any API already available from qRFC framework for the same? Any quick help in this regard would be greatly appriciated.

    Hi,
    This issue is resolved.

  • We want to read data from weigh bridge and display in oracle forms & store

    Sir/Madam,
    in our organisation we had one requirement. i.e is reading data from weigh bridge using serial port, displying that data in oracle forms and when ever user click save button we store that into my oracle database. we are using oracle 8i and forms 6i and windows OS environment. we don't know reading data from serial port and placing that into form items. please help me as early as possible if there is any property available in d2k regarding this requirement .
    thank you,
    vishnu

    There's no property in Forms that makes you read serial ports, but as far as I know you need to know the API of the machine which you want to read data from (it should come with machine's manual) and then it will be easy to store it in forms item.
    Tony

  • Help Required -- Can we use SQL Query to READ data from SAP MDM Tables

    Hi All,
    Please help.........
    Can we use SQL Query to READ(No Creation/Updation/Deletion  just Read) Data from SAP MDM tables directly, without using MDM Syndicator.
    Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.
    Thanks in Advance
    Regards

    All the tables you create in Repository comes under A2i_CM_Tables in Database named as your repository name. So the tables names are fields of table A2i_CM_Tables. Now i tried it but cant make it.
    Now, I dont think its possible to extract all fields in tables and there values using select query. May be pure sql guy can do that or not.
    But there is no relation of data extraction and syndicator. Data is viewed in Data Manager. and you can also store data in a file from DM also.
    BR,
    Alok

  • How do I read data from a DMM or DC Power Supply at a specified rate?

    I have a PXI system with 4071 DMMs and 4110 DC Power Supplies. I want to be able to measure the power consumption of my DUT as it performs various operations. This is what my process flow looks like:
    1. Configure DMM and Power Supply 
    2. Wait for DUT to go into a certain mode
    3. Start  Acquiring data from DMM and PS.
    4. Wait for DUT to get out of this mode
    5. Stop Acquiring data from DMM and PS.
    Since the duration of step #4 is uncertain, I cannot tell the units to collect a predetermined number of samples and give it back to me. Instead I have to take readings as long as it's required. 
    I'm attaching screenshots of my setup and read process. The reading is done inside a timed loop which is running at 1kHz.
    The problem is that using niDMM Read Multi-Point or niDCPower Measure Multiple takes 5-9ms before I get a reading, so I'm not really getting 1ms resolution in my data. I'm sure there are other folks who have had the need to read data from these devices with better time-resolution, so if anyone can point me in the correct direction, it would be great. I'm pretty sure I'm not doing the correct thing here.
    Attachments:
    1-Setup.PNG ‏12 KB
    2-Read.PNG ‏9 KB

    What is really confusing to me is why you are even using the multi-point function when you set the sample count to 1. If you want multiple points, request multiple samples and let the DMM acquire them at a rate you specify. If you want a single sample, use the normal Read. You also need to pay attention to how fast the DMM can acquire. If you want the fastest sample rates, you might be a lot better off with a DAQ board.

  • Error while reading data from MapMessage using MDB

    Hi,
    I have written a small client program to send a message to a queue and an MDB receives the message in the onMessage() method. The message is of type MapMessage. I set key value pairs and send the message in a queue. When I try to read data from MapMessage inside onMessage() method of MDB, I get an exception:-
    javax.jms.MessageNotReadableException: In write mode
    When I send the message, by default the readonlymode is false. How do I set the mode to readonly exclusively in case of MapMessage ?
    Sirisha

    Hi,
    I do not have any problem with TextMessages...I works fine..It is only with MapMessage that I am not able to read the values..Before sending the message, the message has the flag "readMode" set to false by default by the server...R there any configurations to be made to any files like web.xml or server.xml or jms.xml ?
    I am running my JMS application on JDeveloper IDE that has an in-built OC4J server which supports JMS.

  • Error reading data from Infocube using shell script.

    Dear all ,
    I am facing a problem while reading data from an infocube using a shell script.
    The details are as follows.
    One of the shell script reads the data from the infocube to extract files with the values.
    The tables used for extraction by the shell script are :
    from   SAPR3."/BIC/F&PAR_CUBE.COPA"     FCOPA,
           SAPR3."/BIC/D&PAR_CUBE.COPAU"    COPAU,
           SAPR3."/BIC/D&PAR_CUBE.COPAP"    COPAP,
           SAPR3."/BIC/D&PAR_CUBE.COPA1"    CCPROD,
           SAPR3."/BIC/D&PAR_CUBE.COPA2"    CCCUST,
           SAPR3."/BIC/D&PAR_CUBE.COPA3"    COPA3,
           SAPR3."/BIC/D&PAR_CUBE.COPA4"    COPA4,
           SAPR3."/BIC/D&PAR_CUBE.COPA5"    COPA5,
           SAPR3."/BIC/MCCPROD"      MCCPROD,
           SAPR3."/BIC/SCCPROD"      SCCPROD,
           SAPR3."/BIC/MCCCUSTOM"    MCCCUSTOM,
           SAPR3."/BIC/SCCCUSTOM"    SCCCUSTOM,
           SAPR3."/BIC/SORGUNIT"     SORGUNIT,
           SAPR3."/BIC/SUNIMOYEAR"   SUNIMOYEAR,
    /*     SAPR3."/BI0/SFISCPER"     SFISCPER, */
           SAPR3."/BI0/SREQUID"      SREQUID,
           SAPR3."/BI0/SCURRENCY"    SCURRENCY,
           SAPR3."/BIC/SSCENARIO"    SSCENARIO,
           SAPR3."/BIC/SSOURCE"      SSOURCE
    The problem is that the file generation by this script (after reading the data from teh infocube) is taking an unexpected time of 2 hours which needs to be maximum 10 mins only.
    I used RSRV to get the info about these tables for the infocube:
    Entry '00046174', SID = 37 in SID table is missing in master data table /BIC/MCUSLEVEL2
    Entry '00081450', SID = 38 in SID table is missing in master data table /BIC/MCUSLEVEL2
    and so on for SID = 39  and SID = 35 .
    Checking of SID table /BIC/SCUSLEVEL2 produced errors
    Checking of SID table /BIC/SCUSLEVEL3 produced errors
    Can you please let me know if this can be a reason of delay in file generation (or reading of data from the infocube).
    Also , Please let me know how to proceed with this issue.
    Kindly let me know for more information, if required.
    Thanks in advance for your help.
    -Shalabh

    Hi ,
    In continuation with searching the solution to the problem , I could manage to note a difference in the partition of the Fact table of the infocube.
    Using SE14 -> Storage Parameters, I could find the partition done for the fact table as :
    PARTITION BY: RANGE
    COLUMN_LIST: KEY_ABACOPA
    and subsequently there are partitions with data in it.
    I need to understand the details of these partitions .
    Do they correspond to each requests in the infocube(which may not be possible as there are 13 requests in infocube and much more partitions).
    Most importantly, since this partition is observed for this onfocube only and not for other infocubes, it is possible that it can be a reason for SLOW RETRIEVAL of data from this ionfocube( not sure since the partition is used to help in fast retreival of data from the infocubes).
    Kindly help.
    Thanks for your co-operation in advance.
    -Shalabh

  • Read data from SharePoint using ABAP sql command

    We need to read data from a SharePoint site and update the sap object services with the information. There is a lot of information on how to put data into Sharepoint from SAP, but we need to get data from SharePoint and put it into SAP. Is it possible to retrieve data from SharePoint using sql command in ABAP program? If it is possible, what do we need to do to have SAP recognize where to get the SharePoint data?
    Richard Newman

    Hi Newman,
    You can use native sql in your abap code to read data from SharePoint's database. But I would suggest you to generate a SharePoint webservice which can provide you the neccessary data so that you can consume this webservice in ABAP
    (Will be quite faster than native sql).
    Regards,
    Ozcan.

  • Reading data From XML file and setting into ViewObject to Pouplate ADF UI

    Hi,
    I have following requirement.
    I would like to read data from XML file and populate the data in ViewObject so that the data can be displayed in the ADF UI.
    Also when user modifies the data in the ADF UI, it should be modified back into to ViewObject.
    Here is an example - XML file contains Book Title and Author. I would like to read Book Title and Author from XML file and set it into ViewObject Attribute and then display Book title and Author in ADF UI page. Also when user modifies Book title and Author, I would like to store it back in View Object.
    Please help me with this requirement and let me know if any solution exist in ADF, for populating the ADF UI screen fields with external XML file data.
    Thanks

    Read chapter 42 http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcadvvo.htm of the fusion developer guide
    Section 42.7, "Reading and Writing XML"
    Section 42.8, "Using Programmatic View Objects for Alternative Data Sources"
    Timo

  • Read data from spreadsheet

    Hi NI Community, 
    I'm trying to read data from a .csv file (saved from Excel) in LabVIEW 2013 and cannot understand why I keep getting the same error.  I am using the "Read From Spreadsheet File" VI to accomplish this.  I need to read in the data and store it in an array.  When I try to compile and run the code on my myRIO, I get an error that says, "File not found.  The file might be in a different location or deleted.  Use the command prompt or file explorer to verify that the path is correct."
    I have the file saved in the project folder with the rest of my files for this code, and that's the location I am giving to the Read From Spreadsheet VI.  I am running LabVIEW on a virtual machine with a shared drive on my Mac, but I tried saving the .csv locally and it still didn't work.  I was told it may have something to do with the fact that I'm running the code from the myRIO, not my computer where the file is actually stored, but I'm not sure.  Even if that is the problem, I wouldn't know how to solve it.  I have 3418 data points that I'm reading in, so I would really prefer to not have to manually put them into an array.
    If anyone could help me figure this out, I would appreciate it immensely! 
    Best, 
    Emma

    That file needs to be on the myRIO itself.  It cannot just read stuff from your harddrive.  It has its own.
    Think of it as another computer and it all makes sense.  You wouldn't expect another computer to get "C:\blah\temp.txt" and be able to read the file in that location on your computer.  But you can make a shared folder on your computer and then another computer can read the files in that folder using the network address.  This is the method I normally recommend to people to use.  Make sure your myRIO is using the network address.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Reading Data from CSV file

    Hi Guys,
    I am trying to read data from a CSV file character by character. Whats the best way to do this? Any examples around?
    Thanks
    tzaf

    Does this mean your file will have multiple lines? And each line would indicate a new record? If so, you should use the BufferedReader and take in each line as a String. Then you can use the StringTokenizer to separate your string into tokens using the comma as your delimiter. From there you can convert the string tokens into whatever form you like, but by default they are already in String form. To make it an Integer I'd use Integer.parseInt().
    I will show you some code on how to get the values from your file using the BufferedReader and the StringTokenizer but what you do with those values afterwards I'm going to leave up to you.
    File csvfile = new File("myfile.csv");
    byte[] fileBuf = new byte[1024];     // buffer for file data
    int bytesRead = 0;               // number of bytes read
    try
         BufferedReader fileIn = new BufferedReader( new FileReader( csvfile ));
         PrintStream out = new PrintStream( System.out );
         String readLine;     // stores a line from the file as a string
         while( (readLine = fileIn.readLine()) != null )
              StringTokenizer tokens = new StringTokenizer( readLine, ",", false);
              // false means you don't want to count the commas, only the values
              while( tokens.hasMoreTokens() )
                   String aValue = tokens.nextToken(); 
                   // ... do what you want with the value
                   // ... change to Integer or whatever
                   out.println(aValue); // Printing the value to the screen
         fileIn.close();          
    }Good luck,
    .kim

  • How to read data from clusters ??

    Hi ,
    Can any one please help me with procedure to read data from any Pcln tables.....other than pcl2.
    with and without using macros..
    I'm planning to read data from Pcl4 from cluster LA .using the macro RP_IMP_C4_LA. i dont know how to pass the key or where to use the key to read data .
    Please please let me know the standard procedure to read data from cluster tables.(i know PCL2).'
    Thanks In Advance !
    Kiran

    Hi Thomas,
    Just out of curiosity. In our system we have a custom table built which stores data in LRAW format.
    The table is updated using IMPORT/EXPORT FROM/TO DATABASE statements (similar to INDX).
    Can we read the PCL* tables in the same way as INDX ?
    BR,
    Suhas

  • How to read data from clusters ( Time Management )

    Hi All,
       How can we read data from cluster tables related to Time Management in different ways?
       Can somebody help me please..
    Thanks,
    Sankar.

    Hi
    Kindly check the following thread:
    Cluster database
    It has a sample code to read from & to store data in a cluster table
    Hope you are looking for cluster tables in HR
    Some useful HR tables:
    HRP1000 - Infotype 1000 DB Table
    HRP1001 - Infotype 1001 DB Table
    HRP1028 - Infotype 1028 DB Table
    Paxxxx - transparent tables for infotypes
    PCL1 - HR Cluster 1
    PCL2 - HR Cluster 2
    PCL3 - HR Cluster 3
    PCL4 - HR Cluster 4
    PCL5 - HR/RP Cluster 5; HR Planning Usage
    PERNR - Standard Selections for HR Master Data Reporting (Structure)
    kindly check the following link for some useful HR tables:
    http://www.atomhr.com/know_preview/SAP_HR_tables.htm
    Hope this helps!
    best regards,
    Thangesh

  • How to fetch data from XML and store it in internal table

    Hi All,
    Can anyone help me out, in fetching data from xml and store it in an internal table. Is there any standard function module is there?
    Regards,
    Karthick

    to do this you can either develop a XSLT program and use it with CALL TRNSFORMATION key word to tranform the XML into itab .
    (search the ABAP General forum, i have posted few samples)
    or simply use the following FM which converts your XML into a itab of name value pair (name would holw the element name and value would hold the value of the element) which you can then loop and read it to your itb.
    data:             xmldata type xstring .
    data: result_xml type standard table of smum_xmltb .
    data: return type standard table of bapiret2 .
    CALL FUNCTION 'SMUM_XML_PARSE'
      EXPORTING
        xml_input       = xmldata
      TABLES
        xml_table       = result_xml
        return          = return .
    Regards
    Raja

Maybe you are looking for

  • SAPSQL_ARRAY_INSERT_DUPREC dump while saving PO in ME22N

    Hi All, SAPSQL_ARRAY_INSERT_DUPREC dump while updating PO in ME22N. Error analysis     An exception occurred. This exception is dealt with in more detail below     . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was      neither

  • My ipod 4 will not turn on, charge or connect to itunes/computer. nothing has happened to it to cause any damage to the hardware.

    i have  n ipod 4th geration. it has no hardware damage or water damage. it will not turn on, charge, or connect to itues/computer. my computer will not even pick up any hardware connection when i plug it in. the screen stays black. ive tried holding

  • XML: How to convert xml string into Node/Document

    I have a string in xml form. <name> <first/> <second/> </name> I want to convert this string into DOM Node or Document. How can I do this? Any help or pointer? TIA Sachin

  • Extraction of data from SAP

    Hi Expert, When I did an extraction from SAP (ie FBL3N, FBL1N, etc) via export->local file->spreadsheet, the total balance from the extraction file is different from viewing SAP on screen. Why is this so ? If do a direct export->spreadsheet, it is ok

  • Soap to rfc..dont get a response...

    I have pasted below the complete steps for doing a rfc to soap synchronous scenario...i can send a message and update a custom table in r/3 with the data..however i am not getting any response, i have tested the rfc on r/3 and checked the table ..whi