Why a ramp function is performed before running the ground motion in a time-history analysis using ETABS or SAP2000? and what should be the parameters of this function, what it depends on?
You may use this approach to enter the permanent loads as initial condition for NNLIN timehistory: dead loads, prestressing etc. The peak of the ramp function usually has a value of 1.0. If you use NNLIN dynamic time-history for the initial conditions the duration should be such that you achieve quasi-static loading - let say 10 times the fundamental period of the structure.
A good rule of thumb for most FE programs is " like gets combined with like ". In the case of time history analysis, most programs can only accept dynamic or transient type loads. Static loads like dead weight are not included by default because they are the wrong type. To include them in, you have to convert the static load into a dynamic one and this is what the ramp function does - it tells the program that the load is constant over time. Stoyan's answer is pretty much spot on for this as well.
Simply you're telling the software that your loads are not permanent over the time. Instead, they're for a certain duration. When do we need to adopt that? many cases e.g. modelling staged construction, modelling column removal scenarios, dynamic loads in general, etc.