Author Topic: USB Guide  (Read 11458 times)

juscommune

  • Member
  • ***
  • Posts: 4
USB Guide
« on: February 12, 2012, 11:01:21 pm »
I'm just looking for some direction on where to find detailed information about requesting information directly from a vinyl cutter (plotter) that communicates over a USB port with a PC i.e. I would like the vinyl cutter to advise my software the width of the media (vinyl) it currently has loaded. I can do this via a COM Port but nearly all vinyl cutters these days use a USB Port and I'm hoping there is a standard process/method of polling these devices.

Any help or direction would be greatly appreciated...  ;D

Thanks  :)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB Guide
« Reply #1 on: February 13, 2012, 09:56:04 am »
If you're using a commercial product, ask the manufacturer for documentation.

If you're designing the cutter, you can make the cutter a USB virtual COM port and use the same COM-port software to communicate with it.

Jan

juscommune

  • Member
  • ***
  • Posts: 4
Re: USB Guide
« Reply #2 on: February 13, 2012, 04:21:58 pm »
Thanks for the reply.

My approach is generic i.e. for all vinyl cutters worldwide.

Unfortunately there are too many manufacturers to contact each one and in any case many of them are too hard to reach or make contact with being Chinese and Korean etc.

I’m just hoping there are generic call functions etc. (i.e. a relatively standard method or approach to poll the device) that most of them will use or allow.

Any help would be appreciated.

Thanks again.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB Guide
« Reply #3 on: February 13, 2012, 04:54:14 pm »
From a web search, I see that some (many? most?) vinyl cutters use HPGL.

Here is one post on the subject:

http://www.vectric.com/forum/viewtopic.php?f=4&t=1706

Jan

juscommune

  • Member
  • ***
  • Posts: 4
Re: USB Guide
« Reply #4 on: February 13, 2012, 06:10:36 pm »
Hi Jan

Thanks for your reply  :)

I can already send cutfiles to just about every vinyl cutter over any port using HPGL or DMPL etc. so that part is all worked out.

However, the polling process is simply a matter of sending a small request string, and waiting for the device to reply with the information which I will then use to adjust/modify the data which I will later send to the vinyl cutter.

The problem is how to send a small string to a USB device, and more importantly, how to receive the reply.

I can bypass this problem in most cases for sending the information by using the Windows print spooler, but it does not work in the other direction (querying the device)

So in a nutshell, what are the standard windows API routines one should use to send and receive data from a USB printer or plotter device?

Also, some new devices no longer install a virtual print port in Windows, and only appear as a device driver in windows 7, so it is unclear what steps to take to send data to these USB devices?

Thanks again,
Jus Commune

juscommune

  • Member
  • ***
  • Posts: 4
Re: USB Guide
« Reply #5 on: February 16, 2012, 04:03:38 pm »
Just wondering if anyone has any advice or could point me in the right direction (see post directly above)...

Thanks

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB Guide
« Reply #6 on: February 16, 2012, 10:34:27 pm »
It's possible that the built-in Windows printer/plotter support doesn't include the ability to send commands that require a reply.

A search on

windows send raw data printer

might turn up something.

Jan