begginer's qustion

Please don't lose the believe in mankind yet....

Yepp Rick is right. I have sitting on the gif-image for a while and thought this was a great opportunity to use it. :D

And Paul, I think it is acceptet to steal from thieves...


Regarding the opinions about programming languages, I think the oldtimers here know my favorite.....
 
By the way, that clip is from the movie "Office Space".

Well worth renting, or just wait a few days... They seem to play it bi-weekly on Comedy Central... :nodi:

beerchug

-Eric
 
Not meant to offend...

Naturally I depend on programmers and engineers for lots of the advice I get, so in no way did I mean to bite the hand that feeds me.

Here is my situation. The fellows who originally designed (engineer), and programmed (programmer), the equipment we use in our sawmill are a thousand miles away in another province. They have sold this equipment in the past as a replacement for all the hard wiring in the mill. The PLC people found that Ladder Logic was the way to sell this technology to the people using banks of relays for control. Other than my supervisor who used to have my job, being in the middle of nowhere, I have to be the engineer, programmer, and maintenance tech all at once. No, I am not calling myself an engineer or programmer, but I am the one who does it here. My Degree is accredited by the school of "No else wants to live here and do this". So here I am relying on you guys to keep my mill running, and my employer feeding my wife and two kids. I'm not trying to start a fight, just defend the poor guys who have to keep things running......
 
most of you people are
beerchug

I wish I had as much time to bicker around as most of the people are on here.
 
Well folks here say that i have biased views about B&R but i will show you with an example how easy it is to write a code in Automation Basic or C which is supported even by B&R 2003 Micro PLCs compared to Ladder Diagrams.

Lets consider this simple application. We have two push buttons Motor_Start and Motor_Stop and a Motor.
Motor should start when operator pushes Motor_Start Button and stops when Motor_Stop Push Buttton is pressed . Ladder code will look like this:

---||---------|/|--------------()-------
X0000 | X0001 Y0000
|
---|/|----

Y0000

where X0000 - Motor_Start
X0001 - Motor_Stop
Y0000- Motor


Folks new to Ladder diagram programmimg wonder what the second line is for ? Well its called latch.Latching is a very important concept and if the programmer dont have electrical circuits background they have hard time digesting it.
How about something like this in high level language ?

If (Motor_Start = ON) and (Motor_Stop = OFF) then
Motor = ON
else
Motor = OFF
endif

Another example: Suppose you have to count products manufactured, by using a photoelectric sensor and reset the counter when count reaches 10,000.In Ladder Diagram you will have to use UP Counter fuction block whereas in High level language u can just write one line

Production_Count = PhotoSenser +1

if (Production_Count >= 10,000)
Production_Count = 0 // Reset the counter
endif




Now tell me Kiran, what you will prefer ?
Ladder Diagram or High Level Language ?

High level language code is more readable and could be understood easily by anyone whereas if you put ladder infront of someone who dont know what ladder is, he will just go mad !!

I hate Ladder Diagrams.Its pain in the A** to write complex logic in Ladder Diagrams.

Suppose I have to do some simple calculation such as:

Result = ((A+B)/(C+D)) * ((E-F-G-H) + (I+J+K+F)) / 10 * e 10

Just count how many function blocks you have to call and store result in some Temperory registers.If you use Higher level language you are done with it !

I can give such 100s of examples where programming in Ladder Diagram sucks,to prove my point.

But Kiran remember, most of the time its customer's choice and not the Programmers to choose the PLC and Programming Language so you have to live with it !

Welcome to the club and Wish you a luck :)
 
I'm curious about the B & R

Hey_rajan, does the B&R require a linker and/or locator?

Is the operating system in firmware or linked in with the user program?

Is the code compiled or interpreted?

If the operating system is in firmware does the user code need to be recompiled and down loaded again?

Does the B&R show the status of the variables in the code like a PLC?

Can one make changes on line while the machine is running?

Inquiring minds want to know.
 
Kidblue,

Ok ! Let me explain how you can implement a Latch in Higher level language.Lets write something like this.....

