Delta Tau GEO BRICK LV Manual Do Utilizador
Geo Brick LV User Manual
PinOuts and Software Setup
75
The Global and Channel Control registers have to be initialized on power-up. Following, is an example
PLC showing the initialization of all eight channels:
PLC showing the initialization of all eight channels:
//=========================== NOTES ABOUT THIS PLC EXAMPLE ================================//
// This PLC example utilizes: - M5990 through M5999
//
// This PLC example utilizes: - M5990 through M5999
//
- Coordinate system 1 Timer 1
// Make sure that current and/or future configurations do not create conflicts with
// these parameters.
//=========================================================================================//
M5990..5999->* ; Self-referenced M-Variables
M5990..5999=0 ; Reset at download
//========================= GLOBAL CONTROL REGISTERS ======================================//
#define HFGlobalCtrl1_4
// these parameters.
//=========================================================================================//
M5990..5999->* ; Self-referenced M-Variables
M5990..5999=0 ; Reset at download
//========================= GLOBAL CONTROL REGISTERS ======================================//
#define HFGlobalCtrl1_4
M5990 ; Channels 1-4 HiperFace global control register
#define HFGlobalCtrl5_8
M5991 ; Channels 5-8 HiperFace global control register
HFGlobalCtrl1_4->X:$78B2F,0,24,U
; Channels 1-4 HiperFace global control register address
HFGlobalCtrl5_8->X:$78B3F,0,24,U
; Channels 5-8 HiperFace global control register address
//======================== CHANNEL CONTROL REGISTERS ======================================//
#define Ch1HFCtrl
M5992 ; Channel 1 HiperFace control register
#define Ch2HFCtrl
M5993 ; Channel 2 HiperFace control register
#define Ch3HFCtrl
M5994 ; Channel 3 HiperFace control register
#define Ch4HFCtrl
M5995 ; Channel 4 HiperFace control register
#define Ch5HFCtrl
M5996 ; Channel 5 HiperFace control register
#define Ch6HFCtrl
M5997 ; Channel 6 HiperFace control register
#define Ch7HFCtrl
M5998 ; Channel 7 HiperFace control register
#define Ch8HFCtrl
M5999 ; Channel 8 HiperFace control register
Ch1HFCtrl->X:$78B20,0,24,U ; Channel 1 HiperFace control register Address
Ch2HFCtrl->X:$78B24,0,24,U ; Channel 2 HiperFace control register Address
Ch3HFCtrl->X:$78B28,0,24,U ; Channel 3 HiperFace control register Address
Ch4HFCtrl->X:$78B2C,0,24,U ; Channel 4 HiperFace control register Address
Ch5HFCtrl->X:$78B30,0,24,U ; Channel 5 HiperFace control register Address
Ch6HFCtrl->X:$78B34,0,24,U ; Channel 6 HiperFace control register Address
Ch7HFCtrl->X:$78B38,0,24,U ; Channel 7 HiperFace control register Address
Ch8HFCtrl->X:$78B3C,0,24,U ; Channel 8 HiperFace control register Address
//========= POWER-ON PLC EXAMPLE, GLOBAL & CHANNEL CONTROL REGISTERS ======================//
Open PLC 1 Clear
HFGlobalCtrl1_4=$812004
; Channels 1-4 HiperFace, 9600 baud rate (M=129 N=2) –User Input
HFGlobalCtrl5_8=$812004
; Channels 5-8 HiperFace, 9600 baud rate (M=129 N=2) –User Input
Ch1HFCtrl=$4234FF
; Channel 1 HiperFace control register (read position) –User Input
Ch2HFCtrl=$4234FF
; Channel 2 HiperFace control register (read position) –User Input
Ch3HFCtrl=$4234FF
; Channel 3 HiperFace control register (read position) –User Input
Ch4HFCtrl=$4234FF
; Channel 4 HiperFace control register (read position) –User Input
Ch5HFCtrl=$4234FF
; Channel 5 HiperFace control register (read position) –User Input
Ch6HFCtrl=$4234FF
; Channel 6 HiperFace control register (read position) –User Input
Ch7HFCtrl=$4234FF
; Channel 7 HiperFace control register (read position) –User Input
Ch8HFCtrl=$4234FF
; Channel 8 HiperFace control register (read position) –User Input
I5111=500*8388608/I10 while(I5111>0) endw
; ½ sec delay
Dis plc 1
; Execute once on power-up or reset
Close
//=========================================================================================//