Making a digital retriggerable gate pulse on demand

Hello,
I am relatively new to using DAQmx, and I was hoping someone here could provide me with a better solution than I have come up with.
The experiment we are running involves a camera, some image processing and then a laser that requires a gate to run. The way our program is currrently setup is that we loop over this process and after each image processing step decide whether or not to gate the laser with a certain number of pulses with a certain frequency and duty cycle. I have attached an example that would functionally do what I am describing. It is worth noting that our laser requires a digital low to gate and not a digital high.
Currently, our camera is triggered using an external trigger, so the while loop hangs on the IMAQ grab until it is triggered. Then we process the image, decide to shoot the laser (running on its 200kHz internal clock). The current example will hang the code until all of the Digital Output is done which may cause us to miss our next camera trigger. It feels like there must be a more intelligent way of doing this. I am even fine routing our own digital output on our DAQ to trigger a pulse train which is also generated by our DAQ, but ideally we would just send our gate pulses as soon as we know whether or not we want to fire our laser.
For extra reference, we are using a PCI2-1433 framegrabber as well as a PCIe-6363 Multifunction DAQ with a BNC 2110 breakout board. Any suggestions would be helpful. I get the feeling that there are a host of different ways that this could be done using this DAQ and the DAQmx software but like I said, I'm really new with these. I'm betting there are things the hardware can do that I have ZERO awareness of.
Thanks for everones time!
Cole
Attachments:
IMAQ_plus_DAQ_retriggerable_digital_gate.vi ‏30 KB
DAQ_example_retriggerable_gate.png ‏111 KB

Hi ColeVV,
I've taken a look at your code.  I would recommend using a state machine architecture.  
Do you need synchronization among your events?
Sincerely,
Bogdan Buricea
Applications Engineering
National Instruments
Bogdan Buricea
Applications Engineer
National Instruments

