Usb6211 finite digital pulse

My first post to forum. (So hello : )).
to the point: I want to generate a finite digital signal on one of the digital outputs of USB6211. The signal is a UART frame (8N1) (baud rate can be as low as 100 Hz).
So I was expecting something what I did to output an analog output signal, i.e. set the rate, set the duration via setting data and runForeground ..etc, but It seems this is not supported with 6211.(am I right?)
How can I do this? I appreciate any help.
I'm using Matlab 2014b but I can use C functions if necessary (NIDAQmx.h)
Thank you

Hello,
There are several DAQmx examples for C that come with NI-DAQmx and are located in the following location on your computer:
Go to your Start Menu > All Programs > National Instruments > NI-DAQmx > Text-Based Code Support > NI-DAQmx ANSI C Examples > Digital. One helpful example is the WriteDigChan.c example, located in Digital > Generate Values.
This is a great place to get started. If you have further questions, I would brouse through some of the examples on NI Community (http://www.ni.com/examples/)
Hope this helps!
Aimee

Similar Messages

  • Gen Digital Pulse Train Finite Retriggerable - Initial Delay is only for first trigger

    The DAQmx example Gen Digital Pulse Train Finite Retriggerable has an Initial Delay parameter. It appears (6602 and an E series card) that this Initial Delay only delays the pulse generation for the first trigger. Subsequent triggers show no delay. Is this the designed behavior ? Any way to get the Initial Delay to occur for all triggers ?
    Steve

    So, yes, you are seeing the appropriate behavior. However, it is possible to get a re-triggerable finite pulse train with an initial delay. What you have to do is set up a re-triggerable pulse, and have that pulse act as a pause trigger for a continuous pulse train. Let me explain further with an example.
    1) Set up counter 0 as a re-triggerable single pulse (Gen Dig Pulse-Retriggerable.vi). Set the low time = initial delay = X, and high time = Y. The re-triggerable pulse will be low for X, then high for Y after every trigger (it applies the initial delay to the first pulse, and the low time to every pulse after the first). The trigger source is your actual trigger.
    2) Set up counter 1 as a pause-triggered continuous pulse train (Gen Dig Pulse Train-Continuous-Pause Trigger.vi). This pulse train will be the frequency of the finite pulse train you want. The pause trigger source will be the output of counter 0.
    I have attached the VIs I used to accomplish this. There are three VIs, the two mentioned in 1) and 2) and another VI I used just to monitor the signals. These could be combined to a single VI if you would like. Hope this helps!
    -Alan A.
    Attachments:
    Retrig_Finite_Pulse_Delay.zip ‏135 KB

  • Niscope for pxi5105, use a digital pulse signal to control analog signal sample

    i want to use ni-scope to drive pxi5105. And the PFI1 connect to a digital pulse signal(10KHz, 0-3.3V), to control a single channel analog signal continuous sample(Chan 0). I want a loop when the digital signal falling, the analog singal start to sample, and when the digtal signal rising, the analog singal stop. And by the low level of the digital singal, the analog singal sample (coupling by DC) can get an average and export to txt. I have tried the "start_and_reference_trigger.vi " and it did not work correctly. i need your help, thank you very much.
    Attachments:
    start and stop triggers for analog sample.vi ‏94 KB

    Hi Phil,
    The SCC carrier is only conditioning your signals (i.e. if your signals are not in optimal ranges, bandwidth or need external excitation). The actual counters and all digital lines are controlled directly by the M-series board. This means you will never be able to refer to a counter in the SCC module.
    If you route the signals of the M-Series board, is as if you had done so externally from the SCC. Look at this example and might give you more insight to how to implement it (This is software timing). The hardware timing would be doing correlation DIO. Here is an example that needs to be modified to adapt to your timing: http://zone.ni.com/devzone/cda/epd/p/id/4414
    Hope this helps,
    Yardov
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    Finite Dig Output High.vi ‏31 KB

  • How do I count digital pulses and convert them to an x-axis unit?

    I am a grad student in Chemistry and I have undertaken a project to switch an old spectroscopic instrument from a stepper motor chart recorder to a digital interface. 
    I am using Labview 7.1.
    I just measured the signals coming from the instrument, so I know exactly what I am working with.
    I have one constant, 100mV, digital pulse--which was used to drive the stepper motor a set # of wavenumbers for a given amount of pulse. I need to convert this signal to correlate with wavenumbers--on the x-axis of my final waveform graph.
     The other signal is an analog signal, up to 250 mV, which is coming from a photomultiplier tube and represents my y-axis of my final waveform graph.
    I am using the NI BNC-2110 DAQ board. 
    Should I design the program based from just the AI Aquire Waveform.vi? Add a Count Events or Time vi. for the digital pulse?
    Could anyone give me some hints with my initial setup/layout? 

    Hints:
    Figure out what is the modle number of your DAQ device. I think the model you cited is just a break-out box.
    Depending on your hardware you may be able to use the step pulses to clock your A/D conversions.
    The number of sample will be the number of steps so all you need is a conversion factor to convert sample count totoal to wavelength.
    Others may offer better ideas so stand by.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Digital pulse on DO line

    Hi, to output a digital pulse on one of the digital output lines instead of the counter, do i just select the particular line instead of the counter for the device?
    And if i'm only generating one pulse, and idle state is low, then does it matter what i choose as my low time?
    Finally, using the Digital output DAQmx, when I write high to a line, will that line stay high until the remainder of the program (or until i write it low)?
    Thanks.

    What type of DIO are you using? If using a standard DIO-96, you can use the Write to Digital Line function from the standard DIO functions. They are easier to use than DAQmx in this case. Just wire in the device number, channel number, line number, and True to output a high or False to output a low. Once a high is written to the line, it stays high until you write a low. The timing is up to you. You can write a high, wait some time, then write a low.
    - tbob
    Inventor of the WORM Global

  • Converting sequence of anlaog pulses into digital pulses

    Hello,
    I am working to detect the peaks in a particular interval of time say 'x'. I acquired the analog signals( the pulses) as shown in the image here AcquiredPulse from analog board using DAQ.Before detecting the peaks of the pulses of different amplitudes having nearly same time period shown in the above image I want to convert them into digital pulses or pulses of same amplitude so that it will be easy for the post process of detecting peaks.And after obtaining this I need to find out the time interval between the pulses.
    Can any one help me with implementation of this.
    Solved!
    Go to Solution.

    By this Vi you can convert the waveform
    Vara Prasad A
    Kudos are Accepted
    Attachments:
    analog to digital.vi ‏14 KB

  • How to send/recei​ve digital pulses through parallel port?

    Hi, im working on a project to send/receive digital pulses through parallel connection. I need to control the frequency of the pulse sent as my device communicates through negative triggering of the digital pulse. How to use LabVIEW send and capture these waveforms?

    Here's a good place to start:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/72​C6FC6CE4AD4D1386256B1800794596?opendocument
    2006 Ultimate LabVIEW G-eek.

  • Generating digital pulses from the pci 6722

    I am trying to generate signals that will drive a piezoelectric motor. I need an analog signal that I will send to an amplifier and 6 digital pulses with varying offsets. I am using a pci 6722 and was hoping to get an offsets between the digital pulses to be around 2 microseconds. I am struggling  to find the best  way to get such exact time delays between multiple tasks. Any help  would  be greatly  appreciated.

    The actual offset times is not as important as the digital pulses firing sequentially and all within the envelope of the analog signal for multiple steps.  I guess my question is less about hardware limitations, and more about how execute my desired process in Labview. My experience in Labview is pretty rudimentary and I am struggling to see how to synchronize events in labview.  We are using a BNC 2110 to output our signals, and it is my understanding that the BNC 2110 has a 1 Mhz clock.  We are trying to import that clock from our device use that to clock timed loops and we are having some difficulties with the details.  I am honestly not sure if I am on the right track.  In hopes that it might add some clarity I attached a picture of the signals we are hoping to produce.  The orange signal is our analog output.  Between times t3 and t4 we need the 6 digital triggers to switch to "on" and we need them to all switch off simultaneously at t6.  Again we are definitely willing to compromise on speed if we can use the card we already have.
    Attachments:
    waveform.PNG ‏28 KB

  • How to count digital pulses?

    I am using usb-6501 to read in 12 distinct digital pulses and want to know how to count the pulses. The 6501 has only one counter channel so I am looking for a software/labview program option to count pulses for each channel individually. 

    Do you need to know when they change or just how many times they changed? Also how fast are they changing?
    Mike ...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to generate digital pulses to run stepper motor in a sinusoidal motion profile using NI DAQ 6229 card

    Hi,
             I need to make a stepper motor undergo rotary oscillation with a sinusoidal motion profile. As it nears the extreme points it should decelerate and finally slow down to zero velocity and then it should reverse direction and accelerate until it reaches the other extremity where it should slow down and stop and reverse direction and repeat this motion.
            The hardware is NI DAQ 6229 and the stepper motor can be controlled using digital Hi-Low (1,0) pulses. For each high pulse(1's) the motor turns 1 step. I am able to generate a analog sine wave and convert it to digital data using Analog-to-Digital.vi  But i am not able to convert the digital data to a stream of 1's and 0's in the correct sequence to get the sinusoidal profile with the amplitude and frequency i require.
            The direction of rotation can be changed by giving a pulse to another input of the stepper motor. So only half cycle of sine wave needs to be generated and it can be replayed after changing the direction to get the full sinusoidal profile.
    Any ways of making this approach work or any new approaches to this problem would be helpful. Thank You.
    Regards,
    Prabu.
    Solved!
    Go to Solution.

    Hi,
             I finally figured out a way to do it. The analog sine wave is converted to digital and sampled. Consecutive values are compared and if the least significant bit(LSB) changes then a pulse is sent to the stepper motor to turn one step.
    I have included the sub-VI's that accomplish it for the particular stepper motor and connector block i have. The front panel of both sub-VI's are quite messy but the block diagrams should be much clearer. The sub-VI's get their inputs from a third VI which i have not included. So take a look at the VI connector panel to figure it out. Hope this helps. Kinda messy but worked out fine in the end for my application. 
    Thanks again for all the help. I appreciate it very much.
    Regards,
    Prabu Sellappan
    Graduate Student
    Aerospace and Mechanical Enggineering
    University of Southern California
    Attachments:
    start motor test waveform dtest.vi ‏73 KB
    sine profile generation subVI.vi ‏41 KB

  • How to change the frequency of a finite/continuous pulse train in the program?

    Hello!...
    I am trying to modify the Finite pulse train vi example to change the frequency with respect of a ratio (1:2) of the data of a spreadsheet file as they are read one by one.
    My aim is to get the pulse train to clock a stepper motor controller, in such way that the speed of the motor increases when the data of the spreadsheet increases and vice-versa.
    I think that if I want to get the clock to change its speed, I must change the frequency and if I want it to increase/decrease like the data in the spreadsheet, I must tell the frequency that the data is increasing or decreasing in value.
    Obviously the program must do it while it is running
    Can anyone see wh
    ere I have gone wrong and/or give any suggestions?
    I have attached my vi and the spreadsheet file.
    Thanks
    Tiano
    Attachments:
    My_VI.vi ‏99 KB
    wave.txt ‏18 KB

    Tiano,
    Try to build the pieces of the program separately. Get a VI running that reads the spreadsheet and reports the data in it sequentially in an indicator (forget about the pulse generation at this time). This indicator will be wired to the frequency input of the pulse generator VI.
    You have read the data and have a transposed array. Now you must learn to use the Index Array function in a For Loop to extract the data sequentially. You will wire the increment output [i] of the For Loop into Index Array to shift from one data point to the next.
    You have a For Loop with no constant wired to [N] to tell it how many times to run. If you use Array Size to extract the number of entries in the spreadsheet data, this can be the constan
    t that tells the For Loop how many times to run.
    You are using the Tab Control in a way I have never seen before (I don't think it will work this way either. Tab Control is for presenting and hiding controls, indicators, labels, etc. on the front panel, before running the VI. They are not used to control the program functionality itself. Typically you would use a Boolean to choose between 2 options for a Case Structure.
    You can also change the path constant which selects the spreadsheet file into a control. This would allow you to browse for any file you want and eleiminate the need for the Case Structure altogether.
    Mike

  • Using cDAQ timers to repeat a hardware-timed finite-sample pulse train clock

    Hi all,
    As part of a complex project, I must implement an acquisition hardware interface for a linear motion sensor using the Synchronous Serial Interface (SSI) output common in industrial motion control. (I have a fair bit of experience in digital electronics, but I'm new to hardware timer-synchronized digital I/O in LabVIEW.)
    To do this, I need to create a hardware-timed bursted pulse train TTL clock signal. Each burst consists of 25 high-low transitions with a full-cycle period of 2.67 microseconds (375kHz). The output must then be held high until the next burst, which occur at 1ms intervals.
    Using cDAQ timers and a NI 9401 (based on the example at http://www.ni.com/example/30256/en/), I've been able to create the pulse train burst as described (see attached VI image). Next I need to configure another timer to trigger this burst to repeat at 1ms intervals.
    Does anyone have any pointers about the best way to accomplish the hardware timing for repetition of the pulse train?
    Any suggestions of alternative strategies or observations as to the ways my noobish code is stupid or inefficient are welcome as well!
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    Hardware Timed Pulse Train Clock.jpg ‏102 KB

    Hey Ryan, 
    A picture of the behavior you are seeing would be helpful. The NI 9411 should only be reading 50 bits every 1 ms.  
    It may not be possible to read 25 bits (do you mean 50 bits? 25 high 25 low) and push it to a queue without encountering an overflow error. If you take a look at the above code the digital input will receive 50 sample clocks every 1 ms. This is equivalent to acquiring 50 points every 1 ms which is an acquisition speed of 50 samples/1 ms=50 kHz. The read loop must keep up with the 50 kHz rate otherwise the buffer will overflow. In the above example I’ve set the read to pull 5000 samples (x) with the assumption that the loop will take less than or equal to .1 seconds (y). This yields a software acquisition speed of 50 kHz (5000 samples/100 ms). If the loop speed is faster than 100ms then the 10 seconds timeout on the DAQmx read will allow for the read to block so the FIFO may be filled.
    The options available for question 2 are below. They may be used separately or in conjunction.
    Move the DAQmx Read for the NI 9411 to its own independent while loop, set the DAQmx Read to acquire 50 samples, do not graph the data, and pass the data to a Queue for processing in a consumer loop. This will increase the loop speed which may allow you to keep up with the 50 kHz acquisition speed. This may not work because the loop speed will need to be 1 ms or less.
    Increase the value of the Samples per Channel control that goes into the DAQmx Timing VI. This will increase the DAQmx Software Buffer size. This buys time until you receive an overflow error because the DAQmx Software Buffer is being filled faster than samples are removed.
    Read in 5000 sample chunks (producer loop), push this to the queue, and perform the analysis in 50 bit chunks (consumer loop). The additional queue created should allow for the acquisition loop to keep up.
    Regards,
    Izzy O.
    Product Support Engineer
    ni.com/support

  • Digital pulse generation

    hey there, i am now trying to generate a simple pwm signal using digital write and read. so far, i've been trying to manipulate the square waveform and offset it so that it only goes from zero to one volts. den i would compare this analog output with a zero comparator whose output would be sent to NI-DIOwrite.this doesnt work at all. some help would be greatly appreciated. it would be best if there is a file that i can look into. thanks and regards

    Right now you are trying to capture a digital signal right?
    First, connect the output of the comparator to a oscilloscope which can capture single pulse, thus test your comparator.
    If the output is correct, connect it to NIDIO, also probe the voltage there, if the output is not correct, then the channel of that DIO might break down.
    If the output is correct, it will be the problem of your software, or unluckily the NI card.

  • Generating a delayed digital pulse

    Hi,
    I have two digital inputs, read via a DAQmx assistant, one represents a one pulse per revolution, the other
    one pulse per crank angle degree (hence 360 per rev) which are generated by an optical encoder
    attached to the shaft of a small engine setup.
    What I would like to do is to output a single pulse 'n' crank angle (where n could be changed) pulses after
    the revolution pulse. The output would be via another DAQmx assistant (ideally, as this is what I have been working
    with so far). However I can only find something that will delay my signal on a time basis, rathert than sample
    basis,
    Any help appreciated.
    Sandra

    There is a point by point vi that will delay based on cycles of new data entering the vi. It holds the data value until the number of cycles is up. This might be a place to start. You can go inside this Zero-Order Hold PtByPt.vi to see how it works. This is in 7.0 format.
    Attachments:
    zero hold pt by pt.vi ‏38 KB

  • Generate Digital Pulses BNC 2120

    Hello,
    I am new to LabView and I am trying to use a DAQ Assistant to generate a discrete number of digital square pulses to be fed to a stepper motor driver via BNC 2120.  But I don't know how to go about doing this.
    I had an idea that I would use a Timed Sequence with 2 frames, the first frame would have a DAQ in it, and there would be a 1-D array of Boolean (TRUE) input in to the "'data" field of the DAQ. 
    Then the second frame would have a DAQ in it, and there would be a 1-D array of Boolean (FALSE) input in to the "'data" field of the DAQ. 
    But like I said I am very new to LabView and so I don't know if this approach makes sense. Please offer some suggestions!

    Hi all.
    I am currently doing a final year project to run six stepper motors using labview. 
    I was using an arduino mega to control the motors. When I had wrote the program to control the motors realized I only had enough outputs to control one motor.
    Now I intend on using the BNC 2120 to generate the pulses to run the motors but I have no idea where to start. 
    Any help would go along way. 
    I am using 6 Digital inputs for each motor. i have attached the VI i am using
    thanks in advance
    Attachments:
    StepperMotor1 project.vi ‏28 KB

Maybe you are looking for

  • IWeb and uploading to a different .mac account

    where do I set the settings for the specific .mac account I want the web published to? I have 2 .mac accounts and I would like to post to both .

  • NULL values and Data Control based on Web Service

    One of my ADF control is based on a Data Control created through a web service. Every thing is working fine except the way ADF control is handling the null values return by the web service based data control. For example for null columns the web serv

  • Ipod showing up as "unknown usb device"

    I'm betting this is the same problem as "windows doesn't recognize my ipod" but I wanted to make sure. I got the nano for christmas, successfully uploaded happilly to it for a few weeks and lately my computer keeps saying "the usb device has malfunct

  • LOV on Parameter form  can not show in IE

    In report builder I build two user parameter by Parameter Form builder. one is the search_mouth in which we type the month, the other is department_name which is selected by a drop down list and we can not type the name only select a name from the li

  • No Boundary Event in Automated Activity

    Hello Experts, I am developing a BPM in PI 7.31 SP4. I want to add a boundary event in my Automated Activity but when I try to add it the pop up shows me no Options. I expected to have at least a TehcnicalError but there are no one. As you can see in