76
PNSPO CJ1M Motion & Interrupts

[268]Omron_CJ1M_Motion_Introduction

Embed Size (px)

Citation preview

Page 1: [268]Omron_CJ1M_Motion_Introduction

PNSPO CJ1MMotion & Interrupts

Page 2: [268]Omron_CJ1M_Motion_Introduction

Agenda•System Configuration

•Motion Capabilities

•Applicable Literature

•Wiring

•Using the pulse output functions

•Using the High Speed Counting functions

•Using the Interrupt functions

•Using the Compare Table function

Page 3: [268]Omron_CJ1M_Motion_Introduction

4 New CPUs introduced into the CJ1 Family

Page 4: [268]Omron_CJ1M_Motion_Introduction

The CJ1M has many of the same features as the CJ1G/H

•Same instruction set as CJ1/CS1 (400 +)•Compact Flash Card Support•Serial PLC Link 1:9 among CJ1M only•Uses standard CJ1 I/O and communications modules (DeviceNet, Controller Link, Ethernet, Protocol Macro).

Page 5: [268]Omron_CJ1M_Motion_Introduction

Pulse Input and Output capabilities of the CJ1M-CPU22/23

Note:

The 60 kHz refers to Transistor Output + Regular HSC Inputs.

The 100 kHz refers to Line Driver (RS422) inputs and outputs.

Page 6: [268]Omron_CJ1M_Motion_Introduction

Feedback to CJ1M-CPU22/23

The CJ1M-CPU22/23 has 2 high speed pulse outputs and 2 high speed encoder inputs. The CPUs do not, however, create a close or semi-closed positioning loop. The user can create a ladder program to compare the position from the encoder feedback after the completion of a positioning command, but this is not dynamic.

Page 7: [268]Omron_CJ1M_Motion_Introduction

Typical ConfigurationCJ1M + Stepper

Page 8: [268]Omron_CJ1M_Motion_Introduction

Typical ConfigurationCJ1M + Inverter

Page 9: [268]Omron_CJ1M_Motion_Introduction

Typical ConfigurationCJ1M + SmartStep Servo

Page 10: [268]Omron_CJ1M_Motion_Introduction

Typical ConfigurationCJ1M + W Series Servo

Page 11: [268]Omron_CJ1M_Motion_Introduction

Addressing the Built in I/O for use in ladder

•Inputs: CIO 2960.00 - CIO 2960.09

•Outputs: CIO 2961.00 - CIO 2961.05

Page 12: [268]Omron_CJ1M_Motion_Introduction

Input Wiring (pg 23 of W395)LD = Line Driver24 VDC Inputs

Page 13: [268]Omron_CJ1M_Motion_Introduction

Output Wiring (pg 23 of W395)

Page 14: [268]Omron_CJ1M_Motion_Introduction

Pulse Output Programming

PULSSPEDACC

PULS2ORGINI

Page 15: [268]Omron_CJ1M_Motion_Introduction

Monitoring the Present Position and Port Status

The present position of the pulse output ports can always be monitored in the following channels:

Port 0 Present Position: A276-A277 (in HEX)

Port 1 Present Position: A278-A279 (in HEX)

The status of the pulse output ports can be monitored as follows:

Port 0 Busy: A280.04 Port 0 Complete A280.03

Port 1 Busy: A281.04 Port 1 Complete A281.03

Page 16: [268]Omron_CJ1M_Motion_Introduction

PULS – Set Pulses

Page 17: [268]Omron_CJ1M_Motion_Introduction

PULS - Details

Page 18: [268]Omron_CJ1M_Motion_Introduction

SPED – Set the Motion Frequency

Page 19: [268]Omron_CJ1M_Motion_Introduction

SPED - Details

Page 20: [268]Omron_CJ1M_Motion_Introduction

PULS + SPED

No Acceleration or Deceleration

Page 21: [268]Omron_CJ1M_Motion_Introduction

