Data Capture Using USB2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Data Capture Using USB2

  1. #1
    Join Date
    Nov 2011
    Location
    India
    Posts
    147

    Data Capture Using USB2

    Hi,

    Now, I'm using data card for data capture. But it not support for windows 7.

    So i plan to capture data from USB port or Ethernet port.

    I choose USB2 for data capture.

    My requirement, Data capture speed is 60 Megabits per second using USB2.

    In Data sheet of USB2 , Capture Speed is 480 Mbps (Megabits per second).

    But, If i use usb mouse or any other usb device means, speed will be divide for all USB device.

    How can i get Data in the speed the of 60 Megabits per second using USB2?

    Is possible in USB2. Pls, clear me.
    Regards,

    SaraswathiSrinath

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,360

    Re: Data Capture Using USB2

    Well, what is your Visual C++ Programming question or probkem?
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2011
    Location
    India
    Posts
    147

    Re: Data Capture Using USB2

    I used RS232 & RS485. after installed the driver its shown like Com3, Com 4 in port setting.

    If i plug this USB2 means, How its appear ? & how can i get data from this.
    Regards,

    SaraswathiSrinath

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,360

  5. #5
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,845

    Re: Data Capture Using USB2

    This may not be doable with USB2 depending what you need.

    USB can run in different modes. Either in message mode or streaming and streaming has additional subtypes.

    You can get a guaranteed streaming speed (in one direction), but in that case you will have to deal with possible data loss.
    alternatively you can get guaranteed reception, but not a quaranteed speed.

    Even USB3 with it's higher max speed can't guarantee both transfer speed and reception at 60Mbps

    If you're ok with possible dataloss, then guaranteed speed (isochronous streaming transfer) is explained on:
    http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

  6. #6
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,845

    Re: Data Capture Using USB2

    USB while "serial"... Has very little to do with RS232 communication.

  7. #7
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,360

    Re: Data Capture Using USB2

    Quote Originally Posted by OReubens View Post
    USB while "serial"... Has very little to do with RS232 communication.
    It was the answer to the OP's post:
    Quote Originally Posted by saraswathisrinath View Post
    I used RS232 & RS485. after installed the driver its shown like Com3, Com 4 in port setting.

    If i plug this USB2 means, How its appear ? & how can i get data from this.
    Victor Nijegorodov

  8. #8
    Join Date
    Nov 2011
    Location
    India
    Posts
    147

    Re: Data Capture Using USB2

    Hi,

    I used serial communication like below only,
    Code:
    BOOL SerialPort::InitPort(UINT portnr,UINT baud,char parity,
    UINT databits,UINT stopbits, DWORD dwCommEvents,UINT writebuffersize)
    {
            // Code for Port initialize
    }
    Initialize Like
    Code:
     InitPort(4,9600,'E',8,1);
    Read Data from port like
    Code:
    ReadFromPort()
    {
          bResult = ReadFile(m_hComm,&RXBuff,1,&BytesRead,&m_ov);
          bResult1 = GetOverlappedResult(m_hComm,&m_ov,&BytesRead,TRUE);
    }
    My doubt is, shall i use this same way to get high speed data? is possible?

    Thanks Mr.Victor & Mr.OReubens. I will read the posted web pages and come back.
    Regards,

    SaraswathiSrinath

  9. #9
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,845

    Re: Data Capture Using USB2

    Quote Originally Posted by saraswathisrinath View Post
    My doubt is, shall i use this same way to get high speed data? is possible?
    maybe... there are serial hardware ports that can do 60Mbps and larger and that you can access via the "COM" ports in windows.
    USB isn't among them

    While there are drivers that allow you to access a USB in a similar method as an RS232 (The Arduino project uses this principle). The speed at which you can do this is limited.

    If you need guaranteed 60Mbps (with possible dataloss), you will need to write a kernel mode isochronous USB driver.
    If you don't need the guaranteed speed, there are alternatives for USB. Such as interfacing via the WinUSB driver, they can offer data integrity, but the speed will be limited and may not be stable (data may come in bursts).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center