About pain...
You trip and hit your foot hard. Do you know that something has been damaged? Sure. There is some sort of signal that goes to the brain and informs it that a few cells have been squashed. However, no bones are broken, and there's no other major damage other than maybe a little bruise later. However, the ridiculous amount of histrionics that goes after hitting your foot aren't in any way a justified response to said damage. You'll jump, curse, roll on the ground, rub your skin vigorously, whimper, want someone to kiss it and make it better. 5 minutes after being a total wuss, you'll stand up and feel no worse for wear.
That is, in my opinion, pain. Some sort of evolved mechanism, more like a training mechanism to make you more careful in the future, than simply the knowledge that something has been hurt and that some action must be taken - seriously, there's nothing to do there except cope with a few seconds of intense pain and endeavor not to repeat it. The thing that Pavlov used to do negative conditioning and stuff.
In fact, there are many things that can kill us and in fact don't hurt a lot. I heard that getting shot by a bullet can be quite painless, because 1) the pain is too great and basically numbs itself and 2) we don't have a lot of sensory data near our major organs to know that we're dying from gunshot wounds. So we only feel pain from the ruptured skin and some of the muscles.
Just because a machine/plant receives input from some damage done to it, and makes it react in some way (that may be entirely logical if->then) doesn't translate into pain. It doesn't mean it ISN'T pain either (how can we tell? animals whine when mistreated... or sad... or whenever, really, just like people; plants don't... that's all we got for now I suppose).