How to control the voltage (0V to 10V) using PWM on beaglebone black board

Hello Experts,

I have a board (with some opamps) which is connected to BBB (P8_13), and want to get 0-10V from that board.

With this code, I’m getting 7V DC from my external board, so how can I write these values 'duty_cycle’ and ‘period’ ??
b.analogWrite(‘P8_13’, 0.7, 2000.0, printStatus);
http://beagleboard.org/support/bonescript/analogWrite

From this entry, I have 'duty_cycle’ and ‘period’ , now what value I need to write here for the above analogWrite code ?
/sys/class/pwm/pwmchip4/pwm1