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

Similar Messages

  • 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 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 do I generate a pulse with a user specified puse duration, down time and repitition, and then out put to a graph?

    How do I generate a pulse with a user specified puse duration, down time and repitition, and then out put to a graph and then to daq ports? 
    I used lab view in engineering class, but that was the extent of my usage and after fiddling around in lab view and looking on the web looking for solution, I could not produce desired results.  My professor wants me to produce something that will output a pulse for a specified duration, then downtime for another specified duration and then repeat the process a specified amount of times.  
    I am using labview version 7.1
    Thanks in advance.

    Hello,
    Are you using hardware (DAQ card) to generate this pulse or are you planning on doing this all in software.  If you have a DAQ card in LabVIEW you can go to Help » Find Examples and then select Hardware Input and Output » DAQmx » Generating Digital Pulses » Gen Dig Pulse Train-Finite.vi.  This will use a counter from your DAQ card to generate a finite number of pulses at a specified frequency and duty cycle.  Give this a try, or let me know if you are not using hardware, and we can figure something else out.
    Regards,

  • Generate/R​ead Digital Pulse - What clock to use?

    Hi,
    I am using the NI cDAQ-9172 (with output module NI 9472 and input module (9421).   I am trying to generate a pulse, run it through a system (just a resistor at this point) and then read it back into labview.  I am able to generate the pulse with no problem, but anytime I try to read it I get an error regarding the clock.  Any suggestions?
    Thanks,
    Solved!
    Go to Solution.
    Attachments:
    Generate and Read Pulse.vi ‏30 KB

    Looks like i figured it out.  I had the clock said as hardware timed, but my hardware was wired wrong.  After I corrected the wiring it worked, so that must have been the problem.

  • How to continuously generate a pulse train with variable frequency

    Dear all,
    I am trying to use NI-USB 6259(BNC) to send Pulse signals to conduct position control of a servo motor with labview. The position control of servo motor follows these rules:
    The number of the pulse train determines how many degrees the motor rotate ;( e.g. the angular position of motor)
    The frequency of pulses determines how fast the motor rotate; (e.g. the speed of motor rotating)
    The digital determines the direction of rotation of motor (e.g. clockwise or counterclockwise)
    My question comes when I need to continuously generate a finite plus train signal in a period of time. Below is a sample:
    Time(s)
    Number of pulses
    Direction of rotation
    (1 is clockwise, 0 is counterclockwise)
    Frequency
    0-1
    923
    1
    923hz
    1-2
    3540
    0
    3540hz
    2-3
    1751
    1
    1751hz
    3-4
    2663
    0
    2663hz
    4-5
    353
    0
    353hz
    5-6
    1017
    1
    1017hz
    6-7
    3436
    1
    3436hz
    7-8
    302
    0
    302hz
    8-9
    1513
    1
    1513hz
    9-10
    570
    1
    570hz
    Here is the explanation of this table, the motor keeps rotating in clockwise direction during 0~1s. When the time reaches 1s, the motor just complete the rotation of 923 pulse signals. And then the motor starts to rotate in counterclockwise direction during 1s~2s. When the time reaches 2s, the motor just complete the rotation of 3540 pulse signals. So we can see that the rotating speed of motor in 0~1s is different from the speed in 1s~2s. Namely, the frequency of pulse signal in 0~1s is different from the frequency in 1s~2s.
    I have already use the counter output of DAQmx, it just can generate pulse signal with certain numbers and certain frequency in one time. The attachment is the vi which can generate a finite digital pulse train from a counter output channel and the frequency, duty cycle, Initial delay, and Idle state are all configurable.
    How can I continuously generate  a series of pulse train with varying numbers and frequencies during a certain period of time.
    Thank you very much for your help!
    Solved!
    Go to Solution.
    Attachments:
    Counter - Finite Output.vi ‏57 KB
    Finite output.png ‏13 KB

    Hi aacuna,
    Thank you for your reply!
    I already checked that  article.  The frequency in that Vi can change dynamically, but the method of adjusting the frequency is ‘manual’ .Below is the front panel of that Vi. When the Vi is running we can change the frequency by press the button.   
    Time(s)
    Frequency
    0-1
    923hz
    1-2
    3540hz
    2-3
    1751hz
    3-4
    2663hz
    4-5
    353hz
    5-6
    1017hz
    6-7
    3436hz
    7-8
    302hz
    8-9
    1513hz
    9-10
    570hz
    Thank you!

  • Generate a pulse train using a count from a quadrature encoder as the clock

    I am trying to generate a pulse train with the same frequency as my quadrature encoder.  Every time the encoder counts, I want the pulse to go high until the next count and then go low and so on.  I am using a 6602 PCI card and a BNC 2121 accessory.

    Maybe I'm not understanding your app, but I *think* you and I are approaching it from two very different directions.
    As I understand it, you'd like to emit a pulse with each quad state change.  Then that pulse would act as a counter Source signal.  The counter will then increment on each pulse, to keep track of accumulated position.  Further, you'd use your device-under-test (DUT) as a counter Gate signal, which would buffer the position count each time there's a rising edge on your DUT.  The end result is a buffer of position values, captured at each rising edge of your DUT.
    I'm talking about a different approach to produce the same data.  You'd use 2 tasks on a M-series board.  One of them is a hardware-timed digital input task based on "change detection."  Each time one of the specified bits has a transition, your whole set of digital input bits can be captured and an internal "change detect pulse" is generated on the board.  This task should be sensitive to the DUT edges.
    The other task would be a buffered position measurement.  It would receive the reference encoder inputs and internally do quad decode and keep a running count.  The sampling clock for this task would be specified as the other task's "change detect pulse."
    Net result: on each specified edge of your DUT, you'll buffer a reference encoder position value and a digital state of your DUT.  You can choose to be sensitive to rising edges, falling edges, or (!!!!) both at once. You can also choose to be sensitive to many bits simultaneously.  These are better capabilities than you get with the 6602 alone.
    I *think* the 6220 should be ok, based on a quick overview of specs.  I assume your 3.6 MHz is the rate of ref encoder quad state changes, right?  In the approach I'm suggesting, you only need concern yourself with the rate of DUT edges which appear to be in the 10's of kHz or less.
    Gotta go for now.  Post back if any further questions.
    -Kevin P.

  • Ground loop + BNC 2120 behaving like antenna(pr​oblem)

    Hi,
    I am using DAQ 6024E, and using two sensors and one error message "data is overwritten before it could be read
    by the system try divide the signal before measurement" --it took me whole day as to what data is going inside that my computer with 900Mhz processor is unable to handle. I started tearing my hardware step by step. I looked at my range sensor which has one LED which blinks as it throws waves out - but the moment my motors gains speed all of a sudden my labview generates error that "data overwritten before it could be read by the system", now at the same time I looked at my range sensor and instead of blinking slowly like persec it was blinking continuously without break so I took the wire out which was going into the BNC 2120 and the sensor becomes stable again.
    I thought that may be the wire is picking up RF signal from motors so I changed all the wires with shielded insulated wire but again as I switched my motors on labview generates the same error. If motors stays off there is no error. I felt my BNC is acting like antenna and is catching motor RF signals. I took motor out of the circuit and supplied separate voltage from another power supplier and it confirmed me that moment my motor speeds up the range sensor speed of blinking increases but If I take out the signal wire going into BNC 2120 then there is no effect on range sensor and it works fine steady. moment I connect BNC with sensor and motors ON then sensor behave erratically with led blinking extremely rapidly.
    So it is confirmed that nothing is wrong with hard ware of computer but some strange phenomenon.
    Now next I powered my controller with a battery and motors with another power supply to break the loop but problem not solved, I think there is some ground loop thing going on and that is making BNC 2120 as antenna for RF signal created by motor.
    That's why initially at less voltage/speed VI works fine but as motors speed up VI stops working and generating the error " data is overwritten before it could be read
    by the system try divide the signal before measurement"
    I hope now you are in better situation to understand what is happening and how can I stop BNC wire to act like this, remember I am using good insulated shielded wire.
    Thanks

    I've got fast fingers, I play lead guitar in a rock n roll band (nah, just wish I did, but I do play lead guitar - just a bit rusty at it right now). I've spent the last 20+ years being a test engineer at various places. I learned from some of the best at AT&T and Bell Labs (when they were a big dog in the 80's). Before that I was a mobile radio repair technician for 8 years. Learned RF and electronic repair on the job. Troubleshooting background has helped me tremendously in the test engineering world. Also spent three years doing SCADA engineering so I am familiar with PLCs (Motorola, Allen Bradley, and GE Fanuc) and HMI software (Wonderware and GE Cimplicity). SCADA was fun, but I prefer the RF world.
    Getting back to the problem, you give good advice about grounding only one end of the shielded cables. Grounding both ends does cause problems with non RF signals. A scope will go a long way to determine where the problem is coming from. But since he mentioned ultra sonic sensors, I am wondering if the problem is actual sonic noise from the motor. I would not be able to hear it because I lost all hearing above 12KHz from all that loud guitar playing when I WAS in a rock n roll band.
    BTW, your name reminds me of the Rush song, Analog Kid, and also of the progression of analog synthesizers to digital ones, and now there is a movement back to the analog dinosaurs again.
    - tbob
    Inventor of the WORM Global

  • How to Generate Synchronized pulses across two separate cards on a PXI system

    Hey,
    I'm trying to generate three pulses from my PXI System for triggering purposes. I have two cards (PXI 6259 and PXI 6115) , each with two counter/timers on them. The 6259 has 32 bit timers, and the 6115 has 24 bit timers.
    Up until now, I only needed two pulses. One was 180us long at 20 Hz, and the other is 5us at 20 Hz, starting 150us after the beginning of the first pulse. I was able to achieve this by generating both pulses on my 6115 card by triggering the shorter pulse off of the rising digital edge of the longer pulse and giving the DAQmx Counter/Timer task an initial delay of 150us.
    The third pulse needs to be identical to the short pulse, only it needs to occur 20us early (130us after the start of the wide pulse). I tried to generate it using the same technique as I used when generating the short pulse, only generating the pulse and reading in the rising digital edge trigger on my 6259 card instead of the 6115. 
    The result was that my pulse trains were asynchronous and the pulse generated on the 6259 card was constantly shifting to the left.
    This puzzled me, so I wrote up a little dummy program to test generating triggered pulses. The results were that when I generated two pulses on the same card, they were always synchronized; however when I generated pulses on separate cards, one of the pulses always shifted.
    I was hoping somebody could suggest a reason that the pulses across cards are asynchronous even though I'm reading in a digital trigger and hopefully a way to rectify the situation and synchronize all of my pulses.  

    The problem, in a nutshell, is that the timebases on the two boards have manufacturing tolerances that will cause them to differ from one another.   The accuracy error is a small fraction of a percent, but the effect on the phasing of your pulses will be cumulative.  That's why you saw the one set of pulses "shifting to the left."
    The solution is to make sure each board derives its pulse timing from a single common timebase.  Fortunately, this is pretty easy to specify with DAQmx, just a little tricky to find.  In the chain of VI's you call to configure the counter pulses, insert a DAQmx Channel property node.   From memory, I *think* you should be looking under something similar to "Counter Output->General->Timebase->Timebase.Src"
    Right click and create a constant or control to define the timebase source.  You should get a dropdown list that includes a wide variety of choices.  Among them are each of the boards' 20 MHz clocks.  By default each task will use a timebase from its own board but this technique lets you route one board's timebase over the PXI backplane with that single property node setting.  DAQmx does most of the dirty work behind the scenes.
    -Kevin P

  • How to generate a pulse with 9472?

    I am trying to generate a single 8V pulse of 10ms duration on multiple channels of the 9472.  The 9472 is in slot 4 of the 9172 compact daq chassis.  To test my results, I have connected an oscilloscope to one channel of the 9472 (with no load attached).  I tried modifying the Create Digital Waveform VI from the Write Dig Chan-Ext Clk example VI.  In doing so, I generated a binary array with the first half of the array filled with all 0's and the second half of the array filled with all 1's.  When I triggered my O'scope on a rising edge, I saw the channel turn on (also the LED was lit on the 9472).  However, the channel stayed on even after the routine had completed (LEDs were lit solid).  So to try to turn the channel off, I appended one 0 to the end of my array.  Now the O'scope won't trigger and I see no sign of the LEDs on the 9472 blinking.  Any ideas how I can solve this problem? 
    I was able to get a single pulse of the proper duration by setting up a task in MAX with the 9472 in slot 5.  But in doing so, I was only able to generate the pulse on one channel.  I need to be able to parallel multiple channels for my application.

    I am trying to generate a single 8V pulse of 10ms duration on multiple channels of the 9472.  The 9472 is in slot 4 of the 9172 compact daq chassis.  To test my results, I have connected an oscilloscope to one channel of the 9472 (with no load attached).  I tried modifying the Create Digital Waveform VI from the Write Dig Chan-Ext Clk example VI.  In doing so, I generated a binary array with the first half of the array filled with all 0's and the second half of the array filled with all 1's.  When I triggered my O'scope on a rising edge, I saw the channel turn on (also the LED was lit on the 9472).  However, the channel stayed on even after the routine had completed (LEDs were lit solid).  So to try to turn the channel off, I appended one 0 to the end of my array.  Now the O'scope won't trigger and I see no sign of the LEDs on the 9472 blinking.  Any ideas how I can solve this problem? 
    I was able to get a single pulse of the proper duration by setting up a task in MAX with the 9472 in slot 5.  But in doing so, I was only able to generate the pulse on one channel.  I need to be able to parallel multiple channels for my application.

  • Use of DAQ and BNC-2120

    Hello there,
    How can I use DAQ Assistance from labview to generate two different signal and output them from two analog output(AO1) and AO2 of BNC-2120? I tried but the DAQ fails.

    A BNC-2120 is only a connector block.  You can't do any analog input or output with it unless you connect it to a DAQ card.  So what DAQ device to you have it connected to?
    Don't say you tried to do something and it failed without show us what you tried and in what way it failed.  Did it your LabVIEW program give an error message?  Did it fail by showing a big flash and then giving off a lot of smoke?
    Give some details, error messages, attach your LabVIEW VI.

  • 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

  • Generate a pulse train

    How do I generate finite pulse train of 3 pulses of 25us pulse width, pulse period (1/(7000Hz)), and retrigger the same finite pulse train every 588.23us with the PCI-6602?
    What are the externals connections?
    What is the right Labview programming?

    this can be done with the 6602 using multiple counters, but this board has 8 so you will still have many left over for other tasks.
    You will need essentially 2 tasks, one taks is a retrigerable gated finite pulse train and the other is a simple finite pulse train.
    I have done something similar using DaqMX and LV 7.0
    To create the finite pulse train, create a CO.PulseTime task, create a channel setting the high times and low times (25 microseconds)and set the low polarity. I will assume that such a pulse train is going to trigger some external event or other DAQ card. Next set the timing to be implicit and sample mode to be finite and the number of pulses to be 3. To handle the retriggering and gate properities use a channel properitiy node and select:
    StartTrigType = Digital Edge;
    Start.Retrigerable = True;
    Start.DigEdge.Edge = Rising;
    Start.DigEdge.Src = PFI number of the out from the continious pulse train.
    This last option will allow you to route the trigger from the controlling pulse trian to trigger your finite pulde train.
    Now set up a second task to put out a continious pulse train with the period equal to the total durration between finite pulse trains (~500microseconds I dont have the exact number in front of me).
    After creating these two tasks, start the retriggerable task first.
    now when you start the continious pulse train you will get a finite pulse train of 3 pulses every time the rising edge of the continious pulse train fires. Stop and start the continious pulse train using software at will but only stop the finite task when you are done. Hope this helps.
    -Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How to use single Timer to generate PWM PULSE, Pulse ON time measuremen​t, Event time measuremen​t1,Event time measuremen​t2

    Hi,
    I am planning to use a single Timer to generate PWM PULSE, Pulse ON time  measurement, Event time measurement1,Event time measurement2 some one please suggest me how can I achive this.
    Thanks in advance..
    Michael

    Hi Michael,
    It would be really good to understand your application a little more so that any specific needs that you have may be met. In the meantime, I would also suggest searching on ni.com for "pwm" or other keywords that relate to your application. You will see a faceted navigation on the left side that allows you to narrow your search for example code, tutorials, etc.
    Please post back with more information and the community will be able to help out with suggestions.
    ni.com search for "pwm"
    Mark E.
    Precision DC Product Support Engineer
    National Instruments
    Digital Multimeters (DMMs) and LCR Meters
    Programmable Power Supplies and Source Measure Units

  • 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

Maybe you are looking for

  • Keeping itunes media folder organised slows down itunes

    My itunes became very very slow indeed when I updated to version 9. I looked at self help forums and discovered that it should speed up if I unchecked "keep itunes media folder organised". I did that, and sure enough, itunes was cured. Somebody then

  • T400- make the external monitor primary problem.

    I use T400 and Acer p223w monitor. From some reason I cannot make the external monitor to be the primary monitor. Using the Presentation Doctor I have the option to define the external monitor as the primary but when I test it, it says that I have il

  • No Mailed Check received for My Return

    I returned 3 iphone 6 to the Apple Store at Los Gatos, CA on Oct 1, 2014 and I was promised to receive 3 mail checks before Oct 7th by the manager. However, I still have not received my checks today and since I have been relocated to another country,

  • Following your instructions for fixing problems after downloading firefox 4 made it completely unusable, not even able to connect for feedback.

    I was having with internet and web connections just stopping or freezing after downloading firefox4. I tried following your dirrections that said to turn it off then back on. It turned off but would not go back on. I couldn't connect to anything so w

  • Ibook G4 Keyboard

    I evidently broke the small screw in the pad above the light indicating the on/off status of the number lock. Now the key board will not lift up when I retract the two locking tabs on each end of the key board. Any suggestions on how to unlock my key