How to read flushed cluster array from input queue?

Hi! I'm new to LabView. Can someone please help me?
I want to use a subvi to read a queue which I created in another vi. The created queue holds an array of clusters that I want to unbundle in a for loop in the reading vi. But the output of the flush queue function is a string array (since the subvi has no info on what sort of queue is being input).
I can't connect the unbundle function to a string input; can I use the type cast function to force the flush output to be a cluster? Or is there a better way to do this?
And if so, what is the string constant I need to attach to the "type" input in the type cast function?
And also, I'm told that the cluster is kind of like a "struct"; so is there a way to n
ame it so that other vi's know what it is(i.e. type cast)?
jen

I did look at the help examples, but I couldn't find one that was sending the queue from one vi to another(well, not any that I could understand), and that was really my problem.
I did get the thing to work when it was all in one vi.
You bring up an interesting point about "dequeue" and "flush". Perhaps I am mistaken, but my reasoning for using flush rather than dequeue was the following:
I am using the queue as a data buffer. I need the queue to hold a few minutes of data. This data is dumped to file upon fault event, i.e. it tells me what was going on right before the fault occurred. I need that queue to dump the data and then immediately turn around and start filling up again. I felt that holding on to the queue reference in the save-to-file routi
ne (which involves lots of potentially slow hard disk access) might cause the object to lock and hence not be able to save right away. I don't know how LabView does threading, but if I was writing the threading routine, I would lock any object which was being executed upon in a routine to prevent data collision.
Of course, this begs the question: does LabView lock all objects in a subroutine that is executing? Or just in the part which is unresolved? or does it lock objects at all? Perhaps I should flush the queue outside of the subroutine anyway, so that the subroutine can happily munch on the flushed array while my queue goes back to the business of collecting data?
Am I way off base in how the threading works?
Thanks!
jen