PULS and SPED Example

5000 HEX Pulses (20480 BCD Pulses)

FFF HEX PPS (4095 BCD PPS)

Independent Mode

Page 22: [268]Omron_CJ1M_Motion_Introduction

ACC -Accelerate

Page 23: [268]Omron_CJ1M_Motion_Introduction

ACC - Details

Page 24: [268]Omron_CJ1M_Motion_Introduction

PULS +ACC

For stepper motors, this will pass through resonance frequencies of the step motor on the way to the target frequency.

Page 25: [268]Omron_CJ1M_Motion_Introduction

ACC will operate correctly even if the target frequency cannot be achieved.

Page 26: [268]Omron_CJ1M_Motion_Introduction

PULS + ACC Example

Page 27: [268]Omron_CJ1M_Motion_Introduction

PLS2 – Pulse 2

Page 28: [268]Omron_CJ1M_Motion_Introduction

PLS2 - Details

Page 29: [268]Omron_CJ1M_Motion_Introduction

PLS2 will operate if the target frequency cannot be achieved.

This is an improvement over the CQM1-CPU43 and

CQM1H + PLB21.

Page 30: [268]Omron_CJ1M_Motion_Introduction

PLS2 Example

Page 31: [268]Omron_CJ1M_Motion_Introduction

PLS2 Example Continued

Page 32: [268]Omron_CJ1M_Motion_Introduction

PLS2 Example Continued

Page 33: [268]Omron_CJ1M_Motion_Introduction

INI – Mode Control

Page 34: [268]Omron_CJ1M_Motion_Introduction

INI – Details for Stopping

Pulse Outputs

This is an immediate stop, with no deceleration.

Page 35: [268]Omron_CJ1M_Motion_Introduction

INI Example

Page 36: [268]Omron_CJ1M_Motion_Introduction

Mark Registration

One of the key differences between a CJ1M-CPU22/23 and any other CPU based motion control (CPM1A, CPM2A, CQM1H) is the ability to start a motion movement while another is already running. This allow the CJ1M to perform Mark Registration. Ie move until you see a mark, label, product, etc, and then start another movement without stopping the first movement. PLS2 commands are the best to use for mark registration applications. There are limitations when using PLS, SPED, ACC for mark registration.

See appendix A of the CJ1M Built In I/O Installation Manual for details on these restrictions.

Page 37: [268]Omron_CJ1M_Motion_Introduction

PWM – Pulse Width Modulation

Page 38: [268]Omron_CJ1M_Motion_Introduction

PWM – Details

Page 39: [268]Omron_CJ1M_Motion_Introduction

The Origin Search Function

Page 40: [268]Omron_CJ1M_Motion_Introduction

Origin Search Setup

Page 41: [268]Omron_CJ1M_Motion_Introduction

ORG – Origin Search or Return

Page 42: [268]Omron_CJ1M_Motion_Introduction

ORG - Details

Page 43: [268]Omron_CJ1M_Motion_Introduction

High Speed Counting

PRV

INI

Page 44: [268]Omron_CJ1M_Motion_Introduction

High Speed Counter Setup

Page 45: [268]Omron_CJ1M_Motion_Introduction

Monitoring the Count

•Present Count Value is stored in A270 + A271 for HSC0 (in HEX)•Present Count Value is stored in A272 + A273 for HSC1 (in HEX)

Page 46: [268]Omron_CJ1M_Motion_Introduction

PRV – Present Value Read

Page 47: [268]Omron_CJ1M_Motion_Introduction

PRV - Details

Page 48: [268]Omron_CJ1M_Motion_Introduction

PRV - Example

Page 49: [268]Omron_CJ1M_Motion_Introduction

INI – For HSC Reset

Page 50: [268]Omron_CJ1M_Motion_Introduction

INI Example – HSC Reset

Page 51: [268]Omron_CJ1M_Motion_Introduction

