How to generate pulse during changing boolean value?

I need to generate short pulse during changing boolean value from 0 to 1. This pulse is needed to reset counter. 
I was trying with Event Structure with Value Change but I think that I did something wrong.
Maybe sambody can give me some tips to do it in other way?
Thank you in advance.
Regards
Solved!
Go to Solution.

Rogal wrote:
I need to generate short pulse during changing boolean value from 0 to 1. This pulse is needed to reset counter. 
I was trying with Event Structure with Value Change but I think that I did something wrong.
Maybe sambody can give me some tips to do it in other way?
Thank you in advance.
Regards
We assumed you wanted a pulse when a front panel button (boolean) was clicked.
I am still not sure just what it is you want.
Do you want a single pulse when x is greater than 4?
You don't need an event structure for that.
Omar

Similar Messages

  • How can I generate pulse trains whenever the value of the gate changes?

    I need to generate pulse train both at the rising edge and falling of the gate signal. My DAQ board has only two counters.
    Have a nice day,
    Jun

    Jun;
    As your DAQ board has only two counters available, I'm assuming you are working with either one of the E-series board or SMIO boards.
    If that is the case, your board doesn't have the capability of generating triggered pulse trains. And that is what you need.
    You will need to use the 660x family instead. Those boards have the trigger pulse train capability. Regarding the second part of your application; none of the DAQ boards has the capability of triggering a pulse train generation at both rising and falling edges of the same trigger pulse. You can configure either as rising or falling edge of the trigger pulse. Then, to accomplish wath you need, you will need to configure two counters, both having the same trigger pulse triggering a pulse train gen
    eration, and one configured to trigger the pulse train at the raising edge of the trigger pulse and the other to trigger at the falling edge of the trigger pulse; then have an external OR Gate which the two inputs are the outputs of those two counters.
    Hope this helps.
    Filipe

  • Need Help on How to Generate Pulse Width Modulation signals

    Hi,
    I am New in using NI board and programming using LabView. I have no idea on how to start to generate, use what function in order to create a PWM signals.
    My project needs:
    -PWM signals with 15kHz frequency.
    -Duty cycle varrying from 0%, 25%, 50%, 75%, 100%.
    -By using the generated PWM signals to control the half-bridge (MOSFETs) of boost converter and buck converter to varying the voltage of 24V battery to feed in my DC motor.
    The NI board that I use is (NI - sbRIO-9642).
    Can I have a clear view on what to use, how to generate, and by using what functions to generate the PWM signals.
    Sorry for the inconvienient, but I really desperate for help in this. Thanks a lot. I am appreaciate it.
    The attached is the circuit the half-bridge motor controller that I will used.
    Attachments:
    half bridge.jpg ‏13 KB

    Hi Ronald,
    in this thread a very similar question came up. You can use the same approach on your sbRIO.
    For the frequency you gave you should use the FPGA present on the sbRIO - as is shown/discussed in that other thread! I also suggest that other thread because of the "deadtime" feature used to prevent shortcut problems when switching your MOSFETS simultanuously...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to Generate Event on change in Plot Legend for XY Graph

    Hi,
    I have two XY graphs on the front panel and would like to maintain a common plot legend such that any change in the plot legend affects both graphs.
    Objective: I would like any value change in plot legend to fire an event.
    How do I program that?
    I know of value change event for the graph but am unable to find something specific to the plot legend. Other option is to have the user press a "refresh" button that will fire the event.
    Feel free to share thoughts on other elegant methods to achieve the same objective.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    Hi Sarah,
    Looks like you are talking of exactly what I want!
    I have attached a sample VI to try achieve what I want. But it still has some issues which are:
    1) I am unable to configure a Plot Attribute Change Event. I have used a mouse leave event instead. How does one configure a Plot Attribute Change Event?
    2) Is there no single property which will transfer all the settings of plot legend from one graph to plot legend of another graph? In my sample VI, I have to read each property of the master graph and feed it into the slave graph.
    Kindly note I am using LV FDS 7.1 on Win2000
    Thanks,
    Gurdas
    Message Edited by Gurdas on 03-27-2006 11:51 PM
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu
    Attachments:
    Graph_PlotLegend_Event.vi ‏45 KB

  • Change boolean value in a method

    How could the following be done:
    I have an object file deserialized and I want to call its methods. I want one of the methods to return a boolean. When I call this method I want the value of boolean to be set to true. So when I want to call this method again I want the boolean to be set to true. Therfore I will be unable to call this method.
    Below is the code that I have used.
    Thanks in advance
    public interface Call
      public void execute();
      public boolean test();
    import java.util.*;
    public class Example implements java.io.Serializable,Call
      public void execute()
      System.out.println("Example has printed out");
       public boolean test()
         System.out.println("The test method has been called");
    }Should I provide all of the code? Or is the above enough

    I'm glad you've bought a book, I hope you find it enlightening. Incidentally, I'm not annoyed, only amused, but either way if we don't understand your questions, we can't help you can we ?
    Do try to remember that we don't know what you're trying to achieve here - we don't have the big picture.
    So in your update, I still don't know, really, what you're getting at. I particularly don't understand what (if any) relevance you think Serialization has to this problem. However, here is my best guess:
    import java.util.*;
    import java.io.*;
    public class Example
       implements Serializable,Call
       public void execute()
          if(!test())
             System.out.println("Will not do the work");
          else
             System.out.println("Will do the work");
             doWork();
       public void doWork()
          // This method will ONLY get called the first time you
          // call execute() and never again.
       public boolean test()
          System.out.println("The test method has been called");
          if( m_status == true )
             m_status = false;
             return true;
          return false;
       // The status of the test - initially true
       private boolean m_status = true;
    }

  • How often does Best Buy change the value of video game trade-ins?

    Last week, I decided I was going to trade in Batman: The Arkham Knight for the XB1, so I went on the Best Buy website to see how much I was going to get for it and it said $35. Cool. So, I checked the website today and it said it was valued at $32. Can anyone explain how values change so frequently? Just trying get an understanding how Best Buy fluctuates trade-in values.

    supply and demand.
    Next week it will probably be lower.
    And say by chance they get 2000 used Arkham Knight games in it will go down to $5 on a trade in or so.
    Best Buy has to try and then resell it.
    Right now used copies are going on certain Auction web sites for $39 and less.
    The trade in values of games tends to go down pretty fast.  Especially those that were huge sellers.  Lots of them out there.  And lots of people have finished and are looking to unload.

  • How can I get and change the values of Withholding tax grid in MIRO trx

    Hi everyone,
    I have a requirement where I need to get and change WT_WITHCD field in MIRO's Withholding tax grid. Is there a function module / Badi to do this? I used MRM_HEADER_CHECK, but the parameters related with this badi doesn't have this value.
    Do you have any idea?
    Thanks in advance!
    Regards.
    Leo.

    Hello Leonardo,
    You can change that table with help of the filed-symbol in the BADI MRM_HEADER_CHECK.
    LOOP AT ti_drseg INTO ls_drseg. 
      lv_index = sy-tabix.
      LS_DRSEG-MWSKZ = 'I0' . " < For example
      MODIFY ti_drseg FROM ls_drseg INDEX lv_index.
    ENDLOOP.
    FIELD-SYMBOLS: <drseg> TYPE mmcr_tdrseg.
    ASSIGN ('(SAPLMR1M)ydrseg[]') TO <drseg>.
    <drseg> = ti_drseg[].  " this will modify the data in MIRO with your modified data
    Regards,
    Naimesh Patel

  • How to generate controls dynamically based on value stored in database using mvc4?

    In my database, i have a field called control_ids corresponding to  text box, dropdownlist, radiobuttonlist etc. My goal is to
    create controls dynamically based on value of control_id-field in table. Anybody please help me how to create the controls dynamically in MVC 4 for this scenario.

    In your view you could do something like that:
    foreach (var field in Model.FormStruture.fields)
    <div class="editor-label">
    <label for="@field.Name">@field.Descricao</label>
    </div>
    <div class="editor-field">
    <input class="text-box single-line" id="@field.Name" name="@field.Name" type="text" value="@field.Valor" data-rules-required="@field.Mandatory.ToString().ToLower()" data-rule-number="@field.Tipo.Equals(SiB.OCR.Documentos.Modelo.TipofieldDocumento.Numerico).ToString().ToLower()" title="@field.Descricao" />
    </div>
    if (!String.IsNullOrEmpty(field.Format))
    @:<script type="text/javascript">$("[email protected]").mask("@field.Format");</script>

  • How to generate a text file with values from internal table

    hi,
    can anybody help me out to get the values from different internal table written into a text file.
    regs,
    raja

    used gui_download,ws_download,cl_gui_file_save.
    data: ld_filename type string ;
    ld_filename = 'c:\demo.txt'.
    DATA: begin of it_datatab occurs 0,
    row(500) type c,
    end of it_datatab.
    HII
    call function 'GUI_DOWNLOAD'
    exporting
    filename = ld_filename
    filetype = 'ASC'
    tables
    data_tab = it_datatab[]
    exceptions
    file_open_error = 1
    file_write_error = 2
    others = 3.
    gui_download

  • Using ADF Security user in role context to change field value

    Hi I was wondering if it was possible to change an input text field value depending on the ADF authentication login values.
    So if the user in role is manager value is dino2dy if it's Boss its Frank Nimphius.
    My idea is that I want the field user to be read only so no one could change it, but since it's a foreign key in the table I need to have values in it for committing to the database.
    Since different users will be accessing the application I want every user to have his user name automatically entered into a read only field. Then commit that value into the database.
    I have ran into some problems so far, as if I put in a straightforward value in a field, and make it read only, when committing I get an error User field needed. As if the field is empty even though I can see the value on the page.
    Hope you guys can help

    Yeah I have tried that but I can only use it for true or false values, I do not know how to use it to change a value. I ve used it to make something read only or disabled depending on the user in role.
    It still wont work if I change the value in the field. It has to be the database value thing in there. As soon as I change it it starts giving me the you need Korisnik error. But I cant put it as a default value in the database because it defeats the purpose.

  • 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 show Append Changes previous value in text box during edit

    Hi,
    I am using multi text column with append mode, all feature of append mode is working fine,but when any other field has been changed on that time append text box take blank value.
    when using same list with ssrs ,report shows the current data,but after approved by manager current item change in blank and current data come in history.
    is any way to do ,if any body change the any item same data appear during edit time in same column.
    Hasan Jamal Siddiqui(MCTS,MCPD,ITIL@V3),Sharepoint and EPM Consultant,TCS
    |
    | Twitter

    Hi  Hasan,
    According to your description, my understanding is that the multi text column with append mode is not working fine in your SharePoint 2010.
    For reproducing your scenario, I created a new custom list , turned on its version  feature and added a multi text column with append mode. But it was working fine when I change the values of both the
     multi text column and other columns.
    For your issue, could you create a new list to verify the multi text column with append mode  works correctly.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to avoid delay during analog output generation by changing its frequency?

    Windows XP
    LabVIEW 7.1
    PCI-6036E + BNC-2120
    Hi,
    I am going to create a vi to generate an engine speed sensor signal (a simple square wave with specific missed pulses, in my case 58 pulses “teeth” and 2 missed pulses “missed teeth”) as an analog output but in addition give me the opportunity to control parameters for example frequency online to simulate the engine speed changes during running that vi. For this purpose I have started with “Continuous Generation.vi” which is available in NI Example Finder under the following path:
    Hardware Input and Output > Traditional DAQ > Analog Output > Continuous Generation.vi
    Then I modified it towards above mentioned goal, all related vi s are attached. The main vi is: "Motor Signal Generator_1.12.vi"
    At the first try it looks that it works properly but when have a look on that more accurately with Oscilloscope (fortunately I have a good one: Agilent 54621A – 60 MHz, 200 Ms/s) obviously there is a gap (delay or Jitter) whenever I change the engine speed. It is also attached in Signal generation_problem report.doc file.
    Note: Small gaps are OK and related to predefined missed teeth but the big one is happened during changing engine speed.
    As far as I understand it is related to the time which case structure in AO C-GEN sub-vi needs for AO reconfiguration each time after changing the engine speed (update rate). How can I get rid of this delay or gap during signal generation and generating completely continuous signal?
    I have to mention that obviously I changed the frequency by changing the update rate. The other possibility is to change the number of updates in one period (refer to "generate arb frequency.vi" in NI site: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E48F56A4E034080020E74861) which resulted in no delay however then I can not change the frequency continuously but step by step (for example jump from 5Khz to 2.5KHz immediately) and this can not pass to my application.
    Any hint is appreciated.
    regards
    Attachments:
    Signal_generation_NIsupport.zip ‏81 KB

    Hi Roozbeh,
    The following example will allow you to vary the pulse train frequency during run time.
    Thanks,
    Lesley Y.
    Attachments:
    GenDigPulseTrain-ChangingSpecs.vi ‏75 KB

  • How do I configure a counter to generate pulses using DAQmx?

    How do I configure a counter to generate pulses using DAQmx?
    Is says in the DAQmx C reference help
    "CtrnInternalOutput—The signal at this internal terminal is where the pulsed or toggled output of the counter appears. The output of a counter pulses or toggles when the counter reaches terminal count. When counting down, the counter reaches terminal count when the count reaches zero. When counting up, the counter reaches terminal count when the counter rolls over. To configure the counter to toggle or generate pulses, use the Export Signal function/VI with Counter Output Event as the signal name."
    I've tried this but can't get it to work, I may have the parameters wrong or something. The DAQmxExportSignal() function is very unintuitive to me. Here is my counter config code...
    int ret = 0;
    ret = DAQmxCreateTask("",&task_);
    errorMsg(ret);
    if (ret != 0)
    throw ret;
    // Configure the counter
    ret = DAQmxCreateCOPulseChanTicks( task_, "Dev1/ctr0", "", "/Dev1/PFI8", DAQmx_Val_Low, 0, divider, divider );
    errorMsg(ret);
    ret = DAQmxCfgImplicitTiming( task_, DAQmx_Val_ContSamps, 1000 );
    errorMsg(ret);
    // Change to pulse mode
    ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    errorMsg(ret);
    // Start the counter
    ret = DAQmxStartTask(task_);
    errorMsg(ret);
    The above code works fine, in toggle mode, if I just comment out the DAQmxExportSignal() part.
    HELP!!!
    Stefan

    The problem is due to the DAQmxExportSignal call.  By default, when you create a counter output pulse train task, the driver will automatically set the output of the counter to toggle when the count for each high ticks and low ticks expire.  The driver also automatically routes the signal present at Ctr0InternalOutput terminal (the output of the counter internal to the device) to the Ctr0Out terminal (the I/O pin available externally).  Using the line
     ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    will tell the driver to tristate the Ctr0Out terminal and not output the signal to the external I/O pin.  Using the DAQmxExportSignal function is generally only useful if you want to route the signal to some other terminal internal to the board without having the output show up on the external connector, route the signal to some other external pin other than the default pin, or if you want to have the output show up at multiple locations. 
    If you want to change the output behavior from toggle to pulse, you need to use the DAQmxSetExportedCtrOutEventOutputBehavior function.  However, this is generally only useful if all you care about are edges (not the duty cycle of the pulse train), and you want to generate higher frequency signals.  For example, with a 20 MHz timebase as the source of your counter, you can only generate a 5 MHz pulse train by default.  This is because the minimum value for the low and high ticks parameter is 2 (20 MHz / 4 = 5 MHz).  By changing the output behavior form toggle to pulse, you can generate a pulse train at 10 MHz since the output is now pulsing instead of toggling.  However, the width of each pulse is not programmable so you will no longer have a 50% duty cycle signal.  I don't remember exactly what the width of each pulse is, but I believe it's in the neighborhood of 50 - 100 nanoseconds in width.  I hope this information helps.

  • How do I modify an arbitrary component value during a simulation?

    I am a new Multisim user, beginner SPICE user, but with some undergrad and graduate EE coursework, and some "real world" experience, but I don't pretend to be an EE by long shot. 
    I am moving to Multisim from a competitor. In the competition, I can open a tab with all the components in the schematic and their values, including various SPICE model parameters  and can modify these while the simulation is running. 
    For example, I can change a resistor without adding a potentiometer. This affords much quicker simulation response and keeps the schematic very clean and clear.
     Can Multisim do this? I have not been able to find any information regarding this interactive control of component values and SPICE parameters while a simulation is running.
    David
    David M. Ingebretsen, M.S., M.E.
    Collision Forensics & Engineering, Inc.
    [email protected]
    www.CFandE.com

    Yes. The software is B2 SPICE by BeigeBag software:
    http://www.beigebag.com/
    Attached is a grab of the "properties" tab for modifying parameters during the simulation. It is very easy and useful. Since teeh components are "static" it doesn't add to the overall simulation overhead. I'm not sure how the author actually programmed this feature, but it is useful as you can add standard fixed components and simply change the value of any component in the circuit during the simulation.
    David M. Ingebretsen, M.S., M.E.
    Collision Forensics & Engineering, Inc.
    [email protected]
    www.CFandE.com

Maybe you are looking for