How to analyze the data of the series?

Hi, really new to LV and I just can't get my head around how to solve this problem.

I've got about a continuous stream of serial @57600 data transmission speed

It is composed of 9 signed 16 - bit ints sent big-endian and then stopped with 2 bytes to 0xAA.

The data are only heard so when LV opens port it can start at any point in the workflow.

I can open the port, to read, to convert the entire bytes, BUT that I can't run is to know how to "synchronize" my loop to a limit of 0xAAAA

My simple idea was to throw the stream somehow until 2 consequutive 0xAA bytes and then enter the main loop

My complex idea was a FIFO with a sort of string or byte array Analyzer in the rematch of the head of the queue model the 0xAA, 0xAA if there is no 18 bytes between the model & the head then throw else remove the 18 & process

This seems too complicated, especially since the situation is expected to occur only once (I got my loop running for hours without dropping one byte, so I'm happy with it).

It is, I can't implement either I think I just need a little in the right direction please...

You don't need a producer consumer architecture. That is right. But it is not so complicated and if you are new to LabVIEW you should familiarize yourself with her rather sooner than later.

The analysis of the state machine workflow must be in its own loop to do his own thing. As the packets are detected and controlled, they must be communicated to the loop that will do something with it. In this way, no matter what you do with the data now, if it's just the display, save to a file, or whether it is, you can change it later without touching the code of treatment of the series. The code in the loop of the series is just sitting there doing its thing and don't know or care what happens to packages.

Attached is the code saved to 8.5

Tags: NI Software

Similar Questions

  • How to analyze the image url in json?

    Hello

    I get the response from the server and crawled through json. And display it in the field

    Like name1 as:

    try {}
    labelField1.setText (jsonObject2.get("name1").toString ());
    }

    catch (JSONException e)

    {
    System.out.println ("JSONException Description");
    }

    Similarly, I want to make the image. How to analyze the url of the image and display it in the BitmapField?

    You must create a separate thread to extract the bytes of the image of the URL you have.

    You can use the following code to get the image to the server.

    public EncodedImage getImageBytesFromURL(String url){
            ConnectionFactory connFactory = null;
            ConnectionDescriptor connDescriptor = null;
            HttpConnection httpConn = null;
            InputStream inputStream = null;
            byte[] response = null;
            try {
                connFactory = new ConnectionFactory();
                connFactory.setConnectionTimeout(10*1000);
                connFactory.setAttemptsLimit(1);
                connDescriptor = connFactory.getConnection(url;interface=wifi);
                if (connDescriptor != null) {
                    httpConn = (HttpConnection) connDescriptor.getConnection();
                    inputStream = httpConn.openInputStream();
                    int responseCode = httpConn.getResponseCode();
                    if(responseCode == HttpConnection.HTTP_OK){
                        response = readStream(inputStream);
                    }
                }
            }catch (IOException e) {
    
            }finally {
                try {
                    inputStream.close();
                    httpConn.close();
                    inputStream = null;
                    httpConn = null;
                    connDescriptor = null;
                    connFactory = null;
                } catch (Exception e) {
    
                }
            }
            EncodedImage encodedImage = null;
            if(response != null){
                encodedImage = EncodedImage.createEncodedImage(response, 0, response.length);
            }
            return encodedImage;
        }
    

    Remember that this method should be in a background thread. Otherwise, your user interface crashes. The encodedImage that returns the method above can be easily converted to bitmap and set in your bitmapfield.

  • How to analyze the data of 10 bytes encoded in the HH306 of Omegatte data logger/thermometer?

    I am trying to write a simple code for a HH306 of OMEGAETTE thermometer/travailleursduweb.com data recorder.

    That is the problem. I communicate with the device via RS - 232, using Labview 8.5.1 and windows xp. I ask her for "all the coded data", which is actually the only option. He returns 10 bytes of encoded data, the manual describes the meaning of each byte and I understand that. The problem is that I can't analyze the information for use in labview, for example: I want to extract the temperature and simply display it.

    on request, I get: 10bytes (read as a string from the serial port read buffer): display HEX: 02 00 A8 48 FF EF B6 49 B6 03 is perfect, and what I expect.     Display codes: \02\00\A8\B6H\FF\EF\B6I\03 The Normal display is a series of special characters, I don't understand, especially since I don't think they are ascii characters that must match returned hexadecimal numbers!   For the life of me, I can't understand how to extract the information (what are the 48 6 hexadecimal display) of what is returned. All string manipulation functions seem to work only on what is given in Normal view. (The 4th and 5th byte of the data are the codes of the BCD for temperature: for example the temperature was 64.8 degrees farenheight when I took this reading).

    Can someone help me to analyze the data returned by this device?

    Ok... I think that I thought about it. I found this: http://digital.ni.com/public.nsf/websearch/77C8F61D36F5A23086256634005ACB38?OpenDocument.

    I guess the normal display garbled is corresponding to each hexadecimal ascii characters. I'm just not used to seeing characters beyond the decimal number 127 ascii or hex 7F.

    So, basically, to analyze the 10 bytes of data:

    (1) break the string read from the serial port in the 10 ascii characters (using String subset vi)

    (2) son of each output string in the left input of 10 separate Type vi Cast.

    (3) wire a constant U8 in each terminal 'type' VI Type Cast.

    cables of 4) the chain of each Cast of Type vi output to the input of a number hexadecimal string vi.

    (5) concatenate or use as you wish as hexadecimal numbers (now in string format) which cause.

    See you soon.

  • How to analyze the data of the cDAQ and Signal Express, especially after analysis?

    In the first series of tests of my instrument, it took longer than expected for the race.  Thus, the data was saved in 6 days.  The file is too large for export to Excel.  At the beginning of the project, I was as ignorant as I could go ahead and add analysis and the scaling of measures.  By the scaling, I mean my data of switching current dew points or whatever it is that I record.

    How to evolve the data to read the output data as expected 4mA = point of dew of-20 C or 0 PSIG?  Can I pre program this to be recognized for each event?

    For real analysis I am doing – I would first analyze the data I recorded and choose different points to send to Excel to graph and analyze.  Is this possible?

    Secondly, I would like to know how to scale and analyze my data in the project without having to do this later analysis in the future?

    I have a cDAQ-9172 with LabVIEW signal Express 3.0 that uses four modules - 9211 2 modules of thermocouple, my 4-20 1-9201 module +/-10V module and 1-9203.

    Thank you for any assistance.

    Hi Patricia,

    "' You can do this by adding a step Load/Save signals ' analog '.  I hope this helps!

  • How to analyze the files using Lexmark 2600 Series

    To the right:

    I have a Lexmark 2600 Series 3-in-1 printer. It is supposed to be able to scan. However, I can't figure out how to parse the files and I've lost the installation disc. However, the printer is already installed on my computer. I can't analyze. Can someone help me on how to scan files with this printer? Or, is there something I need to do first before that I can use the scanner fuction?

    Hi Xnygga,

    You will need to go to the Lexmark Web site to download the latest software/drivers for your scanner:

    http://support.Lexmark.com/index?page=home&locale=en&UserLocale=en_US & segment = DOWNLOAD

    I hope this helps!

    Debra
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • How to analyze the .m3u?

    Hi all

    I get a file m3u of URL containing the playlist. can someone suggest me or give any idea to analyze the .m3u file and how to get the url of file m3u mp3.

    Thank you...

    Download the m3u as a string. then extract the location of the mp3 files and feed them to the application of data flow.

  • How to analyze the object in the soap response in Blackberry

    I am new to blackberry develipment.i developed using Momentics IDE. Now, I'm working on the integration of Soap Web service. Now my webservice function call works. I answer also. My webservice response, it's like

    http://shidhints.com/">booleanstringstringint    string    string
    

    While parese the answer, now I can analyze and get the token, NumberofReferral but I can't analyze the ListEmails object. How do I analyze this ListEmails, me, pleasehelp

    const QtSoapMessage& response = m_soap.getResponse();const QtSoapType& responseValue = response.returnValue();
    
    m_Token = responseValue["Token"].value().toString();
    m_NumberofReferral = responseValue["NumberofReferral"].value().toString();
    

    use QtSoapArray for that.

    I think this could work:
    QtSoapArray & email = (QtSoapArray &) responseValue ["ListEmails"];
    work with count() and iterate over the table to retrieve the values.

  • How to analyze the results?

    Hi Adobe community.

    I am new to creating forms and I was wondering if there is a way to analyze the results? The tutorial presentation stops at creating forms. I searched on the analysis of messages, but found none. Looking for probably is not the right terminology.

    Thank you

    LF

    You can merge the results of several forms in a CSV file very easily. In Acrobat XI, it is under Tools - forms - more form Options - merge data files into spreadsheet...

  • How to analyze the results of GetSOAPRequest

    Hello

    Can someone help me, how can I analyze the result GetSOAPRequest's next? The following xml code is the example that I try to analyse. Thank you.

    <? XML version = "1.0" encoding = "UTF-8"? >
    "< xmlns:soap: envelope soap =" http://schemas.xmlsoap.org/soap/envelope/ "> "
    < soap: Body >
    "< getCountriesListResponse xmlns =" http://www.voxbone.com/VoxService "> "
    < country >
    "< ns1:Country xmlns:ns1 =" http://containers.services.webservices.voxbone "> "
    "< availableDidsCount xmlns =" http://containers.services.webservices.voxbone "> 79 < / availableDidsCount > "
    "< countryCodeA2 xmlns =" http://containers.services.webservices.voxbone "> AR < / countryCodeA2 > "
    "< countryName xmlns =" http://containers.services.webservices.voxbone "> ARGENTINA < / countryName > "
    "< countryPhoneCode xmlns =" http://containers.services.webservices.voxbone "> 54 < / countryPhoneCode > "
    < / ns1:Country >
    "< ns1:Country xmlns:ns1 =" http://containers.services.webservices.voxbone "> "
    "< availableDidsCount xmlns =" http://containers.services.webservices.voxbone "> 73 < / availableDidsCount > "
    "< countryCodeA2 xmlns =" http://containers.services.webservices.voxbone "> BR < / countryCodeA2 > "
    "< countryName xmlns =" http://containers.services.webservices.voxbone "> BRAZIL < / countryName > "
    "< countryPhoneCode xmlns =" http://containers.services.webservices.voxbone "> 55 < / countryPhoneCode > "
    < / ns1:Country >
    < / country >
    < / getCountriesListResponse >
    < / soap: Body >

    Hi Mike,.

    I got to work with this code snippet.


    Thank you very much!

  • How to analyze the data of the commas?

    Hello!

    I have a problem when parsing comma-delimited data. My oscilloscope transfers 1002 data points via the RS232 interface that is delimited by commas. In addition, they have a variable length where positive values are coded on 8 bits and those negative 9. If the analysis with a fixed length is hardly possible. I tried a variety of solutions for the format of measure like a\x2C, but without success. I can see the data in the RS232 monitor, but how do I work with it in the Dasylab Datasheet?

    Thanks for your help!


  • How to analyze the server JSON data?

    I use an API and I get responces in JSON format. I need help in the analysis of the received data to JSON.

    This is the data that I get...

    {"code": 200, "lang": "en - us", 'text': ['Hello']} »

    I need to extract the text value (ie: Hello must be extracted)

    Please help me with tis problem!

    Thank you

    In C++ JsonDataAccess is right for you

    http://developer.BlackBerry.com/native/reference/Cascades/bb__data__jsondataaccess.html

    In QML:

    var json = JSON.parse(response)
    

    Now you can access the property like this

    CODE = json.code

    LANG = json.lang

    Etc...

  • How to analyze the polyline and polygon in KML in geographic data

    Hello

    document, http://developer.blackberry.com/cascades/reference/bb__cascades__maps.html

    Function convertKmlContentToDataProvider can be used to convert the KML content,

    but after testing, it only supports geolocation, but not the GeoPolyline and the GeoPolygon.

    No more for this?

    The documentation refers only to the markers, so you may need to do the analysis yourself.

  • How to stop the series 'VISA read' the sends packets instead of bytes available.

    Dear Labvillians,

    Highlights:

    How can I stop series "VISA read" send me packages rather bytes?

    Background:

    I have a system which publishes series of 14 bytes on a semi-regular interval packets.

    At busy times, the producer of these these queues of data packets, effectively producing Super-paquets multiple of 14 times larger than 8 packages (112 bytes) bytes.

    My protocol handler is designed to process bytes, packets, or packets Super.

    Now, my request has multiple devices and the order of message processing is essential to the proper functioning.

    My observation is that read VISA waits until the end of a package / super package before moving the data to the application code. (See chart below)

    My expectation is that VISA read should give me bytes available, get too smart for itself and not wait for a package.

    .

    I noticed this on PXI, PC shipped, PSC and, more recently, cRIO

    I've experimented with Scan interface the cRIO rate, which helps to reduce the backlog of packages but don't decide to package under read byte.

    I understand that a solution is FPGA code write to handle and pass the bytes by R/T-FIFO, and there are some great examples on this site.

    Unfortunately, it does not help with FPGA devices not.

    I have also dabbled in the event based sequential reads, but he is evil on vxWorks devices.

    Any help is appreciated

    It is helpful to sometimes talk to yourself.

    I hope that is useful for someone sprinkle in the future

  • How to set the series temporal dynamics as A-T-J, Q-T-D

    Hi all
    I created a Dimension as from the TIME to outline Editor.For this Dimension of TIME, I need to put the dynamic time series as A-T-J, Q-T-D.
    After setting the TIME Dimension has - T - J Dynamic Time Series for, I'm not able to put the Q-T-D dynamic time series for this same Dimension [TIME].
    How to do?

    Kindly guide me.


    Thanks and greetings
    Alizée

    When mark you the time as a dimension of time make sure if you have dimension year indicate years to get the ADC value unless your not use years to store the data of the year

    HTD (history to date)

    A-T-D (year-to-date)

    S-T-D (season to date)

    P-T-D (period to date)

    Q-T-D (quarter to date)

    M-T-D (month to date)

    W-T-D (this week)

    D-T-D (day to day)

    Here's more detail: http://docs.oracle.com/cd/E17236_01/epm.1112/esb_dbag/frameset.htm?dcatimse.html

    To achieve a purpose considered
    Excel addin - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_ss_user/idh_specify_latest_dts.html
    Smart view - http://docs.oracle.com/cd/E17236_01/epm.1112/sv_user_11121102/ch17s02s02.html

  • Dreamweaver / excel or access - how to get the series of html files

    Hello

    IM pretty newbe to dreameaver, any advice is appreciated.

    I have prepared a web page layout using dreamweaver. I also have a list of 200 lines with 4 columns in excel.

    I d like dreamweaver automatically create series of clean html files (no java or other technologies) only html and css, and use the data from the excel file.

    I d like dreamweaver to 'take' each of the cells of a row in the excel file and put it in its place for the layout (description3, description1, description2, description4). as the output, I d like to get 200 html files.

    I was sleeping me with options of database in dreamweaver for a few days and I had the feeling that the features are rather designed for someone who creates dynamic web pages and a database installed on a server. in one such case dreamweaver inserts... java, ajax and spry... (I don't know m) code that I don't want.

    Thanks in advance.

    I have the

    This may seem a little too complex, but you "could" export your Excel files to xml format and built pages by using spry data sets.

    In this way, you wouldn't need a database and the learning curve is perhaps easier.

    "Look at the demos of spry on the following link and the previous link to connect to the developers for ' how - to of.

    http://www.Adobe.com/devnet/Dreamweaver/?view=samples

    Using spry and export your data from Excel to xml format would mean just update your xml file to reflect changes you need for data to Web sites.

    HTH

    Note: in this way, you can use any server provider and there is no specific requirement.

    Post edited by: pziecina

Maybe you are looking for