Off Statement
Turns Off the specified output and after a specified time can turn it back on.
Syntax
Off { bitNumber |outputLabel } [ time ], [ parallel ] [,Forced]
Parameters
- bitNumber
- Specify the I/O output bits to be turned off as an integer value.
- outputLabel
- Specify the output label.
- time
- Specify a time interval in seconds for the output bit to remain Off. After the time interval expires, the Output is turned back on. The minimum time interval is 0.01 seconds and maximum time interval is 10 seconds.
- parallel
- Optional. When a timer is set, the parallel parameter may be used to specify when the next command executes:
- 0 - immediately after the output is turned off
- 1 - after the specified time interval elapses. (default value)
- Forced
- Optional. Usually omitted.
Description
Off turns off (sets to 0) the specified output.
If the time interval parameter is specified, the output bit specified by bitNumber is switched off, and then switched back on after the time interval elapses. If prior to executing Off, the Output bit was already off, then it is switched On after the time interval elapses.
The parallel parameter settings are applicable when the time interval is specified as follows:
- 1: Switches the output off, switches it back on after specified interval elapses, then executes the next command. (This is also the default value for the parallel parameter. If this parameter is omitted, this is the same as setting the parameter to “1”.)
- 0: Switches the output off, and simultaneously executes the next command.
Notes
Output bits Configured as Remote Control output
If an output bit which was set up as a system output is specified, an error will occur. Remote control output bits are turned on or off automatically according to system status.
Outputs and When an Emergency Stop Occurs:
Epson RC+ has a feature which causes all outputs to go off when an E-Stop occurs. If you want to keep the settings even in case of the emergency stop, this feature can be reconfigured from the [Outputs Off during emergency stop] checkbox in the [Setup]-[System Configuration]-[Controller]-[Preferences].
Forced Flag
This flag is used to turn Off the I/O output at Emergency Stop and Safety Door Open from NoPause task or NoEmgAbort task (special task using NoPause or NoEmgAbort at Xqt).
Be sure that the I/O outputs change by Emergency Stop and Safety Door Open when designing the system.
See Also
In, InBCD, MemOn, MemOff, MemOut, MemSw, OpBCD, Oport, Out, Wait
Off Statement Example
The example shown below shows main task start a background task called “iotask”. The “iotask” is a simple task to turn discrete output bits 1 and 2 on and then off, Wait 10 seconds and then do it again.
Function main
Xqt 2, iotask
Go P1
.
.
.
Fend
Function iotask
Do
On 1
On 2
Off 1
Off 2
Wait 10
Loop
Fend
Other simple examples from the Command window are as follows:
> on 1
> off 1, 10 'Turn Output 1 off, wait 10 seconds, turn on again
> on 2
> off 2
← O OLAccel Statement →