SF_SetSw

Sets the input of the virtual safety IO.

Syntax
SF_SetSw bitNumber, value

Parameters

bitNumber
Specifies the input bit of the virtual safety IO.

value
Specify an integer, either 0 (off) or 1 (on).

Description
Sets the input bits of the virtual safety IO.
This command works only when the virtual safety function is enabled.
The safety input signal is negative logic (Active Low).
When 0 (off) is input to the safety input, the function assigned to the safety input is activated.

To get the current status of the input port, use the EStopOn function and the SF_GetStatus function.

Bit assignment of port number 0

Bit Number Safety Input
0 SAFETY_IN1
1 SAFETY_IN2
2 SAFETY_IN3
3 SAFETY_IN4
4 SAFETY_IN5
5 Setting prohibited
6 ESTOP_IN
7 Setting prohibited

See Also

SF_SetIn, SF_GetStatus Function, SetIn Statement, SetSw Statement, EStopOn Function

SF_SetIn Statement Example

 SF_SetSw 0, 0    ' Set bit 0 (SAFETY_IN1) of the safety input to off.