Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

The Motion Control

Function Module

infoPLC.net
140 - 1
Automation Systems
This Section will cover:

• The Motion Control Module


• The Axis Parameters and Setup
• The Axis variable (AXIS_REF)
• Test RUN

140 - 2
Automation Systems
NJ501 Motion Control Function Module (MC)

•The Motion Control Function Module (MC) is the part of


the NJ system that takes control of the Axes.
•The MC is built in each NJ-CPU Unit.
•The MC can control up to 64* virtual or physical (EtherCAT) axes
•The MC can manage DISCRETE, SYNCHRONIZED and COORDINATED
(groups) motion.

*Depending on the CPU model

140 - 3
Automation Systems
NJ501 Motion Control Function Module (MC)
•Axis parameters in the MC are synchronously linked to the IEC Axis variable [AXIS_REF ]
datatype.
•Motion Commands (POU) are executed in IEC task.
•Motion Commands (POU) are buffered to invoque Motion functions from the MC
•MC generates the Motion Profile according to the IEC Motion program.
•Axes are fully controlled and monitored by the MC
•MC and EtherCAT Servos exchange synchronous data

User
MC Module
Program Motion
Profile

EtherCAT Comms
Motion Function
FB
Out
G5
Command
Parameters
(AXIS_REF)

Servos
Variable

Feedback In
Axis

Other..

140 - 4
Automation Systems
PLC-MC Task Synchronization

• IEC Primary Task Program and MC are completelly executed and finished
within the EtherCAT cycle time.
• Consequence: NJ Program is strictly synchronized with the EtherCAT
Drives

PLC PLC
MC MC
Primary Task Primary Task

EtherCAT Process EtherCAT Process


Data Cycle Data Cycle

140 - 5
Automation Systems
The Axis

140 - 6
Automation Systems
NJ501 : The Axis

•MC is designed to perform complex motion operations in combination with


the G5 EtherCAT axis.
•MC can also work with different kinds of axes: Servo, virtual, encoder,..
•The MC axes are linked to the Logic controller by means of the AXIS_REF

140 - 7
Automation Systems
NJ501 : Axis Types

•NJ501 Supports the following kind of Axis:

Axis Type Description


Servo axis These are the axes used by the EtherCAT slave Servo Drives.
They are assigned to actual Servo Drives.
One Servomotor is used as one axis.
Virtual servo axis These are virtual axes that exist only inside the MC Function Module.
They are not used by actual Servo Drives.
For example, they are used as master axes for synchronizing control.
Encoder axis An encoder axis uses an EtherCAT slave encoder input terminal.
Encoder axes are assigned to actual encoder input terminals.

Virtual encoder These axes are used virtually for encoder operation.
For example, they are used for debugging when there is no encoder.

140 - 8
Automation Systems
NJ501 : Axis Parameters

•MC Axis parameters define the axis characteristics and


contains command and feedback information
•MC Axis parameters are accessed by Sysmac Studio for
Configuration and Monitoring.
•Some of those parameters can be also accessed in
Runtime by the Logic Controller by means of the AXIS
Variable (AXIS_REF)

Axis Parameters
Studio

AXIS_REF MC
IEC
Program

140 - 9
Automation Systems
NJ501 : Axis Parameters List

140 - 10
Automation Systems
NJ501 : Axis Parameters List

140 - 11
Automation Systems
NJ501 : Axis Parameters List

140 - 12
Automation Systems
NJ501 : Axis Parameters
•Axis Parameters can be Set/Monitored from Studio:

Axis Parameters

140 - 13
Automation Systems
NJ501 : AXIS Parameter Setup example

Settings view provide


a categorized view of
parameters

140 - 14
Automation Systems
NJ501 : AXIS Parameter Setup example

10000 mm

Tip: Display
purposes Only

140 - 15
Automation Systems
NJ501 : AXIS Parameter Setup example

140 - 16
Automation Systems
NJ501 : AXIS Parameter Setup example

Tip: Define Axis count as Rotary


mode when axis perform an
Rotary
endless motion that will exceed
a Maximum or Minimum Modulo
Positon

Tip: Define Axis count as Linear


mode when axis always will
position within a predefined
limits that will never be
exceeded

140 - 17
Automation Systems
NJ501 : AXIS Parameter Setup example

Linear Counting Mode

Rotary

Position
Positive OverTravel

Negative OverTravel

140 - 18
Automation Systems
NJ501 : AXIS Parameter Setup example

Rotary Counting Mode

Rotary

Position
Modulo MAX Position=360º

Modulo Min Position=0º

140 - 19
Automation Systems
Test Operation (Test Tun)

• Test Operation (Test Run) is used to perform basic test of the motor.
• Test Operation covers:
– Servo Jog
– Servo Positioning (Absolute and Relative)
– Origin Search
– I/O Checking

140 - 20
Automation Systems
VIDEO

140 - 21
Automation Systems
EXERCICE

• Define a Rotary Axis


• Define 360º per revolution
• Perform TEST Operation (JOG) at 1000 deg/s
• Perform TEST Operation (RELATIVE POS):
– Speed 1000 º/s
– Distance 3600 º

140 - 22
Automation Systems
The Axis Variable
(AXIS_REF)

140 - 23
Automation Systems
NJ501 : The Axis Variable (AXIS_REF)

•The Global Axis variables used for Axes (AXIS_REF) type are
the synchronous interface between the Logic Controller and
the MC Axis

