well, Java tries to be hardware independent because its goal is to work on all systems easily, unless the you make your own API for your controller then it's probably not possible. C might be able to do it but you have to remember that these are high level languages, if you want to program this you'd most likely need to use assembly or basic, you should be able to search what brand of PLC you have and you will find what language to use