Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function Generator using PMAC
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,

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
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
close                                ;close written buffer, program one
The best way to get a sine wave output would be to setup the PMAC as an “Open-Loop Microstepping” motor. This will use two of the PMAC DAC outputs. There is a complete description of this setup described in the PMAC Users Manual. It is in the section titled “Open-Loop Microstepping Commutation” starting on page 99 (electronic page 119).

Forum Jump:

Users browsing this thread: 1 Guest(s)