A.5.7 digital i/o, A.5.7.1 control, A.5.7.2 measurement – Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual
Page 464

Appendix A. CRBasic Programming Instructions
464
A.5.7 Digital I/O
CheckPort
Returns the status of a control port.
Syntax
X = CheckPort(Port)
PortGet
Reads the status of a control port.
Syntax
PortGet(Dest, Port)
PortsConfig
Configures control ports as input or output.
Syntax
PortsConfig(Mask, Function)
ReadIO
Reads the status of selected control I/O ports.
Syntax
ReadIO(Dest, Mask)
A.5.7.1 Control
PortSet
Sets the specified port high or low.
Syntax
PortSet(Port, State)
PulsePort
Toggles the state of a control port, delays the specified amount of time, toggles
the port, and delays a second time.
Syntax
PulsePort(Port, Delay)
WriteIO
WriteIO is used to set the status of selected control I/O channels (ports) on the
CR800.
Syntax
WriteIO(Mask, Source)
A.5.7.2 Measurement
PWM
Performs a pulse‐width modulation on a control I/O port.
Syntax
PWM(Source,Port,Period,Units)
TimerIO
Measures interval or frequency on a digital I/O port.
Syntax
TimerIO(Dest, Edges, Function, Timeout, Units)