Turn off outputs

Monday, 08 July 2024

Home
Up
Plugin controller
Probe Guard
Turn off outputs
Traffic lights
Block Delete
Probe Wake
Messaging
SubZero

 

TurnOffOutputs_plugin.py

If you have a USB I/O board attached to your machine, it can be important to make sure that all of the outputs are turned off at the end of a run, even if the run ended because either Stop or e-Stop was pressed.  If you've ever run up against this problem, then this plugin is the answer.

Customisation

Which outputs are turned off is controlled by a python tuple at line 24 in this file

# the tuple defines the output pin numbers to turn off
# default is all outputs on USB I/O board #1
OUTPUTS_TO_TURN_OFF = (0, 1, 2, 3)

This default value (0, 1, 2, 3) turns off all the outputs on I/O board 0.  Since you can have up to 4 I/O boards on a machine, the allowed output numbers run from 0 to 15.

Note

If you wish to turn off just a single output, it's an important part of python syntax that there still be a comma in the list.  As a result, the correct syntax to turn off just output 1 is

OUTPUTS_TO_TURN_OFF = (0, )

Latest download

Version history

Version Date Description
1 06/10/22 First release

Home | Up

 

This site was last updated 07/10/22