News:

  • April 16, 2026, 03:02:08 PM

Login with username, password and session length

Author Topic: E401 Missing End Statement  (Read 18448 times)

wilkerson29847

  • Newbie
  • *
  • Posts: 6
E401 Missing End Statement
« on: April 05, 2011, 12:01:30 PM »
I am getting an E401 Missing END fatal error, and I have an end statement on the last line of the program. Why would it give me that error?

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: E401 Missing End Statement
« Reply #1 on: April 05, 2011, 12:25:19 PM »
The END statement must occur before any subroutines, interrupts or data lables. Maybe that's it.
An output is a PLC's way of getting its inputs to change.

wilkerson29847

  • Newbie
  • *
  • Posts: 6
Re: E401 Missing End Statement
« Reply #2 on: April 06, 2011, 11:39:39 AM »
I looked and looked and I have no data labels, interrupts or subroutines. I can post the program in Mnemonic view if you would be willing to take a look at it. Apparently, I am getting my butt whipped by this DirectLogix stuff so far.

Thanks,

David

wilkerson29847

  • Newbie
  • *
  • Posts: 6
Re: E401 Missing End Statement
« Reply #3 on: April 06, 2011, 01:49:20 PM »
Here is what I have. Can you see anything wrong?

PLC 06

// Rung 1
// Address 0
STR X0
AND X1
AND X12
AND X16
OUT C0

// Rung 2
// Address 5
STR C0
STRN X17
AND X2
STR X17
STR X23
AND X5
OR Y1
ANDSTR
ORSTR
ANDSTR
ANDN X3
ANDN Y0
OUT Y1

// Rung 3
// Address 18
STR C0
STRN X17
AND X4
STR X17
STR X23
AND X3
OR Y0
ANDSTR
ORSTR
ANDSTR
ANDN X5
ANDN Y1
OUT Y0

// Rung 4
// Address 31
STR C0
ANDN X17
AND X12
ANDN X6
ANDN X7
STR X10
OR Y3
OR X11
ANDSTR
ANDN Y2
ANDN X20
OUT Y3

// Rung 5
// Address 43
STR C0
ANDN X17
AND X12
ANDN X6
ANDN X7
AND X13
ANDN Y3
OUT Y2

// Rung 6
// Address 51
STR C0
ANDN X17
AND X12
ANDN X6
ANDN X7
STR X14
OR X11
OR Y4
ANDSTR
AND Y3
ANDN X21
OUT Y4

// Rung 7
// Address 63
STR Y3
AND Y4
OUT Y5

// Rung 8
// Address 66
STR C0
STRN Y3
ORN Y4
STR X17
AND X22
ORSTR
ANDSTR
ANDN X15
TMR T0 K900

// Rung 9
// Address 77
STR T0
OUT Y6
OUT Y7

// Rung 10
// Address 80
END

// Rung 11
// Address 81
NOP


#BEGIN ELEMENT_DOC
"X0","","","Master Stop Inside"
"X1","","","Master Stop Outside"
"X2","","","Pivot Chute Left PB"
"X3","","","Left Overtravel LS"
"X4","","","Pivot Chute Right PB"
"X5","","","Right Overtravel LS"
"X6","","","Stop Button Inside"
"X7","","","Stop Button Outside"
"X10","","","Incline Conveyor FWD PB"
"X11","","","Master Start PB Inside"
"X12","","","Ladder Safety Gate"
"X13","","","Incline Conveyor REV PB"
"X14","","","Start PB Outside"
"X15","","","Alarm Silence PB"
"X16","","","Tunnel Rope Switch"
"X17","","","Auto/Manual Switch"
"X20","","","SSCU-1 Incline Conveyor Auto Control"
"X21","","","SSCU-2 Vibrating Conveyor Auto Control"
"X22","","","SSCU-3 Alarm Auto Control"
"X23","","","SSCU-4 Pivot Chute Auto Control"
"Y0","","","Pivot Chute Right Engage"
"Y1","","","Pivot Chute Left Engage"
"Y2","","","Incline Conveyor REV"
"Y3","","","Incline Conveyor FWD"
"Y4","","","Vibrating Conveyor"
"Y5","","","Green Run Light"
"Y6","","","Alarm Horn"
"Y7","","","Alarm Light"
"C0","","","E-stop Circuit OK"
"C1","","","End"
"C10","","","Change position from the left parked position  OS"
"C11","","","Change position from the right parked position OS"
"C12","","","seal in when in auto and swing is at end of stroke to the right"
"T0","","","Alarm Timer for Conveyor Shutdown"

#END

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: E401 Missing End Statement
« Reply #4 on: April 06, 2011, 02:05:15 PM »
I don't have a CPU to load this into. It's ok on import. The error would come only after downloading it to the CPU and transitioning to run. An empty CPU will show this error until a valid program (with an END statement) is downloaded and it is changed to RUN mode.
An output is a PLC's way of getting its inputs to change.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3803
    • Host Engineering
Re: E401 Missing End Statement
« Reply #5 on: April 06, 2011, 02:18:49 PM »
I bet that's the issue.  The ERROR remains UNTIL you try to go to RUN mode.  Even after you download with the fixed program that HAS the END, you will see the ERROR - until you go to RUN.

milldrone

  • Full Member
  • ***
  • Posts: 48
  • I'm changing my attitude to thumbs up
Re: E401 Missing End Statement
« Reply #6 on: April 07, 2011, 09:31:15 PM »
David,

I loaded your program into a DL06 without any errors.
Vaughn