Jump to content
OMRON Forums

Why is "DISABLE PLC" not working as expected?


nzfm4r123

Recommended Posts

Hello All,

 

I appreciate your patience as I am a novice when it comes to Turbo PMAC. I imagine this problem will be relatively simple for forum veterans.

 

The attached "DISABLE PLC" command (detailed in Excel spreadsheet) does not work as intended and I hope you can provide some insight as to why. Rather than ceasing execution, the PLC program keeps running after "DISABLE PLC". "DISABLE PLC" occurs if interlocked door is opened during jog command.

 

My first goal is to stop PLC program execution after "DISABLE PLC". My second goal is to offer an alternative path to "DISABLE PLC". I want to physically stop a jog motion if a door is opened, and resume original motion until completion after door is closed. For example if jog motion was 50% complete when interlocked door was opened and then closed, finish jogging the remaining 50%.

 

I use a GeoBrick GBL5-CO-5F2-10S to control a Friction Stir Weld (FSW) machine:

six-axis, Turbo PMAC2 processor (80Mhz, 8kx24 internal, 256kx24SRAM, 1MB flash)

 

The FSW machine has two nests, left and right. An operator loads the left nest as the right nest is welding (in a coordinated system PROG14 or PROG15 program) and vice versa. After a successful weld, a PLC program will jog the nest to an unload position where a SCARA robot picks and removes the welded part. If interlocked doors are opened during jog, motion will stop. However, once interlocks are restored, weird things happen because the PLC program kept running as if the jog was not interrupted.

 

I have attached a full configuration backup and an Excel spreadsheet (renamed from .xlsx to .txt) that I hope sufficiently explains what the current code is doing. I highlighted red lines that I think are most pertinent to the problem. I indented the code because helps me keep track of program flow. Feel free to respond if you need additional information.

 

As always I appreciate your help. Thanks!

 

Regards,

John

john.sabina@gm.com

20160724 - FSW3 Config FULL BACKUP Configuration.txt

PLC programs.txt

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

just had the same problem

add a space between PLC and the number

Disable PLC 3 not Disable PLC3

 

Hi Tom, and thank you for your response. I had to laugh when I read your post. So simple, but I probably would not have figured it out without your help. Thanks!

 

The machine runs 24/6, so I will try this out on Sunday.

 

Thanks again and regards.

John

Link to comment
Share on other sites

I see M4018=0 and M4029=0 in other places in the config, so I wonder if that "If" condition, i.e. IF(M12=1ANDM4023=1), is really evaluating true. What happens if you set some other variable (unused) in there as a test?

 

Thanks Steve--understood on the DISABLE syntax.

 

Thanks Gregs. As I run FSW, here are some watch variables:

1. Left nest successfully welds part and starts jogging to robot unload position:

-M4018=1 (Visual Studio GUI has enabled robot unload operation)

-M5002=0 (This variable communicates PLC26 status to Visual Studio GUI. Zero indicates PLC26 is running)

-M4029=1 (This variables tell right-nest PLC28 that left nest is jogging to robot unload position)

-M15=1 (This variable tell Visual Studio GUI that robot controller is running robot and that robot is ready to unload left nest).

2. I force open a safety door. Nest stops moving.

-M4018=1

-M5002=64

-M4029=1

-M15=1

3. I turn robot controller off. This is prevent robot from trying to pickup part from nest.

-M4018=1

-M5002=64

-M4029=1

-M15=0

4. I close door. Nest does not move.

-M4018=0

-M5002=32

-M4029=0

-M15=0

 

Between steps 3 and 4 PLC26 should have executed a "DISABLE PLC26" command. I don't know why PMAC continues executing PLC26 commands. See attached .rtf document. I red-highlighted pertinent section of code.

Link to comment
Share on other sites

Thanks Steve--understood on the DISABLE command syntax.

 

Gregs, here are some PEWin32Pro2 watch variables as I run FSW left nest:

1. Left nest successfully welds and starts to jog towards robot unload.

-M4018=1 (variable that Visual Studio GUI tells PMAC to jog to robot unload position).

-M5002=0 (variable that tells Visual Studio status of PLC26. Status is PLC26 has started).

-M4029=1 (variable that tells PLC28 (jog right nest to robot unload) that PLC26 is working).

-M15=1 (variable from robot unload controller that it is ready to unload a part from nest).

2. I force open a safety door. Nest stops moving.

-M4018=1

-M5002=64 (PLC26 fault. Nest was moving when door opened)

-M4029=1

-M15=1

3. I disable robot unload. I don't robot unload to cycle when nest isn't in unload position.

-M4018=1

-M5002=64

-M4029=1

-M15=0

4. I close door. Nest does not move.

-M4018=0

-M5002=32 (I dont' understand how code gets to this point)

-M4029=0

-M15=0

 

I don't understand why DISABLE PLC26 does not prevent step 4 variables from occurring.

 

Hopefully by renaming the .txt file to .rtf, you can see red-highlights of pertinent code.

20160731 - PLC26_draft.txt

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...