You have a few options here. You can either use your Output to generate a Duty based signal, a Frequency based signal, or use a couple of outputs and write your own serial with a data and strobe bit.
Frequency:
There are several methods to write code that generates a pulse on your output (Pick one!). Try to make it as accurate as possible keeping scan times in mind. Your processor and output hardware will limit the range of this frequency, for example 0-1kHz. Use a configurable Frequency to Analogue converter to generate a 0-10V or 4-20mA signal for your drive. Since you're not changing the frequency that often, or quickly; the reaction time isn't critical. I would use something easy like 0-200Hz and scale it 0-10V, so you have a little resolution to play with. It won't be perfect, but it will be usable and you can adjust it to suit.
Allen Bradley 931S-F1C2D-DC
http://raise.rockwellautomation.com...ents.asp?CID=ABEEC947E096459E9EBD163EC2422A7C
Phoenix Contact MCR-F-UI-DC
https://www.phoenixcontact.com/online/portal/us?uri=pxc-oc-itemdetail:pid=2814605
Many brands have similar items.
Duty:
You'll need a VFD with programming capabilities. I know SEW and ABB have drives like this. Create a task in your PLC program that's scanned every 2-50ms (Depending on how quickly you need to change things). Within this task create a counter from 0-100 (0-100% of that period). Turn the output on from count 0 to any upper limit <100, and this will give you a duty. For example 0-50 is 50%, and so on. Write a routine into your drive that uses the same known period (2-50ms) and measures the on-time of the input. From that calculate your duty % in the drive and scale your speed. This won't be entirely accurate, as you'll use up some time in counting/timers. You can use an error correction to fudge this.
Serial:
Again you'll need a VFD with some programming capability. Chose an appropriate clock (I think we've used 50ms). In both your PLC and VFD programs write code for 2 outputs/inputs (You can use more to make it less complex). One is your data bit and one is your strobe bit.
- Hold the strobe bit high for a time longer than your clock. That way the routine in your drive knows this is the start of data transmission.
- Once this goes low, count and strobe your data through the outputs. Every clock cycle is a bit of data you want to shift. I think we currently shift 64 bits, or 2 DINTs. The more you shift; the longer it will take. Just be careful how you use rising/falling edges to strobe and when your data bit changes in relation to your strobe, or you can get some timing issues.
- In your drive write a separate routine or function for the data transmission. When you see the long strobe, it means data is about to transmit from the PLC.
- As the strobe toggles, shift the data bit into a word in your drive and increment a counter.
- When the counter hits the number of bits you're sending (64 for us), check that the data makes sense and then use it to change the drive speed.
- If the counter doesn't reach the number of bits, or the data isn't within acceptable limits, then get ride of it. As an option you can send an output back to the PLC asking for the data again.