12.1 Sample Program
JetWeb
78
Jetter AG
The time interval is set to a multiple of 10 ms via time base. For value 1 this means
that the number of increments which have been counted within 10 ms are displayed
as frequency value.
12.1
Sample Program
The speed of an SSI encoder is to be measured by a JX2-CNT1 which is located at
the first I/O position after the basic device. This encoder has a position resolution of
4096 increments. The time interval for frequency measurements is set to 1 second.
This makes the readings more stable as minor fluctuations in frequency
measurements will have no great impact.
JetSym - Symbol Listing
JetSym - Program Listing
Status bit 12 = 1
Register 3xx1: Frequency - Time Base
Function
Description
Read
Present time interval of frequency measurement
Write
New time interval
Value range
1 ... 255 [10 ms]
Value following reset
10 (= 100 ms)
********** Registers *************
rmStatusControl
3003
;
Status / Controller
rmFrequency
3007
;
Frequency value
rmTimeBase
3001
;
Frequency - time base
rRPM
100
;
Speed in RPM
;********** Bit Symbols *************
nbSelectFrequency
12
;
;
Bit for selecting the
frequency display
...
; +++ Frequency Measurement Initiali++
BIT_SET (rmStatusControl, nbSelectFrequency)
REGISTER_LOAD (rmTimeBase, 100) ; time interval to 1 s
BIT_CLEAR (rmStatusControl, nbSelectFrequency)
...
; +++ Speed Calcu+++
; +++ is executed at regular int++
BIT_SET (rmStatusControl, nbSelectFrequency)
REG rRPM = REG rmFrequency * 60 / 4096
BIT_CLEAR (rmStatusControl, nbSelectFrequency)
...
Summary of Contents for JetWeb JX2-CNT1
Page 10: ...Table of Contents JetWeb 10 Jetter AG ...
Page 18: ...1 Safety Instructions JetWeb 18 Jetter AG ...
Page 26: ...JetWeb 26 Jetter AG ...
Page 58: ...8 2 Firmware Version JetWeb 58 Jetter AG ...
Page 60: ...JetWeb 60 Jetter AG ...
Page 74: ...11 1 Reading in SSI data JetWeb 74 Jetter AG Fig 18 Examples Reading in Different SSI Formats ...
Page 82: ...12 1 Sample Program JetWeb 80 Jetter AG ...
Page 90: ...13 2 Mode 2 Operation along with JM 2xx JetWeb 94 Jetter AG ...
Page 91: ...JX2 CNT1 Appendices Jetter AG 95 Appendix ...
Page 92: ...Appendices JetWeb 96 Jetter AG ...
Page 95: ...JX2 CNT1 Appendices Jetter AG 99 ...