Stream Serial Data to Disk

I am looking for a sample .vi that I can use to read in data from my RS-422 port, and stream it straight to disk so I don't have to worry about buffering the incoming data. My incoming data files can be anywhere from 1MB up to about 150MB or so, and it will vary, so I need something, or ideas anyway, how to do this. Any help would be greatly appreciated.
Jimmy

Take a look at the attached VI. It has none of the buffering I mentioned earlier, but you may not need it. Disk transfer will probably be inefficient, but should be able to keep up with the serial port. You may want to put a delay in the loop to keep from sucking up processor resources and to allow some data to come in before the next iteration. This will depend upon your data rates and what else you are doing at the time. I would suggest about 10msec.
This account is no longer active. Contact ShadesOfGray for current posts and information.
Attachments:
StreamToDiskFromSerial.vi ‏65 KB

Similar Messages

  • Using TDM VI in Lv 7.1 to stream data to disk

    I found the TDM VI and the structure of the data is very interesting for my application.
    I try to use it to stream an array of waveform data but the TDM VI goes very slow.
    after that, I see in the documentation that TDM file can't support streaming to disk, but I think it's really a basic function.
    futhermore,the TDM VI write binary data, so normally it must work !.
    is there another possibily with TDM file to stream data to disk ?
    Thanks in advance for your help.
    GHELEYNS Nicolas
    Phénix Industries s.a.

    Hi,
    The LabVIEW Storage VIs do not yet support streaming data to disk. However, you can benefit from the storage VIs structured approach to saving data by:
    Streaming data to disk using standard binary write VIs
    Reading data back in and writing it back out to disk using the storage VIs after acquisition
    Deleting the original binary file
    Although there is the extra step of writing data to an intermediate binary file, you benefit because you can structure your data and save it with the descriptive properties that the storage VIs offer.
    Regards.
    JorisV

  • Using Digital I/O to generate serial data stream

    Hello All,
    I am in need to generate a serial data stream. HW I use is MIO-16E-10.
    I am planning to use the digital line out to generate the serial data stream.
    I seems that if I use the wait timer the minimum pulse width I can get is
    1ms. But for my application the pulses have to be shorter than that. I was
    wondering about an alternative way to achive this. Any one who has worked
    with a similar application please help!
    Thanks in advance!
    Anand.

    Anand,
    What you are looking to do is not possible with the digital lines on the board you have.
    Depending on what other connections you have on the board, you could use one of the two analog outputs to generate your required serial data stream using pattern generation. Check the DAQ solution wizard=>Custom DAQ applications=>Analog Output=>Generate continuous sine wave. This example should give you a baseline to get started. Substitute the sine wave generator for your desired digital stream Logic 0 =0V, Logic 1=5V.
    If you need more than 2 lines, or some form of handshaking, I would suggest using the PCI-6534 or (DIO-32-HS as it was previously called) This will give you the ability to generate serial data streams with timing and/or handshaking.

  • Need help streaming data to disk

    I have enclosed a simple vi where I'm streaming data to disk and then would like to read the data (analyze it). I'm not a avid user in LV but would like to understand this concept. I'm having problems reading the data. Is anyone experienced in this arena?
    Attachments:
    streaming to disk.vi ‏146 KB

    Hello,
    I have taken a look at the vi you attached and have discovered where some problems may be arising. First your For and While loops do not know when to finish. You must give them some sort of termination element whether it be a certain number of iterations or end of file. However, the main problem you are running into is that you are trying to write and read from a file at the same time. The read is actually trying to read from a file that does not yet exist or have data. You must have these be sequential. When the write finishes then you can begin the read. You can do this by using a Sequence Structure from the Structures Palette.
    I would also like to suggest using the examples in the Example Finder in the Help menu as a starting point. You can search for read and write to find examples you can incorporate. Also there is one example Read from Binary File that I believe you will find useful in your application.
    Thanks,
    Caroline
    National Instruments
    Thanks,
    Caroline Tipton
    Data Management Product Manager
    National Instruments

  • Why is streaming data to disk necessary?

    Does streaming data to disk actually take the burden off the buffer to allow the processing of data after its been acquired? I've seen an example or 2 but unclear to the purpose. Can anyone explain?

    Hi,
    There's another example called High Speed Data Logger.vi that comes shipped with LabVIEW. This is a more efficient datalogging example than simple data logger.vi. The major difference between the two is that Simple data logger continuously opens and closes the file reference in the while loop and writes in ASCII. High speed data logger.vi only opens the file reference once, and then continuously writes binary data to the file until you tell it to stop. After it stops, it then closes the reference. This is how to efficiently do it without incurring any excess overhead. Hope this helps!
    PS - You can find the example in the NI Example Finder. Go to Help >> Find Examples, and then go to the Search Tab and enter "data
    logging" as the keyword.
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • Streaming data to disk, need help reading data into Power Spectrum/O​ctave vi

    I'm streaming data to disk in one loop, however once this finishes I'd like to read the data into power spectrum vi/Octave analysis vi in another loop. The data from the read vi is a string and power spectrum vi needs 1d waveform. Does anyone have experience with this process?

    From your general description, I gather you are streaming to a text based file (comma or tab separated spreadsheet format) and would like to analyse this data with a power spectrum or octave analysis when you finish. Since you are streaming, I assume you have a lot of data. Do you have more than one channel?
    In any case, you have two simple options (and lots of complex ones). You can either read the data back from disk and convert it to a 1D array (try the Read From Spreadsheet File.vi - will get a 2D array, take the first column or the column of your choice if you have more than one channel) or you can use the Spreadsheet String to Array primitive to create an array from your text data before you save it to disk.
    If your data rate is slow enough, you can analyze as you acquire and store.
    Taking your data as text is very inefficient. What you really want to do is read the data as binary, use that for your analysis, and use something like the Write to Spreadsheet File.vi to save text data to disk.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Q: Re: Q: Acquiring data using two E series devices connected by RTSI and streaming data to disk

    << (My first posting)
    I use two E series PCI Cards, connected by RTSI. I'd like to stream the data
    from both cards to a binary file and to add a header to it.
    I also need to somehow read (plot) the stored data, this with another VI.
    The whole should be then integrated into an existing program, that used just
    one acquisition card.
    Till now I have tried to combine "Two E-series Shared ScanClk.vi" and "High
    Speed Data Logger.vi" into another VI, and I have tried to read the stored
    data with the "High Speed Data Reader.vi". The problem is that I fight with
    one error after another, what prevents me from going further.
    I use LabView 6.1, under Windows 2K.
    Has somebody by chance already done something similar and would agree to
    share with me their experience? TIA for any suggestion.
    Regards,
    Victor Manta
    >>
    "Ben" wrote in message
    news:[email protected]...
    > Hi Victor,
    >
    > I have done a lot of similar work.
    >
    > Exactly what did you try and what specific errors did you encounter?
    >
    > What you are trying is do-able provided the hardware you have suuports
    > it.
    >
    > Please post (both here and to the DAQ group)
    > the details of the hardware you are using,
    > versions of software being used,
    > Examples that you are using,
    > error codes that occured,
    > posibly post example code showing the problem.
    >
    > Ben
    Hi Ben,
    I use two PCI-MIO-16E-1 cards, connected by RTSI. I'd like to stream the
    data from both cards in real time to a binary file, after having added a
    header to it.
    For tests, on the channel 0 of each card is applied the same square wave,
    100 Hz.
    Yes, the hardware support RTSI. I use LabView 6.1.
    Till now I have:
    1. Combined the "Two E-series Shared ScanClk.vi" and the "High
    Speed Data Logger.vi" into a DAQ VI. To do this, I have "doubled" and
    adapted the "High Speed Data Logger.vi". For testing purposes the data are
    stored in two files, always the same ones (the old ones being overwritten
    after each acquisition).
    2. "Doubled" and adapted "High Speed Data Reader.vi" into another VI, for
    reading from both files, mentioned earlier.
    What already works:
    - The headers for both files are correctly stored (VI point 1.)
    - The acquired data from the first card (device 1) are correctly stored (VI
    point 1.)
    - The VI (point 2.) that reads both files and displays the results works
    What doesn't work:
    - The acquired data from the second card aren't stored at all (VI point 1.)
    - An error message says: "Error -10608 occurred at AI Buffer Read. Possible
    reason: NI-DAQ LV: No transfer is in progress for the specified resource."
    I think that I understand this message, but I don't know how to continue.
    The DAQ VI can be downloaded from (please click the link, then the link on
    that page; about 100K, zipped):
    http://www.swissheartnet.unibe.ch/labview.htm
    Thanks a lot in advance.
    Regards,
    Victor Manta
    PS. I don't know which DAQ group you mean.

    "Filipe A." wrote in message
    news:[email protected]...
    > Victor;
    >
    > You can definitely accomplish that task with the DAQ boards you have
    > and Labview.
    >
    > It would be good if you could be more specific as far as what type of
    > errors you are seeing and how you are integrating both VIs.
    >
    > Regards
    > Filipe A.
    > Applications Engineer
    > National Instruments
    Maybe Mr. Filipe A. could help me? Please see below, and TIA.
    Regards,
    Victor Manta
    "Victor Manta" wrote in message
    news:[email protected]...
    > << (My first posting)
    > I use two E series PCI Cards, connected by RTSI. I'd like to stream the
    data
    > from both cards to a binary file and to add a header to it.
    >
    > I also need to somehow read (plot) the stored data, this with another VI.
    >
    > The whole should be then integrated into an existing program, that used
    just
    > one acquisition card.
    >
    > Till now I have tried to combine "Two E-series Shared ScanClk.vi" and
    "High
    > Speed Data Logger.vi" into another VI, and I have tried to read the stored
    > data with the "High Speed Data Reader.vi". The problem is that I fight
    with
    > one error after another, what prevents me from going further.
    >
    > I use LabView 6.1, under Windows 2K.
    >
    > Has somebody by chance already done something similar and would agree to
    > share with me their experience? TIA for any suggestion.
    >
    > Regards,
    > Victor Manta
    > >>
    >
    > "Ben" wrote in message
    > news:[email protected]...
    > > Hi Victor,
    > >
    > > I have done a lot of similar work.
    > >
    > > Exactly what did you try and what specific errors did you encounter?
    > >
    > > What you are trying is do-able provided the hardware you have suuports
    > > it.
    > >
    > > Please post (both here and to the DAQ group)
    > > the details of the hardware you are using,
    > > versions of software being used,
    > > Examples that you are using,
    > > error codes that occured,
    > > posibly post example code showing the problem.
    > >
    > > Ben
    >
    > Hi Ben,
    >
    > I use two PCI-MIO-16E-1 cards, connected by RTSI. I'd like to stream the
    > data from both cards in real time to a binary file, after having added a
    > header to it.
    >
    > For tests, on the channel 0 of each card is applied the same square wave,
    > 100 Hz.
    >
    > Yes, the hardware support RTSI. I use LabView 6.1.
    >
    > Till now I have:
    >
    > 1. Combined the "Two E-series Shared ScanClk.vi" and the "High
    > Speed Data Logger.vi" into a DAQ VI. To do this, I have "doubled" and
    > adapted the "High Speed Data Logger.vi". For testing purposes the data are
    > stored in two files, always the same ones (the old ones being overwritten
    > after each acquisition).
    >
    > 2. "Doubled" and adapted "High Speed Data Reader.vi" into another VI, for
    > reading from both files, mentioned earlier.
    >
    > What already works:
    >
    > - The headers for both files are correctly stored (VI point 1.)
    > - The acquired data from the first card (device 1) are correctly stored
    (VI
    > point 1.)
    > - The VI (point 2.) that reads both files and displays the results works
    >
    > What doesn't work:
    >
    > - The acquired data from the second card aren't stored at all (VI point
    1.)
    > - An error message says: "Error -10608 occurred at AI Buffer Read.
    Possible
    > reason: NI-DAQ LV: No transfer is in progress for the specified resource."
    >
    > I think that I understand this message, but I don't know how to continue.
    >
    > The DAQ VI can be downloaded from (please click the link, then the link on
    > that page; about 100K, zipped):
    >
    > http://www.swissheartnet.unibe.ch/labview.htm
    >
    > Thanks a lot in advance.
    >
    > Regards,
    >
    > Victor Manta
    >
    > PS. I don't know which DAQ group you mean.

  • Q: Acquiring data using two E series devices connected by RTSI and streaming data to disk

    I use two E series PCI Cards, connected by RTSI. I'd like to stream the data
    from both cards to a binary file and to add a header to it.
    I also need to somehow read (plot) the stored data, this with another VI.
    The whole should be then integrated into an existing program, that used just
    one acquisition card.
    Till now I have tried to combine "Two E-series Shared ScanClk.vi" and "High
    Speed Data Logger.vi" into another VI, and I have tried to read the stored
    data with the "High Speed Data Reader.vi". The problem is that I fight with
    one error after another, what prevents me from going further.
    I use LabView 6.1, under Windows 2K.
    Has somebody by chance already done something simi
    lar and would agree to
    share with me their experience? TIA for any suggestion.
    Regards,
    Victor Manta

    << (My first posting)
    I use two E series PCI Cards, connected by RTSI. I'd like to stream the data
    from both cards to a binary file and to add a header to it.
    I also need to somehow read (plot) the stored data, this with another VI.
    The whole should be then integrated into an existing program, that used just
    one acquisition card.
    Till now I have tried to combine "Two E-series Shared ScanClk.vi" and "High
    Speed Data Logger.vi" into another VI, and I have tried to read the stored
    data with the "High Speed Data Reader.vi". The problem is that I fight with
    one error after another, what prevents me from going further.
    I use LabView 6.1, under Windows 2K.
    Has somebody by chance already done something similar and would agree to
    share with me their experience? TIA for any suggestion.
    Regards,
    Victor Manta
    >>
    "Ben" wrote in message
    news:[email protected]...
    > Hi Victor,
    >
    > I have done a lot of similar work.
    >
    > Exactly what did you try and what specific errors did you encounter?
    >
    > What you are trying is do-able provided the hardware you have suuports
    > it.
    >
    > Please post (both here and to the DAQ group)
    > the details of the hardware you are using,
    > versions of software being used,
    > Examples that you are using,
    > error codes that occured,
    > posibly post example code showing the problem.
    >
    > Ben
    Hi Ben,
    I use two PCI-MIO-16E-1 cards, connected by RTSI. I'd like to stream the
    data from both cards in real time to a binary file, after having added a
    header to it.
    For tests, on the channel 0 of each card is applied the same square wave,
    100 Hz.
    Yes, the hardware support RTSI. I use LabView 6.1.
    Till now I have:
    1. Combined the "Two E-series Shared ScanClk.vi" and the "High
    Speed Data Logger.vi" into a DAQ VI. To do this, I have "doubled" and
    adapted the "High Speed Data Logger.vi". For testing purposes the data are
    stored in two files, always the same ones (the old ones being overwritten
    after each acquisition).
    2. "Doubled" and adapted "High Speed Data Reader.vi" into another VI, for
    reading from both files, mentioned earlier.
    What already works:
    - The headers for both files are correctly stored (VI point 1.)
    - The acquired data from the first card (device 1) are correctly stored (VI
    point 1.)
    - The VI (point 2.) that reads both files and displays the results works
    What doesn't work:
    - The acquired data from the second card aren't stored at all (VI point 1.)
    - An error message says: "Error -10608 occurred at AI Buffer Read. Possible
    reason: NI-DAQ LV: No transfer is in progress for the specified resource."
    I think that I understand this message, but I don't know how to continue.
    The DAQ VI can be downloaded from (please click the link, then the link on
    that page; about 100K, zipped):
    http://www.swissheartnet.unibe.ch/labview.htm
    Thanks a lot in advance.
    Regards,
    Victor Manta
    PS. I don't know which DAQ group you mean.

  • PXIe-5122 continuous stream 2 channels to disk with 100MS/s

    Hey,
    I am currently trying to find a way to stream 2 channels to disk with 100MS/s with my PXIe-5122. According to the product specification, the card should be able to do this. 
    Unfortunately, I have'nt seen any programs.
    What I have are two loops, one for the DAQ and one to empty the onboard memory using a queue and writing the fetched waveform data into a tdms file. I keep obtaining the error, that samples in the onboard memory are overwritten... therefore, the VI doesn't empty the onboard memory in sufficient speed.
    Does anybody know how I could solve this problem? Or does anybody have a program?
    Thanks for the help!

    Hi lehrm,
    you are writing about that you didn#t see any application for the 5122. If you mean examples, there are a lot of examples installed on your system when you install the driver sw for the device. eg. there is an example called niScope EX Stream to Disk, that seems to be interesting for your issue
    Examples are available in the Example Finder of LabVIEW, in the folder: "Hardware Input and Output" -> "Modular Instruments" -> NI-SCOPE (High Speed Digitizer)" -> "Continious Acquisition".
    This can give you first ideas! 
    Kind regards
    Tobias S.

  • Precise time stamping of serial data

    I am having trouble with precise timestamping  of incoming serial data recived on 4 ports using 4 separate threads that continually attempt to read a byte.
    When the expected frame is recieved the data is tagged with a time stamp.
    The issue seems to be windows xp or the serial ports themselves.  I am using an xsens serial to usb, 2 lavaport serial cards and the built in serial port.
    Any suggestions for precise timing?

    there is some hints:
       -for milisecond precise timestamp, you can use GetLocalTime,GetSystemTime or GetTickCount.
        But to achieve true milisecond scale, you need use timeBeginPeriod(1)/timeEndPeriod(1) otherwise you get 10-16ms scale depend on system
        (please read help pages on msdn for timeBeginPeriod function)
       - create your program to not use CPU too much(no pooling,just message and/or sync wait),
         or even better, do not run any other apllication which consume lot of CPU/DISK resources on the same PC
       - for serial communication (but this also depend on baud rate) you can try to set send/receive driver buffer to 1 (from windows device manager)
       - try different serial port card/converter(with different drivers)
       - if still need something to try, set higher process and thread priority (SetPriorityClass,SetThreadPriority)
    After all of this, on windows, there are no precise timing.Even if you do everything you can do, there is still chance to get time gap, but you can detect it (in milisecond precision)

  • Serial data input problem

    Hi friends.
    I have a problem with my java programming. Please don't laugh me if it is simple. I'm new in java.
    I want to take data from censor named RFIDreader. It use card like smartcard. When the card approach the censor, it send the ID which consist of 13 bytes of data.
    I have search code from the internet. But when I try to my PC, it didn't do very well.
    Hopefully, PC would receive all the ID data. But in my case it had to read twice to collect the data. The first trying, it's ok. It can collect data only once loop. But next, it must read 8 byte first and then read the rest on the second loop. Only if i restart my PC so it can be good again. But in the second try next, it screw up again.
    I use j2sdk 1.5.0 for windows.
    I want to collect the data once, so i can procces it to another task.
    this is my code
    /* Sample java code to read an RFID tag */
    import java.io.*;
    import java.util.*;
    import javax.comm.*;
    public class RFIDTagRead implements Runnable, SerialPortEventListener {
    static CommPortIdentifier portId;
    static Enumeration portList;
    InputStream inputStream;
    SerialPort serialPort;
    Thread readThread;
    //Array consisting of SOH, length, command, data, BCC
    static byte[] bytearray = {0x01, 0x02, 0x09, 0x32, 0x39};
    static OutputStream outputStream;
    static int n =0;
    public static void main(String[] args) {
    //Enumerate a list of available ports
    portList = CommPortIdentifier.getPortIdentifiers();
    // Identify the ports. I connected the reader with COM1
    while (portList.hasMoreElements()) {
    portId = (CommPortIdentifier) portList.nextElement();
    if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    if (portId.getName().equals("COM1")) {
    System.out.println("The port is: " + portId.getName());
    RFIDTagRead reader = new RFIDTagRead();
    public RFIDTagRead() {
    try {
    //Open the COM1 port and name it MicroReader with timeout 2000ms
    serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
    } catch (Exception e) {System.out.println("Port Error");}
    try {
    outputStream = serialPort.getOutputStream();
    // Write the stream of data conforming to PC to reader protocol
    outputStream.write(bytearray);
    outputStream.flush();
    System.out.println("The following bytes are being written");
    for(int i=0; i<bytearray.length; i++)
    System.out.println(bytearray);
    System.out.println("Tag will be read when its in the field of the reader");
    } catch (IOException e) {}
    // Set Serial Port parameter
    try {
    serialPort.setSerialPortParams(9600,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);
    } catch (UnsupportedCommOperationException e) {}
    try {
    //Register an event listener object to the port
    serialPort.addEventListener(this);
    } catch (TooManyListenersException e)
    {System.out.println("Too Many Listeners");
    //Specify an event type. On data availability, triggers serialEvent method
    serialPort.notifyOnDataAvailable(true);
    try {
    //Associate an InputStream object with this port.
    inputStream = serialPort.getInputStream();
    } catch (IOException e) {}
    //Start a thread to handle the time-to-read the tag
    readThread = new Thread(this);
    readThread.start();
    public void run() {
    try {
    Thread.sleep(56);
    } catch (InterruptedException e) {}
    //This method is called by notifyOnDataAvailabe()
    public void serialEvent(SerialPortEvent event) {
    switch(event.getEventType()) {
    case SerialPortEvent.BI:
    case SerialPortEvent.OE:
    case SerialPortEvent.FE:
    case SerialPortEvent.PE:
    case SerialPortEvent.CD:
    case SerialPortEvent.CTS:
    case SerialPortEvent.DSR:
    case SerialPortEvent.RI:
    case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
    break;
    case SerialPortEvent.DATA_AVAILABLE:
    n++; //to count the number of readings
    System.out.println("The reading description of RFID Tag" + " " + n);
    //array size must not be less than the number of bytes to be read
    byte[] readBuffer = new byte[20]; // to store the read data
    int numbyte = 0;
    try {
    while(inputStream.available() >0) {
    // Read the RFID data and store in the byte array
    numbyte = inputStream.read(readBuffer);
    System.out.println("Number of Bytes read: " + numbyte);
    } catch (IOException e) {}
    if( readBuffer[0] == 1) /*check if start bit is detected */
    int length = readBuffer[1];
    // Identify the Transponder type
    switch(readBuffer[2]) {
    case 12 :
    System.out.print("RFID is RO:" + "\t");
    break;
    case 13 :
    System.out.print("RFID is R/W:" + "\t");
    break;
    case 14:
    System.out.print("RFID is MPT/SAMPT:" + "\t");
    break;
    case 15:
    System.out.print("RFID is Other:" + "\t");
    break;
    // Write the actual tag reading in Hexadecimal
    for( int m = length+1; m > 2; m--)
    System.out.print(Integer.toHexString(readBuffer[m] & 255));
    System.out.println(" ");
    System.out.println("\t" + "Read Sucessful");
    System.out.println("----------------------------------");
    break;
    somebody have a suggestion? please help me...
    thanx

    You may want to try the 'Java Technology Forums - Socket Programming' forum for issues like this:
    http://forum.java.sun.com/forum.jspa?forumID=11
    btw, i did a search on that forum and found a thread that discusses a problem similar to the one you have:
    http://forum.java.sun.com/thread.jspa?forumID=11&threadID=555379
    The suggestion on that thread is:
    try to use
    serialPort.disableReceiveFraming();
    serialPort.disableReceiveTimeout();
    serialPort.enableReceiveThreshold(length);
    with lenght as the preferred size of the dataset. (e.g. 16 bytes instead of 8)You may want to read that thread to see if it helps...

  • Program to decode serialized data?

    Is there a program around which displays the contents of a serialized data stream? Because I'm having a bit of difficulty in serializing some highly interlinked objects, and I suspect that a class is being serialized which shouldn't be. It would be good just to have a quick look at what objects are in the output file.
    I've seen the spec, and should obviously write a one-off program to do the decoding, but if there's something out there already it would save a lot of time.
    I tried doing a loop with
    Object o=objectInputStream.readObject();but it complained that the UIDs were wrong. Which of course was true.

    If you were to System.out.println(objectInputStream.readObject(); in your loop instead of assigning it to an object, does/will it still generate the UID error?
    I don't know of a program to do what you want, but I do know a tedious way to get around the UID error. When it gives you the error, copy down the UID number of the file, then go over to the class and declare private static final long serialVersionUID = /*the UID of the file followed by an L*/ I feel like it's almost a hack, but it will stop the UID mismatch, and you won't have to worry about it again. (I think. It worked for me when I had UID issues and realized it was because I wasn't declaring serialVersionUID like I should have been.)

  • Direct Streaming of data from onboard memory to Host memory in PXI 5122

    Hey All,
    I have a small query about PXI 5122. In Data Sheet its written that " The PXI-5122 also can stream data continuously from onboard memory to host memory for longer acquisitions and streaming to disk. "
    So do we have to write some code for streaming the data on hard disk or when drivers of this card is installed then some VI's will appear in control panel through which we can stream data on hard disk ??
    I hope you all understood what my query is. Please let me know for further details
    Thank you.
    Regards,
    Sarang Dhananjay Jaiswal
    Satyam Development Center, Banglore, INDIA

    hi sarang,
    u have to write some code for streaming the data on hard disk,
    for any applications using labview u need to do coding........
    here is a vi which will do streaming of data on to hard disk
    to know more about digitizers (C:\Program Files\National Instruments\LabVIEW 7.1\examples\instr\niScope\niScope EX Getting Started.vi)
    or in labview goto
    find examples \hardware input output \modular instruments\ NI-scope(high speed digitizers)
    regards
    ak
    Attachments:
    Stream data to Disk1.vi ‏172 KB

  • What's the fastest C function for writing binary data to disk?

    I'm acquiring data at high speeds across multiple boards and I'm having a hard time writing the data to disk fast enough to keep up. I'm programming in C in Visual Studios and I'm currently using fwrite. I have a similar system set up in LabView and my C code can't perform as well. Is there a better or faster way to write to disk in C?

    Some speculated a few years ago that there would be
    no reason to use Fortran too. :)Are you saying there's a reason to use Fortran? Help me lord!
    Anyway, they were right! The industry may be stalling, but the vision is not. The economy and many other factors are to blame for why we haven't been able to break out of the computing paradigm we're stuck in. It's like the automobile, it hasn't changed in a century. Why? $$$
    Oh, people said we'd have flying cars by now, where are they? Well we do have them! But we're too busy spending that 400 billion a year on war instead of evolving as a species.
    Anyway, when we take the next step and have true distributed computing with multi-core processors everywhere, Java will run, Java will scale, and Java will outperform ANYTHING available.
    And speaking of game programming, the PS3 developers are having a hell of a time doing the 3 CPUs. Why? Because all they've ever done is single & double processor systems. It's time to think out of the box. When a game console hits the market with 512 CPU cores, do you REALLY think C/C++ will run on that? But, Java was designed for it.
    Java = the future
    C++ = the past

  • Searching Incoming Serial Data

    Greetings!
    I was trying to get visual studio to filter through the incoming serial data it is receiving from an Arduino. The program shows the incoming data, so I know the serial port is working, but I'm not sure how to get it to look through that data ( I was thinking
    I could use StreamReader to do this). My goal is this: When certain data is received, change the background color of a textbox. I am very new at this and any direction would be appreciated! I feel like i'm throwing spaghetti at a wall... 
    Here is my current code:
    Imports System
    Imports System.Threading
    Imports System.IO.Ports
    Imports System.ComponentModel
    Imports System.IO
    Public Class Form1
    Dim myPort As Array
    Delegate Sub SetTextCallBack(ByVal [TEXT] As String)
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    myPort = IO.Ports.SerialPort.GetPortNames()
    portCmbo.Items.AddRange(myPort)
    End Sub
    Private Sub startBtn_Click(sender As Object, e As EventArgs) Handles startBtn.Click
    SerialPort1.PortName = portCmbo.Text
    SerialPort1.BaudRate = baudCmbo.Text
    SerialPort1.Open()
    startBtn.Enabled = False
    closeBtn.Enabled = True
    End Sub
    Private Sub closeBtn_Click(sender As Object, e As EventArgs) Handles closeBtn.Click
    SerialPort1.Close()
    startBtn.Enabled = True
    closeBtn.Enabled = False
    End Sub
    Private Sub SerialPort1_DataReceived(sender As Object, e As SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
    ReceivedText(SerialPort1.ReadExisting())
    End Sub
    Private Sub ReceivedText(ByVal [text] As String)
    If Me.inputTxtBox.InvokeRequired Then
    Dim x As New SetTextCallBack(AddressOf ReceivedText)
    Me.Invoke(x, New Object() {(text)})
    Else
    Me.inputTxtBox.Text &= [text]
    End If
    End Sub
    Private Sub outputTxtBx_TextChanged(sender As Object, e As EventArgs) Handles outputTxtBx.TextChanged
    Dim myReader As StreamReader = New StreamReader("Me.inputTxtBox")
    Dim line As String = ""
    End Sub
    End Class
    ps: If there is an easier way of doing this, please let me know!

    You should read a good book on "Communications".  When processing received data (from any device) you need to wait until you get the end of message before parsing the data.  The data will be received in chunks that can contain from 1
    to a million bytes.  When you get the word "Hello" you could get "H" then "ello" or "Hel" and then "lo".  You can't start looking through the data until you get the entire word "Hello". 
    So you first have to define a protocol for sending commands to the device and the amount of data that gets returned.  So normally you have to terminate a message using one of the following methods
    1) Ascii : Terminate a message with a fix character like a return or EOM.
    2) Ascii or binary : Includes a bytes count at the beginning of the message.
    3) Ascii or binary : Each type message is a fixed length.
    You can use combination of the 3 methods above.
    jdweng

Maybe you are looking for

  • Time machine issues after migrating to a new MBP

    I just migrated to a MacBok Pro (new, late 2008) 2.4 GHZ with 4 GB RAM. I backed up my older iMac and then during an erase and install, i chose to use the time machine to migrate my data from the installation process. Everything went well and it all

  • Deadful Customer Care - get it sorted

    hello all Ok here goes, see timeline of events below and please bare with me: 04 January 2015 (20:00 approx)- I discovered a fault with my broadband connection, (home hub 4 flashing yellow indicator, no internet). Called the helpdesk and spoke with *

  • Advantages of using PI 7.1 over PI 7.0

    Hi All, I need to suggest to my client, the advantages of using PI 7.1 over PI 7.0, so that we can use the same for our development. Please dont send me the links from SDN, just suggest the advantages. Useful answers will be rewarded. Regards Ranjit

  • Expdp with network_link and different character sets for source and target?

    DB versions 10.2 and 10.1 Is there any limitation for implementing expdp with network_link but target and source have different character sets? I tried with many combinations, but only had success when target and source have the same character sets.

  • Inspection Lot for Process Order without Header Material

    Guys, We have an scenario that we create a Process Order without Header material using T code CORO. Is it possible to assign or create  a Inspection lot for Process order? Regards, Senthilraja