many instruments have a command to return to "local" mode, you would just need to have it sent in the "close instrument" case of your code.
P.M.
PutnamCertified LabVIEW Developer
Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5

LabVIEW Champion