First, output isn't PWM, but is instead a nominal 50% duty cycle pulse with a rather wide tolerance range.
1. Select a PLC input card capable of reading the flow sensor.
Voltage:
Data sheet specifications are stated rather oddly, but 5V to 18V appears to be the nominal operating voltage range.
Frequency:
Again, the specs don't quite add up, but it seems pulse output frequency is 98 times the flow rate in LPM.
If true, at 6 LPM pulse frequency will be 588 Hz. The card must be able to read frequencies at least this high.
It has been a while, but I recall PLC input card specs are expressed in terms of minimum on time.
Pulse duty cycle is specified as 50%, +/-10%, but the drawing gives it as a range of 40% to 60%.
You'll want to make a spreadsheet for calculating expected pulse frequencies, and worst case pulse on times for the flow rate range. Cycle time is the reciprocal of frequency. If output frequency is indeed 588 Hz at maximum flow rate, then the total period is 1.70 milliseconds, and pulse on times may range from 0.68 ms (at 40% duty cycle), 0.85 ms (at nominal 50% duty cycle), to 1.02 ms (at 60% duty cycle).
View attachment 250458
basic parameters
1, the lowest rated working voltage DC3.5V-24V
2, the maximum operating current of 15 mA (DC 5V)
3, the working voltage range DC 5 ~ 18 V
4, load capacity =10 mA (DC 5V)
skills requirement
1, the output pulse high> DC 4.5 V (input voltage DC 5 V)
2, the output pulse is low <DC 0.5 V (input voltage DC 5 V)
3, precision (Flow rate - pulse output) 0.3 ~ 6L / min ± 3%
4, the output pulse duty cycle of 50 ± 10%
5, the output rise time 0.04µS
6, the output fall time 0.18µS
7, flow - pulse characteristics proficiency test pulse frequency (Hz) = [98 * Q] ± 3% (proficiency testing) (Q is flow rate L / min)
A monkey in the wrench is the supplied flow to pulse reference table.
View attachment 250462
It doesn't show values at either the low or high end of the rated flow range (from 0.3 LPM to 2.0 LPM, and 5 LPM to 6 LPM), which makes me wonder whether the sensor has usable linearity in these ranges.
Stranger still, if pulse frequency is 98 * LPM, it holds true at 2 LPM, but pulse impact (frequency?) is shown
going down from 2.1 to 2.7 LPM, and the value of 365 at 5 LPM is far lower than 98*5 (490).
I'm either misunderstanding something, or these specs don't make sense.
2. Power the flow sensor with an appropriate DC supply, which depends on sensor spec (5 to 18 V), and what the PLC input card you've selected.
3. Connect sensor IN to the DC power supply (+) terminal, sensor GND to the power supply return, and sensor OUT to the desired PLC card input terminal. If the DC supply is external to the PLC, then the supply DC common must be connected to the PLC input card DC common.
View attachment 250463
4. PLC programming
Carefully read the manuals for the PLC you intend to use. The basic idea is easy - count the number of pulses for a given time (per second, for instance), and scale it in engineering units (LPM, GPM; whatever is needed).
Keep in mind PLC scan time. If it takes the PLC 1 ms to read inputs, work the logic, and update the output table, and sensor pulse width is also on the order of 1 ms, then using a general purpose DC input module isn't going to work very well (or at all).
Some PLCs have a programming feature to refresh I/O tables whenever a particular input change state from lo to hi, but a better approach is to use a DC input card designed for high speed devices (encoders, etc). Details vary, but the gist of it is they do most of the heavy lifting (counting the pulse train, etc) so the PLC itself doesn't have to, and populate the output table with the count value (or perhaps a value scaled in engineering units).