Multiple recording of waveforms using an external trigger signal

Dear all,
Maybe somebody could help me with the following:
System:
Windows 2000,Pentium III,~800-900MHz,32-bit master PCI bus,256 MB RAM
PCI-NI 5122 Digitizer
PCI-GPIB card
PCI-DAQ card
Labview 7.1
NI Scope 2.7
Problem:
I want to acquire multiple waveforms (e.g. 100) using an external TTL trigger signal of ~40Hz. I have to acquire 1 waveform per trigger signal i.e. 100 subsequent trigger signals will acquire 100 subsequent waveforms.
After, or during the waveform acquisition (?), I have to transfer the waveforms as 100 1D-arrays from the onboard memory of the digitizer through my fitting routine (one-by-one!). The fitting routine accepts one waveform (1D-array) at the time, fits the waveform and calculates 1 fit-value per waveform. So, when I pass the acquired 100 waveforms subsequently through the fitting routine, I need to get out a 1D-array with 100 fit-values. This 1D-array with the 100 fit values will be further processed and a final value will be saved.
This procedure will repeat itself at different points in a sequence structure. The sequence structure will be located in a loop and running for several hours!
Please see attached program flow diagram.
Qustions:
1. When I want to acquire 100 waveforms using 100 subsequent trigger pulses, the attached VI (Multiple_record VI) gives me the following error message:
ERROR
"Possible reason(s):
Driver Status: (Hex 0xBFFA4009)
A previous acquisition is still in progress. If you are attempting to change an attribute, note you can only change fetch attributes while an acquisition is still in progress.
Status Code: -1074118647
What am I doing wrong? Is there a better and more efficient way to do this?
2. How can I transfer the 100 waveforms from the digitizer, one-by-one as 1D-arrays, through my fitting routine? A waveform will have ~2000-3000 data pts. (DBL type). Remember: I DO NOT HAVE TO SAVE THE WAVEFORMS!
3. Which way is faster, and more efficient (memory) for my PC system to transfer the waveforms from the onboard memory of the digitizer to the fitting routine?:
a) Start transfer of already acquired waveforms (1D-arrays), one-by-one through the fitting routine, during the waveform acquisition process is still in progress?
b) First, acquire the 100 waveforms (1D-arrays), store them in the onboard memory (digitizer) and then transfer them one-by-one through the fitting routine?
4. How can I make sure that after the waveforms were transferred through the fitting routine, the onboard memory of the digitizer is EMPTY (clear waveforms which have already been fetched) and ready to repeat the waveform acquisition at a different point of the sequence structure?
5. I do not want to display each acquired waveform because I think it will slow down the acquisition process. Instead, I want to display the last of the acquired 100 waveforms, so I can check my fit and maybe adjust the fit-parameters. How can I do that?
I think the important thing is to perform this process in the fastest way possible with the best use of the PC resources (memory etc.) because this process will run for hours. Any suggestions?
It would be very nice if somebody could give me some help with this.
Kind regards,
beam
Attachments:
program flow diagram.vi ‏11 KB

