The logic to control of a VFD with a PLC will depend on the interface you have with the VFD. Modbus RTU? Modbus TCP? Profinet? Profibus? Hardwired? And it will also depend upon the VFD hardware you have.
Regardless of the interface, once you have configured the hardware, there will be addresses assigned to the memory area that holds the values of frequency setpoint and frequency feedback (both analog signals) and the start/stop command bit.
With some complex drives, like the Siemens MicroMaster4 drives, there are other important status bits and commands that need to be set or acted upon, which makes the logic more complex as well.
In general, when starting a VFD, insure that the alarm status bit or code is off or zero. If not, toggle the bit for alarm reset. Then set the speed reference corresponding to the desired speed. Set the start bit. Depending on the drive, this may need to be latched on to keep the drive running or may be a toggled bit as well. Monitor the speed feedback and run status bit to insure the drive has started. Stopping the drive usually just requires resetting the start bit or toggling a stop command bit.