20
To configure M4 to measure frequency with an internal pull-up and all other parameters set to
factory default, use two commands
1XF4+FD! followed by 1XF4+X+X+X+X+H! or one command
1XF4+1+1+0+D+H+FD! if you need to specify parameters before input-type
In the example where all of parameters except the 2
nd
are specified as „X‟, the „X‟ means “leave the
parameter unchanged” (factory default in this example).
1XF4+X+2.4+FD! will leave time-scale unchanged (default if never programmed), sets slope to 2.4
and puts factory-default values for all the remaining parameters
Verification and Reading current Set-up
There are 2 options to read set-up
1.
aXFm (1XF4! in our examples) command which returns
o
a+s+o+p+t+v+i<CR><LF> or
o
a+NC<CR><LF> if Mm is not set to measure frequency.
2.
aXGm (1XG4) command if you are not sure whether Mm measures frequency or something else.
Refer appendix A for description on XGm command.
Period Measurement
The period of a periodic signal can be measured on channel DIN or AN4. Channel DIN can be set-up to
enable internal pull-up or pull-down but channel AN4 has no internal pull-up or pull-down devices.
SDI-12 set-up command
To configure for period measurement or change a parameter (other than default), use
aXPm+t+s+o+p+i+v+w+x!
Where,
a: SDI-address of module
m: Measurement number (M command number : 1…9)
t: Pulse-wait time out, default is 1.1 second.
s: Slope (default is 1.00). It is a multiplier to convert Time-period to an engineering unit.
o: Offset (default is 0.00). A constant value to be added to the result after adjusting it with Slope
p: Measurement channel, „D‟ for DIN and „4‟ for AN4. (Default is D, i.e. DIN)
i: L=Enable internal pull-down, H=Enable internal pull-up, O=floating (no pull-up or pull-down). This
parameter is valid only when the channel is D, otherwise it is ignored and taken as O. (by default, it is O
for both the channels)
v: switching de-bounce time, default 0.000, i.e. 0mS De-bounce time limits the minimum period that can be
measured e.g., with 1 mS, you can-not measure period of signals above 1 kHz.
w: Switched voltage during measurement ( = 0, 5 or 12). Default is 0
x: Switched voltage warm-up time in sec. Default is 0.1, i.e.100mS
Examples
Consider configuring M4 to measure period in a module at SDI-12 address 1
To configure M4 to measure period with factory default parameters, use
1XP4+FD!
Which will configure the M4 command in the module at SDI-12 address 1 to return the period of the
signal on DIN channel with factory defaults of: slope=1.00, offset=0 with no pull-up or pull-down,
de-bounce-time=0mS.
To change just the time scale to 2.5 seconds (low frequency signal), use 1XP4+2.5!