The data sheet for the SNAP-SCM-ST2 module (doc 1944) states:
“Pulse Width is equal to one-half the period.”
I do not think you will be able to vary the duty cycle from 50% with it, but maybe there is a clever way to phase control multiple channels and achieve something like PWM. Keep in mind that the pulses are at 5 V with 200 mA max current.
I don’t really understand how the technique on page 134 of doc 1701 gets you to 500 Hz. With an R1 brain, the minimum period (composed of 1 [I]on time[/I] and 1 [I]off time[/I]) is 0.006 s, or 166.7 Hz. The doc states that attempting to create a pair of on and off times that total less that this minimum period will cause the values to be scaled up to the minimum, but maintain the requested duty cycle.
Another thing to keep in mind with the digital output modules is that with a rise time of 100 µs and a fall time of 750 µs, a period much below 10 ms (100 Hz) will create a waveform that is starting to lose its squareness at lower duty cycles, and may not give you the results you are expecting. However, the digital modules provide many voltage options and a higher current limit (3 A), so PWM at slower frequencies looks solid.
I had looked into this because I was interested in using PWM to control the position of a proportional valve. I had concluded a separate PWM drive would be necessary for my application, and found a couple of inexpensive options that could be easily controlled by Opto’s standard analog outputs. You may find what you need by checking out the sites below.