SendUSB
The Device.SendUSB command sends raw data (data packets) through the device's USB port that was enabled using the Device.SetUSB command. These commands can be used for sending print commands to a label printer, and are only supported on Android devices.
Group: Device Extensions
Syntax: bOK=Device.SendUSB(vPacket, vDevice)
bOK (Boolean) Optional - returns True if all bytes in the datapacket were received; False if it failed.
vPacket (Variant) is the text stream to be sent to the serial port.
vDevice (Variant) is the name of the device / printer.
Example:
On Error Resume Next
Dim sZPL as String
Device.SetUSB(True, "PC43t") 'This enables the USB connection between the client device and peripheral (i.e. printer).
sZPL = "^XA^PRB^FS^PFO^FS^BY3,2.0^FS" 'Lable format in Zebra programming language
sZPL = sZPL & "^FT100,120^B3N,N,102,N,N^FD1234-5678^FS"
Device.SendUSB(sZPL, "PC34t") 'This sends the Zebra print command over USB to the connected peripheral (printer).