Similar Messages

  • Retriggerable finite pulse train

    I have a problem using a retriggerable finite pulse train as in the NI example Retriggerable_Finite_Pulse_Train. I use ACTOUT to gate the first re-triggerable pulse control and the second pulse control generates the continueous pulse train which is gated by the first retriggerable pulse control. The ACTOUT signal is generated by an AI control which senses a crank trigger (Hall Sensor). The re-triggerable pulse train is used to modulate a fuel injector in sync with ignition timing and RPM.  If the period of the ACTOUT signal changes due to a change in RPM, the pulse train is recalculated. It works OK with one hitch. Even at constant RPM, after about 15 re-triggerer pulse trains the final pulse of the train does not complete. This leaves the signal high in-between successive re-triggerer pulse trains. This incorrect high signal between re-triggerer pulse trains means that the fuel injector is incorrectly left on between pulse trains, when it should be turned off. This incorrect high signal goes on for about 10 pulse train events and then returns to normal. I use the ActualPeriod of the first re-triggerable pulse to ensure the pulse train ends correctly within window of the first re-triggerable pulse, but it seem to wander. Is there another way to create a different type of re-triggerable pulse train that overcomes this problem. I may have to use a single re-triggerable pulse instead of a re-triggerable pulse train as this work correctly every time. However, multiple pulses creates a finer mist from a fuel injector and is the correct why to modulate a fuel injector. The

    CORRECTION TO PREVIOUS POSTING THERE WAS AN ERROR IN HOW I DESCRIBED THE PROBLEM:
    I have a problem using a retriggerable finite pulse train as in the NI example Retriggerable_Finite_Pulse_Train. I use ACTOUT to gate the first re-triggerable pulse control and the second pulse control generates the continuous pulse train which is gated by the first retriggerable pulse control. The ACTOUT signal is generated by an AI control which senses a crank trigger (Hall Sensor). The re-triggerable pulse train is used to modulate a fuel injector in sync with ignition timing and RPM.  If the period of the ACTOUT signal changes due to a change in RPM, the pulse train is recalculated. It works OK with one hitch. Even at constant RPM, after about 15 re-triggerer pulse trains the final pulse of the train does not complete. This leaves the signal high in-between successive re-triggerer pulse trains. This incorrect high signal between re-triggerer pulse trains means that the fuel injector is incorrectly left on in-between pulse trains. This incorrect high signal goes on for about 10 pulse train events and then returns to normal. This pattern repeats. I use the ActualPeriod of the second control's continuous pulse train to ensure the pulse train ends correctly within window of the first re-triggerable pulse. This work but with time this pulse train seem to shift slightly. Is there another way to create a different type of re-triggerable pulse train that overcomes this problem?

  • PXI 6602 - Retriggerable Finite Pulse Train Generation

    Hi,
    I have a VI in LV7.1 where I configure PXI 6602 to generate finite pulses whenever a trigger is received. And the Retriggerable Property is set to TRUE. I look for the task to complete in order to proceed with the other operations.. This actually works. As soon as the pulses are generated DAQmx Task Done becomes TRUE.
    The same VI I upgraded to LV 2011but this time the 'DAQmx Task Done?' never becomes TRUE even after the trigger is received and pulses are generated. 
    Does anyone know if the 'DAQmx Task Done?' functionality is changed in higher version of LabVIEW so that it no more works as it was in LV 7.1?
    Is yes, then do you know what property to use to know that the operation is done?
    Any help is highly appreciated.
    Thanks.

    CORRECTION TO PREVIOUS POSTING THERE WAS AN ERROR IN HOW I DESCRIBED THE PROBLEM:
    I have a problem using a retriggerable finite pulse train as in the NI example Retriggerable_Finite_Pulse_Train. I use ACTOUT to gate the first re-triggerable pulse control and the second pulse control generates the continuous pulse train which is gated by the first retriggerable pulse control. The ACTOUT signal is generated by an AI control which senses a crank trigger (Hall Sensor). The re-triggerable pulse train is used to modulate a fuel injector in sync with ignition timing and RPM.  If the period of the ACTOUT signal changes due to a change in RPM, the pulse train is recalculated. It works OK with one hitch. Even at constant RPM, after about 15 re-triggerer pulse trains the final pulse of the train does not complete. This leaves the signal high in-between successive re-triggerer pulse trains. This incorrect high signal between re-triggerer pulse trains means that the fuel injector is incorrectly left on in-between pulse trains. This incorrect high signal goes on for about 10 pulse train events and then returns to normal. This pattern repeats. I use the ActualPeriod of the second control's continuous pulse train to ensure the pulse train ends correctly within window of the first re-triggerable pulse. This work but with time this pulse train seem to shift slightly. Is there another way to create a different type of re-triggerable pulse train that overcomes this problem?

  • Generating frequency dependant square pulse and making it digital

    trying to generate a square wave pulse at a specific frequency
    it would be great if its simple as setting the amount of frequency (i.e., 50 , 50 pulses per sec)
    but it gets complicated because of the sample rate
    my problem is to convert it to digital and i don't know whats wrong
     i attached a pic of my block diagram
    as you can see, one pulse has frequency F, the other F/2, and lastly F/4
    i need it to be compatible with the VI attached as well. can anyone help? thanks in advance!
    Message Edited by sdkpark on 10-10-2009 12:19 AM
    Attachments:
    Create Digital Waveform.vi ‏20 KB
    Correlated Dig Write With Counter.vi ‏31 KB

    Hello again Sdkpark,
    Apologies the message I was writing didn't include my full post.  Take a look at this great community example for a prebuilt solution to what I believe you're trying to accomplish:
    http://decibel.ni.com/content/docs/DOC-5763
    Let me know if this isn't what you're looking for and I'll reply back.  Have a great day!
    -John Sullivan
    Analog Engineer

  • Making Multiple Digital Signatures Read-only in Form (Acrobat 9)

    I have created a form which includes two (2) digital signature fields.  What needs to occur with the form is Person1 fills the form and then digitally signs it thereby making the form fields read-only .  Person2 then digitally signs the form which should make Person1's digital signature read-only.
    Here's what I've done:
    1) For the Person1 digital signature field, in Digital Signature Properties, under the Signed tab, I have selected Mark as read-only <all fields except these> and selected the Person2 digital signature field.
    2) For the Person2 digital signature field, in Digital Signature Properties, under the Signed tab, I have selected Mark as read-only <all fields> since once Person2 signs the form I do not want Person1 to be able to clear the digital signature and make changes to the form.
    Here's what actually occurs:
    Step 1 above works fine.  Once the signature is applied all the form fields are read-only except for the Person2 digital signature field.
    The problem is that after Person2 digitally signs the form, even though I selected all fields as read-only, Person1 can 'clear' their signature which leaves all the form fields available for editing and leaves Person2's digital signature still on the form.
    I honestly don't care about 'validating' signatures on this form since it's going to be printed but I cannot allow Person2's signature to remain on the form and allow Person1 to edit the form.
    --Mike.

    Hi!
    I have the same problem. Have not been able to figure it out, although tried everything.
    Hope somebody can help
    - MackeMan

  • Making a Digital Signature Form

         Hi, I am brand new to this forum, and thought that I would give it a try.  i am running Abobe Acrobat Pro 9.0.
              I have been tasked with making a document that is Digital Signature ready.  In other works, I need to figure out how to make a Box, with a little red arrow, where somone runs the mouse pointer over the arrow, and a note comes up that says "To digitally sign, click the arrow".
         Is there someone that might be able to assit me in this request?
         Very Respectfully: Rossknechtt,

                    Thank you George. I have made a digital signature field. 
              Is it possible to prove guidance as to how  I Ioad trusted signatures so the signature warning does not come up?  How do I add a date field with a pull down calendar?
    Very Respectfully:

  • Production Premium 4-Making Dolby Digital 5.1 Discs in Encore

    Greetings,
    I am a longtime Photoshop and now Lightroom user but have done my video editing in another product for years.
    I moved to the Creative suite and Production Premium and Encore workflow and am trying to transition.
    After 2 exceedingly frustrating Adobe support calls I gave up.
    I have 2 questions....one I answered myself.  It appears that to create a Dolby Digital 5.1 SD DVD or Blu-Ray disc you need to purchase an additional add-on codec to the tune of $200.  Don't like it (as my $200 full package video editor includes it) but if true, than it is what it is. I saw some previous posts like this but then there were conflicts.
    Second question. Exactly what do I have to purchase (are some better than others) and then how does it affect the disc making process in encore.  Or the editing process in Prod Premium? Is there a tutorial or something?
    I found the encor FAQ to not be very helpful and possibilty mis-leading.  It makes it seem that this is an ADVANTAGE.
    Does Encore DVD 2.0 support Dolby® Digital 5.1?
    A: Yes, Encore DVD allows you to create DVDs containing Dolby Digital 5.1 content. However, Dolby Digital 5.1 content must be created in another application. The integrated Dolby Digiin audio reproduction, Encore DVD 2.0 supports the DTS audio format, in addition to the Dolby Digital format supported in earlier versions. Now, regardless of which of these two popular formats you prefer, creating the final results you want is easy with Adobe Encore DVD 2.0.
    So Production premium supports a 5.1 workflow....the integration with Encore is touted....but I have to go OUTSIDE the suite to make a 5.1 audio disc that my $200 NLE currently can do?
    Or is the plugin just an additional cost that is transparent....you push the button and it encodes....
    Finally, for clarification, I do not try to import or maintain a 5.1 stream to a camera or anything.  I just utilize the 5.1 channels to create a nice dialogue and music ambient mix.  I put what I want in each channel. Pr Prem seems to support this.  I just want it to burn to SD and BD with 5.1.
    Thanks for any help!
    BJBBJB1

    As I'm undertanding (sorry but being italian, I've sometimes problems in translation) I hope this will help:
    -In PP, you import all your clips (audio or not) and, of course your dolby files (example .ac3)
    -when everything is done (effects, transitions, etc.), PP'll encode your project giving you one customed video (as you wish) and your dolby audio file.
    If you have put in this project some stereo audio file, PP will give you anyway a Dolby encoded file (it will be a "pseudo" dolby).
    - Now you can:
    - import them in Encore as assets dragging them in the timeline later
    -import them as timeline, so you'll already find them in the new timeline
    -use DinamicLink from Encore (File\Project\DinamicLink\import a Premiere project) as Jeff says
    If you already have a dolby audio file imported in Encore, you'll choose the audio option "do not Trascode" so the audio project you've created in PP will not be modified and you'll output a brand new Dolby audio file.
    Hope this will help you
    Sorry in advance if I missed any in translation

  • Is there a script for making a digital signature read-only after signing?

    When the user signs a PDF Form, the user can clear his own signature. I want to disable the "Clear Signature" feature. I noticed I can run a Javascript in the digital signature's property. Is it possible to execute a Javascript to make just that signature Read-only?
    Thanks.

    If the person who signed the document has Acrobat Pro, you could use the flattenPages() method, which lets you specify the page(s) to be flattened.
    For example:
    this.flattenPages(0)         //flattens page 1
    this.flattenPages(0, 2)     //flattens pages 1 - 3
    But if they have only Reader, they can't use flattenPages().

  • Making a digital clock

    Hello, I am learning java and i can make simple programs. i have only taken 2 years of java programmin in school.
    i wanted to try something harder, i don't know if i am ready for it or not.
    I want to make a digital clock in java, and maybe modify it by adding buttons to increase hours and mins.
    I have kinda starte it. but i need a lot of help.

    by the nature of your questions, it appears that you don't know much about swing, timers, and java date time functions. We can't just tell you what you need for your clock, otherwise we'd be building it for you. What you need to do is study these areas and learn for yourself. I suggest that you start with the Sun Java Swing tutorials. Start out here:
    http://java.sun.com/docs/books/tutorial/ui/index.html
    and
    http://java.sun.com/docs/books/tutorial/uiswing/index.html

  • Making a digital Video

    I am trying to make a digital picture video of my son's life for Christmas. I purchased iTunes to play in the background but
    iTunes will not let me use my purchased songs. Help

    If the actual video is smaller that 280 x 1024 and you're using html/css to enlarge it to that size, there's really nothing in DW that can help. You would need to recreate the video to the correct final resolution in whatever program you used to create it.

  • Making a digital framing application

    I want to make a digital framing application like at this website:
    http://www.art.com/FrameStep/default.asp?apnum=3459566&PODConfigID=4990697&pd=13856207&sp= A&ui=978F9BE58F4C490C8CA5C33C44F089D0&customerzoneid=3
    Im not sure if i would be able to make this with an adobe program or if its something i would have to download off the internet. Any help would be much appreciated!

    You can develop this application in flash. The thing you have to know is about textfields, loading images from external source, preloaders, event listeners etc. and you can sell the user designed frame to him/her using the cart system, so you need to communicate with the backend database for data storage and you should use server side script to make an communication between your flash and database.
    The familiar tools are:
    FLASH - Interface design and the container for all your designs
    PHP - Serverside script to communicate the database and flash.
    MySql - Is an database software, hence you maintain the consistent data here.
    Start Learning about it and google it the tool names, will help you.

  • REPOST: Making a digital magazine using Indesign, How to publish it without purchasing DPS?

    Hi there,
    So I have posted this on the Indesign forum, bit have been told to repost the question here.
    I am creating a Digital Magazine for a school project. It is getting marked by a marker and they obviously need to see how the magazine works etc.
    I am not looking into purchasing DPS just for this project. I just want to find a way to put the magazine on the iPad so its fully functional, I am in no way looking to publishing it to the App Store or anything like that.
    Someone suggested I still download the Adobe DPS tools installed (Folio Builder and Folio Overlays).... (Does that require me getting the Digital publishing suite?)
    Or I publish it as an Interactive PDF..
    My final question is how would I go about doing both?
    Thank you.

    Before you start I suggest you to understand the difference between Apps and documents. An App It's a self contained content that could be delivered only by the marketplaces (iTunes, GooglePlay, Amazon). If you choose this solution you have to respect their policies.
    If you choose a document such as a PDF you are free to deliver it as you prefer, by your store, by your network, via mail, etc.
    To read a document you need an App such as a Acrobat Reader.
    In between the document and the App there is the device and the operating system. That's why It's not so easy to mantein all the interactivity that you can potentially place in a PDF when you read on a device such as iPad.
    So we can define many scenarios:
    - Deliver your content using a PDF - lower compatibility with interactivity, no adaptive layout
    - Deliver your content using ePUB - lower compatibility with interactivity, adaptive layout
    - Deliver your content using an App created with a solution like the DPS - high compatibility with interactivity
    - Deliver your content using the developing - everything your target devices can support
    In my opinion I suggest you to adopt a CreativeCloud for education (very cheap) so you can deliver your content in all this ways than choose a good consultant :-)
    Ciao
    Andrea Spinazzola

  • How to generate a delayed retriggerable pulse using only one counter with PXI 6070E card

    Hi
    I have a problem in generating a retriggerable delayed pulse with a single counter(triggered through a signal at gate) using PXI 6070E card. VI was developed in NI LabVIEW traditional DAQ Ver.7.1. I have used the "delayed pulse generator config" VI and a "Start counter" & "Stop counter" VIs for the purpose. But there is no output seen at the out terminal of counter. So I introduced a "wait" VI and set it to 1 sec. Now the pulse output appears but some pulses are missing mometarily after every 1 sec interval. (any solution for this)
    I have gone through a few similar requests in the forum but they suggest either to use two counters or to generate a finite pulse train which does'nt fit my application. Moreover PXI 6070E has only 2 counter timers. I am already using one counter to measure the frequency of a pulse train(signal 1). The application requires to generate a delayed retriggerable pulse for every pulse in signal 1. So I have only one counter left.
    Can I measure the frequency of signal 1 by analog means.? so that I can use two counters for pulse generation. (Signal 1 is a TTL signal).
    Request some help.
    Thanks in Advance
    Regards

    A finite pulse train (N_Pulses >= 2) does require the use of 2 counters on most of our older hardware including your 6070E.  If you're just talking about generating a single retriggerable pulse, you would only need one counter.
    Here's an example in Traditional DAQ that shows you how to set a retriggerable pulse generation (it also allows you to adjust the characteristics of the pulse on-the-fly).
    If you're writing a new program, you might consider switching to DAQmx as it supports NI's latest hardware and recent OSes should you ever need to upgrade.  Traditional NI DAQ is no longer in active development.  Here's an example of how to implement a retriggerable pulse generation in DAQmx.  You should take note that you can't use the two drivers to simultaneously talk to the same piece of hardware, although you should be able to go back and forth by resetting the Traditional DAQ driver before switching to DAQmx.
    Best Regards,
    John Passiak

  • Retriggerable gated counter or analog pulse trains

    Hi all,
    I have a problem I could not resolve in the last days. It might be even a question of creativity of how to come up with a solution.
    I have an external pulse train 1 at ca. 8 kHz (frequency not fully stable). With this pulse train, I want to trigger with each pulse an analog waveform. Using X-series boards, this works perfectly.
    But now I want to gate this analog signal with another pulse train 2 that is much slower than the other one (pausetrig option). Theoretically, this works nicely, too. But in reality, the analog signal simply ends at the point where it is stopped by the pause trigger, whereas I want it to stop at the end point of the waveform.
    Please have a look at the drawing attached
    I would be really glad about any ideas on how to solve this problem.
    Best regards,
    Peter

    I don't think I've ever defined both a start trigger and a pause trigger defined for the same task.  Good to know it's allowed.
    Given what you've already found, the solution is to control the timing of the end of the pause trigger pulse's active state (shown here as high). 
    Here's one approach:
    1. Create the pause trigger pulse with a retriggerable single pulse task.  Use a minimal "low time" and "initial delay".  Set the high (active) time to be approximately (N+1) periods of your AO sample clock.  Technically, N+1 periods is a bit more than necessary, but it's sure to be enough and doesn't require research into deep details of AO timing.
    2. Configure the AO task to use the pulse as *both* its start trigger (rising edge) and its pause trigger (pause when low).
    Comments: this makes for a different timing diagram than you've drawn.  Each external 8 kHz pulse causes a minimally-delayed pause trigger pulse which lasts long enough to generate the full AO waveform but ends before the next 8 kHz pulse.  The choice of when to start and stop this trigger pulse will be up to your own logic and will be governed by software timing. 
       Oh dang!  That still leaves you susceptible to a partial waveform since you can't sync the software timing to occur during the desired small fraction of the 8 kHz interval with no AO waveform.
    Second approach:
    1. Similar to #1 above, but set the high (active) time to cover multiple 8 kHz periods and *don't* make the task retriggerable.  To get the timing right in hardware, you'll need to generate a pulse that's *approximately* the requested length, but you'll reserve the right to tweak it so the edges fall in the right place.   You'll also define your pulse in terms of the external 8 kHz signal rather than in terms of internal board time.
         Specifically, configure to generate a pulse based on units of "Ticks" using the rising edges of the external 8 kHz signal as the "source of ticks."  Set a minimal value (probably 2) for both the "low ticks" and "initial delay" inputs.  The "high ticks" setting is where you do your tweaking.
        Suppose the desired pause trigger time is 10.3 msec.  Nominally, that's 82.4 intervals of the 8 kHz external signal.  Well, just round up or down as you see fit and wire this integer # into the "high ticks" input. 
    2. AO task is configured to retrigger off the external 8 kHz signal and be pause triggered by #1's counter pulse.
    Comments: When you start the pause trigger pulse task, it will remain in its low idle state for the first two 8 kHz pulses.  It will go high on the 3rd pulse and then revert low on the 82nd subsequent pulse.
       Because this pulse *also* acts as a pause trigger for the AO task, you're now synced such that the AO task is paused exactly as it is being retriggered, meaning that the previous waveform must have been allowed to complete.  (The deep details of timing will prevent the AO task from generating 1 sample at this instant.)
    -Kevin P

  • Deterministic updating of retriggerable pulses, part 2.

    Re: Question posted by Vern on 6/27/01 on ?Deterministic updating of retriggerable pulses?.
    I?m using LABVIEW in a very similar application to Vern, namely fuel injection control of an engine. I've managed to combine the Pulse Width Modulation VI and Retriggerable Pulse Generation VI, such that a pulse is generated on each occurrence of a pulse at the counter?s gate (which comes from an encoder on the engine). However, the VI executes only once, and the gives ?Error ?10609 occurred at Counter Control?, which is called a ?transferInProgError?. The only way to change the pulse width is to restart the VI, which runs once and then gives the same error. I am using a PCI-6071E DAQ board. Why is this happening?

    That is precisely what I tried, prior to posting my question here. I still get the "10609 transfer in progress error".
    For testing of the VIs, I am using an electric motor to drive my encoder, whose pulses are routed to the gate pin of a counter. The pulses come every 24msec, and I've set my phase 1 to 1msec (delay), and my phase 2 to be 5msec (pulse). I've modified the sub-vi "calculate pulse specs" found in the PWM vi to accept phase 1 and 2 time duration directly, rather than frequency and duty-cycle inputs.
    As you can see, the pulse generation (6msec total) should be finished by the time the new gate pulse arrives. Therefore, switching cycles while a pulse is in progress should not be a problem.
    The oscilloscope shows a 5msec h
    igh pulse, followed by a 19msec low pulse. The low pulse becomes longer if the motor speed is decreased slightly, proving that the operation is gated. The VI runs once, and as long as the motor is driving the encoder, the pulses appear. However, their duration cannot be changed without re-starting the vi.
    I'm attaching the relevant VIs for reference.
    Thank you for your help Geneva.
    Regards,
    John
    Attachments:
    Pulse_Width_Modulator2.vi ‏129 KB
    New_Calculate_Pulse_Specs.vi ‏102 KB

