C++ and engineering

Hello,

I am interested for launching a signal ( starting a device ) by pressing the key " X " via a RS232 port or USB and then later stopping the device by pressing on the key " Z ".

Does someone can clarify the way to do it or is there a typical example for such problems, tutorials, books?

Thanks a lot,

Angel

Comments

  • : Hello,
    :
    : I am interested for launching a signal ( starting a device ) by pressing the key " X " via a RS232 port or USB and then later stopping the device by pressing on the key " Z ".
    :
    : Does someone can clarify the way to do it or is there a typical example for such problems, tutorials, books?
    :
    : Thanks a lot,
    :
    : Angel
    :
    [blue]
    What compilier and OS? Accessing ports are system specific, so we need
    the OS you are developing for.
    [/blue]
  • : : Hello,
    : :
    : : I am interested for launching a signal ( starting a device ) by pressing the key " X " via a RS232 port or USB and then later stopping the device by pressing on the key " Z ".
    : :
    : : Does someone can clarify the way to do it or is there a typical example for such problems, tutorials, books?
    : :
    : : Thanks a lot,
    : :
    : : Angel
    : :
    : [blue]
    : What compilier and OS? Accessing ports are system specific, so we need
    : the OS you are developing for.
    : [/blue]
    :

  • : : Hello,
    : :
    : : I am interested for launching a signal ( starting a device ) by pressing the key " X " via a RS232 port or USB and then later stopping the device by pressing on the key " Z ".
    : :
    : : Does someone can clarify the way to do it or is there a typical example for such problems, tutorials, books?
    : :
    : : Thanks a lot,
    : :
    : : Angel
    : :
    : [blue]
    : What compilier and OS? Accessing ports are system specific, so we need
    : the OS you are developing for.
    : [/blue]
    :



    thanks for your reply,

    I have windows xp and I use Visual C++ 6.0

    I am encountering a lot of problems indeed for getting any documentation regarding C++ ( Visual C++ 6.0 ) programming on external devices. But what surprises me is that in fact a lot of applications have been done on Visual C+ 6.0 but where to get any ?

    Thanks,

    Angel




  • : : : Hello,
    : : :
    : : : I am interested for launching a signal ( starting a device ) by pressing the key " X " via a RS232 port or USB and then later stopping the device by pressing on the key " Z ".
    : : :
    : : : Does someone can clarify the way to do it or is there a typical example for such problems, tutorials, books?
    : : :
    : : : Thanks a lot,
    : : :
    : : : Angel
    : : :
    : : [blue]
    : : What compilier and OS? Accessing ports are system specific, so we need
    : : the OS you are developing for.
    : : [/blue]
    : :
    :
    :
    :
    : thanks for your reply,
    :
    : I have windows xp and I use Visual C++ 6.0
    :
    : I am encountering a lot of problems indeed for getting any documentation regarding C++ ( Visual C++ 6.0 ) programming on external devices. But what surprises me is that in fact a lot of applications have been done on Visual C+ 6.0 but where to get any ?
    :
    : Thanks,
    :
    : Angel
    :


    You need to use Windows API functions.

    General documentation here:
    http://msdn2.microsoft.com/en-us/library/aa363223.aspx

    RS232 COM port documentation here:
    http://msdn2.microsoft.com/en-us/library/aa363195.aspx

    Apart from the functions listed there, you also need to check out the CreateFile() function and others such file handling functions, since ports are treated as files in the Win API.
  • Codeproject.com has a nice free serial port class for Visual Studio. I used it once without any problems of any kind.
  • : Codeproject.com has a nice free serial port class for Visual Studio. I used it once without any problems of any kind.
    :

    Hi,

    Thanks, but I have here in only C++ and Visual C++ 6.0 with wich I have a lot of codes.

    Anyway, as I said, pure C++ would be good and visual C++ 6 a plus, and C++ with Qt 4 Heaven....!!!

    Thanks Angeltpp
  • : : Codeproject.com has a nice free serial port class for Visual Studio. I used it once without any problems of any kind.
    : :
    :
    : Hi,
    :
    : Thanks, but I have here in only C++ and Visual C++ 6.0 with wich I have a lot of codes.
    :
    : Anyway, as I said, pure C++ would be good and visual C++ 6 a plus, and C++ with Qt 4 Heaven....!!!
    :
    : Thanks Angeltpp
    :


    "Pure C++" is impossible since port I/O isn't covered by the C++ standard. So either study those links I posted or track down that code at Codeproject.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories