Hello guys,
I am totally new with PMAC. I have PMAC1 Lite PCI.
And, I am just wondering how to generate a sine wave of high frequency (more than 1kHz is good) without a coarseness, and the output voltage is between 0V and 10V. Actually, I already built a code but it is not still satisfied for me. My code is only satisfied for low frequency ranges. Because, I want to drive a piezo actuator in open-loop condition with sine wave of high frequency more than 1kHz using PMAC.
Any suggestions are very welcome!
Best Regards,
Rendi
close ;close any buffer opened
delete gather ;erase unwanted gathered data
undefine all ;erase coordinate definitions in all coordinate systems
M102->Y:$C003,8,16,s ;address
open plc 1 ;open buffer to be written
clear
P10=16383 ;define V=5Volt of 16bits
P11=1000 ;frequency multiplier
P12=360/32767 ;increment, 360 degree is devided by 16bit of 10volt
P13=0 ;starting point
While (P13 !> 360)
M102=cos(P11*P13)*P10+P10 ;output 0V to 10V
P13=P13+P12
EndWhile
close ;close written buffer, program one