A new hobby - C C+

The Yokogawa Stardom PLC uses Java programs within the PLC to obtain data from the PLC program and email it out. The logic is still done by SFC, Ladder, FB, Statement list but then you have the extra Java code.

Goody, I too would like to achieve what you would, I believe if you buy an ActiveX control that can talk to the PLC wil make life easier, but I dont really know.
 
One of the Omron PLC's allowed calling of a function block that was written in C. You could use a combination of ladder and C blocks or just a C block. Do not know if it is still available. It was not popular.

April (France) had PLC's that could be programmed in C. My memories of the only one I programmed was that it was dangerous becaue you even had to program your own watchdog timer etc. I think they changed that as time went on.

I do not know if they are still available since Schneider bought them out.
 
this is the way that I really like to work with PLC.

What I would do it is use a pre build drive or make one to communicate with the plc (read status of input, output, analog etc) and from there using any programming language VB, C, Borland, Pascal etc created your logic .this is the way that I really like to work with PLC.
 
Re: If you want to learn C++

Peter Nachtwey said:
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.)

I don't do windows programming.
I don't do windows programming.
I don't do windows programming.
I don't do windows programming.
I don't do windows programming.
I don't do windows programming.
I don't do windows programming.

Something came up. Now I will have to learn. I just got VC++.net standard edition. After I get it running one of our windows programmers will polish it off.

I don't do windows programming.
I don't do windows programming, yet.
I don't do windows programming, yet.
I don't do windows programming, yet.
I don't do windows programming, yet.
I don't do windows programming, yet.
I don't do windows programming, yet.

It is a mental thing. Have I told you guys how much I hate Microsoft Windows? How much enthusiam do you have for programming things you hate? Will I be assimilated?

BTW, we supply custom loadable ( blocks written in Borland C ) with our Modicon 984 compatible product. We had to. When we first started making the motion modules, Modicon only did BCD math. They didn't have signed numbers or numbers over 9999. How stupid, we were shocked that anyone would take a pefectly good micro controller and go out of their way to cripple it. Anyway we wrote signed and unsigned binary add subtract multiply divide and array indexing routines that made using our module easier. Modicon users downloaded our custom loadables just to get the math capabilities.

About two years later Modicon added the add and subtract 16 functions.
I think C programs in a PLC is a bad idea. C is pointers that can point anywhere. It is easy to crash the PLC. I know. We did it enough times getting our custom loadable to run. Another reason to leave C out of PLCs is that one can't debug routines by single stepping or going to a break point.
 
If you want to learn computer programming (non-PLC) start with Java. First, you can get the development environment for free. Second, it’s an object-oriented language. Third, you can easily create GUIs (Graphical User Interface). Fourth, it’s easy to move into other languages once you understand programming concepts with Java.

If you want to jump into Microsoft programming from Java learn C# (C Sharp). The syntax is almost the same as Java.

I’m not a big fan of VB. The main reason is that the syntax is too lax. It’s easy to learn bad programming practices with VB because it’s so lax. Also you cannot create ActiveX controls in VB.Net.
 
C and C++ are awesome languages. i grew up on basic and visual basic and i was at first intimidated and then blown away at how powerful these languages could be.

anyway, total side note, but if you ever get a chance to learn simple micorprocessor machine code (8 bits, basically any architecture) it clears up a lot about how not only C works, but also PLCs (well at least AB... haven't had enough experience to say on the others)
 
C and C++ are awesome languages. i grew up on basic and visual basic and i was at first intimidated and then blown away at how powerful these languages could be.

anyway, total side note, but if you ever get a chance to learn simple micorprocessor machine code (8 bits, basically any architecture) it clears up a lot about how not only C works, but also PLCs (well at least AB... haven't had enough experience to say on the others)

C: all the power of assembler with all the convenience of assembler

(yes I know this is an ancient thread;-).
 
Last edited:
Perhaps learn structured text as this resembles Pascal so not far from C++.
I must admit I only know of some add on cards like a small PC based unit that fits on the rack that can use the C language and a few ones for Basic but a bit crude, I don't know of any that can be programmed directly in C, but I bet there are a few but not in the mainstream.
There seems very little point in having another language as there are already LAD, STL, FBD & ST.
 
I believe the "PLCNext" supports C++, Java, Python and all of the Plc standards (ST, Ladder, SFC)

You might want to look into this unit.
 
Hopefully the original poster has found something else to occupy his time, in the last 15 or 16 years since the thread was started. lol!

These days, I'd recommend someone pick up a raspberry PI, and an addon relay board run from the gpio pins for experimentation.

I'm still waiting for a piece of equipment to show up at my plant being ran entirely from a raspberry PI unit. It's only a matter of time. :)
 

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,792
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,765
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,473
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,315
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,465
Back
Top Bottom