1 2 3 4 5 6 7 8 9 10
|
IF #pre_write.measure_mode = 16#01 THEN #tempScaleWord := SCALE(IN := WORD_TO_INT(#AI4ST_Control.Ch0_Dig_Value), HI_LIM := 10.0, LO_LIM := -10.0, BIPOLAR := 1, OUT => #AI4ST_Control.Ch0_Ana_Value); #tempScaleWord := SCALE(IN := WORD_TO_INT(#AI4ST_Control.Ch1_Dig_Value), HI_LIM := 10.0, LO_LIM := -10.0, BIPOLAR := 1, OUT => #AI4ST_Control.Ch1_Ana_Value); ELSIF #pre_write.measure_mode = 16#02 THEN #tempScaleWord := SCALE(IN := WORD_TO_INT(#AI4ST_Control.Ch0_Dig_Value), HI_LIM := 20.0, LO_LIM := -20.0, BIPOLAR := 1, OUT => #AI4ST_Control.Ch0_Ana_Value); #tempScaleWord := SCALE(IN := WORD_TO_INT(#AI4ST_Control.Ch1_Dig_Value), HI_LIM := 20.0, LO_LIM := -20.0, BIPOLAR := 1, OUT => #AI4ST_Control.Ch1_Ana_Value); END_IF;
|