SetDiscreteOutputDelay

Configures delay settings that are found in the Output Details dialog. For more information, see Configure Discrete Output Details.

Note:
  • If the SetDiscreteOutput command is issued after the SetDiscreteOutputDelay command, the SetDiscreteOutputDelay settings are overwritten.
  • 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.

SetDiscreteOutputDelay Inputs

Syntax: EV SetDiscreteOutputDelay(LineID,Type,[Delay],[[WriteProcSet],[IOModule]])

Parameter Description
LineID The output line number to be modified.
Type
  • 0 = None
  • 1 = Acquisition Delay
  • 2 = Time After Trigger
Delay
  • If Type = 0, Delay is ignored and forced to 0.
  • If Type = 1, Delay is the number of acquisition or tracking pulses (0 to 1000) to delay the output after a signal pulse is received by an output Line. If this value is 0, then the In-Sight vision system updates the output line immediately on evaluating the WriteDiscrete function. If this value is > 0, then the output Line is always pulsed. For more information, see WriteDiscrete.
  • If Type = 2, Delay is the amount of time (0 to 10000 ms) to wait before the output is fired.

WriteProcSet

WriteProcSet is an optional parameter.

  • 0 = Settings are not saved in the proc.set file; the settings do not persist if the vision system is power cycled.
  • 1 = Settings are saved in the proc.set file; the settings persist after the vision system is power cycled.

IOModule

IOModule is an optional sub-parameter that can be used to set the Discrete Output Delay for a specific I/O Module type:

  • 0 = Direct I/O / CIO-1350
  • 1 = CIO-1450 and CIO-1460
  • 2 = CIO-1400
  • 3 = CIO-MICRO and CIO-MICRO-CC

SetDiscreteOutputDelay 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 CodesDescription
1The command was executed successfully.
0Unrecognized command.
-2The command could not be executed.
-6User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetDiscreteOutputDelay Example

To configure the following settings:

  • Line ID: 3
  • Type: Time After Trigger
  • Delay: 250 ms
  • WriteProcSet: 1
  • IOModule: CIO-MICRO

Issue the following command: EV SetDiscreteOutputDelay(3,2,250,1,3)

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