19 move signature into input location, 20 port set, 21 pulse port with duration – Campbell Scientific CR510 Basic Datalogger User Manual
Page 112

SECTION 9. INPUT/OUTPUT INSTRUCTIONS
9-8
*** 19 MOVE SIGNATURE INTO INPUT ***
LOCATION
FUNCTION
This instruction stores the signature of the Read
Only Memory (ROM) and user program memory
(SRAM) into an input location. The signature is
a result of the CR510 PROM, the size of SRAM,
and the entries in the
∗
1,
∗
2,
∗
3,
∗
4,
∗
A, and
∗
C
Modes. This signature is not the same as the
signatures given in the
∗
B Mode. Recording the
signature allows detection of any program
change or ROM failure.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
4
Input location number
Input locations altered: 1
*** 20 PORT SET ***
FUNCTION
This instruction sets or configures C1. On
power-up, the port defaults to input
configuration (i.e., is not driven high or low by
the CR510, and can be used to read the status
of an external signal using Instruction 25).
When the port is set high, low, pulsed, or
toggled by this instruction or a program control
command, the port is automatically configured
as an output.
NOTE: Voltages in excess of 5.5 volts
applied to a control port can cause the
CR510 to malfunction.
C1 can also be set using the
∗
6 Mode or the J
and K telecommunications commands. However,
C1 MUST be configured as output before these
means of setting them will work. The option to
configure the port as an output is used when it
must be configured as an output without changing
its state.
Pulse duration, initiated by a program control
instruction, can be set for C1 (Table 12-2).
Instruction 20 does not pulse the port, it only
sets the duration. If Instruction 20 is not used to
set the duration, the pulse command will result
in a 10 ms pulse.
Instruction 20 has two 4 digit parameters. The
code (0-9) entered as the digit determines what
effect command 20 has on C1.
TABLE 9-4. Port Configuration Option Codes
Code
Function
0
Set port low
1
Set port high
2
Toggle port
3
Pulse duration 1 ms
4
Pulse duration 10 ms
5
Pulse duration 100 ms
6
Pulse duration 1 s
7
Configure as output
8
Configure as input
9
Leave unchanged
Duration of pulse on subsequent pulse port
command in Program Control Instruction.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
Not available
02:
2
C1 option codes
Input locations altered: 0
*** 21 PULSE PORT WITH DURATION ***
FUNCTION
Instruction 21 pulses control port 1 for a
specified amount of time in hundredths of
seconds (0.01 seconds).
The pulse works as a toggle; if the port is high
before the instruction is executed, it will pulse
low and vice versa. Any value less than 1,
including 0, gives a pulse of 10 milliseconds.
The maximum input value is limited to 65,000,
which gives a pulse length of 650 sec.
Parameter 1 is 1 for C1. Parameter 2 is the
input location containing the pulse length.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
2
Control port
02:
4
Input location of pulse
length in hundredths of
a second
Input location altered: 0
Input locations read: 1