InterruptsMSKSCLI

Page 52: [268]Omron_CJ1M_Motion_Introduction

Using Input Interrupts•Input Interrupts

–Interrupt Input 0 Task Int 140–Interrupt Input 1 Task Int 141–Interrupt Input 2 Task Int 142–Interrupt Input 3 Task Int 143

Note: Inputs 0 and 1 will not function as interrupt inputs if origin search has been enabled for axis 0 and 1.

Page 53: [268]Omron_CJ1M_Motion_Introduction

Input Interrupt Setup

Page 54: [268]Omron_CJ1M_Motion_Introduction

Interrupt Masks

By default the Interrupt Inputs are ‘Masked’. ‘Masked’ inputs are buffered, but not processed until the mask is cleared (disabled).

Because Interrupts are buffered, it is generally a good idea to Clear the Interrupts, then Unmask the Interrupts. This will erase any input interrupts that were buffered while the interrupt was masked.

Page 55: [268]Omron_CJ1M_Motion_Introduction

MSKS – Mask Set

Page 56: [268]Omron_CJ1M_Motion_Introduction

MSKS - Details

Page 57: [268]Omron_CJ1M_Motion_Introduction

MSKS Details Continued

Specifying Rising or Trailing Edge Trigger

Page 58: [268]Omron_CJ1M_Motion_Introduction

MSKS Example

Page 59: [268]Omron_CJ1M_Motion_Introduction

CLI – Clear Interrupt

Page 60: [268]Omron_CJ1M_Motion_Introduction

CLI - Details

Page 61: [268]Omron_CJ1M_Motion_Introduction

CLI - Example

Page 62: [268]Omron_CJ1M_Motion_Introduction

Using Scheduled Interrupts

•Scheduled Interrupts–Scheduled Interrupt 0 Task Int 02–Scheduled Interrupt 1 Task Int 03

Page 63: [268]Omron_CJ1M_Motion_Introduction

Scheduled Interrupt Setup

Page 64: [268]Omron_CJ1M_Motion_Introduction

Setting the time until the first scheduled interrupt with CLI

Page 65: [268]Omron_CJ1M_Motion_Introduction

Using MSKS to set the time between schedule interrupts

Page 66: [268]Omron_CJ1M_Motion_Introduction

CLI and MSKS Example

In this example, the time to the first schedule interrupt and the delay between subsequent interrupts is the same. The value is manipulated by the program in D1201.

Page 67: [268]Omron_CJ1M_Motion_Introduction

Using Comparison Tables to trigger events at various points in

a positioning profile.

INI

CTBL

Page 68: [268]Omron_CJ1M_Motion_Introduction

CTBL –Compare Table

Note: This instruction works with the High Speed Counter PV. If no encoder is available, the pulse outputs to the stepper can be wired in parallel with the high speed counter inputs to feed the pulses into the high speed counter, thus creating a virtual encoder.

Page 69: [268]Omron_CJ1M_Motion_Introduction

Why use CTBL?Using the compare table instruction is an easy way to turn on and off outputs as a function of the position of an axis. Pushers, blow off nozzles, etc. can be controlled with the CTBL instruction.

Page 70: [268]Omron_CJ1M_Motion_Introduction

CTBL-Details

Page 71: [268]Omron_CJ1M_Motion_Introduction

CTBL – Target Comparison

Page 72: [268]Omron_CJ1M_Motion_Introduction

CTBL – Range Comparison

Range Comparison Tables are always 8 ranges log. To disable a particular range, set the Interrupt Task Number to FFFF.

Page 73: [268]Omron_CJ1M_Motion_Introduction

Starting CTBL with INI

Page 74: [268]Omron_CJ1M_Motion_Introduction

CTBL Example

BCD

HEX

Page 75: [268]Omron_CJ1M_Motion_Introduction

CTBL Example

Page 76: [268]Omron_CJ1M_Motion_Introduction