SW12 (Switched 12 Volt)

The SW12 instruction is used to set the switched 12 volt channel high or low.

Syntax

SW12 ( SWChan, StateSW12Option )

Remarks

The datalogger has two switched 12 volt outputs. These ports are used to provide a 12 volt supply to external peripherals under program control. At room temperature the switched 12 volt supply can source 900 mA between the SW12 terminal and Ground.

Parameters

SW12Chan

The SW12Chan parameter indicates which SW12 port to set. Valid ports are:

Port Description
SW12_1 Switched 12 V port 1 (SW12-1)
SW12_2 Switched 12 V port 2 (SW12-2)
SW12_CSIO CSIO - CR1000Xe Only

State

The State parameter indicates whether the switched 12 volts is High (non-zero) or low (0).

Option

Optional parameter that determines whether the instruction will run in the measurement task sequence or the processing task sequence; also affects whether the program will compile and run in SequentialMode or PipelineMode:

Option Description
Omitted Instruction is run within the measurement task sequence;
program will compile in SequentialMode
0 Instruction is run within the measurement task sequence;
program will attempt to compile in PipelineMode*
1 Instruction is run within the processing task sequence;
program will attempt to compile in PipelineMode*

*other programming may force the program into SequentialMode

Running the SW12 instruction in the processing task when the program is run in Pipeline mode can prove to be problematic if you are using the SW12 control to power a sensor. Because processing tasks can lag behind measurement tasks in PipelineMode, the SW12 instruction may be processed by the datalogger after the measurement has already been made. To avoid this scenario, program the datalogger to operate in SequentialMode.

NOTE: The SW12 supply is unregulated and can supply up to 1.10 A at 20 degrees C, 640 mA at 70 degrees C, and 500 mA at 85 degrees C. A resettable polymeric fuse protects against over-current. Reset is accomplished by removing the load or turning off the SW12 for several seconds.