Programming languages

theripley

Member
Join Date
Jul 2008
Location
laguna
Posts
545
Hi,

This is OT but I hope you'll still help.

I have been PLC programming for quiet a sometime now, although I do not consider myself a master in its programming yet (with due respect to all).

However, I wanted to learn other programming other than plc, that I can utilize in industrial application. I am currently self-learning simple Vb.net applications, but I think it is not commonly use in industry (like fetching signals from I/O card & running a servo motor among others.)

Can you help me with what/ how should I learn? Any advise will be very much appreciated.
 
I use VBA, VB.net, C, and C++ most commonly. I've even used HTML and Java on occasion.
On the Windows platforms, all are essentially interoperable, as long you use a container type communications interface. By container type, I mean not integrated directly into your application.

For the comms interface, you can use a canned library (DLL), ActiveX component, or any standalone server that supports OPC (DDE is pretty much dead now) or that exposes it's API to the programmer.

What to use depends on what you are doing (as always).
For my direct comms drivers (Direct being PLC to oddball device), I generally use 16 bit DOS C mixed with C++. For Windows HMI comms drivers, I use 32 bit C++ (probably 64 soon). Database work and HMI's are almost entirely VBA/VB.
 
What to use depends on what you are doing (as always).
For my direct comms drivers (Direct being PLC to oddball device), I generally use 16 bit DOS C mixed with C++. For Windows HMI comms drivers, I use 32 bit C++ (probably 64 soon). Database work and HMI's are almost entirely VBA/VB.

Why C++? I have read they are error-prone. I am sorry, I'm very new to this.
 
C and C++ are not error prone.

Unlike programmers.

C and C++ are both good for compact, fast code (as well as horribly bloated and slow code, but I'm giving the benefit of the doubt here), and anything written with them can be compiled on almost any platform with minor, platform specific changes. Like I said, I still write 16 bit code that runs on DOS compatible devices, can't do that with VB.
 
A lot of people use C,C+,C++ and C# and do not realize it. A prime example that comes to me is HMI's or the Red Lion G3 to be exact. It uses a modified form of C for running programs in the background and complex tag manipulation.

IMHO learning C is a must for PLC programmers now.
 
I have a visual studio c++ 2010 software, is it as good as the previous c++? Can you recommend any book or link that would be very helpful in this quest of mine?

Ps

I find c++ programming a little bit low level than vb.net. I'm sensing tons of headache ahead.
 
By the way, what is the difference between object-oriented, event-oriented & graphic-oriented software? How do they differ from one another?
 
Visual Studio C++ is still just C++, with a VS front end and editor. With some very few exceptions, C++ is C++ no matter what, if it is up to date. Ideally, you can take any C++ source code, and compile it on with any C++ compiler on any platform, as long as it doesn't rely on or access platform specific things.

In an absolute nutshell:

Object Oriented design models just have to do with creating a bunch of code that hides the nitty-gritty "How" of the implementation details, and presents a clean API to the programmer. For a comms program to an Xtadactlyite5000 for example, the 'Object' (library) would handle simple requests such as "WriteValue(X,Y)", "ReadValue(X,Y)", "SaveNonVolitile(X,Y,Z)", and that is all you actually see as the programmer. You (unless you are programming up the object/library) never have to deal with the actual code that handles those requests. A very important feature of OO programming, is that the objects can (and usually do) maintain a bunch of absolutely private data within themselves, that a higher up programmer never sees.

Event-oriented (in general) is simply a system that does not sit and wait for some input before proceeding. An example using operating systems - Classic DOS programs would generally just sit in a loop waiting for the user to hit a key. Until then, the entire computer was tied up, waiting for the user to hit a key, and then act on it. With Event driven operating systems (*nix, Windows, etc), rather then have the computer wait on anything, each program tells the operating system "Hey, let me know if you see a mouse click, a keystroke, or this 1 second timer expire", and then goes to sleep. No more resources or processing is given to the idle program until one of the events it is looking for happens.

Graphic oriented is just that, pretty pictures, treating the display as a single bit canvas to draw things on as opposed to text-mode which had fixed character sets and that was it.

The three are not exactly different from each other, as they aren't different programming models. Most graphically oriented programs rely on event handlers to pump data into and out of their object handlers.

That ought to confuse you.
 
If you're going to learn C/C++ then I would scap vb.net and learn C#.net instead. That way you only have to remember one syntax.

I would start with C, to learn the basic syntax and std library.
Then C++ to learn OOP.
And then C# to learn .net.

If you're only going to be devloping for windows then you can skip C/C++ and just learn C#/VB.

I have a number of great books on C/C++/C#.net at home. I can make a list if you want. Also Amazon has some really great reviews.
But for beginners there are alot of good guides on the internet.

Java is also a posibility.
Either way the trancision from C to Java or vice versa should be fairly easy.
 

Similar Topics

This article has a nice shout out to Ladder Logic which has risen 5 places on the IEEE list of most popular programming languages to 34th...
Replies
0
Views
2,005
Hello everyone! I am trying to determine the most commonly used advanced controls languages in PLC and HMI programming in order to determine my...
Replies
8
Views
3,066
Can someone provide the major differences between the Unity Pro and Concept programming languages? I am going to develop a project using the...
Replies
8
Views
4,571
Hello, I was wondering if anyone could point me in the right direction to learn other programming languages than ladder logic. I know ladder...
Replies
9
Views
3,583
Back
Top Bottom