04-18-2017 12:56 PM
Hello, I have an executable that is running in a manufacturing floor and it is all about printing labels in a Zebra printer connected via USB. The software looks for a printer under the name of "Zebra" (see attached image). If the printer needs to be replaced, the new printer would have to be named "Zebra" to work with the software. Turns out MAX remembers the serial number that had the Zebra name assigned, making it impossible to rename the new printer under Zebra. The only way to delete the old printer's info is while connected to the PC. The problem comes when old printer is disconnected and even lost in the maintenance cage. So the question is, Is there a way to programmatically delete any record from MAX of a USB device when it is not connected?
Regards,
04-18-2017 01:47 PM
This looks right
04-18-2017 01:56 PM
It is not programmatically, but in MAX expand the Software section and click on NI-VISA. There should be a tab for VISA Options. In the resulting tree, you can select Aliases. Now you can delete the alias to the USB device.
04-18-2017 02:24 PM
Thank you Crossrulz, although I wasn't able to find the NI-VISA options expanding the "software" tag I was able to find it under "tools" reading the following link.
http://digital.ni.com/public.nsf/allkb/B089F9352D262EE686256F1100001EE0
Thank you again.
04-18-2017 02:30 PM - edited 04-18-2017 02:31 PM
This is not an answer to your specific question but may give you another way of accomplishing the task of printing to USB printers.
I have a similar setup where I am printing to Zebra printers via USB. However I am not using VISA at all. If you share the printer, and give it a share name, you can use a cmd prompt to send a text file to the printer.
cmd /c copy %filename% \\%computername%\%printershare%
If you have to swap out printers, you only need to un-share the old printer and share the new one with the same share name.
04-18-2017 04:41 PM
Functions -> Measurement I/O -> System Configuration -> Utilities -> Delete