Skip to main content

PMC Programming

PMC Overview

"PMC" is a Mach feature that uses ladder logic programming to do more complicated I/O configuration. While it has many applications, we most commonly use it to create a safety interlock that states certain criteria must be met before an output can be turned on. 

First, a quick explanation of "ladder logic." 

https://www.youtube.com/watch?v=A07ONVjqGfY

The PMC has extra flexibility to add other conditions to the process!

 

Documentation

Use the Help button to get more documentation on how to program in the PMC. 

 

Setting up A Safety Interlock Using the "Router" PMC

1) Turn on the PMC
  1. To turn on the PMC, first go to "Operator->Edit Screen" on the main menu.
  2. Then at the top left of the screen in the "Screen Tree Manager" click on the machine type. (Figure 1)
  3. At the bottom of the tree manager, click the "..." box under "PMC Oblects." (Figure 1) Then, put a check next to "Router" and click "OK."
  4. Click "Operator->Edit Screen" again. Click "Yes" when prompted to save the screen.

(Figure 1)

2) Understanding the PMC and Ladder Logic

While this is not an exhaustive list, it will give you a quick reference to help you think through the ladder logic before moving on to configuration. Use the image below as a guide.

  1. First, to open the PMC on a machine, go to "Configure->PMC" on the main menu.
  2. Then click "File->Open" and select "Router.pmc" to see the configuration for the PMC. (Figure 2 below is the factory settings for the Router PMC we ship with a standard 2050 Knee Mill.)
  3. Ladder logic gets read top to bottom, left to right. So, when reading this, you would start at the top right, following sequence 1 through 13 shown in pink in Figure 2.
  4. Please not that everything here is configurable. If you double click on any rungs on the ladder, it will bring up a screen where you can configure the parameters.
  5. You will see several brackets on the rungs; shown as "] [" or "]/[." These brackets are simply showing the signal condition. Just think of it this way...
    • ] [ means "Yes" and ]/[ means "No"
    • So, for example, on #5 in the sequence on Figure 2, the "FSpindleOn" condition is "]/[" meaning "no;" we do not want the spindle on!
  6. You will see several numbers set throughout the PMC. These are looking for specific states or values to be true. For example, if look at sequence #3 in the ladder logic on Figure 2, you'll see several different different numbers below it looking for different "states" Mach should be in.
    • "0" is Mach in an "idle" state.
    • So, "0" is "AMachState" that must be true (=) to move though the ladder.
    • And remember, there are many more Mach "states!" (108, 207, etc.)
  7. The "R" and "S" values in the ladder stand for "Reset" and "Set." These are at the end of the ladder on Figure 2. That is because they are used for the signal we are using the PMC to program! Just think of it this way...
    • "Set" is turn on --- "Reset" is turn off
    • Let's think through the example below. Look at "FReleaseTool" signal at the end of the ladder
      • If the "GToolReleaseBtn" button condition is "] [" (or "yes"), it puts "FReleaseTool" to "S" (or "turns on").
      • If the "GToolReleaseBtn" button condition is "]/[" (or "no"), it puts "FReleaseTool" to "R" (or "turns off").
  8. "OSR" (shown at #9 and #12 in Figure 2) stands for "One Shot Rising" and is used to configure one time events in a PLC/PMC. These are not typically used for this type of safety interlock.

3) Programming the PMC for a Tool Release Safety Interlock

Let's return to our example from section 1; tool release button in input #2 and drawbar solenoid in output #2.

image-1630606774857.png

  1. Select "Configure->PMC" from the main menu.
  2. Then click "File->Open" and select "Router.pmc" to see the configuration for this PMC.
  3. Delete both "OSR" items clicking them and hitting "Delete" on your keyboard.
  4. Double click on "GToolReleaseBtn ] [." Change to the desired source, input and rename.
  5. Double click on "FReleaseTool" Change to the desired source, output and rename.
  6. Press f5 to generate. This converts the ladder you have to a lua file Mach 4 can actually run. It will not work unless you complete this step.
  7. Click "File->Save" to save the new PMC config.
  8. Close the PMC window.