PDA

View Full Version : DL240 Editting Crash


cnrservices
June 17th, 2004, 07:35 PM
Attached is a Directsoft file for a machine that watches the next machine upline for a ready signal, and if the signal (X11) is there it sends product through.

However this machine in particular does not stop when the X11 signal drops, it "preps" itself by grabbing one last piece & continuing through until it is ready to drop on the conveyor. At this time it is usually holding a piece just above the last piece on the stopped conveyor. As soon as the ready X11 goes true, the machine drops the readied piece on top of the other piece & this causes a problem every time the line is resarted.

I tried adding a rung & having X11 start a 8 Second timer, then using the timer in place of the X11 instruction in Line 90, accepted the edits OK, wrote to the PLC, but at the end of the download where the PLC stops RUN mode & shows PAUSED, the communication with the PLC halted, the CPU Fault light on the PLC came on & I got a error message about the processor memory. I had to power down the PLC & it came back up in RUN mode OK. I also had to shut down Directsoft & DSLaunch & restart them to restart the 240 COMM link.

I went online & redownloded the original file, and the machine ran as before. This happenned a 2nd time exactly the same, so figuring a CPU problem replaced the DL240 with a brand new CPU, downloaded the original file & tried to edit it. SAME CRASH

Now I successfully did the exact same edit (see lines 204 - 206.)

Is there any reason one stage of a program won't take a verified edit, but another stage will?

Also, am I going about this the right way - I want to wait 8 seconds after the Ready signal goes true before dropping a part.

Hopefully some A-D "specialists" can give this AB programmer some guidance.

