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.
- 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.
- 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:
|
|||||||||||||||||||||||||||||||||||||||||||||||
In-Sight Micro 1000 series, In-Sight 5000 series and In-Sight 8000 series:
|
||||||||||||||||||||||||||||||||||||||||||||||||
In-Sight 70xx - 74xx series:
|
||||||||||||||||||||||||||||||||||||||||||||||||
In-Sight 7000 Gen2 series and In-Sight 9912 vision systems:
|
||||||||||||||||||||||||||||||||||||||||||||||||
In-Sight 9902L:
|
||||||||||||||||||||||||||||||||||||||||||||||||
"Name" |
The name for the output line. The "Name" input must be enclosed in quotation marks. |
|||||||||||||||||||||||||||||||||||||||||||||||
Type |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Pulse |
|
|||||||||||||||||||||||||||||||||||||||||||||||
PulseLen |
Duration of an output pulse.
Note:
|
|||||||||||||||||||||||||||||||||||||||||||||||
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. |
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.