ID this SF film

All I can remember is that its a 70s/80s film, where a bad guy has a machine that can simulate any kind of torture (in a show this at tea time or Saturday afternoon level IIRC) Two victims of the machine are one man who gets covered with ants and another who has the flesh stripped from his hand and upper arm.

Any ideas?

Was it Solarbabies ? At any rate, I do remember seeing the scene you described, and it definitely took place in a post-apocolyptic wasteland.