I have never used iPad. I am completely new to iPhone and iPad application development. I have a robot which can listen to commands sent to it via serial communication or through Xbee.
Can someone tell me if it is possible to write an iPad application that can send commands through COM port?
Short answer is no.
Long answer is maybe. The dock connector pinout suggests that there might be usable serial port hardware:
http://pinouts.ru/PortableDevices/ipod_pinout.shtml
but you will probably need access to the Apple MFi program to use it:
http://developer.apple.com/programs/mfi/
I don’t have MFi access and can only speculate that it might be possible.
Another option is to use the audio connector, though this has its own problems:
http://arstechnica.com/apple/news/2011/01/project-hijack-uses-iphone-audio-jack-to-make-cheap-sensors.ars