Step function

I have created a step function using a case structure within a while loop using shift registers. (I'm sure this probably isnt the best way to make a step function but its the only way I know how) Anyways I have two questions regarding my step function.  First: How do I make the function start at 0 each time I start the program? If I stopped the program at 4, it will begin at 4 when I restart the program.  I want it to begin from 0 next time I restart the program, even if I stopped it at 4 the previous run.  Second: The graph of my step function looks like a sawtooth wave rather than a step function because it is only taking one measurement before moving on the the next step.  How do I get it to look more like a step function? I have attached the VI of my step function.  I would also appreciate it if somebody shows me how to make a step function in a more efficient way. I know there is a step function VI but I could not figure out how it works.
Attachments:
Step function.vi ‏14 KB

I found this on the forums a while ago and I am actually using it in a project right now. So, I can't take credit for coming up with this. I definitely suggest doing a search before posting, because often times your question will already be answered. This essentially does a ramp pattern, and uses rounding of decimals to round the numbers off to a flat line if you're between two step values. You can find the ramp pattern VI in the palettes. 
CLA, LabVIEW Versions 2010-2013
Attachments:
stepfunction.png ‏5 KB

Similar Messages

  • Auto Step functionality in Oracle Forms?

    Hello,
    I am testing Captivate for possibility to capture test
    scenarios for testing in Oracle. I know Captivate has the ability
    to create auto steps from Internet Explorer to automatically create
    captions that contain text describing your actions.
    Is this functionality available in Oracle Forms? I have
    tested it many times and Captivate seems to only be able to create
    auto steps from the browser and not create any from Oracle. It
    still captures everything properly, but not the auto steps. We are
    planning on printing these steps for ease of the user, and thus
    would like to have the steps in writing as well.
    This is what the Captivate Help file says about Auto Text:
    "Use the AutoText Captions feature to automatically create captions
    that contain text describing your actions. Customize the
    appearance, size, orientation, position, and display speed of
    captions, including font, size, color, and text formatting. Before
    recording, choose the caption type and language, or create and
    import your own caption style. Adobe Captivate 3 generates caption
    text in many languages."
    Thanks a lot.
    -Zeb

    Welcome to our community, Zeb
    At first, you really bowled me a wobbly with the description
    of "auto step functionality".
    It's been my experience that Captivate's ability to properly
    recognize elements of an application are pretty much hit and miss.
    To be honest, I'm surprised that it does as well as it does. But
    that's with normal desktop applications. Toss in something that's
    browser based (as your situation seems to be) and I'm surprised it
    works at all.
    I'm sort of stabbing in the dark here, as I'm not an
    application programmer. But I'd guess that what is happening is
    Captivate is only sensing an object in the browser and it has no
    idea as to how to interpret the fields and whatnot that make up the
    object.
    I know it's a nice feature when it works. However, I do hope
    you are aware that you aren't limited to what Captivate gives you
    with this. You are totally able to insert your own Text Captions at
    any time on any slide by clicking Insert > Text Caption.
    Cheers... Rick

  • How do I fit to a step function?

    Hi,
    I'm using the Levenberg-Marquard algorithm to optimize a fit to some data.  I would like to fit to a step function, but when I try to do this with simulated data, the algorithm is not at all responsive to optimizing the position of where the step occurs.  (It simply returns the initial guess position of the step location, rather than optimizing it.)  I have tried using both the step(x) and sign(x) functions but both have the same problem.  Does anyone have any experience with this? 
    Cheers,
    Nancy

    The problem is with the partial derivatives for the position parameter. If the position changes less than the point spacing, the partial derivative with respect to that parameter is always zero.
    I have quickly hacked the ABX subVI to use something larger than the x spacing of the points as increment for the partial derivative (instead of 1e-6), and it converges just fine after that if the initial estimate is reasonable. (See image). Still, I recommend to not do that!
    Follow Lynn's advice.
    Message Edited by altenbach on 05-10-2006 01:01 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    LevMarStep.png ‏205 KB

  • Can any one send link to learn the step by step functionality of GL

    Can any one send link to learn the step by step functionality of GL

    Hi,
    "Oracle General Ledger User Guide" manuals can be found at:
    Applications Releases 11i and 12
    http://www.oracle.com/technetwork/documentation/applications-167706.html
    Thanks,
    Hussein

  • Automator step function bug in Lion

    Thought I would try reposting this problem to see if anyone can help.  I just upgraded to Lion from Snow Leopard and now when I create a workflow in Automator the Step function on the Automator GUI does not work.  I am able to step through the first action in the workflow, but then the Step icon becomes inactive and the status line at the bottom of the Automator window says "Running."  This happens on two different machines that were upgraded to Lion and it happens for a brand new user account as well.  It occurs even using newly created, *very* simple, two-step workflows.  Is there a way to completely reset or reinitialize Automator so I know this is not just some kind of configuration bug?
    Here's the related thread: automator perpetually running on second action
    Thanks!
    Dave

    See my reply in the other thread.  I'm convinced there is an Automator bug in Lion which broke the Single Step through a Workflow functionality.
    See: https://discussions.apple.com/message/18033972#18033972

  • Step function of Fluke PM28xx

    Hi,
    I have a technical question about the Fluke PM2813 programmable power supply. I use this device in a test environment that is controlled by a computer via the GPIB bus.
    Here it is: What do I have to do if I want one of the outputs of the Fluke to ramp up from 0 to 5V and I want to hold the voltage on the other outputs constant during this ramping. The problem is when I use the step function to ramp up one channel, the other channels also change.
    I know I can read the output of the other two channels and copy that value to the necessary memory locations before ramping but that way takes about 11 seconds before all GPIB commands are processed and the actual stepping begins. That way to long...
    Is there another way to accomplis
    h this in a much shorter time?
    Thanks,
    Sven Callewaert

    Hi Sven,
    I'm not familiar with this particular instrument, but seems like something you should be able to find in the documentation for the instrument.
    Are yo using an instrument driver?. What programming enviroment (CVI, LabVIEW)?
    DiegoF
    National Instruments

  • Create a stair step function

    I need to create a stair step analog function to control a galvonometer.  I am trying to scan a small chip with a laser.  I have one galvo to move side to side and one to move down the chip.  I currently use a triangle wave on a rising slope but this causes the system to zig-zag across the chip.  I would much rather have the side to side galvo scan straight across the chip.

    Hello Landauer,
    Could you please elaborate as to how you are using the PCI-6229 to achieve this and why it is a problem to have the "side to side galvanometer" scan straight across the chip.
    Thank you,
    Raajit Lall
    Applications Engineer
    National Instruments
    Raajit L
    National Instruments

  • Grade and Step Functions and Participation Process

    Hi there,
    I have a business requirement to automatically promote employee to a higher grade step from the current step every 2 years from the original hire date.
    I did a grade ladder and defined the pay scale for the 22 required step.
    What must be the required set up?

    Try this query
    select pspp.assignment_id,pps.name, psp.spinal_point, pg.name "Grade",peevf.screen_entry_value
    from per_spinal_point_placements_f pspp,
         per_parent_spines pps,
         per_spinal_points psp,
         per_grade_spines_f pgs,
         per_grades pg,
         pay_element_entries_f peef,
         pay_element_entry_values_f peevf,
         pay_element_types_f petf,
         pay_input_values_f pivf
    where pps.parent_spine_id = pspp.parent_spine_id
    and psp.parent_spine_id = pps.parent_spine_id
    and pgs.parent_spine_id = pspp.parent_spine_id
    and pgs.grade_id = pg.grade_id
    and pspp.assignment_id = peef.assignment_id
    and peef.element_entry_id = peevf.element_entry_id
    and peef.element_type_id = petf.element_type_id
    and petf.element_name = :Element_Name--'Basic Pay'
    and peevf.input_value_id = pivf.input_value_id
    and peef.element_type_id = pivf.element_type_id
    and pivf.name = :Input_Value_Name--'Initial Basic'
    and trunc(sysdate) between pspp.effective_start_date and pspp.effective_end_date
    and trunc(sysdate) between peef.effective_start_date and peef.effective_end_date
    and trunc(sysdate) between peevf.effective_start_date and peevf.effective_end_date
    and trunc(sysdate) between petf.effective_start_date and petf.effective_end_date
    and trunc(sysdate) between pivf.effective_start_date and pivf.effective_end_dateHTH
    Not Tested

  • ME05 How to schedule source list job with steps?

    Can someone please give me instructions on how to create source list ME05 in background using "Steps"? I know how to create a background job in ME05 but need to have several jobs run back to back in the middle of the night. I am reluctant to shedule them at different times and would prefer to use the "Steps" function. Thanks for your input!

    Hello
    Steps:
    First create variant for the report in normal execution mode (to provide input selection parameters in backgrpund)
    1. Transaion code SM36
    Give Job name you want created (Give some meaningful name) and Press enter
    2. Give the ABAP program name
    3. Select variant and save the selections
    4. Come back to initial screen , select the Start condition button and provide the interval as per requirement to schedule the job and save.
    5. Save the job.
    Check the Job in SM37 and relase the Job.
    warm regards
    Rama

  • How to calculate average of step-shaped waveform?

    hello, i have analog waveform which looks like an incremental step function... the step increments in fixed time duration of 'x' sec, and stays at a near constant value, but has some noise
    (ex. attached image)
    i would like to find out the average of values in each step... 
    can anyone please suggest any algorithm?
    thanks,
    Now on LabVIEW 10.0 on Win7
    Attachments:
    Untitled.jpg ‏6 KB

    I did something like this in my Matlab days. I can give you a general idea on how I accomplished it.
    1) Take the derivative (or point by point subtraction) and scan that derivative for a positive threshold. This will be the first jump in voltage, or hopefully the start of the first step.
    2) Now, if you know the exact size of each step, you know the start/stop of each step. However, you likely want to only grab the center. If you get too close to the transition points, you scew your results. These centers can be calculated as Center Time = Start Time + Step Length* (N+1/ 2).
    3) Now that you have the center of your step. You want a percentage of the total step (again, don't want transitions). You can get the start and stop of an individual step. Start and stop times = Center Time +/- Percentage/2 * Step Time.
    4) Average the points between the times.
    Josh
    LabVIEW CLD
    Software is never really finished, it's just an acceptable level of broken

  • Illustrator CS3 - gradient function questions...

    Ok...I'm trying to maintain my cool....this is Soooooo easy in CorelDraw.
    I am simply trying to create a gradient in a vector shape in my file using samplings from two different colors that are currently in this same file.
    I simply want to copy a color from my file onto the gradient color dot on the left of the gradient slider.... and copy/drag a second color from my document onto the second color dot of the gradient slider.
    This works if you're using one of their gay pallets...but I can't seem to figure out how to take a sampling from within the file itself
    Why is this such a chore?
    Is it possible?
    Please describe in detail if you would so that my feeble mind can comprehend this.
    Thanks for your assistance.
    The Big Fish

    Nevermind.... I figured it out. Talk about a retarded way of doing things. :-(
    Another multi-step function that shouldn't be.

  • Generating a gate function

    Hi!
    I have read the postings but not related to mine though appear similar
    Moreover, i knew that there is a simulation for step signal. But, i cant use it. The graph is in waveform chart, whereeas I want it to b in waveform graph.
    How to generate a tunable output gate function and with control over initial time and final time?
    tuneable means controllable time domain.
    1) By the Use of the step function.vi
    Please help...

    i still dun have it.
    Attachments:
    Untitled 12.vi ‏24 KB

  • Write Progress through Whole Script (instead of Timer or through per function)

    Hello Team,
    Is it possible to use the write-progress to begin a the top of a script and run through each function of the script (instead of a timer or per function) and at the end of the script complete?
    For example, here I use a timer:
    for ($i =1;$i = le 100; $i++)
    function sWriteLogInformation
    out-file
    -FilePath $strLog
    -Input Object
    -Append: $true
    -Confirm:$false
    -encoding "Unicode"
    Write-Host -Object $strText
    Get-Process $ProcessName -ErrorAction SilentlyContinue
    If (-not $?)
    strText = "Application is not running."
    Write-Host $strText
    Else
    Stop-Process -processname $processName
    write-Host "Application Closed"
    Write Progress -Activity "Please wait..$strText" -status "$i% Complete" -percentComplete $i;
    start-sleep milliseconds 50
    But I would rather it go through each of the steps/function in the script and close when finished.
    Any input appreciated.
    Thanks!

    Two suggestions:  
    Move the function outside of the for loop, there's no reason to define the same function 100 times.  It may not be a problem with this script, but with a large data set it will affect performance.  And it's just plain bad practice.
    Move the Write-Progress command to follow the initial for statement so it is displayed immediately instead of after processing the first item.
    As jrv suggested, you can have multiple write-progress statements that provide more information for each step, perhaps like this:
    function sWriteLogInformation ($strText) {
    out-file
    -FilePath $strLog
    -Input $strText
    -Append: $true
    -Confirm:$false
    -encoding "Unicode"
    Write-Host -Object $strText
    for ($i =1;$i = le 100; $i++) {
    Write Progress -Activity "Please wait.." -status "Checking $ProcessName" -percentComplete $i
    If (Get-Process $ProcessName -ErrorAction SilentlyContinue) {
    Write Progress -Activity "Please wait.." -status "Stopping $ProcessName" -percentComplete $i
    Stop-Process -processname $processName
    sWriteLogInformation "$processName stopped at $(get-date)"
    } Else {
    sWriteLogInformation "$processName not running."
    Write Progress -Activity "Please wait.." -status "Inserting artificial delay" -percentComplete $i
    start-sleep milliseconds 50
    Not sure where $ProcessName or $strLog are being defined.  I modified your script to clean it up a bit and remove some unnecessary code.
    I hope this post has helped!

  • After Client copy workflow is functionality is working as old Template

    Hi Experts,
    PO Workflow is working fine in Development and Quality servers,
    Due to some requirement client copy is made from Quality to Development.
    Once client copy is completed the PO workflow is not working as per the current functionality,
    Its working as the Previous four Transports (i.e; ol d Template functionality)
    In workflow Analysis log we are able to see the workflow template flow as the old template flow.
    Recent Activity steps functionality is skipped.
    In quality Server Workflow functionality is fine
    Kindly advise me to solve this Problem
    Thanks,
    Ganesh

    yes i am able to see the recent version in the WF Template by entering through SWDD.
    PO WF worked good in Quality  and Development servers till 3 days back
    once the client copy is made, from Quality to Development.
    In Development server it is working as previous 4 TRs functionality
    able to see the current version template.
    Thanks,
    Ganesh
    Edited by: ganesh yarramsetty on Dec 21, 2009 8:27 AM
    Edited by: ganesh yarramsetty on Dec 21, 2009 8:30 AM

  • WAD - Back one Navigation step

    Hi All,
    Our reports are created on WAD, and we have a requirement to provide the back one navigation step functionality.
    When we do any filter criteria on the row fields, then the back one navigation step is working. But when i drag free charcteristic into rows, then back one navigation step is not working.
    for ex : first i drag A field which is there in the free characteristics to the row in the report level
    and then drag B field in to the row. now if i click back one navigation step, B field should go from the report and A field should be available in the report.
    Thanks and regards,
    Vara Prasad.

    Hi,
    Were you able to find the solution for this?
    Best Regards,
    Chinky Garg

Maybe you are looking for

  • HOW to download The Demo Version of Oracle JD Edwards Enterprise One 9.0,

    Dear Friends, Can any one tell me how to download The Demo Version of Oracle JD Edwards Enterprise One 9.0, for Practice purpose, if you have any links please tell me, and how much capacity of hard disk need to store the same. I am Learning the Oracl

  • External repair of customer equipments

    Hello Folks, Need help on following scenario: Customer returns equipment for repair. Repair has to be done by external vendor. We create a CS-order. Equipment get posted on sales-order-stock. How does the process work to create a purchase order for r

  • Duplicate Condition Record Number !

    Hi Experts, I have a question on condition record number: I have a Material SH00001 in  more than one Sales Orgs. Example: MTD and NTD. 1. Is it possible SAP generates the same condition record number (field- KNUMH) for both sales organisation when I

  • Screen Capture avi - HELP!!!!!!!!

    Hello All. Please someone out there must know the best answer to my problem: I need to create a presentation to be used as a trainning guide. I am flexible (to a degree) on how to do this, although the tools in my bag mean that i have used SnagIt to

  • Firefox options general tab not working

    When I go to Tools > Options, all of the tabs are working except for the General tab, which, if I try to switch to it, just keeps on showing whatever was in the last tab I was in rather than showing the stuff that should be in the General tab. Some k