Using PXI 6251 counter to delay a trigger on PXI

Hi at all,
I need to synchronize some devices on an PXI chassis. Basic operation is a user waveform generation on a PXI5401 that routes the Trigger Signal for the generation to one of the PXI (RTSI) lines. I'd like to use this trigger signal to start a counter on a PXI 6251 counting the PXI 10MHz Clock. No problem so far ( at least none that I see What I need is a possibilty to set another sync signal as soon as a certain counter value is reached in order to use this signal as a delayed trigger signal. Is it possible? And how? I've taken a look at the LabVIEW Example finder, but haven't found an example yet...
Thanks!
Oli
P.S. Using LabVIEW 7.1.1, NIDAQ7.4 and a PXI 1042 via MXI4
Programming languages don't create bad code, programmers create bad code....

Nathan,
Thanks for your excellent solution. I'm ordering the Aux100 cable (9-Pin DIN to two BNC Female) to export the trigger signal from the PXI to the Device_2. I will test the program (Echo_Mode_PXI_5122.vi) to be sure it will be suitable for my application.
Another problem, when my system is working on ultrasound Pulse-echo mode (Pulse_Echo_Mode_PXI_5122.vi), the input trigger must be set a delayed trigger acquisition (by setting the trigger delay to, for example 3µs) to remove the signal of power source. Could you please tell me how I can configure the digitizer in this case?
Regards,
John C.
Attachments:
Echo_Mode_PXI_5122.vi ‏49 KB
Pulse_Echo_Mode_PXI_5122.vi ‏49 KB

