10-20-2014 06:46 PM
Hi,
I have a device connected on COM4 of the system. Initially LabVIEW finds it. Then I send a RESET command (VISA write) to this device connected on COM4. As a result of the RESETcommand, the COM4 momentarily closes and reopens. But when it reopens, LabVIEW is not able to find COM4, as shown in the first picture below. The second picture below is my block diagram where I am trying to find COM4, so that when COM4 re-appears, I can proceed with sending other commands to this device. The third picture shows, that when COM4 does reappear (after closing first), the OS is able to find it but LabVIEW does not (in the first picture).
The question is, How can I have LabVIEW refresh and find COM4 in the VISA resources list?
Thanks
Jeet
10-21-2014 12:42 PM
Hi jeet,
Based on the code snippet you attached, the VISA resource list is programatically created. If you call the VISA reset function, this list won't update until you run the block of code again, since the list is a static array of strings.
10-21-2014 04:37 PM
Hi Kevin,
I am sure I have fully understood what you are trying to say. I think you are saying that the I put the block of code (that searches for COM4) in a separate VI and then use open VI reference for that VI, call the VI and then close the reference. However, I am not exactly sure how to do it. I've attached my VI that I am currently working with.
Thanks,
Jeet
10-21-2014 11:36 PM
10-22-2014 11:43 AM
Jeet,
Sorry, I didn't understand how that snippet of code worked into your overall program. I thought you ran that code, let it finish and then called the reset function, though I can see that it is not the case in the vi.
10-22-2014 12:33 PM
Hi
COM4 disappears is because it not a physical port. The device connected is actually a USB device and it has an internal FTDI chip (USB to RS232) which appears as COM4. As the microcontroller inside the device resets, it also makes the COM4 (Virtual COM port) go away and reappear. But when it reappears, LabVIEW does not see it but device mangar does. That is the problem.
Thanks
Jeet
10-23-2014 01:46 PM
Alright, I understand what you mean now. Do you know if it appears in MAX correctly?
11-15-2021 01:11 PM - edited 11-15-2021 01:12 PM
I am having the same issue. The USB device I am communicating with goes into a sleep/power down state and NI-VISA and NI-MAX doesn't appear recognize the device once it wakes up.
Windows Device manager is able to successfully recognize and re-enumerate the device.
Is there a way to programmatically refresh the list of serial devices NI-VISA or NI-MAX?