![Delta Tau Geo Brick Скачать руководство пользователя страница 186](http://html1.mh-extra.com/html/delta-tau/geo-brick/geo-brick_user-manual_2478499186.webp)
Geo Brick Drive User Manual
Motor Setup
186
Absolute Power-On
Phasing, channels
1 through 4
Channel#
8 7 6 5 4 3 2 1
ChPhaseSel (Binary) 0 0 0 0 1 1 1 1 =>
ChPhaseSel =$0F
ChPhaseSel (Hex)
0
F
Absolute Power-On
Phasing, channels
1,3,5,7
Channel#
8 7 6 5 4 3 2 1
ChPhaseSel (Binary) 0 1 0 1 0 1 0 1 =>
ChPhaseSel =$55
ChPhaseSel (Hex)
5
5
//===========================
NOTES ABOUT THIS PLC EXAMPLE
================================//
// This PLC example utilizes: - P7050 through P7079
//
- Suggested M-Variables (make sure they are downloaded)
// Make sure that current and/or future configurations do not create conflicts with
// these parameters.
//=========================================================================================//
P7050..7079=0 ; Reset P-Variables at download
//====================================
USER INPUT
=========================================//
#define Mtr1SF P7050 #define Mtr5SF P7054 ; Motors scale factor
#define Mtr2SF P7051 #define Mtr6SF P7055 ; cts/rev for rotary encoders
#define Mtr3SF P7052 #define Mtr7SF P7056 ; cts/user units (i.e. mm, inches) for linear
#define Mtr4SF P7053 #define Mtr8SF P7057 ;
Mtr1SF=0
Mtr5SF=0
;
--User Input
Mtr2SF=0
Mtr6SF=0
;
--User Input
Mtr3SF=0
Mtr7SF=0
;
--User Input
Mtr4SF=0
Mtr8SF=0
;
--User Input
#define Mtr1PhaseTest P7058
#define Mtr5PhaseTest P7062
; Phase force test values
#define Mtr2PhaseTest P7059
#define Mtr6PhaseTest P7063
;
#define Mtr3PhaseTest P7060
#define Mtr7PhaseTest P7064
;
#define Mtr4PhaseTest P7061
#define Mtr8PhaseTest P7065
;
Mtr1PhaseTest=0 Mtr5PhaseTest=0
;
--User Input
Mtr2PhaseTest=0 Mtr6PhaseTest=0
;
--User
Input
Mtr3PhaseTest=0 Mtr7PhaseTest=0
;
--User Input
Mtr4PhaseTest=0 Mtr8PhaseTest=0
;
--User Input
#define ChPhaseSel P7066
; Select channels to perform power-on phasing (in Hexadecimal)
ChPhaseSel=$0
; Channels selected for power-on phasing
--User Input
//===============================
DEFINITIONS & SUBSTITUTIONS
=============================//
#define ChNo
P7067 ; Present addressed channel
#define PhaseOffset
P7068 ; Holding register for computing phase position offset
#define ActPos
P7069 ; Indirect addressing index for actual position, 162
#define PresPhasePos P7070 ; Holding register for computing present phase position
#define Ixx70
P7071 ; Indirect addresssing index for No of commutation cycles, 170
#define Ixx71
P7072 ; Indirect addresssing index for commutation cycle size, 171
#define Mxx71
P7073 ; Indirect addresssing index for phase position register, 171
#define PhaseErrBit
P7074 ; Indirect addresssing index for phasing search error bit, 148
#define PhaseTest
P7075 ; Indirect addresssing index for force phase test values, 7058
#define MtrSF
P7076 ; Indirect addresssing index for motor scale factor, 7050
#define ChNoHex
P7077 ; Channel number in hex
#define Ixx08
P7078 ; Indirect addresssing index for position scale factor, 108
#define ChPhaseTrue
P7079 ; Present channel power-on phasing flag, =1 true =0 false
//===================================
PLC SCRIPT CODE
=====================================//
Open plc 1 clear
ChNo=0
; Reset channel number
While(ChNo!>7) ; Loop for 8 channels
ChNo=ChNo+1
ChNoHex=exp((ChNo-1)*ln(2))
ChPhaseTrue=(ChPhaseSel&ChNoHex)/ChNoHex
If (ChPhaseTrue!=0) ; Absolute read on this channel?
MtrSF=7050+(ChNo-1)*1
PhaseTest=7058+(ChNo-1)*1
Ixx70=170+(ChNo-1)*100
Ixx71=171+(ChNo-1)*100
ActPos=162+(ChNo-1)*100
Содержание Geo Brick
Страница 5: ...4...
Страница 286: ...Geo Brick Drive User Manual Appendix A 286 APPENDIX A Schematic Samples Watchdog X15 Inputs J6 J7...
Страница 287: ...Geo Brick Drive User Manual Appendix A 287 Outputs J6 J7 603793 109 and earlier Outputs J6 J7 603793 10A and later...
Страница 288: ...Geo Brick Drive User Manual Appendix A 288 Limits Flags J4...