Campbell Scientific AM16/32B AM16/32B Relay Multiplexer - Page 27
og Programming
View all Campbell Scientific AM16/32B manuals
Add to My Manuals
Save this manual to your list of manuals |
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