Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. plz help me,i want to send/receive data to one hardware device that is conneted with GPIB cable , how can i send data to that device in C#.net

plz help me,i want to send/receive data to one hardware device that is conneted with GPIB cable , how can i send data to that device in C#.net

Scheduled Pinned Locked Moved C#
csharphardwarehelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    premkamalg
    wrote on last edited by
    #1

    hi, i want to send/receive some commands to one hardware device through GPIB card(one end is connected to System(USB port) one end is connected to device) in c#.net . i wnat to know in which way i can communicate the device and what r requried fields to access the hardware through GPIB card. plz send sample code for that . it's very usefull to in my application. Thanks prem

    Hi, Thanks, if u think it's good. otherwise sorry.

    N 1 Reply Last reply
    0
    • P premkamalg

      hi, i want to send/receive some commands to one hardware device through GPIB card(one end is connected to System(USB port) one end is connected to device) in c#.net . i wnat to know in which way i can communicate the device and what r requried fields to access the hardware through GPIB card. plz send sample code for that . it's very usefull to in my application. Thanks prem

      Hi, Thanks, if u think it's good. otherwise sorry.

      N Offline
      N Offline
      Nader Elshehabi
      wrote on last edited by
      #2

      Hello To access any port -Serial, LPT, USB, etc...- or device -eg. modem- in C3 you follow these steps: 1- Call Windows API CreateFile() function with the device name as the filename. ie. CreateFile("usb0001") for example. 2- Get The handle of the created file. 3- Supply that handle to the constructor of a FileStream object. 4- Use that FileStream object to read and write from/to the port/device. And no, you can't construct a FileStream from the port directly. Sorry!

      Regards:rose:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups