Configure PXI-2567 to Trigger on Rising Edge using LabWindows​/CVI

I need some help configuring the trigger edge for a PXI-2567 using Labwindows/CVI.  I have been able to successfully create and execute a scan list using both the ni-switch and daqmx APIs.  However, currently the PXI-2567 triggers on the falling edge of an input trigger.  I need to configure it to trigger on the rising edge of an input trigger.  Every function I could find in the daqmx API for configuring the trigger edge gave a non-fatal runtime error, and I could find no such functions in the ni-switch API.
Any help configuring the input trigger edge on the PXI-2567 using Labwindows/CVI would be appreciated.
Thanks

Hi JonRice,
You can configure the scan list to execute on the rising edge of an input trigger.  Here are the Labwindows/CVI and LabVIEW functions you would want to use to retrieve, specify or verify the edge of a digital signal that advances to the next entry in a scan list.
NI-DAQmx C Property: More >> Advance >> Digital Edge >> Edge
You can get/set/reset this property using:
DAQmxGetDigEdgeAdvTrigEdge
DAQmxSetDigEdgeAdvTrigEdge
DAQmxResetDigEdgeAdvTrigEdge
NI-SWITCH C Attribute: NISWITCH_ATTR_TRIGGER_INPUT_POLARITY
You can get/set/check this attribute using:
niSwitch_GetAttributeViInt32
niSwitch_SetAttributeViInt32
niSwitch_CheckAttributeViInt32
NI-DAQmx LabVIEW Property: More:Advanceigital Edge:Edge
DAQmx Trigger Property Node
Short Name: Adv.DigEdge.Edge
NI-SWITCH LabVIEW Property: Trigger Input Polarity
niSwitch Property Node
Short Name: Trigger Input Polarity
Hope this helps!  Let me know if you have further questions.
Chad Erickson
Switch Product Support Engineer
NI - USA

