Its been a while since I've been this stumped. I have a Micrologix 1400 which is used to drive a digital pump. Every pulse moves a fixed volume of liquid, so if I feed it an output of 10Hz I know the mL/minute being moved. The timing has to be spot-on or it becomes wildly inaccurate. At first I was using timers to pulse the output but I had issues with accuracy and after I put it on a scope I saw that there was a lot of jitter depending on what was going on in the program. Then I discovered the PWM instruction, and it is AMAZING when checked at the scope.
The problem? The PWM file has a DINT input for frequency but I need to use fractionals, no more than 1/2 Hz increments (from 0 to 10 Hz). I've looked at the other instructions available but I just don't know where to go. Has anyone ever run into this before? I've been thinking about using interrupts but after looking at the execution priority I don't think that it will work.
The problem? The PWM file has a DINT input for frequency but I need to use fractionals, no more than 1/2 Hz increments (from 0 to 10 Hz). I've looked at the other instructions available but I just don't know where to go. Has anyone ever run into this before? I've been thinking about using interrupts but after looking at the execution priority I don't think that it will work.