Put
Syntax: Put [command] [input parameters]
About Put
The following commands are used in conjunction with the Put extended Native Mode command to send information to an In-Sight vision system and its spreadsheet: Put Live [Int], Put Portnum [Int], Put Timeout [Int], Put Update, Put Watch [Column][Row][Int], and Put XML [Int].
Put Live
Turns live acquisition mode on or off.
Put Live Inputs
Syntax: Put Live [Int]
Parameter | Description |
---|---|
Int |
|
Put Live Outputs
Returns a status code. The status codes are:
Status Codes | Description |
---|---|
1 |
The command was executed successfully. |
0 |
Unrecognized command. |
-1 |
The input is invalid or has exceeded 15 bytes in length. |
-2 |
The command could not be executed, or the vision system is Online. |
-6 |
User does not have Full Access to execute the command. For more information, see User Access Settings Dialog. |
Put Live Examples
To place the vision system into live acquisition mode, issue the following command: Put Live 1
The In-Sight vision system responded with a status code of 1, indicating that the vision system was successfully placed into live acquisition mode.
To take the vision system out of live acquisition mode, issue the command: Put Live 0
The In-Sight vision system responded with a status code of 1, indicating that the vision system was successfully taken out of live acquisition mode.
Put Portnum
Specifies the port that will be used by the In-Sight vision system for transferring data or images over the network.
- The Portnum command must be executed before another device can connect to the specified port.
- If the port number is changed, the In-Sight OPC Server will be disabled.
- The In-Sight 2000 series vision sensor does not support this extended native mode command, and returns -2 when issued.
Put Portnum Inputs
Syntax: Put Portnum [Int]
Parameter | Description |
---|---|
Int |
Specifies the port number. (1 to 65535) Note: A valid port
assignment is any unused number from 1 to 65535, except for ports
used for In-Sight communications.
|
Put Portnum Outputs
Returns a status code. The status codes are:
Status Codes | Description |
---|---|
1 |
The command was executed successfully. |
0 |
Unrecognized command. |
-1 |
The input is invalid, or has exceeded 15 bytes in length. |
-2 |
The command could not be executed, or the vision system is Online. |
-6 |
User does not have Full Access to execute the command. For more information, see User Access Settings Dialog. |
Put Portnum Example
To specify 3001 as the port to be used for transferring data or images across the network, issue the following command: Put Portnum 3001
The In-Sight vision system responded with a status code of 1, indicating that the port number was successfully changed to 3001.
Put Timeout
Specifies the amount of time (ms) that a port connection from a client may be left open without any activity. If the In-Sight vision system does not receive any messages from the client for the specified amount of time, it will close the port.
Put Timeout Inputs
Syntax: Put Timeout [Int]
Parameter | Description |
---|---|
Int |
|
Put Timeout Outputs
Returns a status code. The status codes are:
Status Codes | Description |
---|---|
1 |
The command was executed successfully. |
0 |
Unrecognized command. |
-1 |
The input is invalid, or has exceeded 15 bytes in length. |
-6 |
User does not have Full Access to execute the command. For more information, see User Access Settings Dialog. |
Put Timeout Example
To specify a timeout of 30000 ms, issue the following command: Put Timeout 30000
The In-Sight vision system responded with a status code of 1, indicating that the timeout was successfully changed to 30000.
Put Update
Updates the GUI (
Put Update Inputs
Syntax: Put Update [Int]
Parameter | Description |
---|---|
Int | 1 = Updates the GUI ( |
Put Update Outputs
Returns a status code. The status codes are:
Status Codes | Description |
---|---|
1 |
The command was executed successfully. |
0 |
Unrecognized command. |
-1 |
The input is invalid, or has exceeded 15 bytes in length. |
-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. |
Put Update Example
To update the GUI, issue the following command: Put Update 1
The In-Sight vision system responded with a status code of 1, indicating that the command successfully executed.
Put Watch
Returns the value contained in the specified cell each time the cell is updated. The Put Watch command can be used to specify output cells and send data using the DataChannel.
- The Put Portunum command must be executed to specify a port to which the Put Watch command will send information.
- The In-Sight 2000 series vision sensor does not support this extended native mode command, and returns -2 when issued.
Put Watch Inputs
Syntax: Put Watch [Column][Row][Int]
Parameter | Description |
---|---|
Column |
The column letter of the cell value to set (A to Z). |
Row |
The row number of the cell value to set. The row number must consist of three digits (000 to 399). |
Int |
|
Put Watch Outputs
Returns a status code, followed by a line terminator, followed by the value contained in the specified cell. The status codes are:
Status Codes | Description |
---|---|
1 |
The command was executed successfully. |
0 |
Unrecognized command. |
-1 |
The input is invalid, or has exceeded 15 bytes in length. |
-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. |
Put Watch Example
To receive information from cell A0, only when that cell is updated, issue the following command: Put Watch A000
The In-Sight vision system responded with a status code of 1, indicating that the command successfully executed.
Put XML
Specifies whether Native Mode command output results are formatted in XML.
Put XML Inputs
Syntax: Put XML [Int]
Parameter | Description |
---|---|
Int |
|
Put XML Outputs
Returns a status code. The status codes are:
Status Codes | Description |
---|---|
1 |
The command was executed successfully. |
0 |
Unrecognized command. |
-1 |
The input is invalid, or has exceeded 15 bytes in length. |
Put XML Example
In the following examples, the standard output is compared with legacy XML-enabled output and strict XML-enabled output.
Put XML 0
To disable XML formatting for the output results, issue the following command: Put XML 0. The In-Sight vision system responds with 1, indicating the XML has been successfully disabled. Next, issue the Get Filelist command.
Put XML 1
To enable legacy XML formatting for the output results, issue the following command: Put XML 1. The In-Sight vision system responds with 1, using the appropriate XML formatting, indicating that legacy XML has been successfully enabled. Next, issue the Get Filelist command; the response is in legacy XML format.
Put XML 2
To enable strict XML formatting for the output results, issue the following command: Put XML 2. The In-Sight vision system responds with 1, using the appropriate XML formatting. Next, issue the Get Filelist command; the response is in strict XML format (for example, the FileName ID value is enclosed in quotes).