Similar Messages

  • How do I configure ports for PCI-1200 using LabWindows/CVI?

    I want to use 2 ports of the PCI-1200 DIO ports as oup ports. Whenever I write to a port using WriteToDigitalPort, the other port will be reset.
    Shoud I congigure the ports at the beginning of the program? If so How do I do it?
    (LabWindows 5.5)

    I would suggest using the lower level NI-DAQ functions instead of the Easy I/O functions. (You have a lot more flexablity this way.) To configure seperate ports use the function DIG_Prt_Config, then instead of using WriteToDigitalPort, use DIG_OutPort. Here is an example that writes to one port using these NI-DAQ functions. All you need to do to write to two ports is add two lines in; another DIG_Prt_Config and another DIG_Out_Port.
    Good luck and let me know if this does not work for you.
    Brian
    Attachments:
    DOOnePort.zip ‏4 KB

  • Counting rising edge during 50ms for a TTL signal

    Hello, I'm using Labwindows 6 and a traditionnal DAQ. I've injected a TTL signal on my card and I would like to count the number of rising edge each 50 ms without using an internal timer in labwindows so that the counting pace cannot be disturbed by Windows.
    Do someone know how to process or which functions should I use?
    Thanks

    Hi it's still me with still some troubles
    I've generated with my counter0 a square wave of 50 ms pulse width from an internal source but then, I don't know how to specify that this signal will also be the  pin gate (ND_PFI_4) of my counter1 which will count the rising edge.
    Moreover I also don't know how to specify my counter1 just to count rising edge while  my gate is at high state; here 's mys code :
        //Generation of an internal 100 KHZ square wave
        GPCTR_Control(1, ND_COUNTER_0, ND_RESET);
        GPCTR_Set_Application(1, ND_COUNTER_0,ND_PULSE_TRAIN_GNR);
        GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_SOURCE,ND_INTERNAL_100_KHZ);
        //Generation of a 100 ms gate
        //50 ms => low state
        //50 ms => high state
        GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_COUNT_1,5000);
        GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_COUNT_2,5000);
         //output the counter pulse, you must call Select_Signal.
        Select_Signal(1, ND_GPCTR0_OUTPUT, ND_GPCTR0_OUTPUT,ND_LOW_TO_HIGH);
        GPCTR_Control(1, ND_COUNTER_0, ND_PROGRAM);  
        //configuration CPTR1 that will count each rising edge while the gate is at high state
        GPCTR_Control (1, ND_COUNTER_1, ND_RESET);
        GPCTR_Set_Application(1, ND_COUNTER_1,ND_SIMPLE_EVENT_CNT);
        GPCTR_Change_Parameter(1, ND_COUNTER_1, ND_SOURCE, ND_PFI_3);
        GPCTR_Change_Parameter (1, ND_COUNTER_1, ND_SOURCE_POLARITY,ND_LOW_TO_HIGH);
        GPCTR_Change_Parameter (1, ND_COUNTER_1, ND_INITIAL_COUNT, 0);
        GPCTR_Control(1,ND_COUNTER_1, ND_PROGRAM);
        GPCTR_Watch (1, ND_COUNTER_1, ND_ARMED, &compteur);
        printf("%d\n",compteur);
    And the value of compteur is not the value expected at all.
    thanks.
    (ps : can you speak french?)

  • How can I use the pulse train from a 6602 to trigger an niFGEN and niSCOPE on each rising edge of the pulse train?

    Hello,
    Here is my application: I need to use a 6602 counter/timer to generate a pulse train of certain frequency and duty cycle. On each rising edge of this pulse train, I need to output an arbitrary waveform on Ch. 0 of an niFGEN (5422) AND acquire data from CH. 0 of an niSCOPE (5124). I also need to synchronize the niFGEN and the niSCOPE to the same clock used for the pulse train (6602/ctr0). This process needs to continue until the user stops the system.
    I can generate the pulse train using the 6602 just fine using ctr0, but the pulse train shows up on OUT0 by default. When setting up the niFGEN and niSCOPE to trigger on rising/positive slope edge, OUT0 is not an option for either device as a source for the digital rising edge (pulse train). The main options for both are PFI0-3 and RTSI lines.
    Questions:
    1.) Is there a way that I can direct the pulse train to a location (such as an RTSI line) where BOTH the niFGEN and the niSCOPE can use it as a start trigger for each rising edge? I noticed in MAX that a route can be made between ctr0's internal output and a trigger line and others. If this is a solution, could you please explain how to accomplish this?
    2.) Once I configure the niFGEN and niSCOPE to be triggered on a digital rising edge, how can I effectively have this happen for every rising edge from the pulse train? In other words, can I just initiate the FGEN outside of the while loop and it will generate a waveform for each rising edge it sees at the source until the while loop is exitted?
    3.) Is setting a reference clock for the niFGEN and the niSCOPE the same thing as synchronizing both devices using the same clock that generated the pulse train? It is not clear to me the difference, and why it would necessarily be useful.
    Images of my current front panel and block diagram are attached. If you would rather have the actual VI's just let me know. Any help and/or explanation on this is greatly appreciated. Thanks in advance.
    Attachments:
    Front_Panel_Control.jpg ‏278 KB
    Block_Diagram_Control.jpg ‏263 KB

    Hello Cgifford,
    Welcome to National Instruments Forums.
    To output your signal to the PFI lines,
    you can use external connectios between OUT0 and PFI lines. You can also use
    the backplane to do so by routing into the same RTSI line.
    1)
    On the SCOPE and FGEN, the name of the
    terminals are actually “PXI Trigger Line x/RTSIx” but on the 6602 you might
    need to route the signal using the property:
    You can also use the DAQmx route signal which perform the same opperation.
    2)
    This will depend on the frequency of
    your pulse train. If this is lower than about 10 ms, then you can probably
    place this on a loop and start and stop the acquisition every time. If the
    frequency is higher than this, you will have to use:
    -       Scripting on the FGEN side (read more)
    -       MultiRecord Fetch (more information in the scope help file
    section “Acquisition Functions Reading versus Fetching”).
    3)
    The short answer is yes. The longer one
    might depend on how tight you need the synchronization to be (us, ns, ps). For
    very tight synchronization, you should look into here.
    Message Edited by Yardov on 06-18-2007 03:14 PM
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    property.JPG ‏7 KB

  • How do I perform a trigger that collect the data for every rising edge continuously and then automatically put the data in a .xls file??

    I need to collect the data for every rising edge a trigger perfoms. So far I could collect the data but it seems that it only collect the data in the start of triggering, but not continuously. I also want to put the data in an excel spreadsheet and automatically add new set of data when the next rising edge occur. Please help.
    thanks a lot.

    LabWindows/CVI actually ships with a comprehensive set of examples for just about every area of programming you can use it in, including triggered analog data acquisition and ActiveX control of Microsoft Excel for data logging. Go to the following two directories on your computer to find respective examples for the two areas you are inquiring about:
    1) C:\MeasurementStudio\CVI\samples\DAQ\Ai\DAQsingleBufExtTrig.PRJ
    2) C:\MeasurementStudio\CVI\samples\activex\excel\excel2000dem.prj
    Just make sure to study the examples carefully so that you fully understand the processes followed for triggered analog acquisition and the process of launching an ActiveX automation server for control, and then you should be able to merge the concepts shown in both of the example
    s to make the application you desire.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • PFI0 Trigger : howto plot PFI0 and record dateTime of Rising Edge ?

    Hi,
    I'm acquiring an analog signal on my PCI 6250, triggered on PFI0. For this test, I use DAQ Assistant
    I use VS2010, MS2013, DAQmx 14.0 .
    I acquire at 1MHz, 5,000,000 of samples (5 seconds)
    I would like to plot on a Digital Graph my PFI0 signal, which shows on horizontal axis Date Time. I would like also to know if it possible to record the DateTime of each Rising edge detected (Rising edge period on PFI0 may be faster than 5s) in parallel of my Analog Acquisition or at least the DateTime of the rising edge which has triggered the Analog acquisition.
    Kind Regards,

    Hello Charly,
    Yes you could start 2 differents tasks, one analog aquisition to plot your signal and at the same time one numeric like a counter to mesure your rising edges.
    Hope this will help you,
    Kind regards,
    Maxime G. | Application Engineer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    LabVIEW Tour
    Journées Techniques dans 10 villes en France, du 4 au 20 novembre 2014

  • PXIe-4499 DAQmx Trigger

    I'd like to trigger off a rising edge on one of the analog channels, let's say AI0, on a PXIe-4499 card however I can't seem to figure out how to specify the trigger source. I'm using the "DAQmx Trigger.vi" and the documentation says the following:
    "source is the name of a virtual channel or terminal where there is an analog signal to use as the source of the trigger"
    I tried creating a virtual channel with no luck and have looked through the 4499's documentation but haven't been able to find a reference to source names.
    Can anybody offer a suggestion or point me in the direction of an example?

    Hello bww,
    The example you are looking for can be found on this page. The source you specify will be the signal that triggers the acquisition.  This signal can come through the PFIO for your device, the PXIe chassis backplane, or the Analog Input channels. For your purpose (correct me if I am wrong) you want to acquire on AIO and begin the acquisition when the analog signal (AIO) is above a certain level? Then I would recommend configuring the example to look like the item below.
    Regards,
    Izzy O.
    Applications Engineer
    National Instruments
    www.ni.com/support

  • Rising Edge on AO Start

    Hi,
    I'm using a PXI 6251 Daq card.
    On this one, I'm generate on analog output a finite signal.
    I would like to initiate a rising edge on PXIx terminal when the Output analog task is realy run.
    In fact i would like to provoq an output trigger when the analog task is start.
    Is it possible ?
    Thanks for reply.
    Regards
    =========================
    Bonjour,
    Je dispose d'une carte PXI 6251
    Sur celle-ci je génére un signal Analogique Finit.
    Je souhaite provoquer un front montant sur une sortie PFIX quand la tache de génération à démarrer. Puis que cette sortie tombe à 0 quand la tache est stopée....
    Est-ce possible ?
    Merci pour vos réponses.
    Solved!
    Go to Solution.

    Hello __KB__,
    I think you should start from this example : https://decibel.ni.com/content/docs/DOC-5374
    Then, you'll have to adapt it in order to define a pattern which generates a high level as soon as the analog task starts and which generates a low level at the end of the finite acquisition.
    In order to know which digital line matches with your PFI line, you will have to look at the documentation of the PXI 6251 (http://www.ni.com/pdf/manuals/371291h.pdf, page 14). You can also get the information from MAX.
    Regards,
    Jérémy C.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • 6602: Rising edge capturing hardware interrupt

    I have this signal in input:
    I have to do something on rising edge as soon as possible.
    My idea is to receive an hw interrupt from the board, and to write an isr soubroutine.
    I read about callback function so i write some code.
    But when i call:
        DAQmxErrChk ( DAQmxCfgChangeDetectionTiming ( udpTaskHandle,
                                                      "Dev1/Ctr0",
                                                      "Dev1/Ctr0",
                                                      DAQmx_Val_ContSamps,
                                                      1));
    I have an error for the ctr0, it seems i can use onli the port0.
    Now my question.... is there on port0 a software thread that read continuosly the value of the pins?
    Or is there an hardware interrupt anyway ?
    I think that a software thread has a big latency for me, at this point don't need the 6602 board,
    i could read  the signal on LPT standard port.
    Thank you for the answer.
    There are 10 kinds of people. Those who understand binary notation, and those who do not.
    Solved!
    Go to Solution.

    Sorry if it's passed a long time, i tryed to do as you suggested, but if i set  DAQmx_Val_HWTimedSinglePoint how can i have a continuos acquisition?
    that's my code, it seems that thecallback function is called only once.
    #include <stdio.h>
    #include <NIDAQmx.h>
    #define DAQmxErrChk(functionCall) if( DAQmxFailed(error=(functionCall)) ) goto Error; else
    int32 CVICALLBACK TriggerDetectionCallback(TaskHandle taskHandle, int32 signalID, void *callbackData);
    void Cleanup (void);
    static TaskHandle  taskHandle=0;
    int main(void)
        int         error=0;
        int32       read;
        uInt32      data[1000];
        char        errBuff[2048]={'\0'};
        // DAQmx Configure Code
        DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
        DAQmxErrChk (DAQmxCreateCICountEdgesChan(taskHandle,
                                                 "Dev1/ctr1",
                                                 DAQmx_Val_Rising,
                                                 0,
                                                 DAQmx_Val_CountUp));
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,
                                           "/Dev1/PFI35",
                                           1000.0,
                                           DAQmx_Val_Rising,
                                           DAQmx_Val_HWTimedSinglePoint ,
                                           1000));
        DAQmxErrChk (DAQmxRegisterSignalEvent(taskHandle,
                                              DAQmx_Val_SampleClock ,
                                              0,
                                              TriggerDetectionCallback,
                                              NULL)
        // DAQmx Start Code
        DAQmxErrChk (DAQmxStartTask(taskHandle));
        printf("Continuously reading. Press Ctrl+C to interrupt\n");
        while( 1 ) {
    Error:
        puts("");
        if( DAQmxFailed(error) )
            DAQmxGetExtendedErrorInfo(errBuff,2048);
        if( taskHandle!=0 ) {
            // DAQmx Stop Code
            DAQmxStopTask(taskHandle);
            DAQmxClearTask(taskHandle);
        if( DAQmxFailed(error) )
            printf("DAQmx Error: %s\n",errBuff);
        printf("End of program, press Enter key to quit\n");
        getchar();
        return 0;
    int32 CVICALLBACK TriggerDetectionCallback(TaskHandle taskHandle, int32 signalID, void *callbackData)
        int32   error=0;
        uInt32  data[200]={0};
        int32   numRead;
        uInt32  i=0;
        char    errBuff[2048]={'\0'};
        static int count =0;
        count++;
        printf("\n\n%d", count);
        if( taskHandle ) {
            // DAQmx Read Code
            DAQmxErrChk (DAQmxReadCounterU32(taskHandle,1000,10.0,data,1000,&numRead,NULL));
            printf("\n%d",data);
        return 0;
    Error:
        if( DAQmxFailed(error) )
            DAQmxGetExtendedErrorInfo(errBuff,2048);
            Cleanup();
            printf("DAQmx Error: %s\n",errBuff);
        return 0;
    void Cleanup (void)
        if( taskHandle!=0 )
            // DAQmx Stop Code
            DAQmxStopTask(taskHandle);
            DAQmxClearTask(taskHandle);
            taskHandle = 0;
    Message Edited by blacksocket on 30-03-2010 03:56 PM
    There are 10 kinds of people. Those who understand binary notation, and those who do not.

  • NI PXIe 4141 source trigger for sequence start

    Hi all,
    Is it possible to use Source Trigger to generate a sequence in NI PXIe 4141 SMU? Whenever I try this only first and Second sequence voltages are produced and then sequence stops. 
    It seems to be waiting for Sequence Advance trigger. In this case what is the purpose of Source Trigger? can it only be used for single voltage transition?
    I know I can use Start Trigger to start generat my whole sequence, but I don't want to do use it because it limits my capability to control Measurement using Measurement Trigger individually.
    Please help! 
    Anandelamaran Duraisamy,
    Senior Project Engineer,
    Soliton Technologies (P) Ltd,
    www.solitontech.com

    Kevin:
    Thanks for the info.
    I have since added the ability to use the arm start trigger instead the start trigger, and it does what I was looking for.
    >In practice, it seems that the "arm start" trigger is simply the one and only start trigger
    >that can be configured for counter tasks.
    Well, the regular start trigger works with output pulse tasks.
    Which brings up another question: on a board with analog trigger circuitry, can you use an analog trigger for an task that accepts a regular start trigger? I don't seem to have a board with analog trigger, so I can't try it.
    I find the documentation to be not as clear sometimes as it could be. I also find that it is often difficult to find the particular spot in the documentation where something is disscussed. That is partly because sometimes pieces of a given topic are scattered about.
    Sure wish it was in a PDF so I could actually read through it!
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • Rising edge of square wave

    Hi all,
    I'm wondering how I would go about finding the rising edge of a square wave. I can trigger true when the rising edge of a sine wave occurs but it doesn't work for a square wave. 
    Any ideas would be excellent!

    winterfresh11 wrote:
    So I actually discovered the answer to that question I had, but thank you for your response!
    And what was your answer?  Please share since somebody else might run into the same issue and this thread might be able to help them.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to trigger on Falling Edge?

    Hello,
    I could not find any example on Falling Edge trigger Acq. for 6534 or 6110. Can anybody tell me how to trigger on falling edge, or for that matter even specify which edge to trigger on?
    Dhruvish

    There are some great NI-DAQmx triggering examples that install into LabVIEW 7.0 or newer when NI-DAQ is installed (as long as you include support for your LabVIEW version when installing NI-DAQ). With the release of NI-DAQ 7.4, both of your devices are supported by NI-DAQmx, so I would definately recommend using the DAQmx API. In LabVIEW, go to Help>>Find Examples. For your analog board (6110), navigate to Hardware Input and Output>>DAQmx>>Analog Measurements and maybe take a look at Acq&Graph Voltage-Int Clk-Dig Start.vi. For your digital I/O board (6534), go to Hardware Input and Ouput>>DAQmx>>Digital Measurements and try Read Dig Chan-Int Clk-Dig Ref.vi. Both of those examples has a control on the front panel that allows the user to select whether he/she wants to trigger on the rising or falling edge of a digital signal. Hope this helps!
    -Alan A.

  • How to use niSwitch_InitWithTopology with PXI-2567 relais card

    Hello,
    I'm trying to get the NI Visual Basic example niSwitchControllingAnIndividualRelay.vbp working with a PXI-2567 relais card.
    I doesn't seem to get my ResourceName and Topology (the first two parameters of the niSwitch_InitWithTopology function) right (the example program creates the errors 1074130544 "This session is not valid" and 1074135030 "Failure loading driver module").
    Where can I find the right ResourceName and Topology for the PXI-2567 (self test all right) to fill in these two parameters ?
    With thanks,
    best regards,
    Geert
    Attachments:
    IMG1.gif ‏28 KB

    Hello AlessioD,
    the relay card PXI-2567 stopped "working" again (I don't know why). So I checked the 'Tools' - 'Select switch card' from the Measurement and Automation Explorer with as result the error "Failure loading driver module" on 'OK'.
    Seems that the driver module of this PXI-2567 can't be loaded. NI-switch 32.dll gives the same error report from the Visual Basic sample program.
    What can be the problem and how to fix it ?
    With thanks,
    best regards,
    Geert
    Attachments:
    driver_not_loaded1.gif ‏37 KB
    driver_not_loaded2.gif ‏28 KB

  • How can i get the every rising edge's time value with usb 6212 counter continues acquisition

    i have a usb 6212,and now i can get every pluse 'period ,frequency。 
    i want to know how to get the every rising edge's time point value by DAQmx Counter.
    thx

    As you already know YouTube doesn't play in the background, that's why I wasted my time trying to give you an alternative.

  • Error when intializin​g PXI-2567 Hardware

    I get an error when initializing my hardware(PXI-2567). The error is related to the source name. When I input the source name same as that found in the Measurment Explorer, which is in this case PXI4::11::INST, I get an error that the source does not exist. However, it does work with no errors if I input the source name as PXI1Slot17. How can I use the name PXI4::11::INST instead with out errors ?

    Hi CAN Programmer,
    You cannot use the PXI4::11::INSTR resource descriptor because using it opens a VISA session to the instrument.  Using this initialization technique only allows you access to Traditional DAQ functionality.  The Independent Topology of the PXI-2567 needs functionality beyond that provided by Traditional DAQ, and therefore initialization requires the use of the DAQmx resource descriptor (PXI1Slot17).  May I ask why you want to use PXI4::11::INSTR as the resource descriptor?  There may be another workaround for what you are attempting to accomplish.
    Chad Erickson
    Switch Product Support Engineer
    NI - USA
    Attachments:
    error3.JPG ‏18 KB

Maybe you are looking for

  • Dynex 40" LCD TV has flashes of light on screen

    We recently purchased a Dynex 40" LCD DX-L40-10A LCD TV.   We have a problem with the screen jumping a bit and also have white flashes of light.  When watching a movie or tv show, the screen flashes to the point where we originally thought the movie

  • [T500] DVD recording + warranty

    Hello. I have following problem - if I try to burn a DVD-DL with built-in DVD recorder after about 3-4 GiB it returns an unknown errors. Do I have to return whole notebook or is it possible to have only FRU part on warranty (DVD recording is not esse

  • Line size and line count

    Hi all, May i know about line size and line count impact on reports ? i mean depending on line sizes values i.e 200 etc hw it will effect report either in output display  or length ? and also ablout line count too. Thanks in advance.

  • RSS Channels Not Working in V3 Admin

    Hi All, After creating a RSS channel in BC Admin V3, everytime I use "Actions" to attempt to either "Add RSS channels to a webpage" or "Get RSS html code"; the pop-up window appears momentarily then shuts again? Also, there doesn't appear to be RSS C

  • Lego Mindstorms Cruise Control

    Hi I have a problem and I am going round in circles I am trying to create a cruise control in labview for a lego mindstorms robot. I have got as far as motor control and measuring rotations, however I have hit a wall I need to work out The transfer f