• Post Reply Bookmark Topic Watch Topic
  • New Topic

Power Supply Extension With Rampin  RSS feed

 
delilia hedonist
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

i was reading through forum, i must say that i really like it and i am searching for help for my problem.

Power Supply Extension With Ramping.I must do controlling the current. This basic design can be extended to set the output current to predefined values making each change on constant predefined time interval.
How can i do this:Implement the PowerSupply interface and extend it with the ramping capability to get the RampedPowerSupply?
And this:The required PowerSupply interface is given as in java specification:

boolean on()
Will turn the power supply on.
boolean off()
Will turn the power supply off.
boolean reset()
Will reset the power supply.
double get()
Will return the current that power supply gives out.
void set(double value)
Will set the current in the power supply to the given value.

void loadRamp(double[] rampValues)
Loads ramp values given as an array of double values.
void startRamp(int msecs)
Ramps in time intervals with duration of msecs.

Or
only with power supply:

-constructor
-destructor
-main method (which will light power supply, set the currency on 5, read the currency and write out in System.out)
-property's of power supply(current = double, status = on/off)
-implement on (status = on)
-implement off (status = off)
-implement set in get

But i have no idea what constructor&destructor means and what do the main method and property and implement...???

I did this, but i think that isn't ok, because i must only do it with power supply with dest., const., main methods,.....

public class RampedPowerSupply
implements PowerSupply
{
public boolean on()
{
//write code to turn the power supply on.
}
 
public boolean off()
{
//write code to turn the power supply off.
}

public boolean reset()
{
//write code to reset the power supply.
}
 
public double get()
{
//write code to return the current that power supply gives out.
}
 
public void set(double value)
{
//write code to set the current in the power supply to the given value.
}

public void loadRamp(double[] rampValues)
{
//write code that Loads ramp values given as an array of double values.
}
 
public void startRamp(int msecs)
{
//write code that Ramps in time intervals with duration of msecs.
}
}


Please help me.Thank you for your help.

 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read the important administrative private message I am about to send you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!