Commander / Custom App / Usb Disconnect Follow
I am unsure of which area to post this in and so put it in General Discussion.
A client has asked me to write a custom application that works with Bartender, an RFID module, and Commander. The RFID module is connected inside a printer via USB; the printer is connected to a PC (a laptop) via USB. The RFID module is from Feig Electronic and communication is through the Feig OBID SDK.
I have developed this application. It does what it is supposed to do (IOW, it can print with BarTender, read-and-write the RFID tags in the card being processed). The application runs fine if started by double-clicking on the file in Windows Explorer, if started from a .BAT file, if executed from the Windows 7 Run command or run inside Visual Studio (VB.Net Windows Form app), or if run from an icon on the desktop. All of these can be done repeatedly and successfully without creating any known difficulties.
The problem: the application always fails if started through an OS command in Commander via a Trigger (dropping a file into a directory). When that happens, the RFID module in the printer becomes "invisible" and can no longer be detected by my application or other utilities designed to work with OBID devices.
What we see in Commander is that the Task is executing, but nothing else. If we stop the executing Task, we will see the command line that was executed in the lower half of the screen,
The sequence of events in my application roughly goes like this:
- Print the document via BarTender using the BarTender Print Engine from the SDK
- Connect to the RFID module via the OBID SDK
- Inventory the Tags in the card via the OBID SDK
- Write new tag via the OBID SDK
- Read and confirm the new tag data via the OBID SDK
When the Commander Task is triggered, no BarTender document prints. I am unsure if it gets to Step 2 at all. If it does try to execute Step 2 and cannot connect to the OBID device, it will not attempt any further steps.
Uninstalling and reinstalling the OBID driver will make the Feig RFID module visible again, but that also means a restart of the system. Once that is done, my application can be started directly via any of the successful methods above and will be able to detect the RFID module, to print a Bartender document, to read and write the tags on the card. If the application is then started again via a Trigger in Commander, the problem described above re-occurs.
Help and suggestions will be greatly appreciated.
Please sign in to leave a comment.