I'm not sure the question makes any sense. Do you count Relay Ladder Logic as procedural or non-procedural? I say non-procedural, but I make it do procedural work anyway. How about VisualBasic? It can be considered procedural, but it can also be looked at as event driven. Java is theoretically object-oriented (i.e. non-procedural), but I can write a Java program that is pretty damn procedural. C, which may seem obviously procedural, is often used to do a form of state-logic.

We also have to talk about context. HMI programming is almost never procedural. Discrete control programming is almost universally done in relay ladder logic. I don't know even know what DCS programming looks like, because everything I do in my end of the controls world is at the machine level. Embedded controllers are usually done in C.

You've asked the equivalent of, "Do people prefer hammers or wrenches?" Different jobs have different tools. But it's even worse because a hammer is a hammer, but a language may have both "procedural" and "non-procedural" aspects.

procedural language <language> (Or "imperative language") A term used in contrast to declarative language to describe a language where the programmer specifies an explicit sequences of steps to follow to produce a result. Common procedural languages include Basic, Pascal, {C} and Modula-2.

declarative language A general term for a relational language or a functional language, as opposed to an imperative language. Imperative (or procedural) languages specify explicit sequences of steps to follow to produce a result, while declarative languages describe relationships between variables in terms of functions or inference rules and the language executor (interpreter or compiler) applies some fixed algorithm to these relations to produce a result. The most common examples of declarative languages are logic programming languages such as Prolog and functional languages like Haskell.

Vladimir, which of these would you put Relay Ladder Logic into? It certainly doesn't look like a declaritive language. And I still say it is not procedural, because ladder doesn't happen in "steps." Granted, there is an order that rungs are executed, but since every rung happens every scan the logic doesn't really "proceed."

Rather Relay Ladder Logic is a procedural landuage. The rungs in their "classic" form look like this:

Output = (InputA AND InputB) OR InputC... etc.

- i.e., it specifies sequences.The fact of math. commutativity (A+B = B+A, a AND b = b AND a... etc.) and the fact of functional commutativity (disconnectedness of the rungs,free order of the rungs) are not important. IMO.

James Ingraham:> Vladimir, which of these would you put Relay Ladder Logic into? It> certainly doesn't look like a declaritive language. And I still say> it is not procedural, because ladder doesn't happen in "steps."

In conception, it is declarative. It expresses the state of each coil in terms of the various inputs and other coils.

In practice, the "solving order" is fixed, and people often take advantage of that, writing programs which are sensitive to rung order.

> Granted, there is an order that rungs are executed, but since every> rung happens every scan the logic doesn't really "proceed."

Prolog has much the same thing - an order of execution - but it's still considered declarative. More modern variants such as Mercury eliminate this, so that order does not matter at all; I don't think there's been any widely used ladder variant that would do that, though.

My original point: "...a language may have both 'procedural' and 'non-procedural' aspects."

It is very rare that something as complicated as a programming language can be put neatly in a category. Intro computer science students are taught these definitions, but they don't really mean a whole lot.

i have an project on diffrentiate moduler, procedural and un strcturel programming languages and also there compilers thats are avialiable in market.plese tell me in detail about that project if possible. i shall be very thankful to u.

Procedural Languages Compilers C/C++/Pascal (free) Programmers must in procedural languages declare how to do it. That means that such programs are structured lists of actions. Usually is easy to find paterns in source and target languages that matches each other.

At least one compiler of C, Fortran, Pascal or other procedural language is probably known to anyone who took part in software development. These languages belong to fixed procedural languges.

Fixed Procedural Languages Compilers When the language is completely known to compiler designers, they can write the compiler optimized for such language. Most of procedural language compilers are of such type. There are also compiler (or just parser) generators for them.

Non-procedural Language Compilers In non-procedural languages programmers specify relations within different data entities. These languages are ususlly more abstract than the procedural ones.

Computations are usually done on some special abstract machine. So the compilers are also build accordingly to this machine.

List Of Programming Languages As of 2002, there were more than 600 languages and major dialects of languages available to software practitioners.

Users of this site are benefiting from open source technologies,
including Linux,
PHP,
MySQL and
Apache. Be happy.
This page served by Yesod4 in the beautiful
Blackstone Valley of Massachusetts, the home of the American Industrial
Revolution.

FortuneWomen can keep a secret just as well as men, but it takes more of them
to do it.

You have clicked on the "?" button for search help. To search the
site, enter your search terms in the box labeled "search the site"
and hit Enter.

Some tips for better search results...

Precede each search term with a "+", as follows:

+Modbus +TCP

Otherwise, any post with either term will match.

Use double quotes around phrases, as follows:

+"Allen Bradley" +ethernet

Otherwise, posts containing these words in separate locations will match.

To exclude a word, precede it with a "-", as follows:

+Modbus -Plus

This will return only posts containing "Modbus" but NOT containing
"Plus".

Note that common words (and, that, etc.) and words shorter than 2 characters
are automatically excluded from searches.

Your subscription request is being
processed.

You must be a Control.com member
to subscribe to threads. Please log in and try again.

If you're not already a member, consider joining. It's free,
and you can customize the content you view, as well as being
able to subscribe to threads and topics, getting new posts
delivered to your email as they appear.

Username

Password

Remember me on this computer

Select the categories for which you would like to
see messages displayed...

Applications

Application Questions and Problems

Automation Business

The Business of Automation and Control

Communications

Communications systems and equipment.

Engineering

Engineering and workplace issues.

HMI

Human-Machine Interface and SCADA.

Information

Information resources, documentation.

Languages

Programming languages.

Motion Control

Motion control, servos, steppers, etc.

Networking

Local and wide area networking in factory automation.

Open Control

Open interfaces, software and hardware

PCs in Automation

Computers in manufacturing; also hardware discussion.

PLCs

PLCs and related questions.

Power Generation

Power generation equipment control.

Process Control

Continuous process industries, DCS questions.

Sensors

Sensor technologies.

Software in Automation

Software, including programming, OS issues, etc.

You must be a Control.com member
to vote on a post. Please log in and try again.

If you're not already a member, consider joining. It's free,
and you can customize the content you view, as well as being
able to subscribe to threads and topics, getting new posts
delivered to your email as they appear.