Type: |
Function block |
Available as of: |
V1.6.0.0 |
Inherits from: |
- |
This chapter provides information on:
The function block FB_CognexTelnet allows you to change the online state of the Cognex Vision System and change the job. It can also return the list of jobs, which are stored in the Cognex Vision System.
For more information refer to Using FB_CognexTelnet.
Input |
Data type |
Description |
---|---|---|
i_xEnable |
BOOL |
TRUE: Enable the function block. |
i_xExecute |
BOOL |
With the rising Edge, the command selected on the input i_etCognexCmd is executed. Input is ignored as long as q_xBusy is TRUE. |
i_xErrorQuit |
BOOL |
The function block acknowledges a detected error indicated by q_xError upon a rising edge of this input. |
i_sIPAddress |
STRING[20] |
IP address of the vision system. |
i_uiPort |
UINT |
Port of the Telnet communication (default port is 23). |
i_sUser |
STRING[255] |
User for login to the camera (default: admin). |
i_sPassword |
STRING[255] |
Password for login to the camera (default is an empty string). |
i_etCognexCmd |
ET_CognexCmd |
Select the command the function block should operate. |
i_sJob |
STRING[255] |
The job name the camera loads with the command (it is not necessary to add the *.job file extension). |
i_sNativeCmd |
STRING[255] |
Command to send to the camera. |
Output |
Data type |
Description |
---|---|---|
q_xActive |
BOOL |
TRUE: Function block is active. FALSE: Function block is not active, inputs are ignored. |
q_xReady |
BOOL |
TRUE: Connection to camera is active. FALSE: No connection to the camera or an error is reported. |
q_xBusy |
BOOL |
TRUE: Function block is processing a command. |
q_xDone |
BOOL |
TRUE: Last command is finished. |
q_xError |
BOOL |
TRUE: An error occurred during last command. For more information refer also to q_etResult and q_sResultMsg. |
q_etResult |
ET_Result |
POU-specific output on the diagnostic:
|
q_sResultMsg |
STRING[255] |
Event-triggered message that gives additional information on the diagnostic state. |
q_xCameraOnline |
BOOL |
The on-/offline state of the camera, needed for some handling with the camera. TRUE: The camera is online. FALSE: The camera is offline.
NOTE: It is not the connection to the camera.
|
q_sCurrentJob |
STRING[255] |
Output of job which is active on the camera. |
q_stJobList |
ST_JobList |
Structure of current JobList data. |
q_asTelnetMessage |
ARRAY[1..Gc_uiMaxNumberOfTelnetMessages] OF STRING(255) |
Response given from Telnet communication. |
q_xError |
q_etResult |
Enumeration value of q_etResult |
Description |
---|---|---|---|
FALSE |
Ok |
0 |
Successful |
FALSE |
Disabled |
1 |
Function block is disabled |
TRUE |
ConfigurationInvalid |
8 |
The configuration is invalid. |
TRUE |
ConnectionTimedOut |
4 |
The connection has a time out. |
TRUE |
CognexCmdRange |
10 |
The Cognex cmd is out of range. |
TRUE |
ConnectionLost |
5 |
The connection has been lost. |
TRUE |
UnexpectedFeedback |
2 |
A feedback value is indeterminable. |
TRUE |
UnknownError |
11 |
Indeterminable feedback from camera during processing a command. |
TRUE |
WrongCameraState |
12 |
The state of the camera is invalid. |
TRUE |
NoUserRights |
13 |
User rights are invalid. |
TRUE |
FileNameInvalid |
9 |
The file name is invalid |
TRUE |
CognexError |
19 |
The Cognex Vision System sends an error during processing Cmd. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Success |
Status message: Reading the data was successful.
Enumeration name: |
ConfigurationInvalid |
Enumeration value: |
8 |
Description: |
The configuration is invalid. |
Issue |
Cause |
Solution |
---|---|---|
No connection to camera possible. |
Invalid configuration and connection to camera. |
Verify that the correct configuration has been set, also make sure the camera is connected and restart the function block. |
Enumeration name: |
ConnectionTimedOut |
Enumeration value: |
4 |
Description: |
The connection has a time out. |
Issue |
Cause |
Solution |
---|---|---|
The connection to the camera timed out. |
The connection to the camera timed out. |
Verify the connection to the camera. |
Enumeration name: |
CognexCmdRange |
Enumeration value: |
10 |
Description: |
The Cognex cmd is out of range. |
Issue |
Cause |
Solution |
---|---|---|
An invalid command is selected at input i_etCognexCmd. |
No i_etCognexCmd. is selected at input |
Make sure that a valid value of ET_CognexCmd is selected at input i_etCognexCmd. |
Enumeration name: |
ConnectionLost |
Enumeration value: |
5 |
Description: |
The connection has been lost. |
Issue |
Cause |
Solution |
---|---|---|
The connection to camera is lost. |
The connection to camera is lost. |
Verify the connection to the camera. |
Enumeration name: |
UnexpectedFeedback |
Enumeration value: |
2 |
Description: |
A feedback value is indeterminable. |
Issue |
Cause |
Solution |
---|---|---|
The feedback from the Cognex Vision System is indeterminable. |
An internal error during has been detected. |
Reset the error and try again. |
Enumeration name: |
UnknownError |
Enumeration value: |
11 |
Description: |
The error is indeterminable. |
Issue |
Cause |
Solution |
---|---|---|
Indeterminable feedback from camera when processing Cmd. |
The Cognex Vision System sends an indeterminable error value. |
Reset the error and try again. |
Enumeration name: |
WrongCameraState |
Enumeration value: |
12 |
Description: |
The state of the camera is invalid. |
Issue |
Cause |
Solution |
---|---|---|
Cognex Vision System is set to offline manually or by Cognex in-sight Explorer. |
Cognex Vision System is not in online state. |
Make sure the Cognex Vision System is online. |
Enumeration name: |
NoUserRights |
Enumeration value: |
13 |
Description: |
User rights are invalid. |
Issue |
Cause |
Solution |
---|---|---|
Cognex Vision System reports that the user rights are invalid to execute the command. |
You do not have the required user rights. |
|
Enumeration name: |
FileNameInvalid |
Enumeration value: |
9 |
Description: |
The file name is invalid. |
Issue |
Cause |
Solution |
---|---|---|
No file name or an invalid file name was given. |
The file name set at i_sJob is invalid. |
Make sure there is a valid job name on the input i_sJob. |
Enumeration name: |
CognexError |
Enumeration value: |
19 |
Description: |
The Cognex Vision System reported an error. |
Issue |
Cause |
Solution |
---|---|---|
Cognex Vision System sends an error when processing a command. |
Cognex Vision System sends an error when processing a command. |
See output q_sResultMsg for detailed information. |