I am trying to use system.dnp.demandpoll function but is showing error when I enter variable. With direct string format it works like directly in double qoutes.
Check the docs for the return type of system.tag.readBlocking(). Your device_1 is not a string. The string you think you are getting is nested two levels deeper.
Don't ever use Perspective display components to try to determine a type; we worked extremely hard to make it so you could throw complex values into props and we would make a best-guess effort to display what you might be looking for.
Anyway, I'm betting your "type" is a QualifiedValue, but I am a bit surprised if that's the case and the .dnp function isn't able to use it as a string. If you are seeing QualifiedValue, do readBlocking(...)[0].value