Maybe you are looking for

  • Right click context menu does not appear only for Java 1.7, AWT TextField

    I have been debugging some issues that an application has been having with Java 1.7 versus older versions. A new problem I have encountered is that the right click context menu does not function in any TextField. It works fine when running/compiling

  • How to display advance table based on parameter pls give me solution urgent

    Co code: public class PosASEBacklogCO extends OAControllerImpl public void processRequest(OAPageContext pageContext, OAWebBean webBean) super.processRequest(pageContext, webBean); // PosASEBackShipAMImpl am = (PosASEBackShipAMImpl)pageContext.getAppl

  • Error when uploading SAP query in ECC6 from 4.5B system

    Hi expert , I have down loaded SAP Query(infoset) from 4.5B server and now i want to upload this query to ECC6.0.  when i upload this query(infoset) to ECC 6 as follows to download step like from SQ02 .  but after executing i am getting error "  info

  • How to open multiple report windows on button click without losing session?

    Hi, JDev : 11.1.1.2.0 I am trying to open multiple discoverer plus report windows using my ADF application. My requirement is that user has to select multiple reports from the screen and by clicking on submit button all the reports should be opened i

  • Unable to Edit Payment information

    When I access my account information I try to enter my new card info from a new bank. Apple responds with, " the information you have entered does not match your bank records." I have contacted the 1800 support # and they were not able to assist. I n