Data to labview

Im doing an ecg data transfer  from text file to a graph.  now ive got a problem that i cant i produce a graph from my programme.
 This programme has been able to work with other data(irradience text file) but cant with the ecg data(pearsonfiletext). its been long time since i used labview so ive lost touch abit. plz help
Attachments:
IrradianceTemp 1day.txt ‏5104 KB
full.vi ‏857 KB
Pearson_03_rec_(1)1.txt ‏161 KB

Your two data files have very different structure and date/time format.
We are missing a subVI, please attach it.
What's up with the blinding color scheme? Black axes on dark blue background does not seem reasonable. 
Why is the second loop a while loop instead of a for loop? You know the number of iterations before the loop starts.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Writing data from labview to excel

    Hi, currently I'm trying to get an array of data from labview into a specific excel file everytime.
    The attachment i have is a program creating a new worksheet everytime it runs. I couldn't figure out how to make it work. Anyone can help me? 
    Attachments:
    Excel Copy Example.vi ‏19 KB

    So what is the specific problem? What is it doing that is incorrect? If the problem is that it is creating a new file every time its because the first subVI is opening a spreadsheet template file. Or at least I think it is since all of the subvis are missing...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Can a CIN that is in an infinite loop send data to labview without exiting?

    I have a C program that continuously queries a motor controller.  Right now that program is in a labview vi as a CIN.  The problem is that the CIN must exit before reporting the controller response to the labview vi.  This means I have to constantly run the CIN which opens, queries and closes the connection each time.  Is it possible to run the loop in the CIN itself so that the response buffer from the controller can be sent to the labview vi without exiting.  Are there variables types that can be passed from the CIN before completing the CIN? 

    The controller is a Galil DMC4080 motor controller.  I am running Labview under Mandrake Linux.  I can connect and send commands to the controller using a C program.  I modified the C program as a CIN to pass the controller response to the Labview front panel.  Galil has a library of functions used for the controller commands.  LStrPrintf is the command I use to write the data to labview.  Currently I just run this CIN without a while loop and loop it in labview but I recieve an  error message  after  a 1000 executions, see: http://forums.ni.com/ni/board/message?board.id=170&message.id=270220
    If interested here is the current code I am using with the infinite loop. 
    #include "extcode.h"
    #include "dmclnx.h"
    #include "hosttype.h"
    MgErr CINProperties(int32 prop, void *data);
    MgErr CINRun(LStrHandle IPAddress, LStrHandle Command, LStrHandle Response,
            float64 *ErrorCode);
    MgErr CINProperties(int32 prop, void *data)
        switch (prop) {
            case kCINIsReentrant:
                *(Bool32 *)data = TRUE;
                return noErr;
        return mgNotSupported;
    MgErr CINRun(LStrHandle IPAddress, LStrHandle Command, LStrHandle Response,
            float64 *ErrorCode)
       float          rc = 0;          /* Return code */
       char           buffer[32] = ""; /* Response from controller */
       char           ip[20]=""; /* IP address of controller*/
       char           cmd[20]=""; /* Command to send to controller*/
       HANDLEDMC      hdmc = -1;       /* Handle to controller */
       CONTROLLERINFO controllerinfo;  /* Controller information structure */
       memset(&controllerinfo, '\0', sizeof(controllerinfo));
       controllerinfo.cbSize = sizeof(controllerinfo);
       controllerinfo.usModelID = MODEL_2100;
       controllerinfo.fControllerType = ControllerTypeEthernet;
       controllerinfo.ulTimeout = 1000;
       controllerinfo.ulDelay = 5;
       SPrintf(ip,"%H",IPAddress);
       strcpy(controllerinfo.hardwareinfo.socketinfo.szIPAddress, ip);
       controllerinfo.hardwareinfo.socketinfo.fProtocol = EthernetProtocolTCP;
       DMCInitLibrary();
       /* Open the connection */
       rc = DMCOpen(&controllerinfo, &hdmc);
       if (rc)
           *ErrorCode = rc;
           return noErr;
          while (1)
              SPrintf(cmd,"%H",Command);
              rc = DMCCommand(hdmc, cmd, buffer, sizeof(buffer));
              if (rc)
                  *ErrorCode = rc;
                  return noErr;
                  break;
              else
                  LStrPrintf(Response,buffer);
       rc = DMCClose(hdmc);
       if (rc)
          *ErrorCode = rc;
          return noErr;
       *ErrorCode = rc;
       return noErr;

  • Converting formatted excel date to useful data in labview

    I am using the report generation toolkit for Office, and reading an excel file.  All the data comes back fine, except for the date column.  In excel the column is formatted as a date (ex. 5/5/05) but when it comes through in labview it ends up being something like "37740", it's the same effect if you switch the format in excel to general, the date changes to a number.  Is there anyway to leave the formatting the way it is in Excel and still bring into labview a useful date, or would I have to format the excel file differently?
    Thanks.

    I think I have it figured out using the Excel serial number date.  I attached a vi of something I threw together quickly to convert excel date serial numbers to labview date info.  I'm not 100% if it works all the time, but the few examples I tried worked fine.
    Attachments:
    Excel date to labview date.vi ‏53 KB

  • Plot exel data in labview dynamicall​y

    I would like to plot My Excel data in labview on XY graph, dynamically every 5 seconds.
    i heard that we have to make use of activex.
    Attachments:
    int_ana_110101.xlsx ‏14 KB

    Hi,
    Yes, you can use ActiveX to do this.
    Search "excel" on LabVIEW examples and forums, and you will find a lot of examples to male what you want.
    Best Regards,
    V-F

  • Siemens PLC S7-300 data to LabVIEW RT via Profibus ?

    How can I acquire Siemens PLC S7-300 data to LabVIEW RT via Profibus ? (My RT is hooked up to SCXI chassis.) There is the PCI-1500 Profibus board - but I'd have to use it on another PC running regular LabVIEW, then get data somehow to the SCXI chassis... that's too complicated! Any ideas ? Thanks! benji.

    We are currently working on a driver for the Profibus cards and LabVIEW RT. I imagine that NI is too. Our intention is to help fill in the Industrial network gaps for LVRT. If you'd like, I'll send you an update in 2-4 weeks. Maybe you can help us beta test it.

  • Ideas about storage of spatial data in Labview?

    hello,
    by working on a project i have met such a problem:
    how can i read the data from the spatial database named PostGIS and in which format can i store the data in Labview?

    So you have a remote database (probably somewhere on the file system)...
    This database is a PostgreSQL database.
    Now you want this data to be available on your local machine. The most
    effective way is to simply copy the database. If you do that, you can use
    all code for the local and the remote database. Simply connect to one of
    them, and the queries will succeed. MySQL has functions to create copies of
    the database, and my guess is PostgreSQL has similar functions. So a command
    line call to the database is probably all that is needed to make the copy.
    If you (for some reason I can't imagine) want to read all information from
    the database and store it in a text file, I can't give you all the details.
    I'm not a PostGIS expert. I have no idea what sort of things are stored in
    the database or how it is organized. Going by the manual, it sure looks
    complicated.
    In general, you need to do a query for each table (SELECT * FROM table).
    1) do a query
    2) store the query's result (it is a 2D array, so convert it to a
    spreadsheet string)
    3) repeat these steps, until you queried all tables.
    If you do this, you have all the information in the database.
    Regards,
    Wiebe.

  • Import excel data for labview control

    I'm having some trouble importing excel data into labview. Goals: Input valve flow rates into excel, use those values to control DAQ, have user balance odor with excel defined flow rate, export balance data to excel. Here is what I have so far. Any help is greatly appreciated.
    Attachments:
    Intensity.vi ‏162 KB

    Where in the code are you reading from the Excel Spreadsheet? What VIs are you using? What are the problems are you experiencing (errors, unexpected values, etc.)?
    There is a Read From Spreadsheet File.vi in LabVIEW. LabVIEW uses ActiveX controls for .xlsx files, so saving the spreadsheet as a CSV file may be better for this VI. Try it out! See what happens.
    Here some more info on reading from spreadsheets:
    LabVIEW Manual: Read From Spreadsheet File VI
    KnowledgeBase article: How Can I Import Spreadsheet Files into LabVIEW using the .csv Format?
    Taylor B.
    National Instruments

  • How can we share and transfer data at Labview using the internet

    How can we share and transfer data at Labview using the internet
    Dr. Eugene Berman, Moran Kamilyan and Ravit Bar

    [email protected] wrote:
    How can we share and transfer data at Labview using the internet
    Check these links:
    Basic TCP/IP Communication in LabVIEW
    Data Sockets
    Integrating the Internet into Your Measurement System

  • How can I read the trace data into LabVIEW for E5071B

    HI 
    I am setting up the measurement using vector network analyzer (VNA) E5071B controlled by NI 488.2. How can I read the trace data into LabVIEW and display on the graph? If anyone having an idea or know well about this process please give me the suggestion, I will much appreciate it.
    Many Thanks

    You want to start with the driver
     In case you do not know it, you can do the driver search in LabVIEW from Tools>Instrumentation>Find Instrument Drivers. You might also want to bookmark the Instrument Driver Network for information on what a driver is and how to use it.

  • Output data from LabVIEW, input to C++ code

    I currently have a LabVIEW VI which grabs data (range and angle measurements) from the RS232 serial port, and formats this data into two values - X and Y coordinates (double data types).  What I want to do is pass these individual numerical values (not an array of X/Y coordinates) to a C++ gesture recognition program that inputs X and Y coordinates and determines the gestures.
    What is the best way of passing a value from LabVIEW to C++ code?
    I apologize if this was answered in another thread - I searched through some, but couldn't find any information relevant to my question.  Thanks for the help!

    Hi delvec28,
    delvec28 wrote:
    I currently have a LabVIEW VI which grabs data (range and angle measurements) from the RS232 serial port, and formats this data into two values - X and Y coordinates (double data types).  What I want to do is pass these individual numerical values (not an array of X/Y coordinates) to a C++ gesture recognition program that inputs X and Y coordinates and determines the gestures.
    What is the best way of passing a value from LabVIEW to C++ code?
    I apologize if this was answered in another thread - I searched through some, but couldn't find any information relevant to my question.  Thanks for the help!
    You may want to build a DLL.  A DLL is like a collection of functions - compiled in a way to be used by other programs.
    If the C++ code calls a LabVIEW function which returns values to the C++ code, then the LabVIEW code will be compiled as a DLL.
    C++ code could also be compiled into a DLL usable by LabVIEW.
    There are also ways for separate applications to share data - LabVIEW can be an ActiveX server, LabVIEW also supports DDE (Dynamic Data Exchange)  - these are both Windows-OS-specific.  LabVIEW can be a .NET client, though (as far as I know) LabVIEW cannot yet implement a .NET server.
    TCPIP is yet another (OS independent) method of sharing data between LabVIEW and another application - it's really not too complicated (at least not on the LabVIEW side .)
    Are there two applications running (C++ + LabVIEW)?  If not, in which language is the main program written in?
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • I would like to build I data base in teststand which collect data from labview , if you have example (sequence) that give me some way to build sequence

    I would like to build a data base in teststand which collect data from labview program , if you have example (sequence) that give me some way to build sequence that have step of action for labview and step
    data base

    There is an example in the \TestStand\Examples\Database directory. Basically there are two ways to connect to your database.
    1. You can use the TestStand database step types. There are steps for opening/closing a database connection, opening/closing an SQL statement, and a step for performing a data operation.
    2. The other way is to use the TestStand database logging capability to write your results to the database. This is the way I would recommend. With database logging, you use the step results container to record all your results as the sequence runs. (This is done automatically by TestStand). When the sequence is complete, the process model calls a "Log to Database" sequence that will write the results to the database. You must define your datab
    ase schema using Configure->Database Options. There are some default (or example) schema definitions already defined. Refer to chapter 18 of your TestStand manual.
    Another way to log the data as the sequence is running is shown in the \TestStand\Examples\OnTheFlyReports. This has the advantage of recording data as it is obtained, but it is not as efficient in terms of using a database connection. I don't recommend using this method.
    Please post again if you have any more questions. If you are using stored procedures with your database, I can probably give you some tips.
    Mark

  • Acquire data using Labview VI and process in matlab.

    hello,
            I wish to read data for two analog inputs using a NI DAQ USB 6356 and process it in matlab. I do not have matlab data acquisition toolbox. My Matlab code includes a mex file. I am planning  to start with an example vi for data acquisition and put into it a matlab script node which would have my matlab code and will also call the mex file. I just want to know if this method is at all possible or if there is a better way to do it. At this time it would be sufficient if I just get a fixed number of samples and send it to Matlab, i.e I do not need any real time processing.
    Umar.

    Hi Umar,
    Unfortunately we do not have Matlab within the office here so I'm unable to replicate your issue. On searching the details of the error you're experiencing on the MathWorks(R) website the explaination behind the error is:
    Explanation:The number of left parenthesis is not equal to the number of right parenthesis in your expression.
    Common causes:You added a left parenthesis or removed a right parenthesis from the line of code.
    Solution: Count the number of left parentheses and right parentheses on the line of code. Verify that the quantity of the two types of parentheses are equal. Add in an appropriate number of right parentheses or remove extraneous left parentheses.
    This suggests that the number of opening brackets does not equal the number of closing brackets, however on reviewing your code it seems that this is not the case. Would it be possible to run the Matlab Toolbox code on an older version of Matlab? It may also be worth reducing the "Samples_per_Channel" and "Sample_Rate" to much lower levels to see if the code executes.
    Another solution might involve sampling the data within LabVIEW and then exporting the data to a *.csv data file which can then be easily imported for analysis within Matlab 2011. In this case invoking Matlab following data acquisition using a "Matlab Script Node" would be the best option.
    Kind Regards
    Jamie S.
    Applications Engineer
    National Instruments

  • Questions on Saving and mining data with Labview and DIAdem

    Hi,
    I am sampling two signals at 200k sampling rate. I am trying to save the data on harddisk and analyzing the data using DIAdem.
    If I save the data using mesurement file format .tdm and .lvm, the file size will be about 4 Gigabytes for only 10 mins' acquisition. It is very slow to process it.
    I used the software Clampex and pCLAMP(Axon Instruments) before. At the same 200k sampling rate and also acquiring two signals, these programs save the data as .atf format and the size is only 400 MB for 10 mins' acquisition.
    I wonder if there is also a good way to handle this situation using Labview and DIAdem, and how to do it?

    Hi, Jonathan:
    I tried the TDM binary file format. The file size is 800 MB per min acquisition and it will take a long time to just open these files. For my application, I have to take data for several hours. I am looking for a way to reduce the size of files.
    Is there any other type of file format that can reduce the size significantly and can be handled easily?

  • What is the best way to stack DAQ aquired data in labview?

    I'm developing an application to work with an M-series daq card and labview 8.5 to output a signal and then record on 8 differential inputs for a short period of time (~10 ms). I need to stack my data, however, because the incoming signal will be very, very small, even after amplification. So basically i'm running a slightly modified version of the multifunction Synch AI-AO.vi (included with the install of daqmx). What is the best way for me to rerun this vi a set number of times and add new data directly to the old data (not cat-ing or anything, like |sample 1 of run 1| + |sample 1 of run 2| = stacked stample 1).
    A slightly modified version of the mutlifunction synch AI-AO.vi is attached.
    Attachments:
    des_v2_Multi-Function-Synch AI-AO.vi ‏143 KB

    Hi LSU,
    see attachment on how to "stack" several measurements. I simply add the waveforms and use a shift register to keep the last iterations value.
    Writing to files in each iteration is extremly CPU consuming - especially with express vis. Using for loops for just one iteration is "senseless". You could enable the conditional terminal of the for loop to realize your stop feature.
    For your message 4:
    Have you ever tried all the things you asked for? Sometimes it's easiest to just try&error
    And for the "n=n+x" question: It really helps to take the free online courses offered by NI!
    Message Edited by GerdW on 11-11-2009 06:27 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    des_v2_Multi-Function-Synch AI-AO.vi ‏128 KB

  • How can I collect and record data in LabVIEW from Sensirion Temperature/Humidity Sensor connected to myRIO?

    The product documentation of the sensor and the datasheet is attached. Also Digilent MXP Breadboard's image is attached.
    I've connected the sensor to myRIO using the starter kit's MXP breadboard: http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,842,1216&Prod=MXP-BB
    The output of the sensor is in digital. My initial goal is to get digital output in form of 8 or 12 or 14 bits and then convert them to decimal numbers and record them.
    Pin 1 of sensor is Data, which is connected to myRIO's connector A, DIO1 pin 13.
    Pin 3 of sensor is Clock, which is connected to myRIO's connector B DIO5/SPI.CLK pin 21. According to the datasheet of the sensor, if VDD < 4.5V then Clock should be set to 1MHz.
    Pin 4 of sensor is Ground, which is connected to Digilent MXP Breadboard GND pin.
    Pin 8 of sensor is VDD, which is connected to Digilent MXP Breadboard +3.3V pin. Supply voltage range is 2.4-5.5V and recommended voltage is 3.3V.
    I need to be able to send the following commands to the sensor from LabVIEW.
    Measure temperature: 00000011
    Measure relative humidity: 00000101
    Then, myRIO has to wait for maximum 20 milliseconds (ms) for 8-bit measurement, 80 ms for 12-bit measurement, and 320 ms for 14-bit measurement.
    Two bytes of measurement data will then be transmitted. myRIO as microcontroller must acknowledge each byte by pulling the DATA line (pin 13) low. All values are Most Significant Bit (MSB) first. Note that for 8-bit result, the first byte is not used. Finally, myRIO has to terminate the communication after the measurement data Least Significant Bit (LSB) has been received by keeping ACK bit, which is the LSB bit, as high.
    Attachments:
    Digilent MXP Breadboard.jpg ‏96 KB
    Sensirion-Temerature-Humidity-Sensor-Documentation.pdf ‏136 KB
    Temperature-Humidity-Manufacturer-Datasheet.pdf ‏323 KB

    Have you searched the forum?
    http://forums.ni.com/t5/LabVIEW/Sensirion-sht7x-labview/m-p/350958/highlight/true#M179022
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Maybe you are looking for