Pulse TTL-PCI-6503 write in a log .txt file

Hello, I need to connect the PCI-6503 data output to a log .txt file. This PCI-6503 map reads a pulse sent from another PCI-6503 located in another computer. I want to just save the .txt file if a pulse is received. I know how to create and write to the .txt file, but do not know how to write the DAQmx data in this file. Could someone help?

Thank you in advance!

Hi a2h,.

To only write when there is data emerging from the Daqmx read, you can use the table Emply?. VI to determine if there are real (like the pulse) from the unit and then data of yarn that a structure of case that will write to a text file in the case of false.

Peter W.

Tags: NI Hardware

Similar Questions

  • How constantly write data in a txt file

    Hello
    first of all, sorry for the bad English, but I have a problem to write data continuously to the txt file... I have a chart 2D with values based 2 sliders (sliders values) and some functions I want to interpolate the value by using the bilinear method... and after that the value of the sliders, interpolated value and the value of the closest points, I want to write to a file txt... for every 2-3 seconds perhaps, it would be ideal to be formatted as ::
    x y f f1 f2 f3 f4
    ..   ..  .. . .. .   ..   ...  . ..
    ... ...  ..    ...   ...   ...   ...

    but... first of all I have a problem with writing data, because every time he deletes old data and simply write a new and it is not horizontal... I am very very new to this (it's obvious) and any help will be very grateful 
    Thank you

    Diane beat me to it, I made a few changes to your code, so I'll post it anyway.

    As proposed, please go through the tutorials.

    I added an entry to the worksheet at the end node just to show it can be done at the end so. Table of building on a while loop is not very efficient memory, but it's just to show you what can be done. If you plan to go this route, initialize an array and use the subset to the table replace.

    All the best.

  • How to write output to a txt file query results

    have a sub query resulting in some records I want to write in a txt file

    Select employee a.empcode a, b the address where a.empcode! = b.emp.code

    You can use UTL_FILE to do so, either specifically for your query or more generically as below:

    As user sys:

    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    /
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /
    

    As myuser:

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      --
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    

    This allows the header line and the data to write into files separate if necessary.

    for example

    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    
    PL/SQL procedure successfully completed.
    

    Output.txt file contains:

    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10
    

    The procedure allows for the header and the data to separate files if necessary. Just by specifying the file name "header" will put the header and the data in a single file.

    Adapt to the exit of styles and different types of data are needed.

  • Measurement of voltage deferred with a start from a pulse TTL (PCI-6251, OR DAQmx)

    Hello

    What I do: gain a measure of tension after a certain period of time (order of microseconds) when we observe a TTL pulse, lasting about 1-100 microseconds. What are the options I to do thins?

    PS. If this problem is solved in a C code example, please point me to the right direction. I saw examples of NOR-DAQmx, but not a not spot something like this.

    Hi hum-human resources management.

    The example of DAQmx ANSI C Analog In\Measure Voltage\Cont Acq - Ext Clk - Dig start shows how to use DAQmxCfgDigEdgeStartTrig() to activate a digital start trigger. It also illustrates the continued acquisition, clock to external sampling and all events of samples N; for a simpler starting point, look at analog In\Measure Voltage\Acq-Int Clk-Anlg start and try to convert to using digital analog INSTEAD of triggers.

    However, this will start acquiring exactly when the trigger occurs, not after a period of time fixed. Use DAQmxSetStartTrigDelay() and DAQmxSetStartTrigDelayUnits() to add a fixed delay between the trigger and the beginning of the acquisition. Help OR-DAQmx C reference (which should be on the start menu under National Instruments > NOR-DAQ) lists the valid values for the property of units.

    Brad

  • write data to a txt file

    Hello.

    I use visa and serial Protocol in my vi n want to save the data from MCU in labview to txt file format which, in the data record in each row not each tab.

    I want to just save not given time. Meanwhile, I plot the data in the chart.

    I search in the forum and consider the posts but can't find a solution.


  • Extract strings in the tdms files and write the strings in the file txt or lvm

    Hi all

    I'm struggling to extract strings from a file of tdms to write them in a txt file.

    The strings were written in tdms is a time stamp data recorded to a compact RIO.

    I put the chain in a different group from the PDM, but when I use the function read tdms with the group name, as I said, an error message is always take place.

    Thanks for all the help.

    PS: I have attached an example of tdms file I got over here.

    Kind regards

    Yifeng

    I tried your attached file and it seems that everything goes file. I have attached the screenshot of my VI here, what do you want?

  • Write in a txt file to variable rate

    Hello

    I asked who need slower (100 Hz) datalogging initially and then to increase the rate of datalogging high (10 KHz) after some time.

    I've tried integrating variable data acquisition rates but not success. I also tried to maintain the rate of acquisition of data contant, but write a txt file at different rates.

    Now, without success, I am now trying to write two txt file with low and high rates.

    I would be very apprecaite, if anyone can direct me to correct logic for the task.

    Below you can find the test example VI that I'm trying to implement the requested feature. This VI to write data in a txt file with timestamp corresponding to rates of acquisition of data in the first column.

    Thanks in advance.


  • Write ports PCI-6503

    Hello everyone, I am totally new to this area.

    I'm having a problem with a card PCI-6503, which runs in a PC with W98.

    I instaled the driver NOR - DAQmx7.0 and I have developed a very simple application to test the sending of any signal by the ports of the Board of Directors. I tested the DAQmxCreateDOChan (taskHandle, "port0/Dev1","", DAQmx_Val_ChanForAllLines) write in a digital port function, but it always returns: "DAQmx error: device identifier is not valid (-200220).

    So I have a few points I would like to check; in the application of the Measurement & Automation card PCI-6503 map appears as a traditional device so ¿Does it means that I have to use traditional drivers (libraries and functions like DIG_OUT_PRT) you can find in the: nidaq32.lib library instead of nor-DAmx libraries?

    Thank you

    Fernando

    Hi Fernando

    the first thing you should check is the name of your device in Measurement & Automation Explorer (MAX) must be the same as the one you use on your application LabWindows. However, I realized that it might be a driver according to this knowledge base problem:

    http://zone.NI.com/DevZone/CDA/tut/p/ID/6910#DIO

    As you can see, the version of the DAQmx driver is 7.1. You can download it here:

    http://Joule.NI.com/nidu/CDs/view/p/ID/790/lang/es

    You can find your Council of the DAQmx 7.1 readme file, but you can't on 7.0. Check out this piece of information and see for your motherboard.

    http://FTP.NI.com/support/softlib/multifunction_daq/nidaqmx/7.1/Readme.html

    http://FTP.NI.com/support/softlib/multifunction_daq/nidaqmx/7.0/NI-daq_7_0_readme.htm

    Let me know if an upgrade of the driver solves your problem. Suerte y a greeting.

    Jesus.

  • count the pulses ttl only on 2 V

    Hi I have a problem while I was trying to count a pulse ttl using the DAQ Assistant. The problem can be simple, but I just can't solve that since I'm new to LabView.

    There is a TTL pulse produced of our ODA that is about 30 ns width, 5V. I want to use LabView to perform the count of photons. But because of the noise, I want to put a number limit of 2V, so the software one count higher than 2V TTL pulse. But I can't do that. There is no option to set the limit.

    And our material is BNC-2110 and PCIe-6323.

    Can someone help me with this? Thank you.

    For a counter entry, the minimum voltage for logic there is 2.2 volts - a ttl level. And no, you can not adjust higher.

  • Can I use a USB-6501 instead of a PCI-6503 map?

    I currently use a card PCI - 6503 DIO into a Windows XP system. We have an old (7.1) version of LabVIEW. We are looking for a Virtual Machine in Windows 7, but he will not be able to communicate with the PCI Bus. We currently use a PCI-6503. A USB 6501 will work to place it?

    We are looking for some intot wiring problems, but I think it will do the job.

    Thank you.

  • Single pulse TTL

    Hi all

    I'm going through the phase of my small vi debugging and found an inconsistency that makes no sense. My goal is to generate a single TTL pulse as soon as I discovered a passage by zero of a sine wave. So, I generate a simple sine wave and send a logic true to the block which supposedly should initiate a TTL pulse generation. I first tested at 1 Hz sinusoidal and pulse TTL of ecu 1 Hz. I then put my sine funnction at 5 Hz, but I always only TTL signal of 1 Hz, instead of 5 Hz (1 pulse each time by resetting a sinusoid at 5 Hz).

    Can anyone suggest where the problem is maybe?

    Thank you in advance!

    I think that your problem is easily explained by a single sentence in the help for the VI of passage to zero: "If wire you a waveform value or a dynamic data type value at the point of data entry, this VI evaluates only the first value of the input data."

  • PCI-6503 and LabView 7 trouble in Win XP

    I'm unable to get a digital I/o card 24-line PCI-6503 correctly installed in my Win XP machine.  I use LV 7.1 and NI VISA 5.0.3.  I tried the two v 7.2 and 7.2 DAQ, which supports this card.  Is there something special about software versions and compatibility that I'm missing?  I see that I need to install NI VISA 5.0.3 before LV, but other than that, I did not understand a specific installation order.  Is there something that I am on?  Any suggestions on what I might try?

    Thank you.

    Hi Scott,.

    So, it seems that your card has been properly installed. Now, since your code does not seem to change the States of DIOs, we could try a few things.

    1. First, uninstall DAQmx so keep us just the NOR-DAQ traditional in the computer, since these screws DIO you mention on traditional DAQ.
    2. Try to change the State DIO in MAX using the Test panels. Check if they are actually switching.
    3. When you say that the problem lies in the screws, what exactly is the behavior that you are experiencing? Can join any error or the screenshot of the behavior code?
  • "redo the write time" includes "log file parallel write".

    IO performance Guru Christian said in his blog:

    http://christianbilien.WordPress.com/2008/02/12/the-%E2%80%9Clog-file-sync%E2%80%9D-wait-event-is-not-always-spent-waiting-for-an-IO/

    Waiting for synchronization of log file can be divided into:
    1. the 'writing time again': this is the total elapsed time of the writing of the redo log buffer in the log during recovery (in centisecondes).
    2. the 'parallel log writing' is actually the time for the e/s of journal writing complete
    3. the LGWR may have some post processing to do, signals, then the foreground process on hold that Scripture is complete. The foreground process is finally awake upward by the dispatcher of system. This completes pending "journal of file synchronization.

    In his mind, there is no overlap between "redo write time" and "log file parallel write.

    But in the metalink 34592.1:

    Waiting for synchronization of log file may be broken down into the following:
    1 awakening LGWR if idle
    2 LGWR gathers again to be written and issue the e/s
    3. the time for the IO journal writing complete
    4 LGWR I/O post processing
    ...

    Notes on adjustment according to log file sync component breakdown above:
    Steps 2 and 3 are accumulated in the statistic "redo write time". (that is found in the SEO Title Statspack and AWR)
    Step 3 is the wait event "log file parallel write. (Note.34583.1: "log file parallel write" reference Note :) )

    MetaLink said there is overlap as "remake the writing time" include steps 2 and and "log file parallel write" don't understand step 3, so time to "log file parallel write" is only part of the time of 'redo write time. Won't the metalink note, or I missed something?
  • Help! Trying to write an array to a file without having to rewrite the old data each time.

    Hey everybody,

    I have a vi that takes a 2D array and writes to an xml file. The purpose for this is to characterize the pathloss through a matrix dowkey 10 x 10 to different frequencies. I use this program to create a table of correspondence for the switching matrix, so when I make one of my tests I can get an accurate measurment. The problem with this is that I take data points about 299 by combination of matrix switches leading me to data more than 32000 points in the lookup table. I use xml because each data point requires a header so I can analyze via the table of correspondence with another of my vi when I need that pathloss. What I'm trying to fix, is that when my vi wrote in a file at a time to save memory space, he wrote a single Bay. When writing, it rewrites the old data, and then the new data. As the number of points of data increase so does the time of latency of writing in the file. At the time wherever I am finished, it takes about five hours to completely write to the file. Does anyone know how to write about writing to a file without having to rewrite all the old data? Attached, it's my vi to write to the file, my vi for research in the file and an example of one of my tables in research.

    Thank you

    Dustin

    Hello

    Just in case others have a problem, something along these lines as one excerpt:

  • Write on txt file

    Hello

    I have an internship and I have to perform an improvement of a labview program. Currently, I write my data on my text file but it keeps only the last value of array LUN to. I would therefore like to write data to a text file with each iteration of my loop everything but I can't seem to find how to do.

    Can you help me?

    flavien_33 wrote:

    I'd like an example of the same car by consulting the help of labview I cannot always

    Simply use the function set the file Position by setting son entry to (0:start) to end. This operation will move the "cursor" of the file at the end of its current content. She should of course be performed before the memorization of the new text which will be added at the end of the file.

    So nothing complicated... Once you know how!

Maybe you are looking for

  • How do we keep applications open automatically at startup

    If I don't stop apps on my MacBook air shutdown, whenever I turn it on onagain thoseapps open automatically comes with the whereileft of windows. It's pretty boring, so I want to know how to prevent the opening automatically at windows startup. I hav

  • How to open a .asf file?

    How to open a .asf file? QuickTime does not recognize.

  • Several Versions of NIScope

    I have LabVIEW 8.0 and 8.2 loaded on my computer.  NIScope 3.0 is compatible with LV 8.0 but not with LV 8.2.  It looks like NIScope 3.5 working with LV 8.2 but not with LV 8.0. Can I load multiple copies of the NIScope on my machine? Thanks in advan

  • My wife needs a outlook account

    I have an outlook account and my needs to access his email via my computer

  • How to restore the printer icon in the taskbar

    I want to restore my printer icon in the taskbar. I spent to the properties of the taskbar and selected icons to show and which to hide, but it does not evolve. (I asked to hide all icons appear when they are idle). Printer is shown as 'past', but I