Double-click the SCL instruction to display the following dialog box. In the dialog box, specify the settings for the maximum and minimum input values and for output A and output B.
When setting the maximum/minimum input values and output values A and B, you cannot indirectly designate array elements.
Array Variable Name: Data
Number of arrays:5
O Data [0] x Data [N]
When using real or float variables in operands S1 or D1, and using constants to define the minimum/maximum input and output values in A and B, use "0r" and "0f" to denote real and float values.
When Output Value A > Output Value B
When Output Value A < Output Value B
Program Example
SCL
Converting an analog input value (0 to 4095) to a current value in the range of 4 to 20 [ma] and expressing the value as a decimal.
In the SCL instruction settings in the dialog box, set maximum input value = 0r4095, minimum input value = 0r0, A = 0r20, and B =0r4.
When the positive transition instruction turns ON, the SCL instruction will be executed. When the SCL instruction is executed, the result of Data_A is stored in D1.
When using a normally open, the SCL instruction is always executed as long as the normally open instruction variable remains ON.
SCLP
The SCLP and SCL instructions differ by when they run. In the SCLP instructions, even when using a normally open instruction, only the positive transition is detected and the SCLP instruction is executed. Therefore, the SCLP instruction is executed only for one scan, even when the normally open instruction bit remains ON.