+ Reply to Thread
Results 1 to 6 of 6

Automation of Output Computations and Plots generation

  1. #1
    Registered User
    Join Date
    08-19-2008
    Location
    England
    Posts
    29

    Automation of Output Computations and Plots generation

    Dear All,

    Can somebody help me out in generating a macro for Automation of Output calculations and Plots generation? Generate Plots of type “XY Scatter with Smooth lines and Markers”.- I have clearly mentioned the requirements in Excel sheet enclosed (Please refer S.No.1)

    Requesting you to please get me an Excel Macro for this.

    Apart from the two components such as Bearing & Bushings calculations shown in the Excel sheet, I have to extend these calculations and plots generation to 20 more components. So, please make provision for the same in VB macros.

    Thanks in advance,
    reachspk123

    (Note: Please do not use Excel cell reference formulae anywhere in the sheet. I request you to perform calculations using VB macros only.)
    Attached Files Attached Files
    Last edited by reachspk123; 07-22-2010 at 02:37 AM. Reason: Previous Title was too long

  2. #2
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Excel VBA Macro required for Automation of Output calculations and Plots generati

    Hi reachspk123;

    As one of the moderator's says "We don't do homework".

    You're asking for too much to be done for you. The forum is here to help you get the job done, not do the job for you.

    If you start the project and run into problems, we are here to help, but you have to get it started. When I helped on the previous thread http://www.excelforum.com/excel-prog...er-inputs.html, you had already designed the forms and I improved what you had already started, and gave you a format to keep designing more.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  3. #3
    Registered User
    Join Date
    08-19-2008
    Location
    England
    Posts
    29

    Re: Automation of Output Computations and Plots generation

    Hi Foxguy,

    Quote Originally Posted by foxguy View Post
    If you start the project and run into problems, we are here to help, but you have to get it started.
    As per your advice, I myself have tried and completed the Automation of Outputs Computation and Plots Generation Please find the attached file <<Powerflow_calculations_AUG02.xls>>. I have written VB code (Module_OP) for Output Computations for one Bearing (TB1) and Bushing1.

    Please refer Functions such as writeBearingInputs(), readBearingInput(), readSpeedRatioTable(ByVal), RunBearingSimulation(), Run_BearingSpinLossModel() for Bearing1 Output Calculations.. Similarly, pls refer corresponding functions for Bushing1 calculation. Please refer 'RunTotalOutputSimulation()' for Total Outputs Calc.. Goto "Plots" worksheet to view the automatically generated Plots (3 Nos.)..

    But now, I got stucked in this particular phase.. i.e., I have to extend the Outputs Calculation Automation Using 'For loops' for 22 bearings & 3 bushings.. Please check and update the code available in "Module_OP" to extend for 'n' no. of 'bearings' and 'bushings' as per user inputs.

    Please help me out to automate the above procedure for 'n' bearings.. I will extend the same for bushings and other components!! So, please make provision for the same in macros.

    Thanks,
    reachspk123
    Attached Files Attached Files
    Last edited by reachspk123; 08-03-2010 at 07:01 AM.

  4. #4
    Registered User
    Join Date
    08-19-2008
    Location
    England
    Posts
    29

    Re: Automation of Output Computations and Plots generation

    Hi royUK,

    As instructed, I have modified the title.. Hope this title should be Okay now..

    Thanks,
    reachspk123
    Last edited by reachspk123; 08-03-2010 at 06:35 AM.

  5. #5
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Automation of Output Computations and Plots generation

    Hi reachspk123;

    I'm sorry, I can not figure out what you want.
    You will have to be more specific.

    I think you want to perform some section of code "n" times. But I can not figure out what section of code.

  6. #6
    Registered User
    Join Date
    08-19-2008
    Location
    England
    Posts
    29

    Re: Automation of Output Computations and Plots generation

    Quote Originally Posted by foxguy View Post
    I think you want to perform some section of code "n" times. But I can not figure out what section of code.
    Hi Foxguy,

    Sorry for not having replied to you sonner as I was trying myself to sort out some of these issues.. but ended up in further troubles.. I have explained below the issues in detail.

    Please refer sheet <<Powerflow_calculations_AUG10.xls>>. Similar to the procedure 'Public Sub readSpeedRatioTable' in 'Module_OP' module, I tried copying Bearings Input data (all 22 bearings) from cells B7:Z12 in "Bearings_InputsDB" worksheet to Cells A1:Y6 in "Raw_Bearing_data" worksheet.(Our present example has 22 bearings). When I click 'Run Bearings model' command button, I am getting an error “Run time error 13 - Type Mismatch”. I could able to understand the reason for this error. It’s because I am trying to store both numeric and strings in an array variable name TB1() declared as “double”. I guess we should try automating the saving of Input Parameters in row format (to avoid data type combinations).
    Please update the macro in copying all Input Parameters data from cells B7:Z12 in "Bearings_InputsDB" worksheet to Cells A1:Y6 in "Raw_Bearing_data" worksheet. Current example has only 22 bearings. But, Macro should also be capable of copying 'n' number of Bearings input data (Bearing nos - 1 to n).

    Please refer sheet <<Powerflow_calculations_AUG02.xls>>. Please find below, a brief discription on each section of code that needs to be performed 'n' times.
    In continuation to the above, (i.e.) once all Bearings Input data are copied from "Bearings_InputsDB" worksheet to "Raw_Bearing_data" worksheet, these input parameters will be processed using the formulae used in procedure "Public Sub Public Sub RunBearingSimulation()". Currently, the computations have been performed only for one Bearing (TB1) and the Output Variables such as ("MeanBearingDia, MinDragMoment, FirstGearBearingSpinLossCoeff, SecondGearBearingSpinLossCoeff, ThirdGearBearingSpinLossCoeff, FourthGearBearingSpinLossCoeff, M11GearBearingSpinLossCoeff, M23GearBearingSpinLossCoeff, M1IGearBearingSpinLossCoeff"), are stored in cells C6:C15 of "Bearings_OutputsDB" worksheet.

    For calculation of total (all 22) Bearing Output variables, presently I have added a constant (which is actually the sum of ouput variables of all other 21 bearings) to the above output variables such as ("FirstGearBearingSpinLossCoeff, SecondGearBearingSpinLossCoeff, ThirdGearBearingSpinLossCoeff, FourthGearBearingSpinLossCoeff, M11GearBearingSpinLossCoeff, M23GearBearingSpinLossCoeff, M1IGearBearingSpinLossCoeff"),
    and the resulting output variables (FirstGearBearingTotalSpinLossCoeff, second, etc.,) are stored in cells D19:D25 of "Bearings_OutputsDB" worksheet.
    The above calculations should be performed for 'n' no of bearings.

    Hope this explanations helps.

    Please update the macros to automate the above procedure for 'n' bearings.. I will extend the same for bushings and other components!! So, please make provision for the same in macros.

    Thanks in Advance,
    reachspk123

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1