You should be able to determine if it's plugged-in or not by monitoring the usb_device_state variable.
Code:usb_device_state VAR BYTE EXT CONFIGURED_STATE CON EXT IF (usb_device_state = CONFIGURED_STATE) THEN ; OK to send ELSE ; Detached or Enumerating, don't try to send. ENDIF




Bookmarks