Counter interno 16bit bidirezionale con Quadratura Internal

Transcript

Counter interno 16bit bidirezionale con Quadratura Internal
Counter interno 16bit bidirezionale con Quadratura
Internal 16 Bit quadrature Up/Down Counter
SEGNALE
SIGNAL
COUNTER STATUS EN.
INDIRIZZO
ADDRESS
OUTY5
PLC
DESCRIZIONE
DESCRIPTION
Attivato abilita la lettura di Data Latched e Zero Latched. Se disattivato il valore reso su INPXC e INPXD è il
valore logico degli ingressi fisici.
Activated enables the Data Latched and Zero Latched read. If deactivated the value on NPXC and INPXD is
the value of the phisical digital inputs.
GATE ENABLE
OUTY0
Attivato abilita la modalità Gated . Il counter in questo modo memorizza il numero di tacche (x4) tra un fronte
di Gate ed il successivo. L’avvenuta memorizzazione è segnalata da Data Latched.
Activated enables the Gated mode. The counter in this mode stores the number of pulses (x4) between an
edge of Gate and the next. The event is signalled by Data Latched.
REVERSE COUNT
OUTY1
ZERO ENABLE
OUTY2
Lo schema a lato esemplifica un collegamento tipico di un encoder bidirezionale con
tacca di zero. Per la connessione è opportuno riferirsi al manuale hardware del dispositivo sul quale è installata l’opzione.
The drawing on sideshow a typical connection of a bidirectional encoder with zero
mark. For cabling you must see the hardware reference manual of the device on
which the option is installed.
FIELD
LD25
+
+/-
LD27
+
+/-
+
+/-
-
-
INP*C Ch.Zero
INP*D
LD31
+
INP*A
INP*B
LD29
+/-
INP*E
Ch.A
INP*F
Ch.B
COM*8-B +
LK5
Attivato inverte la direzione del conteggio. Funziona in tutte le modalità.
Activated inverts the counting direction. Runs in all modes.
+
-
COM*C-F
Fmax.=50KHz
10-30Vdc Supply
Push-Pull Output
Attivato abilita il reset del counter al passaggio della tacca di zero. L’avvenuto azzeramento è segnalato dalla
attivazione di Zero Latched.
Activated enables the reset of the counter at the zero pulse. The event is signalled by the activation of Zero
Latched.
DATA LATCHED
INPXC
Attivato indica che, in modalità Gated, è stato memorizzato il numero di tacche tra due fronti successivi di
Gate. Il bit viene resettato dopo una lettura dell’LSB (IOAQ K00*2).
Activated indicates that, in Gated mode, has been stored the number of pulses between an edge of Gate
and the next. The bit is reset by reading the LSB of the counter (IOAQ K00*2).
ZERO LATCHED
INPXD
Attivato indica che, in modalità Zero, è avvenuto l’azzeramento del counter conseguente il passaggio della
tacca di zero. Il bit viene resettato alla disattivazione e successiva riattivazione di Zero Enable.
Activated indicates that, in Zero mode, the zero pulse has been reached. This bit is reset by disabling and
reenabling by Zero Enable.
NOTA: La lettura del contatore deve avvenire nella
sequenza indicata sotto.
L’istruzione IOAQ K 0003 deve essere eseguita per
prima mentre IOAQ K 0002 per seconda. Il ciclo è
completato solo se le due fasi sono state eseguite
nell’ordine indicato. (vedi esempio sul retro)
INP XE
INP XF
INP XC
Ch A
Ch B
Zero
16 Bit
Quadrature
U/D Counter
Bit 15
Bit 8
Bit 7
Bit 0
IOAQ K 00*3 Step 1
IOAQ K 00*2
Reverse count
Zero Enable
INP XD
Gate
Gate Logic
NOTE: The reading of the counter must happen in the
suitable sequence below. IOAQ K 0003 must be executed first, IOAQ K 0002 second. The cycle is completed
only if these two steps are executed, and in the right
order. (see example on the rear side)
Gate Enable
Step 2
*= module address (0-7)
OUT Y1
OUT Y2
OUT Y0
OUT Y5
OUT Y5=0
MUX
OUT Y5=1
X Y
Indirizzo Mod.
Module Addr.
0
1
ADD 0
2
3
ADD 1
4
5
ADD 2
6
7
ADD 3
INP XC
DATA LATCHED
INP XD
ZERO LATCHED
8
9
ADD 4
INP XE
Always 0
A B
ADD 5
INP XF
Always 0
C D
ADD 6
E
ADD 7
F
L’opzione counter permette, installato su
moduli Picosyst ME, l’acquisizione di segnali
provenienti da encoders e/o righe ottiche,
con frequenza di oltre 50Khz. L’opzione
viene installata su richiesta e, il prodotto che
la integra, è identificabile dalla etichetta riportante il codice PCK013*000.
Il counter lavora in quadratura dei fronti,
permettendo quindi una risoluzione quadrupla rispetto al numero di tacche rapportata
allo spazio. E’ integrata la gestione della
tacca di zero, della inversione di conteggio,
e del modo Gated.
In abbinamento a questa opzione devono
essere usati trasduttori con uscita push-pull
10-30Vdc.
The counter option allows, installed on Picosyst ME modules, to acquire signals from
encoders and/or optical lines, with a frequency of more than 50Khz. The option is
installed upon request and the product that
incorporate it is labelled with the code
PCK013*000.
The counter works with edges quadrature,
allowing a resolution enhanced by a factor
of four on the number of pulses/space. The
zero pulse management is implemented
together with reverse counting and the Gated mode.
In coupling to this option must be used
transducers with push-pull outputs 1030Vdc.
MNL119C100
ELECTRONIC SYSTEMS
Via G. Brodolini, 15 (Z.I.) 15033 CASALE M.TO (AL) ITALY
Phone +39-0142-451987 Fax +39-0142-451988
Internet: http://www.elsist.net; email: [email protected]
Esempio di programma RIL per utilizzo PCK013*000
Program example for use of PCK013*000
; ******************************************************************************
; Project
:
; Programmer :
; Date
:
; ******************************************************************************
; Description : This example describe the use of PCK013*000
; installed on a Picolog base module (ADD. 0)
; -----------------------------------------------------------------------------; The digital input "0" enables the gate mode.
ORGR
LODT I 0000
OUTT O 0010
; Gate enable
; The digital input "1" enables the reverse counting.
ORGR
LODT I 0001
OUTT O 0011
; Reverse counting
; The digital input "2" enables the zero mark.
ORGR
LODT I 0002
OUTT O 0012
; Zero mark enable
; The digital input "5" enables the Mux of the inputs from "C" to "F".
ORGR
LODT I 0005
OUTT O 0015
; Multiplex inputs C to F
; Counter value acquisition.
ORGR
SETR
IOAQ K 0003
STRA Y 0000
IOAQ K 0002
STRA Y 0001
LODA W 0002
LODA W 0000
SUBA
STRA W 0004
ORGR
LODT I 0003
PULS
MOVM W 0002
; MSB counter acquisition
; MSB counter value
; LSB counter acquisition
; LSB counter value
; Offset quote
; Counter word value
; Quote value
; Reset quote comand
W 0000
;Offset quote