Campbell Scientific AM16/32B AM16/32B Relay Multiplexer - Page 27

og Programming

Page 27 highlights

AM16/32B Relay Multiplexer I=I+1 'The Resistance measurement measures the PRT resistance: Resistance (PRTResist(I),1,mV50,7,Ix1,1,500,True ,True ,0,250,0.01,0) 'With a multiplier of 0.01 (1/100) the value returned is R/Ro (Resist/Resist @ 0 deg) 'the required input for the PRT temperature calculation instruction. NextSubScan Portset (1 ,0) 'Set C1 Low to disable Multiplexer 'Calculate the Temperature from R/Ro: PRT (PRTTemp(1),16,PRTResist(1),1.0,0) CallTable Avg15Min 'Call the DataTable NextScan EndProg 5.2 Edlog Programming Edlog is used to program our CR10(X), 21X, CR23X, and CR7. 5.2.1 Single Loop Instruction Sequence When a number of similar sensors are multiplexed and measured, the Instructions to clock the AM16/32B and to measure the sensors are placed within a program loop. For the CR23X, CR10(X), 21X, and CR7, the generalized structure of a program loop is as follows: TABLE 5-1. Single Loop Instruction Sequence # INSTRUCTION FUNCTION 1 Set port high to activate AM16/32B 2 Begin loop 3 Clock AM16/32B & delay 4 Step loop index (required in some configurations) 5 Measure sensor 6 Additional processing 7 End loop 8 Additional program loops 9 Set port low to deactivate AM16/32B #1, #9 Activate/Deactivate the AM16/32B - The control port connected to reset (RES) is set high to activate the AM16/32B prior to the advance and measure sequence and set low following the measurement loop(s). For the CR10X, CR23X, and CR10, 21X, CR7 dataloggers with OS series PROMs, use instruction Do (P86) to set and reset the port (for CR10, 21X, and CR7 with earlier PROMs, use instruction Set Port(s) (P20)). #2, #7 Begin and End a Loop - For the CR23X, CR10(X), 21X, and CR7 dataloggers, a loop is defined by instruction Beginning of Loop (P87), and by instruction End (P95). Within instruction Beginning of Loop (P87), the 2nd parameter (iteration count) defines the number of times the instructions within the loop are executed before the program exits the loop. 17

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52

AM16/32B Relay Multiplexer
I=I+1
'The Resistance measurement measures the PRT resistance:
Resistance (PRTResist(I),1,mV50,7,Ix1,1,500,True ,True ,0,250,0.01,0)
'With a multiplier of 0.01 (1/100) the value returned is R/Ro (Resist/Resist @ 0 deg)
'the required input for the PRT temperature calculation instruction.
NextSubScan
Portset (1 ,0)
'Set C1 Low to disable Multiplexer
'Calculate the Temperature from R/Ro:
PRT (PRTTemp(1),16,PRTResist(1),1.0,0)
CallTable Avg15Min
'Call the DataTable
NextScan
EndProg
5.2
og Programming
Edlog is used to program our CR10(X), 21X, CR23X, and CR7.
5.2.1 Single Loop
generalized structure of a program loop is as follows:
TABL
I
e
Edl
Instruction Sequence
When a number of similar sensors are multiplexed and measured, the
Instructions to clock the AM16/32B and to measure the sensors are placed
within a program loop.
For the CR23X, CR10(X), 21X, and CR7, the
E 5-1.
Single Loop
nstruction Sequenc
#
IN
CTION FUN
STRU
CTION
1
Set port high to activate AM16/32B
2
Begin loop
3
/32B & delay
Clock AM16
4
Step loop index
(required in some configurations)
5
Measure sensor
6
Additional processing
7
End loop
8
Additional program loops
9
Set port low to deactivate AM16/32B
#1, #9
Activate/Deactivate
the AM16/32B — The control port connected to
reset (RES) is set high to activate the AM16/32B prior to the advance and
measure sequence and set low following the measurement loop(s).
For the
CR10X, CR23X, and CR10, 21X, CR7 dataloggers with OS series PROMs,
ction
Do (P86)
to set and reset the port (for CR10, 21X, and CR7
).
#2, #7
Begin and End a Loop
— For the CR23X, CR10(X), 21X, and CR7
of Loop (P87)
, and by
f Loop (P87)
, the 2nd
n count) defines the number of times the instructions within
loop are executed before the program exits the loop.
use instru
with earlier PROMs, use instruction
Set Port(s) (P20)
dataloggers, a loop is defined by instruction
Beginning
uction
End (P95)
.
Within instruction
Beginning o
instr
parameter (iteratio
the
17