?
Solved

How can I send to a serial port from C++?

Posted on 2011-09-02
8
Medium Priority
?
386 Views
Last Modified: 2012-05-12
Ok, I'm not much of a programmer at all. I taught myself to write scripts that are compiled by the Open Watcom C++ compiler. I'd like to know an easy way to send to a serial port, USB or RS-232, either will be fine, the goal is to send some commands to some hardware. I can google and find tutorials on coding for serial ports in C++ but really, I'm hoping I can find something that is more "plug and play". I don't really have a clue what is needed, maybe a dll exists and I can call it from my script? I've always wanted an excuse to get PowerBasic, maybe I have to produce the dll? Maybe there is some code I can copy-paste into my script and compile it??
0
Comment
Question by:FuturesTrader
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 36477047
0
 

Author Comment

by:FuturesTrader
ID: 36477128
The developers of the environment that I'm working in replied to my query on their support boards and told me to change to visual C++ 2008 compiler and use some code from microsoft.com... I'll do that if I have to and there seem to be great articles on the subject, but I'd think there would be something that is directly from C++ or can be called from C++ somehow...
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36477166
Then you should click on "Request Attention" above and get the C++ zone added to your question.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:FuturesTrader
ID: 36477191
The focus is very very narrow with regard to what I want to do. It's going to be one-way communication, sending commands to a hardware keyboard wedge.. There was a product called The Mule that came with some software that made interfacing very easy but that product went off the market... I've not found a wedge that comes with interfacing software as of yet... I want to imbed commands to a USB or Serial Port right in my script...
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36477212
That's fine but you're not going to get much attention to your question here in "Miscellaneous Programming".  This appears to be the product you're tlaking about: http://www.barcodeman.com/altek/mule/  Here is a similar product: http://www.microridge.com/wedgelink_hw.htm  And here is a software solution if you have a serial port on your computer that you can use: http://www.tec-it.com/data-acquisition/keyboard_software_wedge.htm
0
 

Author Comment

by:FuturesTrader
ID: 36477235
A software wedge won't suit my application, it has to be a hardware wedge and the existing hardware wedges don't seem to come with scripting language help. I think the Mule came with some dll that could be called from a script... I put in a query on ebay to grab a used Mule if one ever comes up, that is how badly I want to avoid learning more programming :)
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 1000 total points
ID: 36525992
If you are targetting Windows, be sure to, take a look at http://www.cpdee.ufmg.br/~fvasc/Disciplinas/Interfaces/msdn_serial.pdf - this used to be a MSDN article labelled "Serial Communications in Win32" and is *the* reference for serial programming on Windows.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question