PWRM_getCurrentSetpoint
Application Program Interface
2-317
C Interface
Syntax
status = PWRM_getCurrentSetpoint(setpoint);
Parameters
Uns
*setpoint;
/* current V/F setpoint */
Return Value
PWRM_Status status;
/* returned status */
Reentrant
no
Description
PWRM_getCurrentSetpoint returns the V/F scaling setpoint currently in
use. The setpoint parameter should point to the location where
PWRM_getCurrentSetpoint should write the current setpoint. See
PWRM_changeSetpoint for a list of valid setpoints.
PWRM_getCurrentSetpoint returns one of the following constants as a
status value of type PWRM_Status:
Constraints and
Calling Context
❏
If a call to PWRM_getCurrentSetpoint is preempted by a thread that
changes the setpoint, the value PWRM_getCurrentSetpoint returns
is the old setpoint and not the new setpoint. If this may cause a
problem in your application, you can disable scheduling around the
call to PWRM_getCurrentSetpoint.
Example
PWRM_Status status;
Uns currSetpoint;
status = PWRM_getCurrentSetpoint(&currSetpoint);
LOG_printf(TRACE, "Setpoint: %d", currSetpoint);
if (status != PWRM_SOK) { /* exit on error */
LOG_printf(TRACE, "Status = %x", status);
return;
}
PWRM_getCurrentSetpoint
Get the current setpoint
Name
Usage
PWRM_SOK
The operation succeeded.
PWRM_EFAIL
A general failure occurred.
PWRM_EINVALIDPOINTER
The operation failed because the setpoint
parameter was NULL.
PWRM_EINITFAILURE
A failure occurred while initializing V/F
scaling support; V/F scaling is unavailable.
PWRM_ENOTIMPLEMENTED
The operation failed because V/F scaling
is not supported.