Your question is not specific so my answer can't be very specific. Yes you can control the motor, but it is done through a digital drive. In order to use a PID control you need a feedback signal of which ever variable you wish to control. i.e. speed, current, etc.
In the case of speed, the PLC will need to know what speed the motor is running.(Feedback) It will also need to know the desired speed.(set point) The PID instruction determines what action will be required to get the current speed to match the desired speed.
Various settings on your digital drive will also be set to get the proper feedback signal from the drive to the PLC and the set point signal from the PLC to the drive.
I hope that this answers your question.