Industrial Automation
Industrial Automation | Europe

myKnowledge

Main > Product Type > Software > Programming
Minimize Text   Default    Enlarge Text
 

Print
E-mail

Function Block Position Controller - _NCCPU120_MoveSequence


Introduction
The OMRON FB library for position controllers provides a collection of function blocks developed for simple open loop axis positioning.
Most of the FBs share the same interface (I/O) regardless of the output device employed for positioning (CJ1M, CPUs, CP1H or NC Units).
All the FBs rely on the functionalities built-in the CPUs and NC units.
None of the functions employ the feedback from an encoder for positioning.
 
Function Description 
  • When Start (Execute) turns ON, positioning will be consecutively performed on the Pulse Output Port specified with Axis No. (Axis) using Operation Data (Position command, Target frequency, Acceleration and Deceleration rates, and Operation and ABS/INC modes) in DM Area starting from the First operation data word.
  • Positioning can be started from any Operation No. by specifying Starting operation No. (OperationNo).
  • Sequential positioning will be continued reading Operation Data in DM Area until Operation mode (word n, bit 00 to 03) becomes 0 Hex (Single positioning mode).
  • The Positioning completed (Done) will turn ON when positioning by this FB is completed. It will not turn ON when another instance causes a deceleration stop, or when an error interrupts an operation.
  • The Operation No. in execution (ExecutionNo) reflects the Operation No. currently being executed.
  • When an operation is stopped with a deceleration stop, Abort (CommandAborted) will turn ON.
  • The Error Flag (Error) will be turned ON and the Error Code (Error code) will be output if an error occurs for this FB. They will not change their statuses for errors in other FBs or other instances. These statuses will be reset when the Start (Execute) turns OFF.
  • If Start (Execute) turns OFF before a positioning operation is completed, the status will be set for at least one cycle when a corresponding condition occurs.
Example
Basic function Performs positioning sequentially
Symbol
File name Lib\FBL\omronlib\PositionController\NC-CPU(CJ1MCPU2x)\_NCCPU120_MoveSequence10.cxf
Applicable models CPU Unit  CJ1M-CPU21/22/23  Unit version 3.0 or higher
  CX-Programmer  Version 5.0 or higher
 

Variable Table
Input Variables
Name Variable Name Data type Default Range Description
EN EN BOOL     1(ON): Starts FB
0(OFF): Does not start FB
Axis No. Axis INT &0 &0to&1 &0: PulseOutput 0
&1: PulseOutput 1
Start Execute BOOL 0(OFF)   Starts sequential positioning
First Operation Data word DataAreaNo INT &0 &0 to &32767 Specify the first address of the words in the DM Area containing Operation Data.
Starting operation No. OperationNo INT &1 &1 to &64 Specify the Operation Data No. based on which sequential positioning is started.
Pulse method output OutputPulseSelect INT &0 &0 to &1 &O: CW/CCW Output
&1: Pulse + direction output
Output Variables 
Name Variable Name Data type Range Description
ENO ENO BOOL   1(ON): FB operating normally
0(OFF): FB not operating normally
Positioning completed Done BOOL   1(ON) indicates that positioning is completed
Abort Command/Aborted      
Error flag Error BOOL   1(ON) indicates that an error has occurred in the FB
Error code (may be omitted) Error ID WORD   The error code of the error in the FB will be output.For details of the errors refer to the sections of the manuals listed in the manuals mentioned above. When Unit No. or Axis No. is out of the range 0000 will be output.
Operation No. in execution ExecutionNo INT   &O: Start (Execute) = 0 or Positioning completed (Done) = 1
&1 to &64: Indicates the Operation Data No. currently being executed.

Operation Data Setting

  • Set Operation Data in the DM Area.
  • 7 consecutive words of the DM Area are used as one Operation Data containing Position command,Target frequency, Acceleration and Deceleration rates, and Operation and ABS/INC modes.
  • An operation will be stopped with a deceleration stop when an error occurs.
    When Operation mode (word n, bit 00 to 03) is set to 1 Hex (Sequential positioning mode), the next Operation Data will be always read ahead.
  • If Operation Data for the next position contains invalid settings, the sequential operation will be stopped before the Operation Data that contains the invalid settings. (Ex: If an operation is stopped when executing Operation Data 8, Operation Data 9 or 10 may contain invalid settings.)
  • Designating target frequencies that cause a sudden speed change in sequential positioning may cause an error because a sufficient acceleration or deceleration interval cannot be secured. This error, however, does not stop the operation with a deceleration stop, which calls for a need of special attention.
  • The last Operation of a sequence must contain 0 in the rightmost digit of the first word (Single position mode).
  • A maximum of 64 Operation Data can be specified for a sequence.  
Operation Data Word Name Setting range
1 n Bit 00 to 03 Operation mode 0 (Hex) Single positioning mode
1 (Hex) Sequential positioning mode
Bit 04 to 07 ABS/INC mode 0 (Hex) Relative pulse output
1 (Hex) Absolute pulse output
Bit 08 to 15 (Not used) Fixed at 00 (Hex)
n+1 Acceleration rate 1 to 65,535Hz (0001 to FFFF Hex)
n+2 Deceleration rate 1 to 65,535Hz (0001 to FFFF Hex)
n+3 Target frequency (lower word) 1 to 100,000Hz (00000001 to 000185A0 Hex)
n+4 Target frequency (upper word)
n+5 Position command (lower word) Absolute: -2,147,483,648 to +2,147,483,647 (80000000 to 7FFFFFFF Hex)
Relative: -2,147,483,647 to +2,147,483,646 (80000001 to 7FFFFFFF Hex) (+:CW, -:CCW)
n+6 Position command (upper word)

 
 
 
 
 
 
 n+7  Operation, ABS/INC modes Same as Operation Data 1
  
  
  
  
  
  
 n+8 Acceleration rate
 n+9 Deceleration rate
 n+10 Target frequency (lower word)  
 n+11 Target frequency (upper word)
 n+12 Position command (lower word)
 n+13 Position command (upper word)  
     -- 
64 n+441 Operation, ABS/INC modes   Same as Operation Data 1. Note that, however, Single positioning mode is used regardless of the Operation mode setting.  
  
  
  
  
  
  
  n+442 Acceleration rate  
  n+443  Deceleration rate  
  n+444  Target frequency (lower word)  
  n+445  Target frequency (upper word)  
  n+446  Position command (lower word)  
  n+447  Position command (upper word)  

 




Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2009-05-27
Modified 2009-05-28
Views 2853

 

You are not logged in.