There are two kinds of PLC output: relay output and MOSFET output. You should have MOSFET output (if it is relay output, you can't output 300Hz pulse signal).
If you use PWM to generate a pulse signal of 300Hz, the duty cycle of PWM will be reversed (inverted output) after adding a buffer with triode or field effect transistor (the original maximum duty cycle is the minimum duty cycle). Solution: One is to modify the program (recommended), and the other is to use in-phase buffer (with two inverses).