The method you use to analyze your data is fine. The only thing I would watch out for is memory problems. If you keep with the numbers you gave earlier, 100 waveforms at 3000 pts/wfm, you will be transferring 2.4MBytes of data per set. This is way over the 1MByte buffer NI-SCOPE uses for data transfer. It will work, but it might be slow. If you have problems, switch to niScope Fetch WDT.vi for your acquisition and move it inside the loop. Before you call the fetch VI, set the record it will fetch by using the property node and setting Fetch->Fetch Record Number using your loop index.
A couple of other performance tips I think you probably know. The graph inside the loop will slow you down a lot. In addition, the graph of all the data outside the loop will also take a fair amount of time (plotting 2.4MBytes of data). If you want to see just the last waveform, pop-up on the terminal going out of the loop and disable indexing so only the last waveform goes through, not all of them.
Your analysis method should work fine. You may consider doing an I16 fetch instead of the WDT fetch you are currently using. This will reduce your memory usage by a factor of four, provided you don't immediately convert it to a double array. If your analysis is actually finding a max/min, this is faster on an integer array than a double. You can scale the integers using the numbers in the information cluster. It is much faster to scale one integer at the end than a whole array. That said, the I16 fetch is not particularly faster than the WDT fetch, just less memory. This choice will depend on your analysis.
The min record length is the minimum number of points the device will acquire. The actual record length is different if the acquisition rate you ask for is not one of the acquisition rates the device is capable of. The acquisition rate is then coerced to the next highest rate and the record length increased so your acquisition time remains constant. This behavior is part of the IVI specification for digitizers. Using your VI as an example, you ask for 300kS/s acquisition rate and 800 data points. What you actually get is 300,300.3003 S/s and 801 data points. The sample rate is determined by an integer divisor from 100MHz, in this case 100,000,000/333. So, if you really want a certain number of data points, you need to set the sample rate to a physically realizeable one. Alternately, you can just fetch the number you want instead of all the points, realizing your sample window will be a bit shorter than you asked for.
You are correct. To see anything in the records done, you need to delay. However, in this code, the records done output is really not doing anything. The fetch won't fetch until everything is done, so you know all is finished when your data shows up. I would just delete it. If you do want to put a delay in, wrap a sequence structure around the records done query. Add a frame before the current frame and drop a Wait (ms)delay into it. You can find this primitive in the timing and dialog palette. This is an example of when the sequence is actually useful. The delay VI has no good way of enforcing data flow, so the sequence does it.
The way you have implemented it, you don't need to poll acquisition status. To get acquisition status, use niScope Acquisition Status.vi. You would put this in a WHILE loop before your acquire and exit the WHILE loop when the acquisition was done (or an error occurred) to proceed to the acquisition. Make sure you also put an appropriate delay in the WHILE loop or it will eat your entire processor capacity. The delay should be based on how long you expect the acquisition to take.
You should definitely put your fetch code in a subVI if you are going to call it more than once. LabVIEW makes it easy. Select the code you need to make into a subVI, then select Edit->Create SubVI. Don't forget to put an icon and documentation in the subVI. You will thank yourself later.
Let me know if you have any more questions...
This account is no longer active. Contact ShadesOfGray for current posts and information.

