Solved

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

Posted on 2011-09-02
8
383 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 83

Accepted Solution

by:
Dave Baldwin earned 250 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 83

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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 

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 83

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 250 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Simple Linear Regression
Starting up a Project

690 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