Eric Nelson
June 17th, 2004, 08:24 PM
I wish I could offer some help with the error, Greg. I don't have a 240 lying around to test. It will probably be helpful to give the EXACT text of the error. If you haven't already, be sure to post this question at the A-D forum (http://forum1.automationdirect.com/cgi-bin/Ultimate.cgi), but don't expect an answer before tomorrow.

I don't use stage programming, so I'm at a loss trying to follow your program. lack of naming and comments doesn't help either (hint, hint)... ;)

As far as adding the 8 second timer goes, what you did should work. BUT, I also see X11 used in rung 10 (a --]/[-- contact). Just be sure that there won't be a problem if X11 happens to turn OFF before the timer expires. If there is, you may need to add something to prevent that --]/[-- contact from going true if the timer didn't finish.

beerchug

-Eric

cnrservices
June 17th, 2004, 08:40 PM
Eric,
lack of naming and comments doesn't help either (hint, hint)...

I know how you feel, I dislike working without schematics or full programs, but the only info I have on the machine is what I uploaded & a couple of quickly traced inputs. (no schematics, printouts or disk on file - the customer bought this at an auction from a competitor closing it's doors.)

As far as line 10, I'm sure that is just sending a fault code to the touchscreen, as I editted that first & it only delayed the screen message coming up while the machine still ran, so I fa'gotaboutit after the first crash.

I figured that with the stages I had to put an individual timer in each stage used, as if one timer was put in a stage not being processed that would cause bigger problems, and I couldn't recognize any area of the program that ALWAYS executed every cycle (like Ladder #2 in a SLC or PLC5) even with the online Stage View - too fast skipping through to even know why it's there.

Thanks for the reply.

P.S. The other option was to reprogram the next machine to delay the ready signal, but I couldn't find anyone in the area with SAIA software, and a few programmers thought I was making the name up.

Eric Nelson
June 17th, 2004, 08:53 PM
Originally posted by cnrservices
I couldn't recognize any area of the program that ALWAYS executed every cycle (like Ladder #2 in a SLC or PLC5) even with the online Stage View - too fast skipping through to even know why it's there.

There isn't any... It's full of stages (reminds me of 2001 - A Space Odyssey "Oh my God, it's full of stars")... :p

Since you'll probably be living with this machine for a while, go ahead and start reverse engineering it. Fill in the I/O descriptions, and start trying to figure out what the original programmer's train of thought was. That is, if he had one... :D

There are plenty of guys here who swear by A-D's stage programming, so the more nicknames, etc. you can add, the better... :nodi:

beerchug

-Eric

bernie_carlton
June 17th, 2004, 09:36 PM
Greg - what's the make of the machinery? The action sounds suspiciously like one of ours when it reacts to a signal which should only come back on when the area is clear. I can't look at the code from home but I'll look at it from work in the morning. I always program in Stage Logic so it makes it even more possible. As to a programming crash, I haven't the faintest.

Thomas Sullens
June 17th, 2004, 10:04 PM
Greg maybe when X11 goes false and signals the panel view you could go to a new stage put some dummy logic in it and when X11 goes true now timeout and go back to the real program. I maybe completely in left field as I don`t use Stages, but if this works it would save alot of documentation.
Good Luck
Tom

cnrservices
June 20th, 2004, 03:37 PM
Thomas,
when X11 goes false and signals the panel view you could go to a new stage put some dummy logic

Since I have no experience with stages, where in this file would I put the call (or calls) to the dummy stage if X11 false to make sure it worked whenever X11 drops and the program isn't looping somewhere else?

And if there was more than one call to that stage would a simple RETURN if X11 true work, or would I have to know what stage I came from?

Eric,
If you haven't already, be sure to post this question at the A-D forum...
Tried that, but have to register to post & get a password e-mailed to you, and my e-mail server WILL NOT process any e-mail from A-D. It all gets SPAM blocked. They must have done something before to get "listed" on the spammers list. Come to think of it I have never gotten an order confirmation, shipping notification or e-mail newsletter from A-D either & I know they have my right address.

elevmike
June 20th, 2004, 06:12 PM
Greg,

A go-around on the AD Forum issue may be to sign up for a free web based email account with MSN or Yahoo. Since the webmail is not downloaded to your server like outlook, it wont be blocked.

Thomas Sullens
June 20th, 2004, 09:39 PM
Hi Greg
The DL205 users manual explains stage programming in section 7. I learned switching between ladder and stage views will show you program flow. S0 and S1 are ING stages this means they are active at power up. S0 always calls S100,GTS1,GTS2,GTS3 and can call S1. S100 calls GTS4 AND GTS5. S1 calls out S10 and son on click view then stage view. Maybe someone who programs in stages can help you I don`t understand it. Did the rung that CRASHED your program look like this? Wish I could help!bonkhead
Good Luck
Thomas
[attachment][and]

cnrservices
June 21st, 2004, 04:39 AM
Thomas,

The crash that shut down the PLC CPU was below - as I only wanted the timer to respond to X11, not any of the other bits or timers in the original line, also I tried different timer numbers and times (T35; K77).

One thing I still question about the stages: if S0 is an ING stage does it get processed every PLC scan or just initially at power up?

Mike,

I guess I have to get another free e-mail account, had one before but got sooooo much spam I had to search 100 e-mails for 1 or 2 "real" e-mails.

cjh
June 21st, 2004, 07:07 AM
The ISG stage turns on at power up (or program to run mode) and it will stay on unless you jump (JMP) out of it or turn the associated S bit for this stage off through some other means (RST, peripheral device, etc...)

If you want code that runs all the time regardless of stage events, you have to place the desired code above ALL stages, including the ISG stage.

icky812
June 21st, 2004, 07:29 AM
Perhaps this application note might be of some help. It goes a bit farther than chapter 7 in explaining some of the rules of Stage programming.

http://support.automationdirect.com/docs/an-misc-024.pdf

Thomas Sullens
June 21st, 2004, 07:33 AM
Greg the manual says the ing stages are treated just like a regular stage after powerup. It looks to me like S0 with S100 and the subrutines would be kind of like regular ladder programming, I don`t think even in stage programming you could go into a sub and just stay there with out the watch dog bitting you. And evidently you can with stages. C4 or C6 calls S1, S1 calls S10 from there a whole line of stages. When it jumps into S22 X5 is on and X3 is on and V2020 equal to or > than V2110 it turns off C34 which turns off Y5.Without doc. it like **** **** and you know the rest.
Have a nice day!
Thomas

icky812
June 21st, 2004, 10:59 AM
It helps a lot to think of each stage as a Master Control Relay. In reality that's exactly how they act. Each stage controls the power rail until the next stage. If a stage is off then "no power", if the stage is on then everything works as normal.

marksji
June 21st, 2004, 04:34 PM
Greg,

I loaded your software in an old 240 and it ran just fine. Added the timer back (T26 as shown in your post) and it still ran just fine.

Not sure what the problem could be... something could be turning off S22 after X11 comes on, but before the 8 seconds are up, it'd have to be X0 or C42 from what I see.

cnrservices
June 21st, 2004, 08:02 PM
Thanks Guys,

If I got this right - Stage S0 isn't shut off or called anywhere else in the program so it must always run every scan. Or not?

If I put the timer to check X11 in SO and then replace all XIC X11 with XIC my timer Done this should work?

marksji,

If some input or program code turned off S22 without me adding any calls to stages would this cause a CPU fault - and stop the PLC communicating with Directsoft, unable to check error, clear fault, change mode, etc.? (Remember - on 2 different CPU's, but the same edit worked fine in another stage.)

Again, thanks for all the input.

Thomas Sullens
June 21st, 2004, 08:47 PM
Greg you are right S0 is always scanned because it is ISG
so it is ACTIVE at powerup it is not Jumped out of or reset
any where in the program. This means GTS K1,K2,K3 are always
scanned. S100 is always on because it is SET in S0 and never
reset so GTS K4, K5 are always scanned. If you JMP out of a
stage the stage you JMP out of is turnedoff the next scan.
If you JMP out in the middle of a stage it
finishes all below it and turns off the next scan.
I hope this helps?
Tom :huh:

testsubject
June 22nd, 2004, 07:41 AM
I swear by stage programming and will take a look at this when i get into work today.

marksji
June 22nd, 2004, 08:17 AM
Originally posted by cnrservices
If some input or program code turned off S22 without me adding any calls to stages would this cause a CPU fault - and stop the PLC communicating with Directsoft, unable to check error, clear fault, change mode, etc.? (Remember - on 2 different CPU's, but the same edit worked fine in another stage.)


Any stage turning off shouldn't cause a CPU fault. What firmware are you using and is it the latest for the 240?

Also, what I/O cards are in what places in the rack? I didn't have any I/O when I tried it and didn't get a fault, I might get different results with some I/O.

testsubject
June 22nd, 2004, 09:07 AM
Mark,

That was going to be my first question; what is the firmware. Could be a new software old firmware issue. Been there, done that.

cnrs,

What output controls the dropping of the carton? I also think that it is somewhere from s22 on where you might be having your problem. As far as the fault is concerned, my first guess would be that the timer is acting funny from within the subroutine and could have caused a timeout condition. I can understand some of the posters positions in having difficulty understanding this program. I try to never have more than one JMP to any Stage. I liken it to doublecoiling. It also makes it difficult to troubleshoot.

cnrservices
June 23rd, 2004, 06:03 PM
Thanks for all the help,

I added a rung to S0 to time delay X11, and changed all other checks to the timer. So far all tested OK.

Mark & testsubject:
I'm not sure of the firmware in the original 240 CPU I removed, but the NEW 240 I replaced it with was just bought from A-D last month - so it should be very current firmware.

P.S. - Just for fun I tried the original noted edit in line 90 & the CPU faulted, no COMMs, DirectSoft reported "Unable to verify write to memory" - had to power down PLC & restart to get COMMs, had to close DirectSoft AND DSLaunch and restart to activate 240 link.


Again, thanks for the guidance - now that this thing is done I can get back to programming REAL PLC's - #&^&$ them stages.

elevmike
June 23rd, 2004, 07:31 PM
cnrs,

you can update your old 240 cpu with new a new firmware chip for $7.00. I found out the hard way that some instructions dont work with earlier firmware.

testsubject
June 23rd, 2004, 09:34 PM
Greg,

I say the same thing about Rockwell software. I just do not know why you would want to have to use function keys to draw rungs and branches when using the arrow keys is just so much easier! :D

I rely very heavily on the scan time reduction that I get from using Block/Stage programming. It can be a bit confusing to the uninitiated, but when you get a handle on it, there is no other way I would rather use.

Bob

cnrservices
June 24th, 2004, 05:53 AM
I just do not know why you would want to have to use function keys to draw rungs and branches

Funtion keys?

I dont think I have pressed any of the function keys on my keyboard more than 5 times in the last year.

Other than typing in descriptive names & timer settings, I program RSLogix using only a trackball & mouse - actually I don't even keep the keyboard in front of me when I am programming, I have to move stuff & bring it down when I need to type (like here.)

Eric Nelson
June 24th, 2004, 06:21 AM
I rarely use a mouse when programming. Soooo much quicker with hotkeys, even for a two-finger typist like myself... :nodi:

beerchug

-Eric

P.S. That explains your lack of nicknames and comments... ;)

cnrservices
June 24th, 2004, 06:37 AM
That explains your lack of nicknames and comments...

Eric,

The reason the program didn't have nicknames & comments, was it was an upload from a machine in service I was working on without schematics or an original program.

A lot of customers (especially this particular cheap one) balk at paying $135.00 per hour for Panel Backtrace Engineering even before the troubleshooting begins.

Eric Nelson
June 24th, 2004, 07:22 AM
Originally posted by cnrservices
The reason the program didn't have nicknames & comments, was it was an upload from a machine in service I was working on without schematics or an original program.

Yeah, I know. I was just kiddin'... :D

beerchug

-Eric

testsubject
June 24th, 2004, 07:26 AM
Eric,

Same here. CTRL+(arrow) gets me all the rungs and branches that I want. I rarely use the mouse. Hotkeys are our friends!;) So are Block/Stages. :D

Bob

Eric Nelson
June 24th, 2004, 07:41 AM
Originally posted by testsubject
So are Block/Stages. :D

One of these days you're gonna have to program a different brand and ask "Where's my $%^&@#$ SG instruction?"... banghead

Nothing wrong with 'em, but I need portability. I accomplish essentially the same end result with my 'step progamming', and it works on ALL brands! (that I'VE ever used)... :nodi:

beerchug

-Eric

testsubject
June 24th, 2004, 08:16 AM
I say that everytime I have to use RS. (Dumb software!)

lolis

Bob

P.S. I do have a serious question though. How do you minimize scan time in RS? Since I started using Block/Stages, my scan time for a 3000+step program went from 60+ms to High 20s. This was important to me. That is one of the main reasons I really love it.

marksji
June 24th, 2004, 08:40 AM
Sorry no serious questions allowed... at least not here :D