Axis Parameters
Studio

MC

AXIS_REF

IEC
Program

140 - 24
Automation Systems
NJ501 : The Axis Variable (AXIS_REF)

• All fundamental Axis information is availiable in the Logic Controller by


means of it’s Axis Variable

Example:
MC_Axis000 is AXIS_REF Datatype
Then:
MC_Axis000.Cmd.Pos contains the Axis Commanded Position
MC_Axis000.Act.Pos contains the Axis Feedback Position

140 - 25
Automation Systems
NJ501 : The Axis Variable (AXIS_REF)

•Axes variables are always defined as GLOBAL


•Axes variables are always AXIS_REF Datatype
•The AXIS_REF is an OMRON’s predefined struct-datatype existing in
the Logic Controller to interface with the the MC axis.

140 - 26
Automation Systems
NJ501 : The Axis Variable (AXIS_REF)

140 - 27
Automation Systems
NJ501 : AXIS_REF: AXIS_REF_CONFIG

Sets the logical number of the axis. This


number is accessed to recognize the axis
number when accessing AXIS_REF

AXIS_REF_CONFIG 0: mcNoneAxis (Undefined Axis)

AxNo UINT 1: mcUnusedAxis (Unused Axis)

AxEnable MC_AXIS_USE 2: mcUsedAxis (Used Axis)

AxType MC_AXIS_TYPE 0: mcServo (Servo axis)


NodeAddress UINT 1: mcEnc (Encoder Axis)
2: mcVirServo (Virtual Servo Axis)
3: mcVirEnc (Virtual Encoder Axis)

Contains the EtheCAT slave address. A


value of 16#FFFF indicates that there is no
address

140 - 28
Automation Systems
NJ501 : AXIS_REF: AXIS_REF_SCALE

Electronic Gear Ratio Numerator.


Normally, the number of pulses
AXIS_REF_SCALE per motor rotation.

Num UDINT Electronic Gear Ratio Denominator.

Den LREAL Normally, the workpiece travel


distance per motor rotation.
Units MC_UNITS
0: mcPls (pulse)
1: mcMm (mm)
2: mcNm (nm)
3: mcDeg (degree)
4: mcInch (inch)
5: mcUm (μm)

140 - 29
Automation Systems
NJ501 : AXIS_REF: AXIS_REF_CMD_DATA

Contains the current value of the


command position. (Unit: command units)
AXIS_REF_CMD_
DATA
Pos LREAL Contains the current value of the command
velocity. (Unit: command units/s)
Vel LREAL
AccDec LREAL Contains the current value of the
command acceleration/deceleration rate.
Jerk LREAL
(Unit: command units/s2)
Trq LREAL

Contains the current value of the


command jerk. (Unit: command units/s3)

Contains the current value of the Torque


command. (Unit: %)

140 - 30
Automation Systems
NJ501 : AXIS_REF: AXIS_REF_STA

Servo is Ready to be operated: StandStil


AXIS_REF_STA and with no Warning.
Ready BOOL Servo is Disabled
Disabled BOOL
Servo is Stoped and Powered.
Standstill BOOL
Discrete Position Control is operated
Discrete BOOL
Continuous BOOL Continuous Position Control is operated

Synchronized BOOL Synchronized Motion is operated


Homing BOOL MC_Home is executing
Stopping BOOL Stopping operation due to MC_Stop
ErrorStop BOOL
MC_ImdStop or Error ocurred.
Coordinated BOOL
Coordinated Motion Control is operated

Following states are mutually exclusive: Disabled, Standstill, Discrete, Continuous,


Synchronized, Homing, Stopping, ErrorStop,Coordinated
140 - 31
Automation Systems
NJ501 : AXIS_REF: AXIS_REF_DET and AXIS_REF_DIR

Idle: xxxx

AXIS_REF_DET
Idle BOOL InPosWaiting: xxxx
InPosWaiting BOOL
Axis is Homed and referenced
Homed BOOL
InHome BOOL Axis is in the Home Position

AXIS_REF_DIR Axis is commanded in the Positive Direction


Posi BOOL
Nega BOOL
Axis is commanded in the Negative Direction

140 - 32
Automation Systems
NJ501 : AXIS_REF: AXIS_STA_DRV (Drive Status)

AXIS_REF_STA_DRV
ServoOn BOOL Servo Powered

Ready BOOL Servo Ready


MainPower BOOL ?
P_OT BOOL Positive OverTravel
N_OT BOOL Negative OverTravel
HomeSw BOOL
Home Proximity Switch
Home BOOL
Home Signal
ImdStop BOOL
Inmediate Stop Input
Latch1 BOOL
Latch (Probe) signals
Latch2 BOOL
DrvAlarm BOOL Drive alarm

DrvWarning BOOL Drive Warning

ILA BOOL Servo Limiting function Active

140 - 33
Automation Systems
NJ501 : AXIS_REF: Actual Feedback, Warnings and Notices

AXIS_REF_ACT_DATA
Feedback Position
Pos LREAL
Feedback Velocity
Vel LREAL
Trq LREAL Actual Torque

AXIS_REF_WARN
Active BOOL Active when XX ocurres
Code UNIT XX Code

AXIS_REF_NOTICE
Active BOOL Active when YY ocurres
Code UNIT YY Code

140 - 34
Automation Systems

You might also like