Similar Messages

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

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

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

  • How to read Java Object message from JMS Queue using JMS Adapter .

    Dear All,
    In my scenario i have to read a java object message from JMS Queue . I tried by using the JMS Adaper ,but i am not getting any Payload . Can any one tell me is there any special settings for JMS Adapter to read the Java Object message .
    I am able to read the Message successfully thru JMS Adapter but in SXMB_MONI it is not showing any payload .
    I also went in Message monitoring but i am getting this type of message in Sender JMS Adapter  in Audit Log.
    JMS Message ID XXXXX Message Type Null unknown.Payload can not be read and will be empty.
    JMS Message ID XXXXX Payload Empty can not read.
    Please Help.
    Lateef

    Hi,
    As far as i know, JMS Object Messages is not supported by XI JMS adapter.
    you need to have the JMS provider to transform the message to bytes messages.
    (Refer to SAP note 856346)

  • Reading in an array from a text file

    I'm trying to use a text file to load in some configuratin
    data (using actionscript 3) I have it working ok for simple stuff
    like gamename=Chess&gamescore=100 , etc... but some of the data
    needs to be in an array. Can someone please point me in the right
    direction to how I can read in an array from a text file?
    Thanks!

    the easiest way is to create a string with the (soon-to-be)
    array elements separated by a delimiter (like a double comma). read
    in your string, then use the split() method of strings to split
    your string into an array.

  • How to Read a CAB File from JAVA?

    Hi,
    Anyone knows how to read a CAB File from java. I need to read a property file of txt file that is packaged in CAB file & then based on that, I have to do processing. Is there anyway to do it.
    I had tried using java.util.zip.ZipFile Class, but it does work for JAR, but not for CAB.
    siva.

    Perhaps there's something in the Cabinet SDK that will help:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncabsdk/html/cabdl.asp

  • How to read line number text from PDF using plugin?

    Hi, I would like to know how to read line number text from PDF using plugin?
    Thanks in advance.

    Ok, some background reading of the PDF Reference will help you understand why this is so difficult. PDF files are not organised into lines. It is best to think of each word or character on the page as being a graphic with its own position. The human eye sees lines where a series of graphics (words) are roughly in the same horizontal region.
    In the general case it is difficult or even impossible to answer this. You may have columns with different spacing (but the PDF stores no information on what is a column). You may have subscripts and superscripts. You may have text in graphics coinciding with other text. Commonly, there may be titles, headings or page numbers which are just ordinary text and might count as lines.
    That said, what you need to do is extract the text on the page and its positions. The WordFinder APIs are the way to do that. Now, sort all the words out, using the Y coordinates and size to try and guess what makes a "line". Now you are in a position to find the text (divided into words, not strings) and report the "line number" you have estimated.

  • Copy small array from cyclical queue

    Hi,
    I would like to know how to create a small array from a bigger one when the bigger one is cyclical. The problem is that i'm copying the values with Arrays.copyOfRange(array,from,to) until I end up to the final of the queue where it falls in a ArrayIndexOutOfBoundsException
    Example:
    cyclical_queue: [ 34 23 2 3 4 5]
    if small_array has to be [4 5 34] i cannot use copyOfRange since it would end up in Arrays.copyOfRange(cyclical_queue,4,1) -> ArrayIndexOutOfBoundsException
    P.S. I am trying to do it without loops since performance is important in my program
    Thanks in advance for any help,
    Rodo

    Rodo1983 wrote:
    I would like to know how to create a small array from a bigger one when the bigger one is cyclical. The problem is that i'm copying the values with Arrays.copyOfRange(array,from,to) until I end up to the final of the queue where it falls in a ArrayIndexOutOfBoundsExceptionYou can't use Arrays.copyOfRange for this if the array you're copying wraps around the end of the queue.
    P.S. I am trying to do it without loops since performance is important in my programDon't bother. Looping isn't inefficient, and besides, I'm almost positive Array.copyOfRange() uses loops. Just start copying at the beginning index, wrapping to zero if you get to the end, and stop when you get to the ending index.

  • How to get the XML messages from JMS Queue in BPM

    I have one requirement in my application.we are sending XML messages to the JMS Queue.How to get the XML messages from JMS Queue and how to Extract the details from XMl.
    can you please send me the code to get the XML messages from the JMS Queue.
    Thank you,

    Hi,
    Sure others will have some other ideas, but here's what I typically do to get the XML from a JMS queue. Inside the Global Automatic that pops the messages off the queue you'd have logic similar to this:
    artifactInfoNodes as Any[]
    xmlObject as Fuego.Xml.XMLObject = XMLObject()
    load xmlObject using xmlText = message.textValue
    . . . Once you have this, it's a matter of deciding what you want to do with the message. Most times you'll parse the XML (using XPATH statemens), set argument variables and create a work item instance.
    Hope this helps,
    Dan

  • How to read and write data from Excel to TestStand without using LabVIEW VIs

    Hi,
    How can I read in columns of data from Excel into a TestStand array and write columns of data to Excel from TestStand without using LabVIEW VIs?
    I don't think the Property Loader custom step type in TestStand will work because the data I would like to read in from Excel is in a column that is thousands of rows long and the data has to be in the proper format to use the Property Loader to load in an array from Excel.
    Thanks for your help.

    That example does not use LabVIEW and it does about 40% of what you need to do by calling Excel through ActiveX. If you don't know how to use Excel through ActiveX then you'll need to brush up on that.
    http://www.microsoft.com/en-us/download/details.aspx?id=16250
    http://support.microsoft.com/kb/141759
    http://support.microsoft.com/kb/302084
    CTA, CLA, MTFBWY

  • How to read table of records from RFC

    Hi,
    My requirement is to read multiple records(800) from RFC 1  and pass the same records to RFC 2 as input(AbstractList).
    Please suggest how to achieve this ??
    Thanks,
    vijay.

    Hi,
    I'll share the code for RFC 1 & RFC 2
    Code for RFC 1
    Zbapi_event_name input= new Zbapi_event_name();
    input.setUser("name");
    wdContext.nodeZbapi_event_name().bind(input);
    // we use the normal execute statement over here
    wdContext.nodeZbapi_event_name.nodeOutput().nodeResult_Objec1(); // returns all table records
    code for RFC 2
    Zbapi_event_data data= new Zbapi_event_data();
    data.setUser("ss");
    data.addPerners(Object); // we have a method accepts argument as Object
    data.setPerners(Abstractlist); // we have a method which accepts the argument as Abstractlist
    // we are stuck at this step , how to transform the data from RFC 1 to RFC 2
    wdContext.nodeZbapi_event_data().bind(data);
    // we use the normal execute statement over here
    Please suggest.......
    Thanks
    vijay

  • Reading a char array from Serial port

    Need help!
    Hi, I've got the following problem - I wanna read a input stream from serial port and I use at the moment the following method (reading bytewise):
    public String receiveText (){
          byte ch;
          fStrBuf.delete(0,fStrBuf.length()); //clearing the buffer
    try{
              do {
              ch = (byte) fPortInStream.read();
              fStrBuf.append( (char) ch);
            while ( (byte) ch != 0x03); //The end of frame byte
             }catch(IOException ioe) {};
          return fStrBuf.toString();It works pretty well, but disadvantage is that it's too slow to use it in the thread (at least I think so)
    How can I change it to read all available data from the port (or simply faste). I don't need event listeners, because it's a request-responde communication.
    I tried smth. like this
    byte[] readBuffer = new byte[20];
                try {
                    while (fPortInStream.available() > 0) {
                        int numBytes = inputStream.read(readBuffer);
                        fStrBuf.append(readBuffer);
                } catch (IOException e) {}
          return fStrBuf.toString();But it doesn't seem to work :-(

    May I suggest that you use StringBuilder rather than StringBuffer. It has less overhead because it is not threadsafe. I do synchronous serial port stuff with Opto 22, and i have no listeners enabled.
    Appending to the String(Builder/Buffer) directly from the byte buffer mangles it. So I use a string (ugh). With the Opto22 brain boards, i am looking for a carriage return as a term char. It either finds it or times out.
    This is the best i have come up with so far:
    StringBuilder response = new StringBuilder();
    String data = new String();
    long msTimeOut = 2000;
    public void getResponse () throws IOException {
            byte[] readBuff = {0};
            int charAvail;
            response.delete(0,response.length());
            long ts = Calendar.getInstance().getTimeInMillis();
            try {
                while ( readBuff[readBuff.length-1] != '\r' ) {
                    charAvail = inputStream.available();
                    if ( charAvail > 0 ) {
                        readBuff = new byte[charAvail];
                        inputStream.read(readBuff);
                        response.append(new String(readBuff));
                    if ( Calendar.getInstance().getTimeInMillis() > (ts + msTimeOut) ) {
                        response.delete(0,response.length());
                        response.append("TIMEOUT");
                        break;
            } catch (IOException e) { e.printStackTrace(); throw e; }        
            data = response.substring(0);
        } I just starting writing Java about 4 days ago, so caveat emptor.

  • How can i get a array from a JSP ?

    Hi all,
    i have a STORED PROCEDURE like this:
    static public void getMyArray(double [] xx) {
    for (int i=0; i<myarr.length;i++){
    myarr=3.145*i;
    xx=myarr;
    return ;
    how can i get the array with XSQL and transform with a XSL ?
    Is this at all possible?
    Thanks for any help.
    Achim

    u r asking how ca u get array from jsp?
    and u r asking xsql ...some stuff i couldnot understand .can u repeat the question properly?
    null

  • How do I copy an array from a website to Excel using Firefox

    Was running Firefox on Windows Vista. I could copy an array from finance.yahoo.com into an Excel spreadsheet by selecting the array with control key down then clicking on edit - copy selected cells, then pasting into an Excel sheet. I only had to tell it the upper left cell and the whole array went in properly
    Now trying to do the same thing on a new machine running Windows 7, but the "copy selected cells" option is not available in the edit menu. Is there a way to copy an array with Firefox and Windows 7? These are big arrays. One cell at a time is out of the question.

    Try this Add-on --> https://addons.mozilla.org/en-US/firefox/addon/dafizilla-table2clipboard/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *'''''Adobe PDF Plug-In For Firefox and Netscape''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • How to read the hierarchy data from the same table using loop in AMDP method

    Hi All,
    We have a requirement to get the top partner from BUT050 table.
    Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050.
    Example:
    For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) one level above
    For partner 3523(BUT050-PARTNER1)  there is partner 4544 (BUT050-PARTNER2) last level .
    so in this case for the partner 1234 the Top parent is 4544 .
    I have created AMDP Procedure method to get the top-parnet and below given is the logic implemented in AMDP method.
    Here i have implemented a recursive logic with the WHILE loop to get the top most hierarchy partner from the same table BUT050
    IV_Parent is the input partner and ev_top_parent is the output value.
    AMDP Procedure Method:
        DECLARE lv_date VARCHAR(8) := TO_VARCHAR (current_date, 'YYYYMMDD');
        DECLARE found INT := 1;
              iv_partner1 =  SELECT partner1 FROM but050
                              WHERE partner2 = iv_partner
                              AND reltyp = :iv_hierarchy
                              AND date_to >=  :lv_date
                              AND date_from <= :lv_date;
         WHILE found <> 0  do
           select partner1 into ev_top_parent from :iv_partner1;
                           iv_partner1 =  SELECT partner1 FROM but050
                           WHERE partner2 in ( select partner1 from :iv_partner1 where partner1 is not null)
                           AND reltyp = 'ZBP004'
                           AND date_to >= :lv_date
                           AND date_from <= :lv_date;
           select COUNT ( partner1 ) INTO found FROM :IV_PARTNER1;
        END WHILE;
    This method is working fine, but here it is only taking one single partner and getting the top parent as output.
    Now i would like to convert this mehtod so as to accept n number of partners (not one single partner) as input and should process each partner to get the top parent.
    Could anyone guide me how can i handle the given AMDP method further so as to work some how it is within another loop from other AMDP method.
    Thanks.
    Regards,
    Laxman.P

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • How to read a XML file from BLOB column and insert in a table - PL/SQL Only

    Hi,
    To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
    I tried with DBMS_LOB and didnt get around.
    Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080543758</DET_CODE>
    <DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
    <ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
    </Corporate_alloc>
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080534343</DET_CODE>
    <DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
    <ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
    </Corporate_alloc>
    </dataroot>
    CREATE TABLE TEST_XML
    ( PKG_CODE VARCHAR2(50),
    PKG_NAME VARCHAR2(100),
    DET_CODE VARCHAR2(20),
    DET_NAME VARCHAR2(500),
    ALLOCATION_RATIO NUMBER )
    Thanks
    EBV

    In regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
    Re: XML Data - Caliculate fields
    Re: Extractvalue function not recognised

Maybe you are looking for