If(Motor_Start = ON)
Motor = ON
endif

This is nothing but a latch.Now lets see how this stuff works.
Initial Condition: Motor_Start = OFF,Motor_Start = OFF, Motor = OFF

Now operator presses the Momentory Push Button Motor_Start.
Remember its a Momentary Push Button (Similar to Inching type)

In next scan PLC sees your Motor_Start = ON and turns on the Motor
Lets just say this was Scan No 1.

Now in Scan No 2 PLC sees that your Motor_Start = OFF (Remember it was Momentary) so it will not even enter this if block again so your
Motor is on forever if there is no other condition turning it OFF.

Isnt it a simple latch ?

Now suppose i write something like this

If(Motor_Start = ON)
Motor = ON
endif

If(Motor_Stop = ON)
Motor = OFF
endif

Suppose the Motor is already ON and operator presses Motor_Stop push button Momentarily.

Now as Motor_Start = OFF and Motor_Stop = ON second if block will be executed and Motor will be turned OFF.

I can do this in single if statment like this...

(Oops there was a small bug in my earlier post) :D

If (Motor_Start = ON) and (Motor_Stop = OFF) then
Motor = ON
else if (Motor_Stop = ON)
Motor = OFF
endif

Hope this will help :)
 
My point was rajan, the 'latch' should have been an Examine if Closed/Normally open/XIC, whatever terminology suits you, not a Normally closed as you depicted! Your motor would have stopped as soon as you released the momentary start button.
 
Peter,

B&R has its own Programming Package called Automation Studio similar to Microsoft Visual Studio.It has built in GNU C compiler.
The operating system resides inside the B&R CPU. User writes the application using Automation Studio and then compile it and downloads it in B&R CPU.The process is very much similar to other PLCs.

In initial stages of development you can define all the variables used in your program as Internal/Memory variables so that you can download and test your program with just a B&R CPU.You dont need any I/O modules to test your program.

You can add the variables, you would like to watch in Watch Window (Similar to MS Visual Studio) and you can see the status in watch window.Also when you are in Online mode with CPU connected you can switch to Debug mode and just point your mouse over any variable used in your program and it will show its value in Tooltip. Thats really kool ! You can also set breakpoints and debug code line by line.

Have you ever used VB 6.0/VC++ 6.0 ? The enviornment is pretty much similar to it.

Also you can download new version of program online while the old version is running.New program will be effective from next scan.

One more thing your program is hardware independent you can assign actual I/Os to the variables once you get to the shop floor !
Also its very easy to change I/O assignment if required.

Hope this will help

For more info visit www.br-automation.com
 
"Production_Count = PhotoSenser +1 "

I'm betting that the production_count will never exceed 2, in which case you won't need the reset code.<grin>

Bill
 
You got me bill ! Actually what i wanted to say was...

If(EDGEPOS(PhotoSensor))

ProductionCount = ProductionCount +1

endif

Where EDGEPOS detects the Positive Edge.
 
Has anybody a comment for Johnnies request?
I am interestet in a trial freebe flowchart program to compare it with Ladder/Memonic.
Regards
 

Similar Topics

hi all..panelview plus 1250.. can i remove flash drive(2711p-rw1)format it and install windows ce5 ..this is to hook the panel up to my hobby...
Replies
0
Views
867
hi all first post ..i came accross a panelview plus 1250 from a sewage works..is there any to format it or take it back to windows ce 4.1..i eas...
Replies
5
Views
1,355
hello people im new to this awesome forum as the title says, im new to ab, i got this ab micrologix 1000 and i was browsing about the software i...
Replies
5
Views
4,843
Hi , I am using Omron CJ1M –CPU11, Software : Cx Programmer.. 1 st question : I want to know whether a subroutine can be called in another...
Replies
10
Views
2,543
I begginer in Omron PLCs and I want to ask what is the last IDE where using for programming omron CJ1M-CPU11 PLCs, and from where can I download it?
Replies
2
Views
3,009
Back
Top Bottom