Before the function block is enabled, the inputs i_sIPAddress, i_uiPort, i_sUser and i_sPassword should be filled with valid values. If the values are not correct, the function block returns an error.
For Cognex Vision Systems, the default values are:
Port: 23
User: admin
Password: empty string
With the correct parameterization for the Cognex Vision System, the function block connects automatically to the Cognex Vision System. As long as the Telnet connection is established, the output q_xReady is set to TRUE.
During the first connection, the function block reads the online state of the Cognex Vision System, and the corresponding signal sets the output q_xCameraIsOnline.
While a command is being processed, the output q_xBusy is set to TRUE. When q_xBusy is TRUE, the input i_xExecute is ignored.
Select i_etCognexCmd and set the input i_xExecute.
at the inputWhen the command has been processed, the output q_xDone is set to TRUE, and the state is shown with the output q_xCameraIsOnline.
Select i_etCognexCmd and set the input i_xExecute.
at the inputWhen the command has been processed, the output q_xDone is set to TRUE, and the state is shown with the output q_xCameraIsOnline.
Select i_etCognexCmd and set the input i_xExecute.
at the inputWhen the command has been processed, the output q_xDone is set to TRUE, and the current job is shown at the output q_sCurrentJob.
Select i_etCognexCmd, set the wanted job at the input i_sJob, and set the input i_xExecute.
at the inputWhen the command has been processed, the output q_xDone is set to TRUE, and the current job is shown at the output q_sCurrentJob.
To get a complete list of jobs that are saved on the camera, select i_etCognexCmd, and set the input i_xExecute.
at the inputWhen the command has been processed, the output q_xDone is set to TRUE, and the current JobList is shown at the output structure q_stJobList.
The structure includes the uiNumberOfJobs, which indicates the number of jobs and an array with the name of the jobs that are stored on the camera.
You can send other Native Commands to the camera. These commands are specified by the manufacturer of the camera.
Select i_etCognexCmd, set the command you want to send at i_sNativeCmd, and set the input i_xExecute.
at the inputThe command is sent directly to the camera. When the function block has received the response, the output q_xDone is set to TRUE. The response of the camera is shown at the output q_asTelnetMessage.