SetDiscreteOutput

Configures output settings that are found in the Discrete I/O Settings dialog and the Output Details dialog. For more information, see Discrete I/O Settings and Configure Discrete Output Details.

Note:
  • When issuing this command, the In-Sight vision system must be Offline.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
  • If an In-Sight vision system is being used in conjunction with a CIO-1400 or CIO-1450 I/O module, do not use either the SetDiscreteOutput or SetDiscreteOutputDelay commands to change a discrete output setting over the serial port. Doing so may cause the vision system to become unresponsive. Use the Discrete I/O Settings and Output Details dialogs to make the change, or send the commands over Telnet.
  • Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetDiscreteOutput Inputs

Syntax: EV SetDiscreteOutput(LineID,"Name",Type,Pulse,PulseLen,Delay)

Parameter Description
  LineID

In-Sight 2000 series:

  • 0 to 4: The vision sensor is connected to the Breakout cable and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 7: The vision sensor is connected to the I/O Module cable and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.

In-Sight Micro 1000 series, In-Sight 5000 series and In-Sight 8000 series:

  • 0, 1, 4, 5: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 11: The vision system is connected to the I/O Module cable and connect to a supported I/O module. For more information, see I/O Module Support.

In-Sight 70xx - 74xx series:

  • 0 to 5: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 13: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.

In-Sight 7000 Gen2 series and In-Sight 9912 vision systems:

  • 0 to 5: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 13: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 9, 12, 13: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 9: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.

In-Sight 9902L:

  • 0, 1, 4, 5: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 11: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 11: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 9: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.
"Name"

The name for the output line. The "Name" input must be enclosed in quotation marks.

Type
  • 0 = Programmed (default)
  • 1 = High
  • 2 = Low
  • 3 = Acquisition Start
  • 4 = Acquisition End
  • 5 = Job Completed
  • 6 = System Busy
  • 7 = Job Load OK
  • 8 = Job Load Fail
  • 9 = ERR: Missed Acquisition
  • 10 = ERR: Tracking Overrun
  • 11 = ERR: Tracking Queue Full
  • 12 = Online/Offline
  • 13 = Strobe

    Note:
    • In-Sight Micro 1000 series: Only valid when LineID = 1 (HSOUT 1 for Direct I/O) or LineID = 9 (HSOUT 1 for CIO-MICRO, CIO-MICRO-CC, and CIO-WENET).
    • In-Sight 5000 series: Only valid when LineID = 1 (HSOUT 1 for Direct I/O / CIO-1350 or CIO-1400) or LineID = 9 (HSOUT 1 for CIO-1450, CIO-1460, CIO-MICRO or CIO-MICRO-CC).
    • In-Sight 70xx - 74xx series: Only valid when LineID = 0 (HSOUT 0 for Direct I/O) or LineID = 8 (HSOUT 0 for CIO-MICRO or CIO-MICRO-CC).
    • The In-Sight 7000 Gen2 series: Only valid when LineID = 1 (HSOUT 1 for Direct I/O or CIO-1400) or LineID = 9 (HSOUT 1 for CIO-MICRO).
    • In-Sight 8000 series: Only valid when LineID = 1 (HSOUT 1 for Direct I/O) or LineID = 9 (HSOUT 1 for CIO-MICRO).
    • In-Sight 9902L: Only valid when LineID = 1 (HSOUT 1 for Direct I/O).
  • 14 = I/O Module Standby (CIO-1450 and CIO-1460 only. Only valid when LineID = 0 - 7)
  • 15 = Light Control (CIO-1460 only. Only valid when LineID = 9)
  • 17 = Lifeline (CIO -MICRO & CIO-MICRO-CC Only)
  • 18 = Waveform
  • 20 = Serial Transmit (Direct I/O only; only valid when LineID = 1)

    Note:
    • Serial Transmit is only available when connecting to an In-Sight 70xx - 74xx series vision system with In-Sight Explorer 4.7.1 or later, and using In-Sight 4.7.1 or later firmware.
    • When the SetDiscreteOutput command is issued and Output Line 1 is set to Serial Transmit, the vision system determines if Input Line 1 is set to Serial Receive. If not, Output Line 1 is temporarily reset to the default output type for this line. Once the SetDiscreteInput command is issued, and Input Line 1 is set to Serial Receive, Output Line 1 is automatically set to Serial Transmit.
  • 24 = Job Pass/Fail Cell

    Note: Job Pass/Fail Cell is only supported on In-Sight 7000 Gen2 series and In-Sight 9000 series vision systems.
Pulse
  • 0 = Level Output

    Note: When Type is set to 13 (Strobe) and Pulse is set to 0, the Strobe/Light Control Trigger setting is set to Rising Edge. For more information, see Configure Discrete Output Details.
  • 1 = Pulsed Output

    Note: When Type is set to 13 (Strobe) and Pulse is set to 1, the Strobe/Light Control Trigger setting is set to Falling Edge.
PulseLen

Duration of an output pulse.

  Vision System/Vision Sensor   Minimum Pulse Length Maximum Pulse Length Default Pulse Length
General-Purpose Output High-Speed Output
In-Sight Micro 1000 series (except 1402, 1412 and 1500) 10ms 10ms 1000ms 10ms
In-Sight Micro 1402, 1412 and 1500 10ms 1ms 1000ms 10ms
In-Sight 5000 series 10ms 10ms 1000ms 10ms
In-Sight 70xx - 74xx series 10ms 1ms 1000ms 10ms
In-Sight 7000 Gen2 series 1ms 1ms 1000ms 10ms
In-Sight 8000 series 1ms 1ms 1000ms 10ms
In-Sight 9902L 1ms 1ms 1000ms 10ms
In-Sight 9912 1ms 1ms 1000ms 10ms
Note:
  • When using the CIO-Micro or CIO-Micro-CC I/O module with supported vision systems, the minimum pulse length for general-purpose outputs is limited by the Update Time setting in the I/O Module Configuration dialog. For example, if the Update Time is 20ms, the minimum pulse length cannot be set below 30ms. For more information, see I/O Module Configuration.
  • For the In-Sight 7000 Gen2 series and 8000 series vision systems, the minimum pulse length of 1ms is only supported using In-Sight firmware version 5.5.0 and higher. If using an earlier version of firmware, the minimum pulse length is 10ms.
Delay

0 to 1000

SetDiscreteOutput Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes Description
1 The command was executed successfully.
0 Unrecognized command.
-2 The command could not be executed.
-6 User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetDiscreteOutput Examples

Example 1: Job Load OK Signal Type Settings

To configure the following settings:

  • LineID: 3
  • "Name": "LINE3"
  • Type: Job Load OK
  • Pulse: Level Output
  • PulseLen: 250 ms
  • Delay: 50

Issue the following command: EV SetDiscreteOutput(3,"LINE3",7,0,250,50)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.

Example 2: Strobe Type Settings

To configure the Strobe Type settings:

  • LineID: 1
  • "Name": "LINE1"
  • Type: Strobe
  • Strobe/Light Control Trigger: Rising Edge
  • PulseLen: 10 ms
  • Delay: 50

Issue the following command: EV SetDiscreteOutput(1,"LINE1",13,0,10,50)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.

Note: To configure the Strobe Start Position, use the SetSystemConfig native mode command.