Similar Messages

  • Two external trigger signal

    Hello guys,
    I want to use two external trigger signals for the system. But when I use the C# function "ConfigureDigitalEdgeTrigger", it just creats one external trigger port.
    How can I creat two ports for  two external trigger signals?
    Thanks !

    Kristian;
    I don't believe the problem you are seeing there is related to the external trigger connection, but to a too small interchannel delay in between channels.
    If you don't give enough time to teh interchannel delay, the instrumentation amplifier might not have enough time to settle properly, so you will always see the signal that is connected to the previous channel on that channel, regardless what you have connected to the second channel.
    The AI Config.vi has an input for you to change the interchannel delay of your acquisition.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Data-acquisition with NI 6036E DAQ card & GPIB using an external trigger

    Hi all,
    I hope somebody could give me some help with the following and answer some questions:
    Simple system description:
    Labview 6.1
    PCI-GPIB card
    6036E DAQ card
    In my system, I am using an external analog trigger signal (A) for continuous data-acquisition. Characteristics of the analog trigger signal (A) are: ~40 Hz, signal height +1.48V, triggered by rising edge (the analog trigger signal (A) could be changed to a TTL signal). Each data-acquisition is done within ~1.0 ms after the rising edge of the trigger pulse. The timing of the data-acquisition and analyzing procedure is controlled by execution in a sequence structure placed in a loop.
    Now, I connected a power meter to the system, to measure the laser power during the data-acquisition. The power meter has two options to provide the laser power data:
    a) via analog signal output (voltage corresponds to laser power in watts)
    b) via GPIB (direct output reading of laser power in watts).
    Problem:
    During a certain point in my data-acquisition sequence structure (defined by a frame), I want to use the next occuring analog trigger signal (A) to acquire 1 value from the power meter.
    How do I do this in Labview programming for the following two situations?
    a) If I connect the analog output from the power meter to an analog input channel of the 6036E DAQ card. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).
    b) If I use the GPIB connection of the power meter. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).
    An other possibility would be to trigger the power meter directly, so it outputs constantly power meter values at ~40 Hz. How could I than acquire 1 power meter value (at a certain time im my sequence structure) via analog input at DAQ card or GPIB?
    Additional questions:
    How do I configure the PFI0/Trig pin on the 6036E DAQ board individually as an INPUT?
    How do I use an analog trigger signal (A) as counting signal for a loop, or as an activation signal for a sequence structure which includes GPIB commands?
    It would be very nice if somebody could give me some help.
    Kind regards,
    beam

    Hi beam,
    I just want to verify that I understand your situation correctly:
    An external trigger signal (A) is wired to one of your input channels (e.g. CH0) to trigger data acquisition of a second channel (e.g. CH1). Your power meter is connected to an analog input channel, which you would like to trigger with a certain rising edge at some of your sequence structure.
    Problem:
    During a certain point in my data-acquisition sequence structure (defined by a frame), I want to use the next occuring analog trigger signal (A) to acquire 1 value from the power meter.
    How do I do this in Labview programming for the following two situations?
    a) If I connect the analog output from the power meter to an analog input channel of the 6036E DAQ card. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).
    If a task has been configured to acquire signal from one analog channel, it's not possible to run a second analog input task or to add a second channel on the fly. You had mentioned that it's possible to read from the instrument through GPIB. Is it possible to perform a software trigger such that at a certain frame of your structure, when the trigger signal A reaches voltage "x", a GPIB command is written to your power meter to query a measurement reading?
    Additional questions:
    How do I configure the PFI0/Trig pin on the 6036E DAQ board individually as an INPUT?
    You do not need to explicitly configure the PFI0 line as an input. If you want to use it as an input such that it acts as an analog trigger, simply wire the trigger signal to this pin. When configuring the trigger in your software, specify PFI0 as the trigger source.
    How do I use an analog trigger signal (A) as counting signal for a loop, or as an activation signal for a sequence structure which includes GPIB commands?
    You can try using the Limit VI to find out when the trigger signal reaches a certain level, and count how many times this level is reached. Similarly, you can use this as the condition to execute GPIB commands.
    Hope this helps,
    Lesley

  • Multiple records in BPM using Switch

    Hi Frnds,
                  I was doing File to RFC to Webservice sceanrio using multiple records.
    For that i have used
    ReceiveTransformation-Block(ForEach)-Send Sync-ContainerEndBlock-TransformationSendTransformation(Multimapping)-Block-switch-sendsync-containerendblock-Transformation---send.
    In switch, i was checking the condition like, if the material is present, then it got the first branch or else it should go to next branch.
    In switch i was facing the problem, if i give multiple records with the same value, i am getting the output. If i give different values like for one record, material is present and the other record material is not present, then i am not getting the output.
    Could you please help in this issue.

    In switch i was facing the problem, if i give multiple records with the same value, i am getting the output
    The standard behaviour of Switch is that in case of multiple records, the Last Record value is taken and checked with the switch condition.
    U break all the records into individual records usinf "Recordset per message = 1" or transform one message with multiple records into multiple records, save it into multiline container variable and then use Block with mode ForEach.
    Regards,
    Prateek

  • How to use an external trigger on an electrometer (KEITHLEY 6517A)

    I'm really new using LABVIEW, so please, be patient with me...
    I'm using a KEITHLEY electrometer to acquire data from a dosimeter. We are going to do some measurements on a pulsed source and before the pulse there's a trigger signal. I don't know the size of the trigger, I'll just know that when I start my measurements (in another lab) So I would like to implement a case were the user can decide the value of the external trigger, so this information goes to the eqipment before starting the measurement.
    What I would like to know is... Someone can give me a hint on how to do that? I'm using GPIB and LABVIEW 7.1.  and I already took all the 6517A libraries for labview.
    Thank you all

    The external trigger on a 6517 is a TTL signal. Any pulse higher than 3.4V will trigger it. You cannot program the threshold level.
    You can set the delay programmatically with TRIG: DEL <n> command.
    ref: page 2-81 and following of User Manual
    Message Edited by normandinf on 10-21-2008 03:55 PM

  • Insert multiple records into Oracle using Java

    Hi,
    Has anyone tried to insert multiple records into an Oracle table from Java? I have my data in a Java collection.Can I send a Java Collection to an Oracle Package as a PL/SQL Table Type? My problem is I dont want to instantiate a CallableStatement object everytime I do an insert. Instead I want to do that only once and then insert multiple records in one operation.
    Any suggestions will be appreciated,
    Thanks,
    Alex

    Hi Mensa,
    I went thru the code example in your book in chapter 8 (downloaded it from OTN). It looks like the java code for "public class myPLSQLIndexTab" might be a java stored procedure stored in the oracle database?
    Pardon my ignorance because I've never worked on java code in the oracle database itself but how would I call such a program outside the oracle database? For example say I have a batch job that downloads data from a webservice and that batch job is written in java and its sitting on a batch server somewhere on the network. But the java program that inserts data into the database is sitting in the oracle database (also somewhere in the same network). How can the java code sitting on the batch server talk to the java code sitting on the oracle server? Is it the same as calling a pl/sql package using CallableStatement?
    Thanks
    Alex

  • Displaying the selected multiple records from node using onleadselect event

    Hi all,
    How to display the selected multiple records from node to node using onleadselect event.
    i came to know tht to fulfill this requirement i need to use the method get_selected_elements,
    how to use this method in my event??
    sree

    Hi Sree,
    Try below code..
    DATA : lo_nd_it_lips TYPE REF TO if_wd_context_node,             // This is first node
                 lo_el_it_lips TYPE REF TO if_wd_context_element,
                 ls_it_lips TYPE wd_this->Element_it_lips,
                 lt_it_lips TYPE wd_this->Elements_it_lips.
               DATA: wa_temp TYPE REF TO if_wd_context_element,
                lt_temp TYPE wdr_context_element_set.
    * navigate from <CONTEXT> to <IT_LIPS> via lead selection
          lo_nd_it_lips = wd_context->path_get_node( path = `ZRETURN_DEL_CHANGE.CHANGING_3.IT_LIPS` ).
          CALL METHOD lo_nd_it_lips->get_selected_elements
            EXPORTING
                INCLUDING_LEAD_SELECTION = ABAP_true
            RECEIVING
              set = lt_temp.
          DATA lo_nd_pack_mat TYPE REF TO if_wd_context_node.          //Second Node
          DATA lo_el_pack_mat TYPE REF TO if_wd_context_element.
          DATA ls_pack_mat TYPE wd_this->Element_pack_mat.
          DATA lt_pack_mat TYPE wd_this->Elements_pack_mat.
    * navigate from <CONTEXT> to <PACK_MAT> via lead selection
          lo_nd_pack_mat = wd_context->get_child_node( name = wd_this->wdctx_pack_mat ).
          lo_nd_pack_mat->get_static_attributes_table( importing table = lt_pack_mat ).
          LOOP AT lt_temp INTO wa_temp.
            CALL METHOD wa_temp->get_static_attributes
              IMPORTING
                static_attributes = ls_it_lips.
                  ls_pack_mat-vbeln = ls_it_lips-vbeln.
                  ls_pack_mat-material = ls_it_lips-matnr.
                  ls_pack_mat-vgbel = ls_it_lips-vgbel.
                    append ls_it_lips to lt_unpack.
                  CLEAR ls_pack_mat.
           ENDLOOP.
    Cheers,
    Kris.

  • How can I create software start and stop trigger in LabView using 6023E series DAQ card? I don't want to use the external trigger.

    I am using 6023E DAQ card to collect the signals, such as AE, Force, Torque from the machine. I want to collect only some part of signal for example between start triger and stop trigger. I'd like to know how I can creat those triggers in LabView from one of the channels that I am acquiring at the same time. I found one or two library file that is only for start trigger. I know that this is availabe in some of DIAdem functions. Please let me know if you have done some example for this requirement.

    If you are wanting to create a software trigger based on an analog input voltage in LabVIEW, there are several options. One suggestion would be to compare the voltage values from one input channel to a number within a loop. If the input voltage crosses that threshold (is greater than the number), have a case statement that will acquire data from the other channels. This would simulate a software start trigger in LabVIEW.

  • How to get or show multiple record data pagewise using JSPBean and HTML

    Hi ,
    I am using JSP bean for getting the data from database and html toe present the data.
    The problem is when the user inputs data
    in the search field and clicks on Search button ,i need to get all matching rows fromw the database ,which i am already getting.
    Now if i have got suppose 100 rows i need to show 6 recrods on each page the rest should be shown when the user clicks NEXT or PREV buttons.
    example
    Name: input data here
    Description: input data here
    SEARCH Button
    Show here the first 6 records
    PREV 1 2 3 4 5..... NEXT
    The page will look somewhat like this.
    So the rows will be shown just below the search fields .If i am getting more than 6 record i should show PREV and NEXT with the number for each page holding 6 records.
    Have anybody worked on such thing can you help me out .
    Thanks

    Hi This may help, Previous does not work properly, coz I didnt find much difficult to code so you can build on your own from Next option logic
    Here is the code. Here and there couple of probs exist but they are solvable easily,
    <HTML>
    <%@ page language="java"
         import="
         java.util.* "
    %>
    <%!
         Vector customers;
    %>
    <%!
    void dummyMethod()
         customers = new Vector();
         for (int i=0;i<30;++i)
              // Prints only one time when browser opened first time.
              System.out.println("I:"+i);
              customers.add(i+"");
    %>
    <body>
    <script language=JavaScript>
    function getNextRows(begin,end)
         document.frmPage.begin.value = begin;
         document.frmPage.end.value = end;
         document.frmPage.which.value = "next";
         document.frmPage.action = "getRows.jsp";
         document.frmPage.method="post";
         document.frmPage.submit();
    function getPrevRows(begin,end)
         document.frmPage.begin.value = begin;
         document.frmPage.end.value = end;
         document.frmPage.which.value = "prev";
         document.frmPage.action = "getRows.jsp";
         document.frmPage.method="post";
         document.frmPage.submit();
    </script>
    </body>
    <%! int x = 0; %>
    <HEAD>
    <TITLE>Customer Account Information</TITLE>
    <META HTTP-EQUIV="Expires" CONTENT="0">
    </HEAD>
    <BODY BGCOLOR = "#FFFFFF" >
    <form name=frmPage>
    <input type=hidden name="begin" value="0">
    <input type=hidden name="end" value="10">
    <input type=hidden name="which" value="">
    <H2 ALIGN="CENTER"><FONT COLOR="#000099">Customer Account Information</FONT></H2>
    <H2><FONT COLOR="#000099"></FONT></H2>
    <P>
    <TABLE BORDER="1" cellpadding="0" cellspacing="0" WIDTH="80%" ALIGN="CENTER">
    <TR>
    <TD WIDTH="10%" BGCOLOR="#CCCCFF"><FONT FACE="Italic">Acct# </FONT> </TD>
    </TR>
    <%
    int begin = Integer.parseInt((request.getParameter("begin")==null)?"0":request.getParameter("begin"));
    int end = Integer.parseInt((request.getParameter("end")==null)?"10":request.getParameter("end"));
    int max=0;
    if (request.getSession(false).isNew() ||
    request.getSession(false) == null)
         dummyMethod();
    max = customers.size();
    String     which = (request.getParameter("which")==null)?"next":request.getParameter("which");
    if (which.equals("next"))
         for (x = begin; x < max && x <= end; ++x)
              out.println("<TR>"+
                   "<TD WIDTH='50%' BGCOLOR='#CCFFCC'>"+customers.elementAt(x)+"</TD>"+
                   "</TR>");
         begin = end;
         end +=10;
    else
         for (x=begin; x <max &&x <= end; --x)
              out.println("<TR>"+
                   "<TD WIDTH='50%' BGCOLOR='#CCFFCC'>"+customers.elementAt(x)+"</TD>"+
                   "</TR>");
         end = begin;
         begin -=10;
    %>
    </TABLE>
    <%
         if (begin == max)
              out.println("<tr><td>Next  <a href='javascript:getPrevRows("+begin+","+end+")'>Previous </a></td></tr>");
         else
              out.println("<tr><td><a href='javascript:getNextRows("+begin+","+end+")'>Next </a></td></tr>");
    %>          
    </BODY>
    </HTML>

  • How to populate multiple records into 1 using addtl keyfigs

    Hi Gurus,
    Please take a look at this scenario.
    I have 3 records coming from source system.
    ex:
    key dateid startdate enddate
    c    1      d1         d2
    c    2      d3         d4
    c    3      d5         d6
    i need to populate these 3 records as one into the infoobject based on dateid.
    (dateid =1 then kf1=d1,kf2=d2;dateid =2 kf3=d3,kf3=d4 dateid = 3 kf1=d5,kf2=d6)
    i added 6 key figures ( kf1 kf2 kf3 kf4 kf5 kf6) as attributes to infoobject.The final
    record should look like the below one.
    key kf1 kf2 kf3 kf4 kf5 kf6
    c d1 d2 d3 d4 d5 d6
    Could you pls give me some thoughts on how to do this in a better way.
    Do i need to write update routine or just the formula in update rule is enough  ??
    Thanks in advance
    -dooDle

    Hi Ramesh,
    The scenario you have mentioned looks really complicated reason being, maintainance.
    Combining 3 records to one is possible in Start Routine. But it will be an expensive one.(I mean loopin)
    Pseudo code:
    LOOP AT DATA_PACKAGE.
    Check which records satisfy your criteria and fill a Temporary table. The fields will be your entire record to be appended to the fact table.
    Endloop.
    Delete your Data Package.
    populate the Temporary Internal Table onto the Data Package.
    Hope it helps.
    Regards,
    Praveen.

  • Why do I often get blank frames while acquiring images using external trigger under Windows 7?

    I'm using Windows 7, the latest LabVIEW and IMAQdx right now. The program was developed based on the example provided by LabVIEW. Everything ran well on Windows XP using internal trigger or external trigger. But when I wanted to run the program on a desktop with Win 7, I just cannot get the images continuously using the external trigger. Although I can get the images, the blank frames showed up very often. When I chose the internal trigger, there was no problem.
    Once I thought there might be something wrong with my program. But I tried the LabVIEW example to select the internal trigger mode and external trigger mode, it had the same problem.
    Is there anyone could give me some suggestions to solve this problem?
    Thanks!

    Hi Matt,
    The images are either "all blank" or "all good".
    The hardware setup is exactly the same.
    The blank images are not acquired periodically.
    Similar results were also seen when using MAX to control the camera.
    We found a solution to this problem. But we don't know how to explain it. When we were using the 5-Hz external trigger, we thought the video mode would not affect the image acquisition and therefore we left the video mode option as default (15 fps). But when we change the video mode to 7.5 fps or 30 fps, the problem disappeared. So now if we want to get rid of the blank frames while using the external trigger, we just need to choose the video mode other than 15 fps. Interestingly, when we switch back to the XP system, the camera also acquried inconsistent blank frames if we set the video mode at 15 fps.
    Thanks again for your help.
    Hubert 

  • Externally trigger binned counting

    Hi,
    I have a PCI-6221 and am trying to achieve the following.  I've tried searching and found similar questions, but nothing exactly the same, so apologies if I have overlooked a previous answer.
    What I would like to do is count total pulses per 100 µs for some fixed period of time, say 100 ms.  The start of the 100 ms total measurement period should be triggered by an external signal which is much slower, e.g. 1Hz  This is as I need to sum multiple mesurement events as follows, where the time bins given are times after the trigger signal and each measurement is triggered by the external signal.
    Measurement     0-100µs  100-200µs    200-300µs   etc.
           1                    2                1                0
           2                    1                2                1
           3                    2                1                1
           4                    0                1                0
        total                  5                5                2
    If I could get the rolling total for each measurement that would also be fine, I can subtract each time bin from the previous in software.  The previous example using this method would therefore be:
    Measurement     0-100µs  100-200µs    200-300µs   etc.
           1                    2                3                3
           2                    1                3                4
           3                    2                3                4
           4                    0                1                1
        total                  5                10              12
    I have looked at previous answers such as http://forums.ni.com/ni/board/message?board.id=40&​message.id=2056&query.id=1096458#M2056 and whilst I converted that to a finite number of measurements OK, I couldn't work out how to set it to digitally trigger without errors.  I'm using LabView 7.1.
    Thanks very much, I hope that this was clear.
    Alex

    I haven't fully fleshed out this idea, but here it is in a think-out-loud form.
    I'm assuming you don't have clocked analog output in your app, and will lean on using an AO task solely for its clock.
    Here's the idea:
    1. One of your counters is set as a retriggerable single pulse generator.  Let's say it's CTR0.  Use the external ~1Hz signal as its trigger, and set it up to generate a single pulse with a 100 msec high time and a minimal low time.  You'll need a DAQmx property node to make it retriggerable.
    2. Configure an AO task to generate at 10 kHz, corresponding to your 100 microsec bins.  Configure it to be pause triggered by the output of CTR0.  Thus, the AO generates samples at 10 kHz, but only while CTR0 output is high (for 100 msec).  You'll have to write a buffer of analog values to generate, but it can just be an array full of 0 voltage, and you don't have to wire that output to anything either.
    3. Configure your other counter, CTR1, for period measurement.  This may be tricky to configure with DAQmx property nodes, but ultimately you'll need to treat your pulses of interest as the timebase for the measurement while using the AO sample clock as the signal to be measured.   That sounds backwards, but the effect will be to store the number of your pulses of interest that occur between AO clock edges.  You will need to research "duplicate count prevention" to make sure that 0 values get buffered properly.
    I *think* that sort of arrangement could work.  About every second, you get an external trigger.  That trigger causes CTR0 to generate a single pulse with a 100 msec high time.  Your AO task generates a clock pulse every 100 microsec, but only during the 100 msec when CTR0 is high.  Each of those AO clock pulses buffers a value for your CTR1 period measurement.  This should produce a measurement buffer like the first one you listed.
    4. (Simpler Alternative) Configure CTR1 for simple counting.  Use DAQmx Timing.vi to specify the use of the AO Sample clock, and specify your external pulses of interest as the signal to measure.  By default, LabVIEW will expect to see those pulses at CTR1's default SOURCE pin.  This arrangement should produce a measurement buffer like the second one you listed, though you may still need to research "duplicate count prevention" to make sure that gets set up right.
    5. I can't help but think there's another way to do this without the AO stuff, but nothing's coming to me now.
    -Kevin P
    Message Edited by Kevin Price on 02-01-2010 02:19 PM

  • Does the external trigger of the 5152 count as a second channel?

    Hi everyone,
    The PXI-5152 digitizer is listed as providing a 2GS/s sampling rate (TIS) for one channel only.  My question is whether or not the External Trigger channel counts as a "second channel" when used during data acquisition.  If so, does this cause the maximum acheivable sampling rate to drop to 1GS/s for my data channel (CH 0)?
    My experience has been that this is the case, but I lack a smoking gun which explicitly states this.  When I use the external trigger to control data acquisition on Channel 0, I'm only ever able to acheive 1GS/s.  Am I making a mistake?
    I was hoping that the trigger port would act as a simple comparator.  If not, does this imply that the external trigger channel is being sampled at 1GS/s? 
    Many thanks,
    Jimmy

    Hi Jimmy,
    The External Trigger is not digitized and therefore is not a second channel. It is appropriate to consider it like a comparator.  It can be used as an analog trigger source for the TIS acquisition on channel 0 to achieve 1 channel at 2 GS/s.  I am not sure why you are only achieving 1 GS/s.
    I recommend starting with an example program such as "Configured Acquisition".  You can navigate to this example through the Example Finder, or by using your Start Menu and navigating to All Programs>>National Instruments>>NI-SCOPE>>Examples.  Select your preferred programming environment such as LabVIEW and locate Configured Acquisition.
    Once you have the example open try the following settings to achieve 2GS/s on ch0 triggered from the external trigger input. Set the sampling rate to 2GS/s, the channel to 0, check "TIS Enabled", and ensure that Enforce Realtime is also checked.  Set the trigger type to Edge, and the trigger source to the External Trigger.
    - Jennifer O.
    Product Support Engineer - High Speed Digitizers

  • Multiple record insert thru PROCEDURE - Urgent

    All,
    My requirement is, I have to invoke a procedure which accepts two input and 1 out variable. The operation of the procedure is to insert the data to two tables(head_tab and line_tab-accepts multiple record). I used %rowtype for the two inputs i.e procedure proc(head_var head_tab%rowtype, line_var line_tab%rowtype, out_var out number). The incoming doc comes from 3rd party application which sends a header record and multiple line record for the same header.
    I used the transformation activity, to insert line record I used for-each loop for multiple record. But %rowtype being a scalar data type, it doesn't accept array of record to it! I'm stuck here. Can we achieve this scenario with using of procedure? or should I configure DBAdapter to insert the data directly to the table rather the procedure does this? If we can achieve it thru procedure, how can I go about?
    Thanks,
    Sen

    Hi,
    I believe you should change the signature of the procedure.
    I tried below code for my proc to send multiple records without use of for loop.
    Type line_var_rec IS RECORD(
    Var1;
    var2;
    Type line_var_tab IS TABLE OF line_var_rec INDEX BY BINARY INTEGER;
    Type head_var_rec IS RECORD(
    var3;
    var4;
    line_var line_var_tab ;
    Type head_var_tab IS TABLE OF head_var_rec INDEX BY BINARY INTEGER;
    proc(head_var IN head_var_tab, out_var out number);
    With the above code you can insert multiple header records each having multiple line records.
    Pls let me know if u have any questions.

  • Programmatic updating multiple records of a table in ADF

    Hi,
    I am using Jdeveloper : 10g 10.1.3.3
    Problem : I need to update multiple records in DB using ADF feature.
    The senario is like user is shown records of item consisting of item name, item code, category code, price etc. then user clicks "change category code" link availabe against each record. In next page user is shown current code and provided a text box to enter new code. Once i get this in my bean i need to update all records as:
    update item_info set category_code = :new_code where category_code = :current_code. Means to udate category code in all the records where category_code is :current_code.
    I have Entity and View Object for this table.
    How do i update multiple records using created view which is entity based?
    Have A Nice Time!
    Regards,
    Kevin

    In ADF you don't use update statement directly. This is done by the framework.
    You have to search for the records which match your condition category_code = :current_code using your VO based on the entity.
    Then iterate over the result set and change each row to your need setCategoryCode(newCode);
    When you commit the changes they are persist them in the DB.
    To see the changes in the UI you have to update the display using PPR or execute the query again.
    Timo

Maybe you are looking for

  • Error while trying to add a calendar account

    Dear all, I've already added a public calender (ics) to my iPhone but now I need your help. I want to add the calender of my fellow (our both calenders are served by Exchange 2003). After filling out all the required fields (Server, description, user

  • Won't install java 1.8 says version already exists 14.9

    I'm trying to create a database in Open Office which I was able to do fine this morning, but now after updating OO it is telling me "no java installation could be found". When I go to oracle to download the latest Java version the machine tells me I

  • Converting Pages PostScript file to PDF

    Can someone with a similar setup test this Pages PS file technique out and see if you can do it? This was a tip from a Pages User/Blogger, as a way to get truer color printing of a Pages doc when moving it from the 3-color screen version to a four co

  • Order by -- complex sorting?

    Hello: How can one accomplish the following: Let's say I have the following scenario: Select value2 from table2 IF this value exists. Else, select value 1 from table1. -- Then: I would like to ORDER BY all of the above results (sometimes the value ma

  • Adobe Form FaormCalc Scripting .....

    Hello all,          I am Creating <b>AdobeForms In ISR In transaction SFP</b>. As per my knowledge Any FlowLogic Related to that form is Written in the Predefined BADI's , we just need to implement them. <b>My Question is If we can write flow logic i