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

Similar Messages

  • How to generate biphasic pulses and change parameters?

    Hi I am a beginner. I need to know how to generate biphasic pulses. What are the functions i need to use(the logic involved in labview to generate)? I should be able to change the parameters like duration,interval during the course of the program.

    Greetings:
    You can go to the Analysis/waveform/signal generation toolbox and find Pulse Pattern. You can set the duty cycle, frequency and phase with the standard controls.
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • How to generate pwm pulse using NI DAQ in MATLAB

    hi everyone. please tell me how to generate pwm pulses using Ni DAQ card in MATLAB Simulink. if through coding is possible then post the corresponding code.....reply me 

    Make sure you have installed the Measurement studio support for VB 6.0 then you will be able to find examples in the folder below on win7 and 8.
    C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples
    Narrow down to Analog Output and choose update voltage example for measurement studio.
    You also have the possibility to use DAQ assistant if you have measurement studio installed. This function is a configuration type programming. After going through the configuration Wizard code is automatically scripted for you so that you can output the voltage you need. Read more about DAQ assistant in the blow link.
    http://www.ni.com/white-paper/4652/en/
    Best Regards
    Jonas Mäki
    Applications Engineering
    National Instruments

  • How to generate a pulse waveform 90 deg phas shifted with respect to a pulse generated using a counter in PXI 6070E daq card ?

    Hi
    I ma using 6070E daq. I am generating a infinite pulse train using one of the counters. I want to generate another pulse train which should 90 degress phase shifted with respect to the previsously generated pulse. How to implement this using the counters in the DAQ card.

    Hi Gopal,
    1) yes the frequency generator is programmable. You have 2 timbebases (10MHz and 100kHz) and you can divide down by any integer between 1-16. Those are the only frequencies you can use.
    2) The way counters work is that you can apply a gate signal to the counter which will cutoff the output. Therefore, you can have a second counter generating a pulse train of an equivalent frequency to the frequency generator (fout) but you don't want it to start immediately. You want it to start only after a short delay (equivalent to a 90d phase). Therefore, you need to "gate" or prevent the output on this counter for that small delay period of time. The way you can do this is by using a second counter to create a delayed pulse. You would
    connect the output of that counter to the gate of your pulse train function. That way, during the delay period of the pulse, you won't be outputing your pulse train yet. When the pulse (high-time) of your pulse reaches the gate, then your pulse train will start generating its pulse train (which is consequently delayed by the amount of delay used in the single delayed pulse counter). Since you don't want your pulse to go back low, you will have to turn off or clear your pulse counter while it is high. That way the signal on the gate will remain high forever.
    Your better solution is to use a PCI-660x card to perform this action. You will have more counters which will give you a greater range of frequencies to choose from and you will have more accurate timing of the signals.
    Anyway, hope that clears things up. Have a good day.
    Ron

  • How to generate a pulse train with different pulse width and delay?

    How to generate a triggered pulse train with different pulse width. for example, after each trigger signal, let's say 2 ms, then the counter output a pulse with pulsewidth of 1 ms, and then after 3 ms delay after the first pulse, the second pulse was generated with a pulse width of 4 ms.  Next cycle when the trigger signal comes, the same two pulses will be generated and so on. Is it possible to achieve this by using 6601 counter card? and if yes, how to achieve this? Thanks!

    Unfortunately you can not create a hardware timed pulse train with different widths on each pulse from a counter. Whilst it can be changed on the fly using software, since you require a hardware triggered signal getting the software involved will not give a huge amount of accuracy when the pulse will actually change.
    So in short you can't use your 6601 card (or a counter timer) to achieve this
    There are three possible Alternative solutions
    1 You could use a high speed digital IO device such as the (6533/34) to generate your variable signal which would require setting up the pulse train as a series of states based around the burst transmission mode where the clock would give you your specific timing.
    2 A timed analogy output (for example on a MIO card with a clock (PCI-6220 / 62xx), i.e. Not the 6704 style static analogy output cards)
    3 A high speed digital waveform card such as the (, 656x , 655x, 654x, 6534, 6533 (http://www.ni.com/modularinstruments/find_right.ht​m) ) this could then be scripted to work with your triggering and also there is a digital waveform editor which will enable you to set up the pattern you wish to generate (http://sine.ni.com/nips/cds/view/p/lang/en/nid/135​55) 
    Hope that helps
    Tim Matthews
    NI (UK)

  • 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.

  • How to generate a pulse on x number of events PCI-6602

    I am running LabVIEW 5.1 full development with a PCI-6602 counter board.
    I would like to generate an output pulse after counting x number of input pulses. I would also like to reset the counter with an external signal.
    My application is I am trying to generate a second index pulse for an encoder.
    I would like to count the pulses from encoder phase A and generate an output pulse on x number of counts. Then I would like to reset the counter using the encoder’s index pulse. This way I can change the phase of the “generated” index pulse with respect to the “real” index pulse by x number of counts (degrees) and maintain that regardless of encoder rpm.
    Thanks
    Brian

    Brian,
    There actually is a way to do what  you want, but it gets a little complicated.  I don't have LV on this machine so I'll have to just describe the idea.  First a summary: the counter will repeatedly countdown to 0.  Each time it reaches 0, it will generate a brief pulse which will in turn hw-reset the counter value to N.  Then it will countdown to 0 again, etc.  The same brief pulse could also be wired to a different encoder-measuring counter to create a "delayed" reset to 0 (or some other #).
    1. Configure your counter for "position measurement" instead of "simple event counting".  Set the encoder type to, um, I forget the name -- something like "two pulse encoder."  It's the setting that will increment with every SOURCE edge and decrement with every AUX edge.  Wire your encoder channel A to the counter's default AUX input (in position encoder mode, you must use the default input pins).  Hard wire from the default SOURCE input to GND.  Now every encoder edge will decrement the count, and nothing wlil ever increment it.
    2. Configure the counter to use z-indexing.  Set the z-index reload value to be N-1, where N is the # of encoder counts by which to delay the encoder's real z-index pulse.  Set the z-index reload phase appropriately, probably to A low B low.  Wire the real z-index pulse to the counter's GATE input.
    3.  Configure the counter to "pulse on terminal count" -- you do this using 'Counter Set Attribute.vi'.  So N encoder edges after the real z-index pulse, you'll generate a pseudo-z-index with this counter.
    4. You can wire this pseudo-z-index to the GATE input of the encoder-measuring counter.  Now the encoder's z-index pulse is delayed by an amount you can program.
    5. Note: this method requires the motion to be uni-directional.
    Good luck!
    -Kevin P.

  • How to switch multiple relays using PCI 6601 DAQ card

    What is the specification of the digital output value given from the PCI 6601 DAQ card?How to develop LAB VIEW code to switch a relay?Can anybody please explain?

    Hi hasi,
    did you read the manual and the specs of the PCI6601? It says: "5V TTL/CMOS compatible"...
    You shouldn't expect to much current from a simple DO pin - probably it's not enough to drive your relay!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • 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 generate real pulses in myRIO from pulse train function

    Hi,
     I need to generate modulated pulses for an experiment. I should be able to select the number of pulse for second and their frequency, variate the amplitude among then and produce them in myRIO. To build those pulses I used the tool pulse train; however, I am stuck about how to generate those pulse from the pulse train function in real pulses in myRIO. The PWM tool, aparently, doesn't allow to select and change the amplitude between the pulses. Does anyone knows how to produce them from pulse train or even another way to do so? Thanks.
    Solved!
    Go to Solution.

    I need that each pulse have the same amplitude in the same pulse train, but just in case I want to change to each pulse different I made this draft code where I can manipulate everything that I need and change with few adjusts to the second option. I can control also the gap time. The program is running fine so far, but I still have one more task to do that is struggling me. I need to generate numbers inside the range (max-min) according to the steps with no repeatition. In case of lack of option the number does not need to to follow the rule of 2up1down. After run all the numbers between the range I need to start all over again. This code should be attached probably after restrict the number to the steps.  Any idea? The code is still not clean, which may cause confusion in some aspects. However, all I need to change is the beginning of the code to attach the non repeatition cicle. Thanks.
    Attachments:
    MonophasicGenerator.vi ‏36 KB

  • How to use counters of PCI 6251 to count the number of pulses

    Hello,
    I have inputs from an optical encoder {pulse train} and i need to count the number of pulses for a short period of time to estimate the speed of the DC motor. Could you please tell me how to use the counters in PCI 6251 DAQ. I found something on DAQ STC, whichs says the input pulse should be connected to PF0 {ctr source}, but i have query where do i get the output {number of pulses counted in a particular period of time}.
    Looking for your reply.
    Thanks & Regards,
    bsnr

    Hi bsnr,
    Thanks for the post!
    In MAX (Measurement and Automation Explorer), if you find the device (DAQmx devices) and right-click, you can select pinouts - which should contain a table telling you which pins are what PFI lines.
    Then, in labVIEW, you need to generate some code to use the choosen coutner in a task to count digital edges. If your not sure on this, go to Help>>Find Examples>>Hardware I/O>>DAQmx>>Counters.. and take a look at some of the code provide.
    ps. It seems (maybe just your wording), but your expecting the counter output pin to provide the number of counted edges - this isn't the case.  
    Please let me know what you think?
    Kind Regards, 
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • How to generate a csv report to determine paper size in a pdf or pdf/a file ?

    how to generate a csv report to determine paper size in a pdf or pdf/a file ?

    Use the cfpdf tag as follows:
    <cfpdf
        action = "getinfo"
        name = "pdf_info"
        source = "C:\temp\testFile.pdf">
    My Operating System is Windows. This tag gets information about testFile.pdf, and stores it in a structure. I have given this structure the name pdf_info. This structure has the key you are interested in, namely, pageSizes.
    Pdf_info.pageSizes is an array whose indices correspond to the respective page number in the PDF. You can use this to generate Comma-Separated Values (CSV) for each page.
    <!--- Initialize CSV list --->
    <cfset csv = "">
    <!--- Add headers or first row, followed by carriage-return --->
    <cfset csv = "Page,Height,Width" & chr(13)>
    <cfloop from="1" to="#arrayLen(pdf_info.pageSizes)#" index="i">
    <cfset row_info = i & "," & pdf_info.pageSizes[i]["height"] & "," & pdf_info.pageSizes[i]["width"] & chr(13)>
    <cfset csv = csv & row_info>
    </cfloop>
    <!--- Output CSV --->
    <cfoutput>#csv#</cfoutput>
    <!--- Write CSV to file --->
    <!--- <cffile action="write" file="C:\temp\output.csv" output="#csv#"> --->
    Done!

  • How to generate an OUTBOUND INVOICE IDOC from the ABAP Program?

    How to generate an OUTBOUND INVOICE IDOC from the ABAP Program? Any Function Module that can be used for this?

    Hi
    This is more of configuration
    (1) Create a Output type with Medium 6 ( Check with your functional consultant)
    (2) Maintain Partner Profiles using WE20 transaction
           Idoc type - INVOIC02
           Message type - INVOIC
           Process Code - SD09
    Regards
    Madhan D

  • How to trigger 5v -ve polarity from pci 6251 to sincronise the image capture

    Hello!
    I want to synchronise the image capture of an IEE 1394 firewire camera with an 50hz input signal (acquired from Vsync of VGA port ). I want to accomplish this using PCI 6251 (SCB 68 E series) device. The IEE 1394 camera can be triggered using a 5V –ve polarity signal but have no idea how it is achieved, some examples about the application would be helpful
    shri

    This example illustrates how an application might be constructed in order to trigger an analog acquisition as well as an external system concurrently with an E-Series board. The analog component has been made retriggerable by tying a counter pulse train to its sample clock. Due to the complexities of the DAQ STC, an analog output line is employed in order to generate a hardware-timed, regular, pulse used to trigger both the analog acquisition, and potentially an external system. This type of architecture could be used for "stimulous - response" testing.
    Attachments:
    Timing_with_AO.vi ‏123 KB

  • DAQ board for acquiring analog pulses

    Hi.  I'm using the USB-6251 DAQ board, and I'm trying to record analog Gaussian curve-ish pulses into LabVIEW.  Except when there is a pulse, the analog input channel is at 0V.  Right now, I've got the trigger working to start acquisition at the beginning of the pulse, but I can't figure out how to stop acquisition when the pulse is over.  I've been using the DAQ Assistant, with an Analog Window start trigger, set at the range 10m to 10 V.  Is that the right way to do it?  I can't get any reference trigger to work to stop the acquisition however.  It's set to acquire 5k inputs at 1 kHz and always goes for the full 5 seconds instead of stopping.
    Thanks in advance for helping!

    Not exactly.  It's still picking up pulses separately, but it's including the empty space afterwards (as in, if the pulse lasts only 10 ms, it still acquires data for the full 1 second).  Preferably, it would stop acquiring data when the voltage is outside the analog window.
    I attached the VI as it is right now, with just a start trigger and no reference trigger.  I'm unsure how to configure the reference trigger to have it stop the acquision once the voltage is outside the window again.
    Thanks for your help!
    Jeremy
    Attachments:
    DAQ integration.vi ‏90 KB

Maybe you are looking for

  • Why is the fan of my Macbook Air suddenly so noisy?

    It has become very noisy. The fan is running constantly. I never heard the fan before. Has something broken. The performance has not changed but it takes much more to start up and shut down.

  • Help please on Security stuff

    For some reason Itunes keeps asking me to verify my account by asking me my security questions to download or buy anything. The problem is i forget the answers and i know i dont have them writen down anywhere. Is there a way to re-set the questions a

  • Using php/mysql accountify

    hello i am kinda new to dreamweaver and have had sucess doing what i have wanted up until this last snag. i want to be able to have people log in to my website into their own personal account. so far accountify is the only program that allows for me

  • Can Someone email me the Default Dock File.

    Man, I tried out DockDoctor to mod the dock a bit. I accidentally add a space to the right which can't be removed through the programs default dock reset option. If there's anyone here running OS X Leopard 10.5.2 with an unmodified dock running at de

  • Position Tweening Not Working

    Photoshop CS3. When I tween between frames in an animation with Position selected, the program dupes the first selected frame the number of times specified but does not tween the object's position. So if I specify five frames, I get five dupes of the