Академический Документы
Профессиональный Документы
Культура Документы
<<Index>>
1
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Revised
Revision Contents
Date
v1.00A
2009/02/20
Newly created
v1.01B
2009/06/01
v1.02C
2009/10/02
v1.03D
2009/11/10
1
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Outline
FB Library Outline
This FB library is for systems that use the QJ71E71-100 module to connect to Cognex Corporation In-Sight Vision
Systems.
No.
Description
P+Cognex-In-Sight-E71_LogOn
P+Cognex-In-Sight-E71_LoadJob
Selects, changes and activates jobs stored in the In-Sight Vision System.
P+Cognex-In-Sight-E71_TriggerAcq
After triggering loading of the In-Sight Vision System images, acquires the
result of the image assessment (pass / no pass).
P+Cognex-In-Sight-E71_GetData
P+Cognex-In-Sight-E71_SetData
P+Cognex-In-Sight-E71_GetStatus
P+Cognex-In-Sight-E71_SetOnline
P+Cognex-In-Sight-E71_SetOffline
P+Cognex-In-Sight-E71_SaveJob
Saves the current job to the In-Sight Vision Systems flash memory.
10
P+Cognex-In-Sight-E71_SendCmd
2
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
No.
Device Name
Explanation
Q series sequencer
Use base, power supply unit and high performance QnH CPU unit1 or
universal QnU CPU model.
GX Works2
QJ71E71-100
3
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
4
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
5
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Set to TCP.
Set to Active.
Set to No Procedure.
Set to Enable.
Set to Confirm.
Enter the hexadecimal number that matches the In-Sight setting.
(Refer to 1.5) Enter 0BB8.
Enter the decimal number that matches the In-Sight setting.
(Refer to 1.5) Enter 192.168.0.1.
Enter the hexadecimal number that matches the In-Sight setting.
(Refer to 1.5) Enter 0BB8.
Set to TCP.
Set to MC Protocol.
No setting is required.
Enter the hexadecimal number that matches the In-Sight setting.
(Refer to 1.5) The default setting is 3000.
No setting is required.
No setting is required.
6
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
This section explains the Cognex In-Sight settings used by this program.
Set the job file settings and the network setting.
For details, refer to In-Sight EasyBuilder Help.
7
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Startup Check Method For In-Sight from Personal Computers Using Windows
Use Command Prompt in Windows to check the startup of In-Sight by sending a ping.
(2) In the Run dialog box, enter cmd and click the OK button.
(3) Enter the following command in Command Prompt to check the startup of In-Sight from the displayed response.
Ping 192.168.0.1
8
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Related manuals
Q-compatible Ethernet Interface Unit Users Manual (Basic Edition)
In-Sight EasyBuilder Help
Important
Be sure to read the corresponding Users Manual before using each product.
9
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
FB Library Details
Item
Summary of Function
Description
Establishes the connection between the QJ71E71-100 module and the In-Sight Vision
System.
Symbol
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
MELSEC-Q Series1
Model
High performance QCPU model2
Universal QCPU model
Ladder
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
Explanation of
Function
With FB_EN (execution command) ON, logs on to In-Sight from the ethernet unit.
FB Compile Method
Macro type
FB Operation
Item
I/O Signal Movement
Description
[With abnormal end]
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. When this FB is used, the connection destination must be set in advance in the open setting
of the network parameter. Refer to the Users Manual and be sure to complete the settings.
3. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
Related manuals
11
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Error Code
Description
Connection Open failed.
Action
Perform the operation again after checking whether
the connection No. for the FB input label is not outside
-102
-103
-104
-106
-200
-201
-202
15 characters.
The length of the password exceeds
15 characters.
12
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
i_Start_IO_No
Word
Connection No.
i_Connection_No
Word
1 to 15 (decimal
number)
Timeout value
i_TimeOut
Word
1 to 32767
(decimal number)
User Name1,2
i_UserName
Text
[0 to 9] [a to z]
[A to Z]
[0 to 9] [a to z]
[A to Z]
Enter a password of
15 characters or less for the
user name.
If no entry is made, the
string
Password1,2
i_Password
Text
string
password is sent as No
Password to In-Sight.
1: Use ASCII or Shift-JIS characters for the User name and Password input variables.
2: Passwords can be used in ladder programs to prevent reading of the User name and Password.
Refer to 3.1 Using Passwords to Prevent Reading/Writing in Ladder Programs.
13
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Output labels
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
For operating In-Sight, the connection destination of the QJ71E71-100 module must be set.
Set the corresponding connection destination of In-Sight from the network parameter Ethernet/CC IE/MELSECNET for
GX Works2. Be sure to read the GX Works2 Operating Manual (General Edition) for the setting method.
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
This chapter describes the function of the function block.
It does not describe the constraints of using the unit or sequencer CPU nor the constraints generated by their combination,
etc.
Be sure to read the corresponding Users Manual before using each product.
14
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Name
P+Cognex-In-Sight-E71_LoadJob
Description of Function
Item
Summary of Function
Description
Selects, changes and activates jobs stored in the In-Sight Vision System.
Symbol
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
Model
1
MELSEC-Q Series
Ladder
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
Explanation of
Function
With FB_EN (execution command) ON, selects, changes and activates jobs stored in the
In-Sight Vision System.
FB Compile Method
Macro type
FB Operation
15
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
I/O Signal Movement
Description
[With abnormal end]
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. In order to use this FB, it is necessary to use P+Cognex-In-Sight-E71_LogOn and log onto
In-Sight beforehand.
3. In this FB, there is processing for going offline and online before and after job change
processing.
It is, therefore, not necessary to separately use FBs that execute offline and online
commands.
4. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
Related manuals
16
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Error Code
-6
Description
The specified value is outside the range or
Action
Refer to the In-Sight manual.
sufficient memory.
The system is not online.
-105
-106
-300
characters.
17
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
i_Start_IO_No
Word
Connection No.
i_Connection_No
Word
1 to 15 (decimal
number)
Timeout value
i_TimeOut
Word
1 to 32767
(decimal number)
i_JobFileName
Text
[0 to 9] [a to z]
[A to Z]
string
1: Use ASCII or Shift-JIS characters for the Selected job file name input variable.
Output labels
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
18
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
19
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Name
P+Cognex-In-Sight-E71_TriggerAcq
Description of Function
Item
Summary of Function
Description
After triggering loading of the In-Sight Vision System images, acquires the result of the image
assessment (pass / no pass).
Symbol
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
MELSEC-Q Series1
Model
High performance QCPU model2
Universal QCPU model
Ladder
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
Explanation of
With FB_EN (execution command) ON, triggers loading of the In-Sight Vision System images
Function
and then acquires the result of the image assessment (pass / no pass).
FB Compile Method
Macro type
FB Operation
20
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
Description
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. In order to use this FB, it is necessary to use P+Cognex-In-Sight-E71_LogOn and log onto
In-Sight beforehand.
3. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
Related manuals
Error Code
-6
Description
Action
-104
-105
-106
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
i_Start_IO_No
Word
Connection No.
i_Connection_No
Word
1 to 15 (decimal
number)
Timeout value
i_TimeOut
Word
1 to 32767
(decimal number)
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
Execution result
o_Result
Word
Output labels
no pass
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
22
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
23
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
FB Definition Name
P+Cognex-In-Sight-E71_GetData
Description of Function
Item
Summary of Function
Description
Acquires the data held by In-Sight.
Symbol
* When the symbolic tag name is unknown, refer to 3.2 Finding Out which Symbolic Tags can
be Used with an FB.
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
MELSEC-Q Series1
Model
High performance QCPU model2
Universal QCPU model
Ladder
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
24
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
Description
Explanation of
Function
With FB_EN (execution command) ON, sends the symbolic tag set in i_tag to the In-Sight
FB Compile Method
Macro type
FB Operation
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
Related manuals
25
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Error Code
-6
Description
The specified value is outside the range or
Action
Refer to the In-Sight manual.
-104
-106
-301
-305
characters.
26
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
i_Start_IO_No
Word
the corresponding
CPU unit.
For the specific
i_Connection_No
Word
1 to 15 (decimal
number)
Timeout value
i_TimeOut
Word
1 to 32767 (decimal
number)
Symbolic tag
i_tag
Text
[0 to 9]
string
[A to Z]
[a to z]
i_Result_Type
Word
0 to 4 (decimal
number)
1: Use ASCII or Shift-JIS characters for the Symbolic tag input variable.
2: For the received value data type and the type conversion operation for the received data, refer to 3.3 Type Conversion
Processing Combination Table of P+Cognex-In-Sight-E71_GetData.
27
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Output labels
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
Execution result
o_Result
Text string
16 bit integer
32 bit integer
Single-
precision real
number
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
28
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Name
P+Cognex-In-Sight-E71_SetData
Description of Function
Item
Summary of Function
Description
Changes the data held by In-Sight.
Symbol
* When the symbolic tag name is unknown, refer to 3.2 Finding Out which Symbolic Tags can
be Used with an FB.
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
Model
1
MELSEC-Q Series
Ladder
29
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
No. of Steps (Max.)
Description
Universal models: 1876
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
Explanation of
Function
With FB_EN (execution command) ON, sends a random symbolic tag to the In-Sight Vision
FB Compile Method
Macro type
FB Operation
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
[Error Code]
Constraints
(Cautions)
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. In order to use this FB, it is necessary to use P+Cognex-In-Sight-E71_LogOn and log onto
In-Sight beforehand.
3. In this FB, there is processing for going offline and online before and after data change
processing.
It is, therefore, not necessary to separately use FBs that execute offline and online
commands.
4. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
5. Do not directly enter the value for i_tag_Value and i_tag_Data_Type.
Create the MAIN program so it refers to the values stored in D300, etc.
When the values are entered directly, a CPU error may occur.
6. Be sure to match the type of i_tag_Data_Type with i_tag_Value.
When the type does not match, a CPU error may occur when the type is converted.
For details, refer to 3.4 Type Conversion Processing Combination Table for
P+Cognex-In-Sight-E71_SetData.
Related manuals
30
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Error Code
Description
The specified value is outside the range or
Action
Refer to the In-Sight manual.
-2
-5
-6
-104
-106
-301
-302
-305
characters.
32 characters.
characters.
31
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
Unit installation XY
i_Start_IO_No
Word
Connection No.
i_Connection_No
Word
Timeout value
i_TimeOut
Word
1 to 32767 (decimal
number)
Symbolic tag1
i_tag
Text string
[0 to 9]
Set value1,2
i_tag_Value
Text string
---
address
[a to z] [A to Z]
16 bit integer
32 bit integer
Single-preci
sion real
number
Data type of the set value2
Word
0 to 4 (decimal number)
32
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Output labels
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
Execution result
o_Result
Word
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
This chapter describes the function of the function block.
It does not describe the constraints of using the unit or sequencer CPU nor the constraints generated by their combination,
etc.
Be sure to read the corresponding Users Manual before using each product.
33
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Name
P+Cognex-In-Sight-E71_GetStatus
Description of Function
Item
Summary of Function
Description
Acquires the current status of the In-Sight Vision System (online/offline).
Symbol
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
MELSEC-Q Series1
Model
High performance QCPU model2
Universal QCPU model
Ladder
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
Explanation of
Function
With FB_EN (execution command) ON, acquires the current status of the In-Sight Vision
FB Compile Method
Macro type
FB Operation
System (online/offline).
34
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
Description
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. In order to use this FB, it is necessary to use P+Cognex-In-Sight-E71_LogOn and log onto
In-Sight beforehand.
3. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
Related manuals
Error Code
-6
Description
Action
-105
-106
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
i_Start_IO_No
Word
Connection No.
i_Connection_No
Word
1 to 15 (decimal
number)
Timeout value
i_TimeOut
Word
1 to 32767
(decimal number)
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
Execution result
o_Result
Word
0: Offline
1: Online
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
Output labels
36
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
This chapter describes the function of the function block.
It does not describe the constraints of using the unit or sequencer CPU nor the constraints generated by their combination,
etc.
Be sure to read the corresponding Users Manual before using each product.
37
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Name
P+Cognex-In-Sight-E71_SetOnline
Description of Function
Item
Summary of Function
Description
Puts the In-Sight Vision System online.
Symbol
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
Model
1
MELSEC-Q Series
Ladder
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
Explanation of
Function
With FB_EN (execution command) ON, puts the In-Sight Vision System online.
FB Compile Method
Macro type
FB Operation
38
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
Description
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. In order to use this FB, it is necessary to use P+Cognex-In-Sight-E71_LogOn and log onto
In-Sight beforehand.
3. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
Related manuals
Error Code
Description
Action
-2
-5
-6
-105
A communication error occurred.
-106
39
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Labels
Input Labels
Name
Variable name
Data
Valid range
Description
type
Execution command
FB_EN
Bit
i_Start_IO_No
Word
unit.
X10.)
i_Connection_No
Word
1 to 15 (decimal
number)
Timeout value
i_TimeOut
Word
1 to 32767 (decimal
number)
Output labels
Name
Variable name
Data
Default
Description
OFF
type
Execution status
FB_ENO
Bit
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
40
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
This chapter describes the function of the function block.
It does not describe the constraints of using the unit or sequencer CPU nor the constraints generated by their combination,
etc.
Be sure to read the corresponding Users Manual before using each product.
41
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Name
P+Cognex-In-Sight-E71_SetOffline
Description of Function
Item
Summary of Function
Description
Takes the In-Sight Vision System offline.
Symbol
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
Model
1
MELSEC-Q Series
Ladder
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
Explanation of
Function
With FB_EN (execution command) ON, takes the In-Sight Vision System offline.
FB Compile Method
Macro type
FB Operation
42
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
Description
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. In order to use this FB, it is necessary to use P+Cognex-In-Sight-E71_LogOn and log onto
In-Sight beforehand.
3. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
Related manuals
Error Code
-6
Description
Action
-105
-106
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
i_Start_IO_No
Word
in the
corresponding
CPU unit.
X10.)
i_Connection_No
Word
1 to 15 (decimal
number)
Timeout value
i_TimeOut
Word
1 to 32767
(decimal number)
Output labels
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
44
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
This chapter describes the function of the function block.
It does not describe the constraints of using the unit or sequencer CPU nor the constraints generated by their combination,
etc.
Be sure to read the corresponding Users Manual before using each product.
45
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Name
P+Cognex-In-Sight-E71_SaveJob
Description of Function
Item
Summary of Function
Description
Saves the current job to the In-Sight Vision Systems flash memory.
Symbol
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
Model
1
MELSEC-Q Series
Ladder
* The number of steps is indicated as a reference for the number of steps in the label program.
For details, refer to GX Works2 Version 1 Operating Manual (Simple Project Edition).
Explanation of
Function
With FB_EN (execution command) ON, saves the current job to the In-Sight Vision Systems
FB Compile Method
Macro type
FB Operation
flash memory.
46
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
I/O Signal Movement
Description
[With normal end]
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. In order to use this FB, it is necessary to use P+Cognex-In-Sight-E71_LogOn and log onto
In-Sight beforehand.
3. In this FB, there is processing for going offline and online before and after save processing.
It is, therefore, not necessary to separately use FBs that execute offline and online
commands.
4. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
Related manuals
47
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Error Code
Description
The command could not be executed
-2
Action
Refer to the In-Sight manual.
-5
-6
-105
-106
-303
48
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
i_Start_IO_No
Word
in the
corresponding
CPU unit.
X10.)
i_Connection_No
Word
1 to 15 (decimal
number)
Timeout value
i_TimeOut
Word
1 to 32767
(decimal number)
i_JobFileName
Text
[0 to 9]
string
[A to Z]
[a to z]
1: Use ASCII or Shift-JIS characters for the Save job file name input variable.
Output labels
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
49
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
This chapter describes the function of the function block.
It does not describe the constraints of using the unit or sequencer CPU nor the constraints generated by their combination,
etc.
Be sure to read the corresponding Users Manual before using each product.
50
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Name
P+Cognex-In-Sight-E71_SendCmd
Description of Function
Item
Summary of Function
Description
Sends the selected native command and receives the results.
Symbol
* When the native command to be sent is unknown, refer to 3.5 Usable Native Commands that
can be sent with P+Cognex-In-Sight-E71_SendCmd.
Compatible Devices
Compatible units
QJ71E71-100
Compatible Vision
System
Cognex In-Sight
Compatible CPU
Series
Model
1
MELSEC-Q Series
Language
Ladder
Explanation of
Function
With FB_EN (execution command) ON, sends a random native command, and receives the
result.
FB Compile Method
Macro type
FB Operation
51
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Item
Description
[With abnormal end]
[Execution
Command]
[Execution
Command]
[Execution
Status]
[Execution
Status]
[Normal
Completion]
[Normal
Completion]
[Abnormal
Completion]
[Abnormal
Completion]
[Error Code]
Constraints
(Cautions)
[Error Code]
1. This FB does not include error processing. Error processing can be created separately to
match your system and operation requirements.
2. In order to use this FB, it is necessary to use P+Cognex-In-Sight-E71_LogOn and log onto
In-Sight beforehand.
3. Do not implement multiple FBs simultaneously for the same camera; if necessary, execute
multiple FBs sequentially.
Related manuals
52
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Error Code
-6
Description
Action
sufficient memory.
The system is not online.
-105
-106
-304
199 characters.
53
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Labels
Input Labels
Name
Variable name
Data type
Valid range
Description
Execution command
FB_EN
Bit
---
i_Start_IO_No
Word
Connection No.
i_Connection_No
Word
Timeout value
i_TimeOut
Word
1 to 32767
(decimal number)
Native command1
i_Native_Command
Text
string
[0 to 9] [a to z]
[A to Z]
1: Use ASCII or Shift-JIS characters for the Native command input variable.
Output labels
Name
Variable name
Data type
Default
Description
Execution status
FB_ENO
Bit
OFF
Execution result
o_Result
Text
string
End flag
FB_OK
Bit
OFF
FB_ERROR
Bit
OFF
Error Code
ERROR_ID
Word
54
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Version
Date
Description
1.00A
2009/02/20
Newly created
1.01B
2009/06/01
1.02C
2009/11/10
Important
This chapter describes the function of the function block.
It does not describe the constraints of using the unit or sequencer CPU nor the constraints generated by their combination,
etc.
Be sure to read the corresponding Users Manual before using each product.
55
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Appendix
(2) Select the program to set the password for, and click on Setting.
56
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
(3) Set Registration Condition to Read/Write Protection and, after setting the password, click the OK button.
(4) Confirm that the Registration state shows Registered, and click the OK button.
57
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
(5) Whether or not the password is set can be confirmed by the Disable Password prompt displayed during the Read
from PLC operation after the completion of password registration.
58
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
59
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
P+Cognex-In-Sight-E71_GetData converts and outputs the value received from In-Sight in accordance with the specified
received value data type (i_Result_Type).
Whether or not settings are possible for the received value data type and the value received from In-Sight is shown below
along with the operation for the set values.
Numerical Value
Numerical Value Range
2.147e+0092.147e+009
Type of Tag
Text String
Data Type of
Received Value
Data Type of the Received Value
Not Entered
Text String (Enter KO)
Operation 1
Error 1*1.
Error 1*1.
Error 1*1.
Numerical Value
Range
Other Ranges
Numerical Value
Range
"0" or "1"
Operation 2
Operation 2
Operation 2
Operation 2
Operation 1
Operation 1
Error 1*1.
Operation 1
Error 1*1.
Error 1*1.
Operation 3
Operation 4
Operation 5
Operation 4
Operation 5
Operation 5
* For details of the conversion processing operation, refer to QCPU Programming Manual: Common Commands Edition.
P+Cognex-In-Sight-E71_SetData converts the set value (i_tag_Value) to text string based on set value data type
(i_tag_Data_Type) and sends the set value to In-Sight.
Whether or not settings corresponding to the set value data type and the set value are possible and operation for the set
values are shown below.
Setting Value
Data Type of
Received Value
Data Type of the Received Value
Not Entered
Text String (Enter KO)
Text String
Direct
Input
Indirect
Input
: Setting Possible
X: Setting Not Possible
-: Item where direct value input
in FB is not possible
Error 2/3/6
Operation
Operation 1 Operation 1
1
Error 3*1.
Error
Error
Error
Error 1/3*1. Error 1/3*1.
1/3*1.
1/3*1.
1/3*1.
Single-precision Real
Number
Direct
Indirect
Input
Input
Direct
Input
Indirect
Input
Error 2/3/6
Error 2/3/6
Error 7*1.
Error 7*1.
Error 4*1.
Error 1*1.
Error 4*1.
Error 5*1.
* * For details of the conversion processing operation, refer to QCPU Programming Manual: Common Commands
Edition.
60
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Native commands that can be sent by this program are shown below.
No.
1
2
3
4
5
6
7
8
9
10
11
12
13
TJ
RJ
WJ
DJ
GJ
RB
14
RI
15
16
17
18
19
WB
WI
GV
SI
SF
20
21
22
23
24
25
26
27
28
29
30
SS
GI
RS
WS
TS
SL
GL
SO
GO
SE
SW
31
32
33
34
RT
SM
Get Connections
Get Expr
35
36
37
38
Get Filelist
Put Live
Put Portnum
Put Timeout
39
40
41
Put Update
Put Watch
Put XML
Description
Loads the specified job from In-Sights flash memory and makes it the active job.
Saves the current job into In-Sights flash memory.
Reads the job from the specified In-Sight flash memory.
Sends the job to In-Sights flash memory.
Deletes the specified job or cell data (.CXD) file from In-Sights flash memory.
Returns the file name of the job currently active in In-Sight.
Loads the job from one of the job slots within In-Sights flash memory and makes it
the active job.
Saves the current job in the job slot specified within In-Sights flash memory.
Reads the job from the specified In-Sight job slot.
Sends the job to the In-Sight job slot specified within In-Sights flash memory.
Deletes the job from the slot specified within In-Sights flash memory.
Returns the ID of the job currently active in In-Sight.
Sends the current image from In-Sight to a remote device in ASCII hexadecimal
format (80 characters/line).
Sends the current image from In-Sight to a remote device in ASCII hexadecimal
format (80 characters/line).
Sends image data from a remote device to In-Sight.
Sends image data from a remote device to In-Sight.
Returns the value included in the specified cell.
Sets the control included in the cell to the specified integer value.
Sets the edit box control included in the cell to the specified floating point number
value.
Sets the edit box control included in the cell to the specified text string.
Returns In-Sight sensor information.
Reads In-Sight system setting data.
Sends system setting data from a remote device to In-Sight.
Saves In-Sights settings to the proc.set file.
Prevents unauthorized changes to In-Sights IP address.
Returns the security status of In-Sights IP address.
Sets In-Sight to the online or offline mode.
Returns In-Sight online.
Triggers the specified event.
Triggers the specified event and returns the response after completion of the
command.
Resets c. This command is the same as physically turning on the power again.
Sends the text string to In-Sights spreadsheet via the native mode connection.
Returns the current connection information for In-Sight.
Returns the parameter or value included in the cell specified by the row and line
address, as well as the state of that cell.
Returns the number of files and each file name stored in In-Sight memory.
Turns the live load mode ON or OFF.
Specifies the port In-Sight uses for data or image forwarding via the network.
Specifies the amount of time (milliseconds) to maintain the port connection from the
client when sending or receiving is not being carried out.
Refreshes the GUI (spreadsheet, image display, and cell graphics).
Returns the value included in the specified cell when the cell is refreshed.
Specifies whether or not to format the output result of the native mode command with
XML.
61
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
The native commands that can be sent by this program following the native command Put XML are shown below.
No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
EV GetNetwork
EV GetSerialPort
EV GetStartup
EV GetUserList
EV
SetDeEnergizeOutputs
EV EditRegion
EV SetEIPSingleAttribute
EV SetFavorHostTable
17
18
EV SetFTPSettings
EV SetSerialPort
Description
Reads the settings of the Customize dialog box from the GUI of In-Sight 3000/3400.
Returns the Turn off the output power when offline setting specified by the Discrete
output setting dialog box.
Returns the information set in the Discrete input setting dialog box.
Returns the information set in the Discrete output setting dialog box.
Returns the class and the instance attributes of In-Sight EtherNet/IP.
Returns the information set in the FTP settings dialog box.
Returns the information included in the In-Sight host table dialog box.
Returns the machine status data stored in one of the buffers (begins with 0) attached
to the 8 indices within the machine status stack
Returns the information set in the Network settings dialog box.
Returns the information set in the Serial port settings dialog box.
Returns the information set in the Startup dialog box.
Returns the information set in the User list dialog box.
Changes the Turn off output power when offline setting of the Discrete output
setting dialog box.
Changes the cell settings that include the EditRegion function.
Sets the class and the instance attributes of In-SightEtherNet/IP.
Activates or deactivates the Give higher priority to the host table than DNS option of
the In-Sight host table.
Changes the FTP settings dialog box settings.
Changes the Serial port settings dialog box settings.
62
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
QJ71E71-100
Q Series Sequencer
Unit
Q06HCPU
Power
Windows
Personal computer
In-Sight
Micro
FB Name
M100
P+Cognex-In-Sight-E71_LogOn
M110
P+Cognex-In-Sight-E71_LoadJob
M120
P+Cognex-In-Sight-E71_TriggerAcq
M130
P+Cognex-In-Sight-E71_GetData
M140
P+Cognex-In-Sight-E71_SetData
M150
P+Cognex-In-Sight-E71_GetStatus
M160
P+Cognex-In-Sight-E71_Online
M170
P+Cognex-In-Sight-E71_Offline
M180
P+Cognex-In-Sight-E71_SaveJob
M190
P+Cognex-In-Sight-E71_SendCmd
63
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
FB Name
D10
P+Cognex-In-Sight-E71_LogOn
D11
P+Cognex-In-Sight-E71_LoadJob
Outputs the error code generated when the job file is changed.
D12
P+Cognex-In-Sight-E71_TriggerAcq
D13
P+Cognex-In-Sight-E71_GetData
Outputs the error code generated during symbolic tag value acquisition.
D14
P+Cognex-In-Sight-E71_SetData
Outputs the error code generated when the symbolic tag value is
changed.
D15
P+Cognex-In-Sight-E71_GetStatus
D16
P+Cognex-In-Sight-E71_Online
D17
P+Cognex-In-Sight-E71_Offline
D18
P+Cognex-In-Sight-E71_SaveJob
Outputs the error code generated when the job file is saved in
In-Sights flash memory.
D19
P+Cognex-In-Sight-E71_SendCmd
Outputs the error code generated during native command sending and
receiving.
D100
P+Cognex-In-Sight-E71_TriggerAcq
D200
P+Cognex-In-Sight-E71_GetData
D400
P+Cognex-In-Sight-E71_SetData
D500
P+Cognex-In-Sight-E71_GetStatus
D600
P+Cognex-In-Sight-E71_SendCmd
Data register
Device
FB Name
Application
D300
P+Cognex-In-Sight-E71_SetData
D301
P+Cognex-In-Sight-E71_SetData
D5500
P+Cognex-In-Sight-E71_TriggerAcq
D5501
P+Cognex-In-Sight-E71_TriggerAcq
D5502
P+Cognex-In-Sight-E71_TriggerAcq
R0
P+Cognex-In-Sight-E71_TriggerAcq
Job Name
Job Description
P+Cognex-In-Sight-E71_LoadJob
xy-ja.job
Positioning
inspection
P+Cognex-In-Sight-E71_LoadJob
inspect-ja.job
Inspection
P+Cognex-In-Sight-E71_LoadJob
IDCode-ja.job
QR code reading
64
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Common settings
Input output items
Value
Description
H0
Connection No.
K1
K0
Logon user
FB Name
User Name
Password
P+Cognex-In-Sight-E71_LogOn
operator
FB Name
Job Name
Job Description
P+Cognex-In-Sight-E71_LoadJob
xy-ja.job
Determines positioning.
P+Cognex-In-Sight-E71_SaveJob
xy-ja.job
Determines positioning.
FB Name
Tag Name
Description
P+Cognex-In-Sight-E71_GetData
P+Cognex-In-Sight-E71_SetData
(NULL password)
65
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Turns ON when a
connection with
In-Sight is
established.
66
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
67
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
68
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
69
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Turns ON when
In-Sight is put online.
70
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
Turns ON when
In-Sight is taken
offline.
71
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
72
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
(k) Processing example when an image is assessed in the sensors hardware trigger input port
Cautions
When image assessment is conducted in the sensors hardware trigger input port, the settings for the job description must
be changed.
P+Cognex-In-Sight-E71_TriggerAcq cannot be used in conjunction with the hardware trigger input port to conduct image
assessment.
The method for setting the file register is described on the next page.
73
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection
To set the file register, open the PLC File tab in PLC Parameter, and set the File Register items.
In the above example, the file register is created within the sequencer CPU.
74
FB Library Reference Manual for In-Sight QnH/QnU CPU QJ71E71-100 Connection