Similar Messages

  • How do I generate two finite pulse trains using counters on PXI-6251

    I'm trying to use Counter 0 and Counter 1 on the PXI-6251 to generate two finite pulse trains.  But, I get this error:   "The specified resource is reserved. The operation could not be completed as specified."  See attached example.
    Inside the disabled box is what I'd like to run on both counters.  I stripped things down to creating the task, starting, and stopping.  I then started to add things to see what my problem was.  The timing VI seems to be what causes me issues but I don't know why. 
    My end objective is two identical pulse trains with one delayed by 5us, which I figured would be easy to do in the initial delay.  I tried both in a single task and as separate tasks with no avail.
    Attachments:
    2_counter_outputs.vi ‏32 KB

    Hi SirMutt,
    Creating a finite pulse train requires
    two counters. What’s really happening is that one counter is creating a
    continuous pulse train while the other counter applies a finite pulse to “window”
    the pulse.
    What you want to do is correlated DIO. I’ve
    done a search on our website for “correlated DIO” and have come up with a few
    resources. Hopefully that will help you get started.
    Digital Output and Pulse Generation
    Performing Correlated Digital IO with an M Series Device in LabVIEW
    M Series Hardware-Time DIO with Counter Clock Generation
    Mark E.
    Precision DC Product Support Engineer
    National Instruments
    Digital Multimeters (DMMs) and LCR Meters
    Programmable Power Supplies and Source Measure Units

  • RPM Measurement using Quadrature Encoder and PXI 6602 counter

    Hi,
    I am on a project at work where I need to verify the speed (in RPM) of an unloaded motor which can operate up to 1400 rpm.  After doing some research, i determined that a quadrature encoder could be used to make the measurement.  I am looking at this encoder  http://sine.ni.com/nips/cds/view/p/lang/en/nid/205321.
    I have a PXI 6602 counter/timer module in which I would like to interface to the quadrature encoder.  I would like to create a VI that allows me to calculate the speed using the encoder.  Can someone provide me with details of what needs to be in the VI or an example which can do this?  At the most basic level, i want to calculate the speed on demand.  After doing this, i would like to figure out how to quickly calculate the speed so that i can determine response time of the speed changing within sub-millisecond resolution (1 ms resolution max).
    Further, i created a VI that allows me to change the pulse width of a 100 Hz pulse train at run-time which tells the motor controller the desired speed.  I would like to be able to use this VI to change the speed of the motor and the first VI (that I am seeking help about) to calculate the response time (time between the initial speed and settling at the new setpoint).
    I am familiar with the NI example finder, but have not been able to find an example that I can use.
    Thanks,
    Gary

    Hey Gary,
    I think for you setup, you should try using the Meas Dig Frequency - Low Freq 1 ctr. You can find it by searching example finder with 'low freq'. This vi tells you the frequency of a digital signal by sampling between two pulses and inverting the time between pulses. If you hook up your encoder to a counter and have that counter specified in the vi, it will be able to give you on demand readings of frequency (you can do some multiplication to get the rpm value, freq*60/pulses per revolution of encoder). A simple way to take continuous readings is to put a while loop around the daqmx read and the data output of the read. You can also replace the numeric indicator to a waveform chart to graphically display the change of frequency or rpm readings over time.
    You should be able to integrate this as two separate tasks with the pulse train vi you created earlier.
    Hope this helps
    Luke W

  • Using PXIe-6672 to send trigger to PXI-6682H using NI sample code

    I have a PXI-6682H and a PXIe-6672 card in a PXIe 1075 chassis.  I have an IRIG-B timesource going into the PF1-0 IRIG B connector on the 6682H.  I'm trying to use the 6672 card to route a trigger to the 6682H card to receive an IRIG-B signal and supply a timestamp.  I'm using the example code Time Stamp Trigger.vi (to set the 6682H to receive a trigger via PXI_Trig7 for 6682H PXI slot) and Route Software Trigger.vi (to set device in slot corresponding to the 6672 to PXI_Trig7).  I receive no timestamp.  What gives?  Any help would be appreciated.

    Hello jwins,
    The PXIe-1075 is a multi-segment chassis and the PXI trigger bus is split between each segment.  The figure in page 17 of the PXIe-1075 user manual (http://www.ni.com/pdf/manuals/372537b.pdf) shows this.
    Can you retrieve a time stamp by sending a trigger to the 6682H from a device on the same segment?  If so, you may need to route the trigger bus between segments.
    Follow the steps in the knowledge base article titled Routing PXI Trigger Lines Across the Buses of Multisegment PXI Chassis to route the PXI trigger bus to the segment that contains the 6682H card from MAX. 
    You can also use VISA in your program to Programmatically Route PXI Trigger Lines Across a Multi Segment PXI Chassis.
    Anthony F.
    Product Marketing Engineer
    National Instruments

  • 6251 Counter input signal

    Hello,
    I am acquiring pulses which are 0-5V with the counter of the PXI 6251. However, I would like to know if it is possible to acquire pulses that are, for example 0-12V or 0-24V without damage the device. In other words, which is the voltage range for the counter input in a PXI 6251?
    thanking in advance,
    CJMV

    Hi,
    You will not be able to use the counter directly but you can setup an analog level trigger for your signals. This will create a pulse that isTTL compatible  for you everytime the signal crosses a particular level. Then you can route this into your counter and perform any counter measurements on it. An example is this is shown here where it sets up a level trigger to make frequency measurements.
    Alternatively you can purchase an industrial strength digital I/O board such as the USB-6525 but this does not include a counter.
    Please let me know if this works out for you.
    Message Edited by Abhinav T on 07-06-2007 05:20 AM
    Abhinav T.
    Applications Engineering
    National Instruments India
    LabVIEW Introduction Course - Six Hours
    Getting Started with NI-DAQmx
    Measurement Fundamentals

  • NI PXI 6251 strange behaviour

    Hi,
    I have couple of questiobns about NI PXI 6251 in PXI-1045(with pxi-8360 Mxi-express controller).
    First it works with some huge delays when Daq_mx_stop is called or even the vi is stopped by RED button
    Second The reference trigger is not working for me...
    When the simple start trigger is set anf APFI0 is used everythzing works fine (except previously described lond delay)
    But if I set reference trigger it do not react on the triger pulse.
    thanks in advance

    Hi,
    Unfortunately the problem is not solved.
    This behaviour is observed not only in my .vi but also in NI MAX when I create a task there.
        If I use start trigger option acqusition works with external trigger, but DAQ-assistent shows me a warning: 200010 (not all points are acquired or generetaed )
    Long delay before the task finishing occures here as well.
        If I try to config reference trigger for the same input (APFI0) with the same parmeters it also reacts on a trigger but no data is read and DAQ-assistent shows me an error: -200281.
    Also a long (~15sec) delay is observed before the task in NI MAX is finished comletely.
    In attachment I've add an example where I have all these troubles but it is nothing else as very basic read example I have the same problems also in standart example from NI library.
    Thanks in advance.
    Attachments:
    testpxi6251.vi ‏31 KB

  • How can I set up a delayed analog trigger on PCI 6115 DAQ

    I have an S-Series PCI 6115 DAQ which I’m running with Labview. I’m using it to measure signals from an acoustic emission sensor and two force transducers. I’d like to set up a delayed analog trigger which will start acquisition on all three channels a period of time after a selected channel’s voltage exceeds a threshold.
    Currently I’m using the AI Config VI in line with the AI Start VI and AI Read VI to capture data after a analog hardware trigger occurs. A software trigger probably wouldn't work because I have to sample my data at 10MS/sec. My setup works fine for triggering without any delay or skip counts. However, if I set the delay or skip count in the additional trigger parameter field of the AI start VI, there is no effect, and the device still starts capturing data immediately after the trigger is received. What is the cause of this, and how can I get around it?
    Also, is it possible to sample the channels of a PCI-6115 DAQ at different rates? Right now, I’m sampling all my channels at 10MS/sec and throwing away data on all channels except one. However, this seems relatively slow and eventually I would like to attempt pseudo-real time control using my data.

    rpursley8 is right about needing to get the counters involved if you want a hardware timed delay in your application.
    Concerning whether or not you can sample at different rate, check this document out.
    Sampling Different Channels at Different Rates with NI-DAQmx
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • Time Controlled digital line PXI-6251

    Hi,
    I need to create a time controlled boolean.
    For example a digital line is set to False. I'd like to change to True status for a certain amount of time (e.g. 150ms).
    Is it possible with PXI 6251?
    Thanks

    Hi,
    yes you can. Set a buffered digital output task like "Digital - Finit Output.vi" example.
    You can use an external clock, generate it throught counter output or use ananog in/out sample clock.

  • Repetative trigger from PXI-6733 to PXI-6220

    I am running a PXI-6733 in continuous mode and want to send a trigger pulse from the 6733 to a PXI-6220 at the start of each cycle. I will also want to do this in finite sample mode. I have used a DAQmx Connect Terminals VI to connect the trigger channels. But I cannot find how to set the 6733 StartTrigger as an output or how to synchronize it with the analog output. Any suggestions would be welcome.
    Bob

    Since your AWG needs to send the 6220 the trigger, the M Series (6220) correlated DIO feature doesn't help. Luckily, the 6733 also has the feature. I've attached a vi that shows how to set up the 6733 to output a companion digital waveform to the analog waveform. The first point in the digital waveform is a 1, the rest is 0. You will have to connect a physical wire from the digital line used to an input (PFI) of the 6220.
    If you can run the 6220 in a 'batch' mode (a series of finite tasks), you can use this digital line as a Start Trigger for your 6220. If your passes happen too quickly, you might need to run the 6220 continuously. Now, you might use a counter on the 6220 to generated the sample clock for the analog input task. The digital line from the 6733 would serve as the counter tasks's Start Trigger. The counter task would produce a series of pulses each time it got this trigger. This is getting a little complicated.
    Attachments:
    6733 Correlated AO and DO.vi ‏66 KB

  • How to use on board counter to change sample rate dynamically on pci-6134

    Hi,
    I am relatively new in LabView.
    I am making power quality measurement system and I need to vary the sampling rate of my pci-6134 dynamically (all channels simultaneously). What I need is to have a constant amount of samples in each period of measured signal (grid voltage), which changes slightly all the time. Therefore I will have to measure the voltage, find its exact frequency and then adjust the sampling rate of daq accordingly. I know that there will always be some delay, but I would rather like not to go into any predictive algorithms...
    I have found an information in the Forum that one of possible solutions is to use an onboard counter to change the sampling frequency but I have no idea how to make that. Can someone help me or possibly show an example? 
    Is there a simple way to solve that problem?
    Thanks in advance
    Andrzej

    At least at a glance, the code generally looks like it ought to work.  Two thoughts:
    1. Instead of getting into PFI3 vs PFI8 routing stuff, can't you just specify "Dev1/Ctr0InternalOutput" as the AI Sample Clock source?  (You may need to right-click the terminal to get at the menu that exposes the so-called "advanced terminals").
    2. Try writing both the freq AND duty cycle  properties when you want to update the freq.  Or try using the DAQmx Write vi instead of a property node.  My past experience suggests that writing only the freq property *should* still work, but writing both isn't hard to try and may turn out to help if the behavior of your version of DAQmx differs somehow.
    -Kevin P.
    P.S. Bonus 3rd thought.  I just went back to reread the thread more carefully, including your first screenshot.  I'm now thinking that maybe the hardware actually WAS behaving properly, and that you just weren't aware of it.   When you query the AI task for it's sampling rate, all the task can know is whatever rate you told it when you configured it outside the loop.  So even as you change the counter freq to change the actual hardware sampling rate on the fly, the AI task will continue to report its orig freq.  After all, how is *it* supposed to know?
           Try an experiment:   Set your original freq very low so that the AI task produces a timeout error without getting all the requested samples within the 10 sec timeout window.  Run and verify the timeout.  Then run again, but after 3-5 seconds set a new frequency that will produce all those samples in another 1 sec or less.  Verify that you get the samples rather than timing out.  That should demonstrate taht the counter freq change really *does* produce a change to the hardware sample rate, even though the task property node remains unaware.

  • How to generate a pulse of 5 V -ve polarity in synchronis​ation with a 10 v input using PCI 6251 DAQ board

    HI
    I want to generate a 5V -ve polarity pulse to trigger my IEEE 1394 camera using an PCI 6251 (scb68 pin E) device, furthermore I am reading a standard Vsync signal from a SVGA port which is 10 v.
    Now I want to synchronise the image capture of an IEEE 1394 camera with the Vsync signal so that camera is triggered to capture at every 4th Vsync signal (which is 50HZ.). Presently I am able to read the Vsync signal and also generate the -5 v signal But the Daq board generates a continues -5v signal while I want a 1 ms pulse (for every 4th Vsync).
    Also this 5 v signal is generated even if the vi is stopped running.
    Can anybody guide me so this problem can be solved.
    Thanks a lot in advance
    Shri

    You can use the Write function, that is you can use the 10 volt signal as a trigger for the task, and when you get this trigger, the task starts and generate (writes) a waveform you defined in an array ("data", in the example).
    Something like this..
    DAQmxCreateTask("",&taskHandle);
    DAQmxCreateAOVoltageChan (taskHandle, clokSource, your_sampling_freq, -10.0, 10.0,
    DAQmx_Val_Volts, "");
    DAQmxCfgSampClkTiming (taskHandle, clockSource, SAMPLING_RATE,
    DAQmx_Val_Rising, DAQmx_Val_FiniteSamps,
    samp_to_read);
    DAQmxCfgAnlgEdgeStartTrig (taskHandle, input_channel, DAQmx_Val_RisingSlope, 9.0);
    DAQmxWriteAnalogF64 (taskHandle, 1000, 0, 10.0,
    DAQmx_Val_GroupByChannel, data, //data contain a pulse
    &samp_per_channel, 0);
    DAQmxStartTask(taskHandle);
    // and then you create a loop....
    For example you can specify data to be like this:
    data[0] = -5;
    for(i=1;i<1000; i++){
    data[i] = 0;
    Tell me if you need more help.....
    bye

  • Using more than one time delay in a thread

    Hello,
         I need to use two non-consecutive time delays in a thread. My thread typically proceeds as follows:
    1. Tell an oriel MS257 to change wavelengths
    2. Time delay #1 to give the MS257 time to change
    3. Tell HP 4156C to start sweeping
    4. Poll the 4156C until sweeping is complete
    5. Time delay #2 to give 4156C time to load data
    6. Read/parse/save data
    My problem is that the second time delay seems to start counting immediately after the first one - it does not wait for the sweeping to complete before counting. My VI is attached. It's a bit messy - organizational tips are also welcome!
    Thanks,
    Ying 
    Solved!
    Go to Solution.
    Attachments:
    TFTmeasure.vi ‏115 KB

    Looking into the sources show: Cleanup is a nice tool (even thought it is far from perfect )
    Well, nevertheless, from the wireworking, it seems alright that the second Time Delay express VI should indeed wait for the loop to finish. Therefore, i am wondering why it is skipped. And the only reasonable explanation: You have an error on the error cluster.
    So please debug into it using highlight/probes on the error cluster to make sure that you are not running into issues here.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • PXI-6251 Phase Angle

    Good Day,
    I am currently using a PXI-6251 module and I need to measure Phase Angle between two sinusoidal waveforms. I have done a lot of searching and can not find much. If anyone is able to help I would appreciate it.
    TIA,
    TomJr

    Hi TomJr-
    I'm not sure if it will be very significant, but there will be some phase difference introduced into your sampled signals due to the fact that the input lines are MUX'd through a single PGIA and ADC.  This means that there will inherently be some skew between channels that you may want to account for. 
    The easiest way to accomplish this is to query the AI.Convert.Rate propery as shown below. 
    This value is the frequency of the clock that initiates samples from each channel in succession, so the reciprocal will represent the system-introduced phase difference in the sampled values.  If the amount of time introduced by this multiplexing is significant you might want to manually add it to the value you calculate with lrallen's suggestion.  Alternatively, you could use a simultaneously sampled S Series board to remove these effects if they are very significant in your system.
    Hopefully this helps-
    Message Edited by Tom W [DE] on 03-06-2006 01:15 PM
    Tom W
    National Instruments
    Attachments:
    untitled.GIF ‏3 KB

  • WANTED: NI PXI-6602 counter/timer

    I'm looking to buy a used NI PXI-6602 counter/timer board. Got one?

    "Zvezdana S." wrote in message
    news:[email protected]..
    > Hugh,
    > To possibly obtain an used board from National Instruments, you should
    > contact your regional Internal Sales Representative (ISR) for possible
    > used boards. If you are not sure who your ISR is, generate a service
    > request at:
    I never knew NI had an SRQ line we could pull.
    Craig Graham
    Physicist/Labview Programmer
    Lancaster University, UK

  • NI PXI 6251 SPI emulation

    Hi,
    I'd like to use NI PXI 6251 DIO to setup and run an SPI communication using Labview2013. Is it possible, do you have any suggestion?
    Thanks!

    use the right hardware http://sine.ni.com/nips/cds/view/p/lang/en/nid/202368
    Of course it is possible to emulate a SPI interface but it will be "Clunky" low, speed and won't support features like "Clock-Streaching" very well.
    Jeff

Maybe you are looking for

  • CRIO, FPGA, portability to different I/O module configuration

    Hello people! For my student research projekt, I need support. I have to implement the NI-Tutorial:"CompactRIO Control Design and Simulation Tutorial" on another hardware. my cRIO 9004 is no problem and the chassis NI9104 is the same. Problems occure

  • Database mail only works from SSMS not from a job

    I have a script that returns its results via DB mail. When I run it from SSMS I get email, when I run it from a job I don't get email Here is the error message from the DB mail log Message The mail could not be sent to the recipients because of the m

  • Using bucket search and lookup tables

    I have to create an array of dates, and then extend this by creating a lookup table for the months of the dates. So this lookup table will have 12 elements. Finally it should print to the screen the total amount of times a month appears in the object

  • Do apple provide mac book pro RAM upgrades?

    It currently has 2gb of ram and I would like to give it 4gb or more. I got this mac in late 2008

  • JOptionPane.showInputDialog

    Hi, I have a question about JOptionPane.showInputDialog(...), there is a method that accepts an object array for its parameter, when the array size exceeds a certain bound the final dialog will contains a JList in it. When I click the item of the JLi