Serial port buffer - how to read the last entry?

Hello

I'm trying to read data from a device connected to the serial port. The instrument makes a row of data, last updated CR LF at pre-set intervals (0.2 seconds, 0.5 sec., etc.). I want to read the most recent line to an interval of time different (for example 1 s). What happens is that the buffer fills, and when I read that I always get the whole buffer content, starting with the first (oldest) row of data.  After reading, I empty the buffer to prevent overflow.

From the red string I, I serach occurrence of CRLF and take the data before the game. This will give me the first line of data (oldest), sometimes incomplete.

What I want is the last line. There must be an easy way to achieve this?

I can't use the Frother with my instrument.

Any help appreciated

Sylvester

To give an idea, put something like this you diagram:

Tags: NI Hardware

Similar Questions

  • How to read the two columns of data from the Port series

    Hello

    I'm reading two columns of data from the serial port.

    Example:

    52439 52430

    52440 52437

    52209 52214

    51065 51070

    52206 52390

    I use the serial of Visa service and I can read the first column of data from the serial port, but I can't understand how to read the second column.

    I want to both sets of chart data.

    I enclose my VI.

    Thank you for your help.

    The analysis of string function takes a "Format string" on top (with the right button of the function and choose Help, which explains all the entries).  In particular, you can say 'Give me two numbers separated by a tab' and the output will be two numbers (whole or floating, depending on the chosen format).  In particular, %d\t%d specifies a decimal integer, , whole decimal.

  • How to read the host name or serial number cRIO locally

    I have not worked with cRIO and decided to ask for help.  (o).

    I don't know about the screws that allow to access this information from a connected Windows machine, however, I want to retrieve and display this information on remote panels.  But I cannot determine how to read the cRIO hostname or the serial number of the software running on the cRIO?

    Thanks for the help.

    James

    This could help.

  • How to read the data in a device connected to the usb port

    Is there a class or object, or the piece of code in Java that is comparable to the PDQComm32.ocx and the mscomm32.ocx used in VB6? I need to know how to read the data of a device plugged into the usb port of the BBerry. Is it possible to use the BB to read data from a device via a usb cable?

    I'm new in Java and I'm looking for the opportunity to write a project to read the data in a device with this program that can turn on a BB instead of on a pc.

    Thank you

    Did you watch net.rim.device.api.system.USBPort?

    That's what the doc says:

    Provides access to the USB port of the device.

    Avoid using this class in applications, as it is not portable. On the contrary, if you need to access the USB port, use factory CLDC Connector to serve a connection.

    Rab

  • VISA serial port automatically configures scan of the available serial ports?

    I am using a VISA set a serial port to open a connection to the serial port, to enter data, make some manipulation of array and display it.

    My VI works perfectly until what I have build in exe and transfer it on a laptop with a USB converter to port series (as the laptop does not have a serial port).

    Windows allocated the converter to COM9, but I do not see it in LabVIEW.

    Do I need to use something like 'Find VISA resource'? If it does find something how can I change the name of resource VISA?

    I have attached a screenshot to give you an idea of what I'm doing.

    There is absolutely no reason to use all of this code. The original order of resource VISA name should work just fine. Have you installed the runtime VISA on the laptop? If so, did you also install MAX, so you can check the VISA resources on the latptop?

    In addition, since an exe file will run automatically when opening, have you provided a mechanism for a com port selection until the program begins the acquisition of VISA?

  • Read the last sector of the virtual hard disk

    Hello

    I'm running Windows 7 Home Premium VM inside VMWare Workstation image. I want to access the last sector of this Virtual Hard Drive. However, I do not within Windows 7 itself.

    Instead, I want to start this virtual system using a bootable Livecd. To this end, I can create an ISO using the Windows XP Installation CD and Bart PE Builder.

    Now my question is, how do I boot under VmWare Workstation Livecd Bootable using Bart PE created so that I can access the virtual hard disk.

    And also, once I started the new system, I want to read this last sector of the virtual hard disk. This is for testing purposes. I know, it could be done on a running system as well however, I want to be able to do this in VmWare Workstation.

    I searched the net for a solution. I came across the Disk Explorer utility, which is available here:

    www.Runtime.org/DiskExplorer.htm

    In my view, this will allow me to read the last sector and thus copy. It is however an expensive software. They have even a plugin developed to work with BartPE, which is available online here:

    http://www.Runtime.org/diskexplorer_for_ntfs.cab

    But we need to provide the license key in the .inf for this file to work.

    In any case, I know how to prepare the Windows Bootable Live CD using BartPE.

    Issues related to the:

    How to get started in using a windows live CD VMWare?

    How to access the virtual hard disk of the Windows 7 operating system?

    And finally, are there other alternatives that are easier to explore this disk that would allow me to read the last sector of this virtual hard disk and copy another medium?

    Thank you.

    I am able to use the keyboard in knoppix, but the mouse doesn't seem to work properly. I am able to click right on the desktop but not able to select any option. The behavior of the mice is completely wrong.

    Is it possible to fix it?

    You can try to temporarily adjust the Type of guest OS Linux or edit the .vmx to have these parameters/values or temporarily remove the USB controller.

    usb:0.deviceType = "mouse"
    usb:0.present = "FALSE"
    mouse.vusb.enable = "FALSE"
    
  • How to read the files on time capsule

    How to read the files on time capsule from iPad?

    Thank you

    Using an application like navigation on the iPad. More info here:

    Stratospherix - FileBrowser - overview

  • How to read the status of User1 DIP-switch with a cRIO FPGA chassis?

    How to read the State of the DIP switches on a FPGA cRio chassis?

    I work with a cRIO 9022... My idea is to put the system in "service" mode with USER1 switch to IT and communicate with the FPGA via the FPGA - GUI (VI) on the host computer instead via the RT module that is used in normal conditions.

    Any ideas? Unfortunately, I don't have an unused channel on the left... .and (as I know) cannot use the interface RS232 of FPGA.

    Many thanks in advance,

    Luke

    Hi, this is the correct information. You cannot read the FPGA of DIP-switch status. The only thing you could do is to use the function of Reading Switch.vi located under the range of functions-> real-> utilities RT time

    It's how you probably know side host RT and not the FPGA.

    Cordially Virginia

  • How to read the value of list boxes by iteration in a loop For?

    I have a lot of list boxes on the front of my VI. I want to know how to read the value of this combo with a loop boxes For. The point is that I don't know how to get the reference of each combo box in a loop.

    Any information would be welcome. Thank you!

    su27 wrote:

    I have a lot of combo boxes on the front of my VI [...]

    Be sure to close the references that you have finished with them.

  • How to read the VI Analyzer config file?

    Hello

    How to read the analuzer vi configuration file? I'm getting a lot of errors on the size of the front panel and I don't know what should be the size you want. Where is the maximum expected size of the specified front panel?

    Kaspar says:

    Hello

    How to read the analuzer vi configuration file? I'm getting a lot of errors on the size of the front panel and I don't know what should be the size you want. Where is the maximum expected size of the specified front panel?

    If you have VI Analyzer installed, you can load the configuration file and look at the section select the Tests. There is a test for the maximum size of front under front-> User Interface. The default value is the resolution of the current monitor of the PC (including multiple monitors). You can change to the desired option.

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • Read the last value of a large file of PDM

    Hello everyone!

    I hope someone can help out me with this one.

    I try to put in place a program that can read the last value of one of the large channels of different TDMS files but I just can´t find a way to do it.

    I would appreciate help for my little problem.

    Thank you very much in advance for your support.

    Kasim.

    Hello

    You can use the following playback TDMS Set Position feature included in the PDM API.  This function receives a parameter called "(0:start)", which can be set to 1 to go to end of the file.  In this way, you can read the last value written to the PDM file.

    I hope this helps!

    Anuar Rojas

  • How to read the color table in a subvi?

    How to read the color table in a subvi? Is it made by a reference to the table or with a global variable? For a better understanding of the problem, I added to vi. Run the "run.vi." I want to see

    the background color of the table "run.vi" in the subvi called "read color.vi".

    How can I do?

    Thanks in advance

    Norick

    pop up on the wire table refernece and establishes 'control '. Add this control to the icon of the sub - VI decision-making and then wire ref of the appellant to this Terminal VI so the calling VI move the ref to the Subvi.

    Ben

  • How to read the 32-bit depth .bmp image

    How to read the image, 32-bit depth using LabVIEW .bmp?


  • How to read the analog inputs of one Board of R for (PXI-7851R) series

    You can guide me please with the steps for reading of the analog inputs of a series a. card I use as the target fpga PXI-7851R.

    Have you looked at the examples provided with LabVIEW? There are examples showing how to read the analog inputs.

Maybe you are looking for

  • Pavilion g6-1118TX: reported hard drive failure

    Hello people of the community. Recently, I get a message indicating an imminent hard drive failure during startup. I just wanted to know how I can solve the problem and how to buy a hard drive and the same difficulty. The issue seems to affect the cr

  • Upgrade ram HP 15-r017dx

    Just bought the 15-r017dx touchsmart hp. It comes with 4 GB of ram, but I have a 8 GB from another laptop that I would use. However, I can't understand how to enter this particular laptop. He doesn't have a removable cover to get into the ram or hard

  • No sound when watching youtube videos. Work was then arrested. All other sound works fine.

    No sound when watching youtube videos.  Work was then arrested.  All other sound works fine.

  • WS-C3750G-48PS-S

    I want to test 48 ports of 3750 past at the same time, is there a command to test these port without using a single-port Cat5 cable?

  • Movi research have not some entered endpoint

    About 1/6 manual phone book entries are not displayed in a movi research. They have not changed for more than a week. I checked the access control, all telephone directories are available to all users. I don't see anything besides different from thos