AO Generation using Pause trigger

Hi all ,
I'm trying to do an Analog Generation with my X-Series NI-6356 DAQ ,
My problem is that I want to make 5 tests each one with 200 points that reflects as a linear wavee for the AO.
I'm using  DAQmxWriteAnalogF64 but this command is too slow 100 ms over USB!
And I don't have that time.
So I Want to use a Pause trigger.
I'll set a buffer of 1000 points and I want to make 5 tests:
test 1 - AO of 1-200 from the buffer
test 2 - AO of 200-400 from  the buffer
test 3 - AO of 400-600 from  the buffer
test 4 - AO of 600-800  from  the buffer
test 5 - AO of 800-1000 from f the buffer
my questions are :
1. Is it possible ?
2. Is there any example I can use ?
Kobi Kalif
Software Engineer

Kobi-
Can you post some pseudo code so that I can get a better understanding of your intended program?
Thanks,
Sean
Applications Engineering Specialist - Semiconductor Test
National Instruments

Similar Messages

  • Edge counting with digitial pause trigger

    Hi
    I should write a program for edge counting with digital pause trigger in visual basic.  I have found an example of using pause trigger in edge counting but it is written in C#.
    Steps in the program followed is:
    1) creating task
    2) creating count edge channel objecy
    3) configuring thr trigger ( where i have been strucked)
    code in c # is:
    taskname.triggers.pausetrigger.digitalleveltrigger ( source, level)
    When i tried to look for trigger function and to configure it in Visual Basic, I have not found any trigger function to set/configure in the function library
    Thanks

    Hi there,
    Here is the code in text format.  That's pretty much all you need.  I took the example code called CntDigEvents.vbp and added the following code before the start task function call:
        DAQmxErrChk DAQmx.DAQmxSetPauseTrigType(taskHandle, DAQmx_Val_TriggerType6_DigLvl)
        DAQmxErrChk DAQmx.DAQmxSetDigLvlPauseTrigSrc(taskHandle, "PFI0")
        DAQmxErrChk DAQmx.DAQmxSetDigLvlPauseTrigWhen(taskHandle, DAQmx_Val_Level1_High)
    As for the C# code I am not familiar with C# so I don't think I can be a great help on that one.
    myTask.Triggers.PauseTrigger.ConfigureDigitalLevelTrigger(triggerSourceTextBox.Text, gateLevel)  This function is the main call for the pause trigger and all it is doing is setting the properties.  triggersource should be along the lines of "PFI0" or "Ctr0" and gate level defines whether the gate level is "high" or "low)
    How is the VB code going?
    AdamB
    Applications Engineering Team Leader | National Instruments | UK & Ireland
    Attachments:
    VBcode.txt ‏4 KB

  • Abort inserting a record in a table using a trigger

    Hi there,
    Is there any way to abort inserting a record in a table using a trigger?
    For full details, I have the following table ("myTable"):
    BSC INTEGER NOT NULL,
    BTS VARCHAR2(20) NOT NULL,
    INFO1 INTEGER,
    INFO2 INTEGER
    myTable_PK = PRIMARY KEY (BSC,BTS)
    I have also a stored procedure that imports a data from text file and inserts them to the specified table (using UTL_FILE package). The stored procedure works great.
    But the thing that in the text file itselft it might be (due to third-parity report generation bug) that the primary key will be violated or the BSC/BTS field has null value. In such case I just want to ignore the insertion statement using a trigger.
    Thanks

    Ok Jens, could you tell me what exception could I use?
    Below a protion of my StoredProcedure.
    CREATE OR REPLACE PROCEDURE update_myTable() IS
    FHANDLE UTL_FILE.FILE_TYPE;
    BSC INTEGER;
    BTS VARCHAR2(20);
    INFO1 INTEGER;
    INFO2 INTEGER;
    BEGIN
    FHANDLE := UTL_FILE.FOPEN('LOG_FILE_DIR',FILENAME,'R',4000);
    LOOP
    UTL_FILE.GET_LINE(FHANDLE,STR);
    -- Process the line STR and generates BSC, BTS, INFO1, and INFO2 values
    EXECUTE IMMEDIATE 'INSERT INTO myTable VALUES(:1,:2,:3,:4)' USING BSC,BTS,INFO1,INFO2;
    END LOOP;
    EXCEPTION WHEN NO_DATA_FOUND THEN UTL_FILE.FCLOSE(FHANDLE);
    END UPDATE_R205BTS;
    Remember that I am already using an exception with NO_DATA_FOUND to indicate the end of file then closing it.
    Thanks for your reply

  • DAQmx: Gating Pulses with Pause Trigger

    I have an NI 9401 module in a 9171 chassis and would like to gate the output of one counter with the output of another counter. Counter 1 (the signal to be gated) generates a 3 Mhz signal and Counter 0 (the gate) generates a 10 Hz signal that is externally routed to Counter 1's Gate pin. I expected this would gate Counter 1's signal to produce the 3 Mhz pulse only when Counter 0 is high, but the wiring had no affect on the output of Counter 1, it still generated a continuous 3 Mhz pulse train.  I found that some code is needed to get a counter to pay attention to the signal at its Gate pin (this post was particularly helpful) and that this can be done with the Pause Trigger property node. After setting up the node, however, I ran into this error:
    Error -20124 occured at DAQmx Start Task.vi:2
    Lines 4 to 7 of this port are configured for input. Cannot configure these lines for output at this time.
    I'm pretty perplexed by this.  The problem seems to be coming from trying to designate PFI 5 ("CTR 1 Gate" on the 9401) as the Pause Trigger source.  If anything, I would think the error would be that lines 4 to 7 are configured for output, since those lines are grouped under CTR 1 which is configured as a CO channel to generate the 3 Mhz pulse train, and that setting line 5 as the Pause Trigger source is changing the configuration to an input.  Searching for this error in the NI forums and Google doesn't pull up any troubleshooting information.  I've tried to create a task to configure line 5 as a seperate digital input channel, but then I get the opposite error (Error -200125) saying that lines 4 to 7 are configured for output and cannot be configured to input, to make things more confusing.
    Any thoughts would be appreciated.  I'm concerned that I'm missing something obvious about gating pulses or configuring CO channels since I keep reading that one of the advantages of DAQmx over DAQ Legacy is that it makes signal routing easier.  I'm using LabVIEW 2012 (32-bit) with DAQmx 9.5.5 installed.
    Solved!
    Go to Solution.
    Attachments:
    Simple_Gated_Pulse.vi ‏29 KB

    Hi agoncalves,
    I took a quick look at your VI and I see two immediate problems:
    1.  There is not guarantee that both tasks will reserve before either one starts.  This explains your error and why it seems confusing.  The 9401 is nibble configurable but you can't change the direction while the device is in use (why the reserves are important).  The module powers up with both nibbles set to input.  Your first task drives an output so it switches direction on one of them.  When your task is committed (started) it locks in that configuration.  The second task then tries to also drive an output but on the other nibble which is input and cannot be switched because the first task is running.  The solution is to use the error wire to force the execution order (or use a flat sequence structure).
    2.  You'll run into problems with your gating signal unless you wire it into a separate input (and put both pulse trains on the same nibble).  You can change that by setting the channel property CO.Pulse.Term.  That's if you want to route your signal through some external circuitry and back in.  If you are using the signal directly, you could just use it internally.  Such as /cDAQ1Mod1/ctr0InternalOutput

  • Read analog trigger signal gated by digital pause trigger

    Hi!
    I want to use and analog trigger together with digital pause trigger. At the same time i want to see on the scope the analog trigger signal which was gated by gate signal. Is it possible? Can i somehow wire the gated trigger to one of the outputs of the board?
    Thanks in advance.
     

     Hi Sergei_phys,
    Thank you for the forum post!
    I have a few questions about your post:
    What hardware are you using? Is it NI or 3rd party? You mention using a scope, is that a NI piece of hardware/module?
    In theory you can have a analog trigger to start the acquisition and a digital trigger to pause , but it depends of the hardware.
    Thanks,
    DanC12
     

  • Does "pause trigger" have a status flag?

    Hi,
    I am using a BNC2110 with PCI6133 multifunction DAQ card. I am reading random analog voltage pulses on one channel for now, and using the "Pause Trigger" properties (on trigger property node) so that the read task only takes in samples from the pulses, and not samples of the baseline noise between pulses.  This works ok. But is there a way of signalling when the pause trigger has actually started and stopped (at the rising and falling edges of a pulse, respectively)? I want to use these signals to index the collected data so that I know where in the data any one pulse starts and ends, and so keep all pulse data separate, but in one array.
    Many thanks,
    Oliver.

    Hi Oliver
    One thing you could do it to look for a timeout error to flag when a pause occurs. The time-out error code is -200284. If you set the timeout value to the minimum (1) you can keep checking for the timeout and set a boolean to true when a timeout occurs. So if the boolean is true you know you have a pause, if the boolean is false you know you are reading in the signal.
    I have adapted the vi that you posted to do this and attached it below.
    I hope this helps
    Thanks
    Beejal S
    NI UK & Ireland
    Attachments:
    ai_with_analog_pause_trigger_flag.vi ‏44 KB

  • How to use Pause / Break button on Macbook / Small Apple Keyboards

    I have ready many forums regarding the inability to use Pause / Break button on Macbooks (or other small keyboards made by mac) without using a USB pad extension. And all of those threads are closed and will not let me reply with MY ANSWER / SOLUTION!!
    Lets just say my life depended on getting a Pause button working on Bootcamp Windows 7 x64 macbook. I googled away, with no answers... I did know about the fn option to perm in windows btw.
    BUT, i remembered, when i couldn't get my x64 bit drivers for Bluetooth keyboard to work, that there was a VIRTUAL KEYBOARD inside of "ease of access center" inside of Control Panel (all view). Find "use the computer without keyboard" and enable "use on screen keyboard"
    Now you will be able to click PAUSE virtually in keyboard...
    I dont know if this is an option in XP or vista, but Im sure its built in as well.
    YOUR WELCOME ;P

    I've been going crazy tring to figue this out as well--  I use Microsoft Remote Access on my Macbook Pro. I found this archived post below-- it worked for me!!!
    MWithersIT
    Nov 3, 2010 1:09 PM 
    I have ready many forums regarding the inability to use Pause / Break button on Macbooks (or other small keyboards made by mac) without using a USB pad extension. And all of those threads are closed and will not let me reply with MY ANSWER / SOLUTION!! Lets just say my life depended on getting a Pause button working on Bootcamp Windows 7 x64 macbook. I googled away, with no answers... I did know about the fn option to perm in windows btw. BUT, i remembered, when i couldn't get my x64 bit drivers for Bluetooth keyboard to work, that there was a VIRTUAL KEYBOARD inside of "ease of access center" inside of Control Panel (all view). Find "use the computer without keyboard" and enable "use on screen keyboard" Now you will be able to click PAUSE virtually in keyboard... I dont know if this is an option in XP or vista, but Im sure its built in as well. YOUR WELCOME ;P 

  • Problem for xml generation using DBMS_XMLGEN

    Hi All,
    i have problem during xml generation using Any help would be highly appreciate
    how could we publish xml data using data base API DBMS_XMLGEN in oracle applications (APPS) i.e. at 'View Output" using
    Any help would be highly appreciate.
    Let me know if need more explanation, this is High priority for me.
    Thanks and Regards,
    [email protected]
    Message was edited by:
    user553699

    You can set the null attribute to true , so that the tag appears in your XML
    see the statement in Bold.
    DECLARE
    queryCtx dbms_xmlquery.ctxType;
    result CLOB;
    BEGIN
    -- set up the query context
    queryCtx := dbms_xmlquery.newContext(
    'SELECT empno "EMP_NO"
    , ename "NAME"
    , deptno "DEPT_NO"
    , comm "COMM"
    FROM scott.emp
    WHERE deptno = :DEPTNO'
    dbms_xmlquery.setRowTag(
    queryCtx
    , 'EMP'
    dbms_xmlquery.setRowSetTag(
    queryCtx
    , 'EMPSET'
    DBMS_XMLQUERY.useNullAttributeIndicator(queryCtx,true);
    dbms_xmlquery.setBindValue(
    queryCtx
    , 'DEPTNO'
    , 30
    result := dbms_xmlquery.getXml(queryCtx);
    insert into clobtable values(result);commit;
    dbms_xmlquery.closeContext(queryCtx);
    END;
    select * from clobtable
    <?xml version = '1.0'?>
    <EMPSET>
    <EMP num="1">
    <EMP_NO>7499</EMP_NO>
    <NAME>ALLEN</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>300</COMM>
    </EMP>
    <EMP num="2">
    <EMP_NO>7521</EMP_NO>
    <NAME>WARD</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>500</COMM>
    </EMP>
    <EMP num="3">
    <EMP_NO>7654</EMP_NO>
    <NAME>MARTIN</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>1400</COMM>
    </EMP>
    <EMP num="4">
    <EMP_NO>7698</EMP_NO>
    <NAME>BLAKE</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM NULL="YES"/>
    </EMP>
    <EMP num="5">
    <EMP_NO>7844</EMP_NO>
    <NAME>TURNER</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>0</COMM>
    </EMP>
    <EMP num="6">
    <EMP_NO>7900</EMP_NO>
    <NAME>JAMES</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM NULL="YES"/>
    </EMP>
    </EMPSET>
    http://sqltech.cl/doc/oracle9i/appdev.901/a89852/d_xmlque.htm

  • IPod nano 6th generation keeps pausing spontaneously

    My iPod nano 6th generation keeps pausing spontaneously; it's only a year old and naturally warrantee is just expired. Please help!

    So you worked through the suggestions in this Apple support document then?
    iTunes displays a -69 error when syncing iPod
    B-rock

  • SAP RF/ Bar code generation using IM

    Hi folks
    Can any one experiencing in using SAP Console / Bar code generation using Inventory Management .

    Please read this article
    http://tdworld.com/info_systems/highlights/peak-pepco-inventory-management/
    Is it possible to generate the barcoding using Handling unit or any other module without WMS ?
    Thanks for your input
    Jeevan

  • Using external trigger channels with PCI-1422

    I need to trigger some 5 volt relays with my PCI1422 board similar to the way it is done with digital I/O on a standard board. Can this be done using the trigger channels? I have tried this and only get a 2V state change...

    Hi,
    How much current are your 5V relays pulling? Have you tried to measure the voltage change on your 1422 trigger lines with a Voltmeter without connecting it to the relays? The Trigger lines on the 1422 should give a 5V TTL signal, so something must be pulling that signal down.
    Hope this helps.
    Morten Jensen
    National Instruments

  • Help: Can you use software trigger on a digital line.

    Hi:
    We have a legacy DAQCARDard 700 which does not support hardware triggering.
    We have a trigger from our instrument that is 5 V+ and we would like to
    trigger when it drops to 0 V. We have several questions.
    1. Do we need to invert the signal in MAX or is that only for V that are
    negative?
    2. Is there a good example in the examples where the state of this digital
    line is used to trigger an analog acquisition? When we tried using the
    digital trigger examples, we had an error saying that the hardware did not
    support that mode.
    3. We have an analog software trigger mode (based on the Analog Software
    Trigger example) working which we would like to modify over to read the
    digital line, but we have done very little wi
    th digital I/O.
    4. The digital trigger has been assigned a virtual channel of dtrg.
    Any help would be much appreciated.
    Thanks in advance,
    Pete

    Thanks Doug,
    If we read the digital line instead of as an analog line would it improve
    the accuracy of the triggering. Everything works now except we have a
    little bit of timing jitter within about 1 data point scanning at 50 kHz.
    However, I've never done any digital i/o with LabView, but may I should work
    through some of the tutorials. If you thought that this might solve the
    jitter problem. Would checking the state of the digital line allow a faster
    response with softtrig, I guess is my question?
    Pete
    "Doug Norman" wrote in message
    news:[email protected]..
    > Hello Pete,
    >
    > You are correct that the DAQCard-700 has no digital (or analog)
    > hardware trigger. The analog trigger example t
    hat is working for you
    > is using conditional retrieval. This is where data is always being
    > acquired and the driver looks at the values to determine when to
    > "trigger" and read the data into LabVIEW. To answer your questions:
    > 1. I don't think you need to invert the signal. This is for when you
    > want a digital low (below 0.8 volts) to show up as a digital high, and
    > a high (above 2.0 volts) to be read as a low.
    > 2. I don't know of a good example. You would basically have to
    > monitor the digital line. When it goes from high to low you would
    > then start your analog acquisition.
    > 3. I think this could be your best bet. If you have enough analog
    > input lines, why not just connect this digital signal as one of your
    > analog inputs. Then use this example to trigger when the 5 volts
    > drops to 0. It won't hurt to acquire your digital signal on an anlog
    > input along with your other data.
    > 4. I don't understand this question.
    >
    > Best Regards,
    >
    > Doug Norman

  • Use reference trigger for cyclic recording data

    Hi,
    Before I start, let me briefly introduce what hardware I have and what I want to achieve.
      I  got SCXI-1000 (Chassis), SCXI-1102C (module), SCXI-1303 (terminal block,
      mainly for temperature sensor input); a couple month ago  I bought feedthrough SCXI-1180 and terminal SCXI-1302 to input my digital signal (see attached PNG file). In fact, I have two digital signals to input. The first one is Injection digital signal (input as PFI0) which will trigger the start of recording my
    temperature profile; The second is packing signal (input as PFI1), which I want to use as a reference trigger to stop the recording and save as the cycle file.
    And then the injection cycle keeps going. Please see the attached VI for details.
        I get my digital trigger working to start recording my temperature sensor profile. However, I can't get the second part trigger to stop the recording.
    The error message from running my VI is that a reference trigger is only applicable for finite sampling. It seems that I need continuous sampling to recording my temperature profile! So, by looking through my VI, please give some suggestions to do the task and solutions to solve the conflictions for sampling.
      Your assistance is higly appreciated.
    HW
    Solved!
    Go to Solution.
    Attachments:
    Arburg digital signals.png ‏17 KB
    Trigger_Test2_TransientComparison.vi ‏109 KB

    Hi, Jim:
    I've tried with the way you suggested to poll out the digital line. In your VI, it will stop the running of the whole program when the second signal jumps up. If you see my VI attached, I'd like to start recording with the first trigger and then stop the cycle file by the second trigger signal falls down, and then keep recording the second cycle until clicking stop (reference to my signal illustration).
    So what I am trying is to use both trigger signal to output a boolean value (when both trigger signals are 0), reverse it to true (1), and use it to stop the cycle file. But I am still little far away from doing the task. Is there any way to do the cyclic file as I want with or without 'Write to Measurement File' VI?
    Please edit my VI and save in V8.5. Thanks for your help! 
    Best Regards
    HW
    Attachments:
    Trigger_signal_illustration.png ‏12 KB
    Read_AI_Test2-Dig_Chan_triggers.vi ‏111 KB

  • Retrieving latest updated or inserted records without using a trigger

    I have to retrieve the latest updated/inserted records from a set of database tables. Say, if 'n' sets of different records have been updated or inserted into one or more different database tables then all the 'n' records of data should be retrieved using a java code without using a trigger.

    helpmeplz wrote:
    Thanks for your reply.
    But I don't know when or from where or what kind of data gets inserted/updated into the tables. I need a listener or a component which can handle events occured on the particular set of database tables, and get the event data. the java code should get the updated/inserted rows that have been inserted into a set of database tables by a third party.
    Please lemme know how I can do this.Realistically you can't.
    If and only if the tables have a modification timestamp then you could use that. Every table would need it.
    Other than that the only othe possibility would require that you keep an entire copy of each table in the memory, poll at a set interval and then do an entire comparison for each table. For very small data volumes (on the target tables) that is practical. For larger volumes it isn't.

  • Visual C++ AM/FM generation using NI-6062E & DAQmx C functions

    hi all,
    I am trying to write my own code in VC++ .Net(MFC) for FM/AM generation using DAQmx C functions, but it was more demanding than on the LabView platform. I can build the framework for all parameters (ie. Carrier Freq, Modulation Freq, Modulation Index, Amplitude) but as I came to the the array size, sampling rate, buffer size, I don't know what to do??
    Can anyone please have a look?
    Thank you very much!
    Attachments:
    NI_AM_FM.zip ‏60 KB

    Hello Sean,
    The following code is where I think most important to my task of AM/FM generation:
    (Ln147 to Ln162 in FunctionGenerator.cpp)
    void CFunctionGenerator::GenerateSineWave(
    CNiReal64Vector& waveform,
    double frequency,
    double amplitude,
    double sampleClockRate, // samples/sec.
    double samplesPerBuffer)
    double deltaT = 1/sampleClockRate; // sec./samp
    int intSamplesPerBuffer = static_cast(samplesPerBuffer);
    waveform.SetSize(intSamplesPerBuffer,CNiVector::NiVectorDoNotInit);
    for(int i=0;i waveform[i] = amplitude * ::sin( (2.0 * M_PI) * frequency * (i*deltaT) );
    I want to change the waveform 1D array to something like this for FM:
    waveform[i] = amplitude * ::cos(((2.0 * M_PI)*carrier_frequency*(i*deltaT)) + modulation_index*sin((2.0 * M_PI) * modulator_frequency * (i*deltaT)));
    for AM:
    waveform[i] = amplitude * (1 + modulation_index * cos (( 2.0 * M_PI) * modulator_frequency *(i*deltaT))*cos((2.0 * M_PI)* carrier_frequency *(i*deltaT)));
    It seems I need to add two more parameters "double frequency_modulator, double modulation_index," to the GenerateSineWave function,
    but it also looks like I need to adjust the "for(int i=0; i < intSamplesPerBuffer; i++)" because from my LabView Block Diagram iteration of "i" also depends on the two frequency parameters?
    Do I also need to adjust deltaT? or the sampleClockRate is not fixed in FM/AM cases?
    How can I do the above?
    Thank you for your patient.
    Regards,
    RollyMessage Edited by Rolly on 04-06-2005 02:35 PM
    Message Edited by Rolly on 04-06-2005 02:38 PM

Maybe you are looking for

  • Junk mail filter doesn't work all the time

    Why doesn't the Junk mail filter work all the time? I click on mail like from Best Buy or Omni Hotels to go into junk mail but hardly any of their mail goes into Junk. Other sites go directly to Junk. If I click on a Best Buy mail to indicate it's Ju

  • EA4500 Windows 7 cannot index files so files not seen by Windows Media Player

    I have setup a disk on the USB port of the EA4500 and have 4 folders.  One being music.  I want to access this folder via my Wireless laptop with Windows Media Player but I only get a handful of the 3000+ songs on the disk.  A hard wired PC can acces

  • Time Capsule may have deleted all my Data??????

    Hi, Yesterday i looked at my Time Machine Backup icon in my 'info bar' at the top of my mac to check if Time Machine and Time Capsule were doing there Hourly backups only was i to find it hadn't done a Backup since the 1st of July... 5 days ago. I pr

  • Sales order packing proposal

    Hi I am creating  standard sales order with packing proposal and after saving the sales order the handling unit no is created.After crating the delivery document and Transfer order document,while packing another new handling units was created.It is n

  • Scene Selection Menu Question

    I will try and make this question as unconfusing as possible. I have a DVD with a basic menu screen. It offers to play the whole film or go to the scene selection menu. When I go to the scene selection menu obviously I have the option to do just that