Write Data to Wonderware Historian from LabVIEW

I am looking to log data acquired using LabVIEW and CRIO to a Wonderware Historian.  If someone has experience in this area, would you mind sharing the way you accomplished it?  The cRIO unit will be connected to a TPC-2212 also.
Thanks in advance!
Bob C

Hi BobbyCee,
I am not familiar with the Wonderware Historian since it is not an NI product, but it looks like it is a SQL server.  Where will you be hosting the SQL server?  How are you planning on communicating with it?  
The Database Connectivity Toolkit is typically used for communicating with SQL servers.  
http://sine.ni.com/nips/cds/view/p/lang/en/nid/209​060 
You may want to contact Wonderwave to see if it is compatable.
Hope this helps!
Dayna P.
Applications Engineer
National Instruments

Similar Messages

  • Write data on database ACCESS from labview

    Hi!
    I want to write on a table of database from labview... I have already succeeded in opening the base and the table but I don't know how write on it... I know that I must use
    with Table
    .Addnew
    Table.Fields(0)=what I want to write
    .update
    end with
    But how do it with labview ???
    Thanks in advance
    hasna
    Attachments:
    lecture_de_la_base.vi ‏35 KB

    Hi Kiki,
    I believe you have another Developer Exchange Forum open for this issue. To keep them similar, I am attaching an updated version of your VI. It is wired to read any errors which occur in the VI. I received error -2147221164. This does not help too much, because the meaning of this error depends upon the ActiveX server. You will want to run this VI yourself, see which error you get, and then consult the ActiveX Server documentation to find the meaning of the error.
    J.R. Allen
    Attachments:
    criture_de_la_base.vi ‏37 KB

  • Possible data loss whlie transfering from Labview 7.0 into Matlab [binary]

    Greetings,
    I am kind of confused on binary data processing from labview to matlab. I tried to follow this thread by C. Minnella:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=211371&query.id=131675#M211371
    And it was a great help for me to understand many of my issues. However there is something wrong with data that I am writting and retrieving in Matlab
    Here is how signal looks in Labview
    http://img126.imageshack.us/my.php?image=picture1va4.png
    And its spectrum
    http://img126.imageshack.us/my.php?image=picture3hn6.png
    http://img146.imageshack.us/my.php?image=picture4br6.png
    And this is what I am getting in Matlab:
    http://img357.imageshack.us/my.php?image=picture7jq7.jpg
    my vi:
    http://img146.imageshack.us/my.php?image=picture2wn0.png
    The only change I did was replacing DAQ task with Global chanel constant, since it has original scaling for the data from Load Cell (Fx Axis in particular), this is the device I am getting data from, it is in rest, sitting on the table.
    I can't figureout what is happening, looks like it is clipped, besides the amplitude is not correct.
    Would really appreciate any insights,
    Oleks 

    Hello Ton,
    Thank you for the fast reply, here is a part of the code that reads from Labview data file:
    %Read header information, return in a structure[headerInfo,fileMark] = GetHeader(fileName,pathName, dataBytes);
     %Open binary file Big endian formatfid=fopen([pathName fileName],'rb','ieee-be');  %Move file marker to begining of scansfseek(fid,fileMark+startScan,'bof');  %Read number of requested scansy=fread(fid,headerInfo.NumChannels*scans,dataType);
     %Reshape data into a matrix [scans x channels]y=reshape(y,headerInfo.NumChannels,[])';
     %Close binary filefclose(fid);
    I basically followed example posted in 2006 on NI forum. I think my major concern is whether data is getting to matlab scaled correctly (it is scaled within global channel to Newtons) and looks like I am not getting the same data type in Matlab.

  • Trying to write data to file (time from timestamp + velocity + temperatur​e)

    Hello all. I've received a considerable amount of help from many of you recently, and once again I'm seeking assistance.  Having spent the majority of my LabVIEW time dealing with GPIB and data aq boards, I'm still struggling with various aspects of serial communication.  I have been working on a .vi to both control and accept data from a Furness Micromanometer.  The last task is to write the data to a file.  Attached is a copy of the vi, as well as what the front panel looks like after a test, and the resulting data saved to disk.  Anyone have any suggestions on how I should change the formatting of the data, or do whatever else might be necessary, so that my laptop and the micromanometer will get along and play well together?
      Below is the data saved to the text file, as well as the front panel showing what SHOULD have been saved. See next posting for vi.
       @6      @6      @6      @6      @6      @6      @6               
    8:00:00 PM             
    8:00:00 PM  
    1:41:28 PM             
    8:00:00 PM  
    1:41:28 PM  
    1:41:37 PM?²-V     
    8:00:00 PM  
    1:41:28 PM  
    1:41:37 PM  
    1:41:47 PM?°£×
    =p¤     
    8:00:00 PM  
    1:41:28 PM  
    1:41:37 PM  
    1:41:47 PM  
    1:41:57 PM?éãS÷ÎÙ     
    8:00:00 PM  
    1:41:28 PM  
    1:41:37 PM  
    1:41:47 PM  
    1:41:57 PM  
    1:42:07 PM?ÿt¼j~ùÛ     
    8:00:00 PM  
    1:41:28 PM  
    1:41:37 PM  
    1:41:47 PM  
    1:41:57 PM  
    1:42:07 PM  
    1:42:17 PM?ûhr° Äœ     
    8:00:00 PM  
    1:41:28 PM  
    1:41:37 PM  
    1:41:47 PM  
    1:41:57 PM  
    1:42:07 PM  
    1:42:17 PM  
    1:42:27 PM?ÆéxÔýó¶      
    8:00:00 PM  
    1:41:28 PM  
    1:41:37 PM  
    1:41:47 PM  
    1:41:57 PM  
    1:42:07 PM  
    1:42:17 PM  
    1:42:27 PM  
    1:42:37 PM?ý‡+ J

    It looks like you have not formatted your data properly to save it. Can you post a bit of you code? It would be easier to advise you.
    Mike...
    PS: Where are you at with Corning? I spent about 2 yrs in Painted Post...
    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

  • How can I read/write data files (text file) from PL/SQL Script

    I had an oracle forms pl/sql program to read/write a data file (text file). When this code is run on a command line as a PL/SQL script using the SQL*Plus I am getting an error:
    -- sample.sql
    DECLARE
      vLocation                 VARCHAR2(50)  := 'r:\';
      vFilename                 VARCHAR2(100) := 'sample.dat';
      vTio                   TEXT_IO.FILE_TYPE;
      vLinebuf               VARCHAR2(2000);
      vRownum               NUMBER        := 0;
      -- use array to store data FROM each line of the text file     
      TYPE           array_type IS VARRAY(15) OF VARCHAR2(100);
      vColumn      array_type := array_type('');
      PROCEDURE prc_open_file(p_filename IN VARCHAR, p_access IN VARCHAR2) is
      BEGIN
        vTio := TEXT_IO.FOPEN(vLocation||p_filename,p_access);
      EXCEPTION
        WHEN OTHERS then
          --  raise_application_error(-20000,'Unable to open '||p_filename);
          message(sqlerrm);pause;
      END;
      PROCEDURE prc_close_file is
      BEGIN
        IF TEXT_IO.IS_OPEN(vTio) then
           TEXT_IO.FCLOSE(vTio);
        END IF;
      END;
    BEGIN
      --extend AND initialize the array to 4 columns
      vColumn.EXTEND(4,1);
      prc_open_file(vFilename,'r');
      LOOP
          LTEXT_IO.GET_LINE(vTio,vLinebuf);
          vColumn(1)  := SUBSTR(vLineBuf, 1, 3);
          vColumn(2)  := SUBSTR(vLineBuf, 5, 8);
          vColumn(3)  := SUBSTR(vLineBuf,10,14);     
          Insert Into MySampleTable
          Values
            (vColumn(1), vColumn(2), vColumn(3));
          EXIT WHEN vLinebuf IS NULL;
       END LOOP;
       prc_close_file;
    END;
    SQL> @c:\myworkspace\sql\scripts\sample.sql;
    PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declaredIt works on the oracle forms but not on the SQL*Plus. Is there an alternative method using a PL/SQL script? A simple sample would help. Thanks.

    Did you ever noticed the search box at the right side of the forum?
    A quick search (limited to this years entries) brought up this thread for example
    Re: UTL_FILE Examples

  • Getting correct Date/Time data in DIAdem 11 from LabView tdms data

    I've got a handful of large tdms  files (9-18 million data points) collected with LabView that I need to extract elements of, and export as a text file, with the time data as a string.
    I'm using DataFileLoadSelect and the Register option and then DataBlCopy to bring in a chunk of data at a time, but I'm having to explicitly convert each time value from a LabView timebase (1/1/1904) to the DIAdem timebase (1/1/0000), not to mention the offset,  before writing the date-time as a text string - this really slows the process down. 
    I't strikes me that DIAdem(11.1) has got to have a way to read LabView timestamps correctly, but I'm a DIAdem novice, so any suggestions would be helpful. And no, I don't have LabView installed locally, so using a LabView vi is not an option for me.
    Thanks,
    Eric
    Solved!
    Go to Solution.

    WfmToDateWfm works great, but there is a bug in the code if you want to use DataFileLoadRed and your starting point is not at the beginning of the file.  There is a provision in WfmToDateWfm to handle the offset, but it's not hooked up:
    OffStartTime = ChnPropValGet(Channel, "wf_start_offset") ChnDeltaTime = ChnPropValGet(Channel, "wf_increment")
    RelStartTime = 24*3600*(Trunc(ChnStartTime) + 693958 + Abs(Frac(ChnStartTime)))
    To make WfmToDateWfm work with an offset, simly add the variable OffStartTime to the RHS of RelStartTime
    Eric 

  • Write to Citadel database from LabVIEW?

    Hi. I'm a newbie when it comes to Lookout and the Citadel database... so here's my question for you all:
    We have various labview applications that log data from instruments. We would like to be able to take this data and store it as "tags" in a Citadel database.
    What do you think is the best way to do this?
    There are ODBC drivers for the Citadel database, but they appear to only allow you to query the database to retrieve values... you can't write data to the database (so its read-only).
    Are they any "Lookout VIs" or Citadel VIs that can write to the Citadel DB from LabVIEW? Or a DLL or something?
    Any ideas?
    regards,
    John Paul

    Very nice question John Paul. I take it you already have Lookout and LabVIEW. In this case, with the latest versions of either, simply use the LabVIEW datasocket to publish the items on your front panel. Lookout then can subscribe to these once you register the LabVIEW computer. Once you have subscribed to them in Lookout, you are then able to set up logging. You may need to create an expression object to route the data to citadel.
    If you just want to use LabVIEW and the Citadel database, you might try VI Logger. This works in our configuration utility - MAX, and also comes with a set of VIs for LabVIEW. One caveot, the Citadel database in VI logger is newer (and faster) than the Citadel database in Lookout. I believe NI is working to synchronize
    the version in the future, and its hard to say when. So till then, you would not be able to merge data in the dislike citadel databases. However, you can always use and ODBC call set to extract from both and store in a more permanent SQL database such as access, oracle, ms back office, etc.
    Good Luck,
    Preston Johnson
    Business Development Manager
    Industrial Applications
    National Instruments
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Write data from Oracle 9i 64 bit to Oracle 32 bit through database link

    Hi to All:
    We are using following Oracle 64 bit application.
    Operating System: Sun Solaris 5.9
    Database: Oracle 9i (64 bit)
    Machine: Sun Server Spark V890
    Now my questin is that I want to move data from the production database running in Oracle 9i 64bit on Sun server to Oracle 9i 32 bit on Windows Server 2002 thru database link.
    I heard that it is not possible to write data from oracle 64 bit to oracle 32 bit, no matter what operating system we are using.
    Please confirm me that whether we can write data through database link from Oracle 9i 64 bit to Oracle 32 bit.
    Please specify every possible solution or any site from where I can have the solution.
    Thanks in advance.
    Hassan Raza Khan Lodhi

    Create a test table ( in 64bits db) , add some data
    From 32bits create a dblink
    Execute the following query
    create table test_32
    as select * from test64@dblinkto64;
    Michael

  • Read multiple files and write data on a single  file in java

    Hello,
    I am facing difficulty that I want to read multiple files in java and write their data to a single file. Means Write data in one file from multiple files in java
    Please help me out.
    Naveed.

    algorithm should be something like:
    File uniqueFile = new File();
    for (File f : manyFilesToRead)
       while (readingF)
           write(dataFromF, intoUniqueFile);

  • How long does it take to write data from network analyzer

    I am using LabVIEW to control two DC power supplies through GPIB-USB and I have a DAQ-6008 generating 8-bit digital output. I am connecting two DC power supplies and the 8-bit digital signal to my circuit and want to measure s parameters (all S11, S12, S21, S22) and write their magnitude and phase to a .txt file in my laptop. It worked but took about 1.5 minutes to write data (magnitude and phase of four s parameters) for a fixed DAQ output and fixed DC voltage by only sweeping 6 points. Is it a reasonable time? Because eventually I will have more than ten thousand combinations and need to record s parameters for all these combinations and it will take too long. I would like to know which part spends more time or how I can reduce the time to write four s parameters. Thanks a lot.
    Attachments:
    Agilent E3631 Output 2 DC Volts_for loop.vi ‏22 KB
    Agilent PNA Series Config And Read Data_test(4).vi ‏32 KB
    Main(2).vi ‏30 KB

    Hello yll,
    -So you mean I should delete some of the controls
    in the front panel  and make them a fixed value or default in the block
    diagram to reduce the front panel controls
    What Dennis is saying is that your front panel controls are only read once by your program.  The are read at the beginning and the value is passed into the while loop.  This is the value that will be used, even if you change the front panel.  You can verify this by using highlight execution. 
    -What does it mean that I am
    resetting the instrument each time?
    Everytime you call the initialize VI, you send a command for the instrument to reset.  This is not necessary, since you want your settings to remain for the entire program.  You can reset it when you "first" start using it, but as your program keeps going, you do not need to reset it.
    -Do I need the initialize VI and
    close VI in every iteration or I should have them out of the loops so
    all the instrument are initialized and closed only once throughout the
    entire process?
    That is exactly what you should do.
    -For the network analyzer, when you said I only need the
    VIs from initialize.vi to read data.vi (the second one from the end),
    do you mean that I can delete the close.vi? and why does it make the
    program faster?
    You should probably add the close outside the loop, as good practise.  I would still put the initialize outside the loop.
    I hope this helps.
    O. Proulx
    National Instruments
    www.ni.com/support

  • I want to write data into eeprom(93LC86) in parallel port using labview?

    I want to write data into eeprom(93LC86) in parallel port using labview? Also I want to read data from EEprom.

    Hi Mr. Mz,
    after having a look to 93LC86-Datasheet I do not see a problem. The self-timing programming cycle of this Chip avoids timing problems; the rest is only logical stuff.
    If you need more general info, how to use the parallel port, I recommend: http://[email protected]/ or
    in case you need an example of SPI-Interface in LabVIEW with paraport - then write to: [email protected]
    You are welcome
    regards
    wha

  • 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

  • How to write data in a real-cube from a internal table

    Hello Friends
    as you know, we can load data into cube by data sourc, transform rules.  But now, i want write data into a real-time cube from a interinal table .
    I want to know how can I do it.
    thanks !

    Not possible as there shd be some interface or connectivity shd be there to laod the data..
    possible ways are download to excel using FM GUI_download and use that one as a DS...

  • How to write plan data into Transactional Cube from Visual Composer ?

    Dear experts,
    Visual Composer is very powerfull to build a 'nice-looking' web-report (I think is much better than Web Application Designer in term of freely position the chart/graph/table/selection parameter in anywhere we like. We can't have this flexibility in WAD) plus it also has strong integration to R/3 for posting the  transactions via RFC-Enabled Function Module (such as changing customer credit limit, approve PO, approve Sales Order, etc), so that the R/3 user won't even have to know the TrxCode.
    In addition to this, I just wondering if VC also capable to write plan data into transactional cube via Write-Enable Query. We can simply insert a BW Query into VC as planning layout (set the edit-mode to "editable") plus having some Wizards to make it more user-friendly and self-explanatory for the users.
    But I am not sure how to save the changes back to transactional cube from VC.
    Could anyone please kindly advise how to achieve this.
    "Seeing is believing" is always my learning method, so I would appreciate some "actioanable" explanation or hints.
    Many thanks,
    Sen

    Hi Sen,
    As far as I know, it's not possible to write data into transactional cubes directly from a table in Visual Composer through standar method, but it's possible to integrate a WAD with your input ready query into a URL element in VC (You can fill entry variables in VC and call WAD dinamically), so it's possible to create a planning application in VC calling dinamically WAD's.
    Another way to interact through VC is creating button objects that calls planning sequences (with BAPI calling RSPLS_PLSEQ_EXECUTE). Also can fill variables in VC and pass them to sequence.
    Regards,
    Enrique

  • I want to run my program with continuous aquisition and write data to file when a button is pressed and get the most recent samples from the DAQ board.

    This is an update to a question I asked earlier. I am still trying to solve the problem. I have included a zip file with a library file. The file to open in pj_pushbutton.vi. I have placed comments explaining the issues and problems in this vi and the subvi's.
    When I push my button to write the data to file I think it is writing the data that has already been stored in the buffer and writing to file all at once. I want the data that is taken from the DAQ board from the time that I press the Write File button. How do I do this?
    Attachments:
    pj_pushbutton.zip ‏692 KB

    Hi,
    1. In AI read, you need to set the Read/Search option to "Relative to End of Data".
    2. Next you should not start AI Read VI until you press the Write to File. I am attaching an example VI below. Please see if it helps.
    Regards,
    Sastry V
    applications Engineer
    National Instruments
    Attachments:
    MostRecentAcquiredData.vi ‏97 KB

Maybe you are looking for