Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

using C++ in machine control software

Status
Not open for further replies.
I need any artical or paper about using C++ programming language as machine control software.
And any use for C++ prog. Lang. as an industrial control software.

[sig][/sig]
 
I've used C++ for partial control in locomotive control software. This was a real time embedded application- where memory and processor resources are limited.

With C++, there're some concerns being raised with respect to industrial/real time applications. Almost all these can be effectively tackled if specific design/development strategies are followed.- a simple example is freeing (deleting) an object when it's not needed anymore. [sig]<p>Narayanan UM<br><a href=mailto:umn@ieee.org>umn@ieee.org</a><br><a href= > </a><br> [/sig]
 
Please give me some sample code in C++ for reading inputs through a serial port.
 
Please just use inport and outport functions to figure it out, supposed you should be very clear of every bit of the instruction bytes mean for your card,plc or other devices.
 
hi gkmaint,
If you just want to read in bytes from serial port (UART) then just use the function intb(), like stated by samsara. But in case of real time problem, you should capture the bytes using interrupt, so write your interrupt routine and placed it in the right adress, but you must firt save the &quot;something&quot; accidently in this address and put it back after your task done.

cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top