Consulting

Results 1 to 7 of 7

Thread: Voltage Ramp

  1. #1
    VBAX Newbie
    Joined
    Aug 2008
    Posts
    5
    Location

    Voltage Ramp

    I am trying to write a simple excel VBA program that ramps up to a voltage inputed into an excel cell but also has an input for it defining how long it will take to reach said voltage.

    I am doing this on a Agilent 33120A which is usually used for waveform arbitration but I know can also do this.

    I haven't found any sample code that relates to this task. If anyone could help me out that would be great.

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Tex,
    Welcome to VBAX
    I've moved your post to the Exel forum.
    Sound fairly technical, so the more information/example you can provide the better.
    You can post a sample workbook using Manage Attachments in the Go Advanced reply section.
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Newbie
    Joined
    Aug 2008
    Posts
    5
    Location
    Thank you, basicaly what im trying to get here is that when you put a time say 100 seconds into the time= cell and say 5volts into the voltage=cell and press start. It will send that to my test equipment but it would make it take 100 seconds to reach 5volts slowly ramping up. (making the equipment read the sheet and respond)Setting up the equipmet connection I think I have. I have columns for other things on my sheet but I think I have those covered. There is some sample VBA embedded, but I can't figure this out as far as where to even start with code that increments the voltage over a set time.

    Really you could look at the example as if there were only the voltage and time input with the start button to make it easier.

    Edit: I put in a different example that may be closer to what I need. You could add in inputs for time and voltage that it would ramp to and stop at.
    Last edited by tex; 08-06-2008 at 07:56 AM.

  4. #4
    VBAX Newbie
    Joined
    Aug 2008
    Posts
    5
    Location
    This one may actually be closer as it sends data to the exact equipment im using. Only missing of course is a set voltage and time input with the requirements mentioned above.

  5. #5
    VBAX Expert
    Joined
    Aug 2007
    Location
    Windermere, FL, a 'burb in the greater Orlando metro area.
    Posts
    567
    Location
    Tex,

    What is the smallest time increment that your device recognizes? Your example shows a 4 sec increment. The shorter the interval the more the voltage will approximate a curve and the less it will look like a step function.

    Cheers,
    Ron
    Windermere, FL

  6. #6
    VBAX Newbie
    Joined
    Aug 2008
    Posts
    5
    Location
    Good point, I actually did not think of that. I believe it increments in 1 second intervals. I can't find anything saying it will do less than that. Also, I have been configuring it for RS-232 communication until I recieve my GPIB card.

    My attachment is what I have thus far. I'm deleting the part where it says output is 5v etc etc..And would like to know how to make that variable. And I think a possible way to do a timed ramp could be with the rise time function somehow. Still working to complete this. Thanks. If anyone knows of how to do these things or has a link to some sample code that can do any of these things don't hesistate to holler.

    Further, it should be known that the basis for this excel sheet was ripped from an Agilent example program that they provide. I went with it because it sends data to an instrument and has a interesting rise time feature.You can modify these if you want and some of the fearures on the sheet that don't really have anything to do with the set voltage/time ramp may be removed later.
    Last edited by tex; 08-06-2008 at 02:48 PM.

  7. #7
    VBAX Newbie
    Joined
    Aug 2008
    Posts
    5
    Location
    I'll be working on this some more today...So if anyone knows any links to sample code related to what I need don't hesitate to post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •