One of the ways:
1. Create VI with TCP Listen.vi, set fixed port number, set net addres as localhost
2. Run VI
3. Run MAX, select create new tcp device, set port number from 1. and net adress as localhost
4. Device ready for action!
Now you can operate your virtual device using visa. When you call VISA open, TCP Listen.vi produced connection id. Using this id with tcp functions you can send/receive commands with your device drivers.