A new hobby - C C+

Goody

Member
Join Date
Apr 2002
Location
Huddersfield W Yorks UK
Posts
1,081
I feel I need to try stretch my brain again!

I was intruiged by the last few posts on the massive thread about paying for software and the subject of programming in C.

I suddenly thought ' Hmmm, I would like to learn/teach myself this as a new project/hobby '

But where do I begin?

I have several plc programing softwares and a programing rig (plc's, hmi's and cables all permanently connected)set up at my home office desk.

So.... where do I start?

What software, what books, what hardware, what.........

I would like to sit here with books - software and make an output on my plc turn on at my bidding with my C+ code and shout Eureka.


Any tips and help will be appreciated :)
 
It really depends on your budget, and how big you want to go.
If you're planning on developing graphically rich windows programs, then MS's Visual studio is probably the way to go.

If you just want to hit the ground tinkering, There are some good freeware IDE/compiler packages out there. I like Dev-C++ http://www.bloodshed.net/devcpp.html

I have quite a few C/C++ books from college and personal use.
I would reccomend the C++ for dummies book to learn the basics of the language. Amazon link


BTW, the language is called C++. This is a little joke amongst developers. The ++ operator is a shortcut for incrementing a variable. Instead of typing C = C + 1, you can write C++. When time came to name the Object Oriented enhanced version of the C language, they called it C++ (or the next C). There are also --, +=, and -= operators as well. I'll leave it to you learn how those work.

Good luck.
 
Last edited:
If you want to learn C++

The 'must have' book is the C++ Programming Language by Bjarne Stroustrup. ISBN 0-201-88954-4. Note this book covers C++. Not windows programming.

If you want to do windows progamming then buy a standard version of VC.NET. It costs about $109 US list price. (I don't do windows progamming, I consider it fluff.)

However, my bias leans toward embedded C projects. I would consider getting a Z-world or Rabbit semiconductor development system.
You can do small control system with one of these.
 
In the first reading, knoe that it looked for PLCs with programming saw C++.
I recommend this,Chis H. Pappas and Willian H. Murray / 770pages ISBN not have.

For automation, I wrote old tools that directly inserted the ladder in the EEPROM of PLC... today it is easy to send for the EdPLC.

First that it makes correct chronological learning...
equal the evolution of the computers... :p

Glossary: EdPLC -Sw edition PLC.Is possible new word, add dic here.
 
Just a side note.... I haven't had a lot of opportunity to do much programming on the controllogix platform yet, but from the classes I've taken, my previous exposure to C/C++ programming was a big help in understanding how and why the data structures, tags, etc. function.
 
tom_stalcup said:
Just a side note.... I haven't had a lot of opportunity to do much programming on the controllogix platform yet, but from the classes I've taken, my previous exposure to C/C++ programming was a big help in understanding how and why the data structures, tags, etc. function.

This is very true.
CLX is like a ladder logic version of C, complete with structures, etc. That's exactly what I thought when I started using it.
I think it's pretty :cool:
 
C+ to PLC?

I can do the programing in C+, but never in PLC. I have a SLC 500 and a Micrologic 1000 PLC catalog, Where should I start?? Books or free software that you can recommend to get me going? I'd love to be able to able to write in C or compiled Basic, and have software to translate it to PLC.
 
Re: C+ to PLC?

MB said:
I can do the programing in C+, but never in PLC. I have a SLC 500 and a Micrologic 1000 PLC catalog, Where should I start?? Books or free software that you can recommend to get me going? I'd love to be able to able to write in C or compiled Basic, and have software to translate it to PLC.

VB for me is a better platform,,,if you want to learn C,,,try the "learn C in 24 days books"

Fred Raud
 
Sorry, must have written the question wrong? I am a C+ programer already. I can do C+ with no problem. But I'd like to stretch my brain, by learning how to do PLC programing. Where is the best place to start? Books? Websites? etc. If there is such a thing, I'd like to be able to write code in C+, and then have a computer translator program to change it into PLC. Am I making better sence? Sorry about the confusion before. Thanks for the help!
 
No PLC that I know of uses any type of C for programming.

All of them that I have seen use either one or all of:
1, Ladder logic (Most popular)
2, Instruction list (look and feel similar to assembly)
3, Functional Block Diagram, similar to hardware TTL logic
4, Structured text, not common, most similar to C
5, Sequential Function Chart or Grafect, which programs using flow charts.

Some PLC manufacturers use C to write the programming software and packaged functions such as analogs or maths functions.

Generally, PLC native languages are much easier to implement than C, so you will probably be better off learning ladder and being done with it.

For a simple PLC simulator (written in C, BTW) that could be used as a basic soft PLC for testing, look up "Classic Ladder". It needs a bit of mucking around to get it working, but it does come with source code.

Doug
 
Just remembered,

The earlier versions of the Modicon Quantum, programmed with "Concept", allowed you to write your own functions using Borland C++, which were then compiled and run on the Quantum PLC.

So, I was wrong, you can use C to program a PLC.

I don't know if this is still available however.

Doug
 
Functional Block Diagram, similar to hardware TTL logic

Yup and that's why I like it! I started my engineering life after university as a hardware design engineer, except that when I started, it was still DTL - so now you know how old I am! :D

I've never seen one, never mind worked with them, but I believe the Siemens M7 series uses C/C++.
 
Last edited:
Doug_Adam said:
Just remembered,

The earlier versions of the Modicon Quantum, programmed with "Concept", allowed you to write your own functions using Borland C++, which were then compiled and run on the Quantum PLC.

So, I was wrong, you can use C to program a PLC.

I don't know if this is still available however.

Doug

I believe Mitsubishi PLCs support a similar thing, subroutines written in C to be called by the main program.
 

Similar Topics

So I have a hobby project I've started planning. This won't be in a very harsh environment, so I was kind of thinking about using a fairly cheap...
Replies
17
Views
4,771
Hey all. I’m not sure this is the right forum but I thought I’d put a link to a video I just posted. It does involve PLC’s. I sometimes will...
Replies
2
Views
1,735
Hello engineers/technicians of PLCS.net! I require your assistance, if you may be so kind to provide it. I hope this is an appropriate query to...
Replies
11
Views
6,442
After viewing the thread on PLC controlled Christmas lights, I thought I'd send a link to my friend's website highlighting his basement train set...
Replies
3
Views
2,301
Am thinking at the moment of remote monitoring and trending of one of my bee hives weight in an apiary. I would like to collect the weight data...
Replies
3
Views
1,454
Back
Top Bottom