Denso Keyence Vision XG Series Manual Download Page 1

11[

文書のタイトルを入力

 

 

 

 
 
 

 

 
 
 
 
 
 

 

 

KEYENCE 

  Image Processing System 

 

MODEL: XG Series

 

 

Summary of Contents for Keyence Vision XG Series

Page 1: ...11 文書のタイトルを入力 1 KEYENCE Image Processing System MODEL XG Series ...

Page 2: ...formance cannot be guaranteed if this product is used without observing instructions in this manual 2 All products and company names mentioned are trademarks or registered trademarks of their respective holders This manual covers the following product KEYENCE XG 7000 8000 Series Important To ensure proper and safe operation be sure to read Safety Precautions Manual before using the provider Notice...

Page 3: ...e of This Product Provider 4 2 How to Connect 6 3 Communication Settings for Robot Controller and Device Used 7 4 Provider Execution Procedure 9 5 Command Description 10 6 Error Code of XG provider 32 7 Operation Panel Screen 33 8 Sample Program 34 Revision History 35 ...

Page 4: ...native commands required to access XG series in the robot program Use of this provider allows customers to establish communication with a robot easily without creating a communication program for XG series The following shows a diagram of provider embedding XG Robot controller Communication circuit Using the dedicated communication format for XG data transmission is performed Sub Main Declare prov...

Page 5: ...type Note that a program procedure cannot contain the providers of the same type Note When the same provider exists in different programs like in the above figure exclusion process is required between the programs tasks The provider is provided as a dynamic link library abbreviated as DLL which can be used from PacScript If provider is compared to a folder the folder contains various commands Cont...

Page 6: ...ect to the robot controller via Ethernet use the optional dedicated cable KEYENCE PN OP 66843 or a crossover LAN cable Also when a switching hub router is used use the cable suitable for the switching hub router specifications XG series Crossover cable 3 m OP 66843 Robot controller ...

Page 7: ...1 Communication via Ethernet TCP IP 3 1 1 Ethernet TCP IP communication settings on robot controller Set the robot controller s IP address 1 Press F6 Setting F5 Communication and Token F2 Network and Permission to display the Communication Settings window Set the IP address and subnet mask so that the robot controller and XG series t are within the same subnet mask ...

Page 8: ...subnet mask so that the robot controller and XG series are within the same subnet mask Set CR for delimiter For Command Data Output set 8500 at all time Fixed value 3 1 3 Other settings for XG series 1 After creating a test flow with XG Vision Editor select Capture Settings Trigger Settings tab on Flow View to display the Trigger Settings window Select External for the trigger type and check the E...

Page 9: ... conn eth 192 168 0 10 4 State from trigger to data receiving process 5 EndProc End process Exit Sub ErrorProc Error process End Sub 1 Declare the provider error processing routine as needed Connection error detection at declaration 2 Declare the provider implementation variable as Object type The variable name can be specified arbitrarily 3 Declare the result acquisition variable The data type de...

Page 10: ...rigger Trigger Issues a trigger 18 EnableTrigger EnableTrigger Enables disables trigger input 19 ReadTriggerEnable ReadTriggerEnable Reads the trigger input enabled disabled state 20 WriteVariable WriteVariable Writes a variable value 21 ReadVariable ReadVariable Reads a variable value 22 ChangeInspectSetting ChangeInspectSetting Changes the inspection setting number 23 ChangeInspectSettingAsync C...

Page 11: ...ress Port number Default port number is 8502 The port number is optional Timeout period Specify the timeout period msec for transmission Timeout Time Default 500 The timeout period is optional Description The provider becomes effective when implemented to a variable From this point the implemented Object type variable is used to access the provider The implemented variable is called Implementation...

Page 12: ...ge ImplVar ChangeMode Mode Argument Mode Switching between run and stop modes integer 0 Stop mode 1 Run mode Usage The operation mode is changed to run or stop Example Dim caoCtrl as Object caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl ChangeMode 1 Enter run mode ...

Page 13: ...een run and stop modes integer 0 Stop mode 1 Run mode Usage Change the operation mode between Online Offline mode asynchronously To obtain and check the return value of the command use GetCommandResult command Example Dim caoCtrl as Object Dim vntResult as Variant caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl ChangeModeAsync 1 Enter run mode Obtain the return valu...

Page 14: ...ent operation mode is stored If acquisition fails 1 is stored Variant type 0 Stop mode 1 Run mode 2 Remote capture mode Description The current operation mode run stop or remote capture mode is acquired Example Dim caoCtrl as Object Dim vntResult as Variant caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 vntResult caoCtrl ReadMode ...

Page 15: ...ーズ ImplVar Reset Usage Resets the controller Syntax ImplVar Reset Description The controller is reset Example Dim caoCtrl as Object caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl Reset ...

Page 16: ... to the next unit of the start unit Syntax ImplVar Restart Description The command makes a jump to the next unit of the start unit Example Dim caoCtrl as Object caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl Restart ...

Page 17: ...artAsync Description Jump to the next unit after the Start unit asynchronously To obtain and check the return value of the command use GetCommandResult command Example Dim caoCtrl as Object Dim vntResult as Variant caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl Restart caoCtrl RestartAsync Obtain the return value of RestartAsync command vntResult caoCtrl GetCommand...

Page 18: ...r Trigger Trigger No Argument Trigger No Specify the number of trigger to issue integer 1 4 Trigger 1 to 4 1 All triggers Description A trigger is issued Example Dim caoCtrl as Object caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl Trigger 2 ...

Page 19: ...ableTrigger Enable mode Argument Enable mode Specify whether to enable disable trigger integer 0 Trigger disabled 1 Trigger enabled Description Trigger is enabled disabled Example Dim caoCtrl as Object caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl EnableTrigger 1 ...

Page 20: ...rn value The trigger status is stored If acquisition fails 1 is stored Variant type 0 Trigger disabled 1 Trigger enabled Description The trigger status enabled disabled is acquired Example Dim caoCtrl as Object Dim vntResult as Variant caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 vntResult caoCtrl ReadTriggerEnbale ...

Page 21: ...lue to write to the variable Double type Synchronization mode Specify whether or not to reflect in synchronization with a flow integer 0 Reflected immediately without synchronization with flow MW command 1 Reflected at the end unit of flow MS command Description A value is written to a specified scalar variable This variable name is a name configured in the XG series Example Dim caoCtrl as Object ...

Page 22: ...e characters character string Return value The variable value is stored If acquisition fails 1 0 is stored Variant type Description The value of specified scalar variable is acquired This variable name is a name configured in the XG series Example Dim caoCtrl as Object Dim vntResult as Variant caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 vntResult caoCtrl ReadVariable My...

Page 23: ...gument SD card number Specify the SD card number Integer 1 2 Inspection setting number Specify the inspection setting number Integer 0 to 999 Description The setting is changed to the inspection setting number of the specified SD card Example Dim caoCtrl as Object caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl ChangeInspectSetting 1 2 Change SD card 1 inspection se...

Page 24: ... 1 2 Inspection setting number Specify the inspection setting number Integer 0 to 999 Description Switch the current program to the specified inspection setting number and SD card asynchronously To obtain and check the return value of the command use GetCommandResult command Example Dim caoCtrl as Object Dim vntResult as Variant caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 ...

Page 25: ...spection setting number Integer 0 to 999 Description Obtain the currently used inspection setting number Example Dim caoCtrl as Object Dim vntRet as Variant Dim iaryData 1 as Integer caoCtrl Cao AddController XG CaoProv KEYENCE VWXG _ conn eth 192 168 0 10 Obtain currently selected inspection setting number and its SD card number iaryData 0 stores an SD card number iaryData 1 stores an inspection ...

Page 26: ...Error type Argument Error type Specify the error status Integer 0 1 0 Error0 and Error0Code cleared 1 Error1 and Error1Code cleared Description The error status and error code of the specified type are cleared Example Dim caoCtrl as Object caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl ClearError 0 ...

Page 27: ...urn value Command response is returned with a character string If acquisition fails the character string is not stored Variant type Description For the supported non procedural commands refer to the reference manual of V Works for XG ActiveX control for XG series Example Non procedural command R0 The following shows an example of entering run mode Dim caoCtrl as Object Dim vntResult as Variant cao...

Page 28: ...tion For the supported non procedural commands refer to the reference manual of V Works for XG ActiveX control for XG series To obtain the return value or the execution result of this command use GetCommandResult command Example Non procedural command R0 The following shows an example of entering run mode Dim caoCtrl as Object Dim vntResult as Variant caoCtrl cao AddController XG CaoProv KEYENCE V...

Page 29: ... Trigger 1 to 4 1 All triggers Return value Output data specified for the result output unit is stored If acquisition fails 1 0 is stored Variant type Description Issues a specified trigger and acquires the processing result specified for the output unit of the XG series side Example Dim caoCtrl as Object Dim vntResult as Variant caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0...

Page 30: ...urs and no value will be returned If an asynchronous command ends with an error the error will be ignored within the process of asynchronous command and the error occurs at GetCommandResult command execution If there is no response within the specified timeout period during the waiting time of the asynchronous command completion a time out error 0x80000900 will occur Note that if another command i...

Page 31: ...eiving packet Description Receive packets If any packets have already been stored in the receiving buffer packets in the receiving buffer will be obtained Example Dim caoCtrl as Object Dim strRet as String caoCtrl cao AddController XG CaoProv KEYENCE VWXG conn eth 192 168 0 10 caoCtrl Trigger 1 strRet caoCtrl RecievePacket ...

Page 32: ...ue is out of range The following error codes are defined as original error codes Error Error number Description E_BASED_VWXG 0x80100000 VWXG series original error E_ENABLED_CANCEL 0x80101000 Failed to perform cancel process E_EXECUTING 0x80102000 Another command was executed during a command execution E_GET_COMMAND_RESULT 0x80103000 GetCommandResultcommand was executed after a Synchronous command ...

Page 33: ...op mode ChangeMode 3 Configures the inspection setting number SD card number 1 to 2 setting No 0 to 999 4 Changes to the setting No set in the step 3 ChangeInspectSetting 5 Configures the variable name to read This variable name is a name configured in the XG series 6 Reads out the value of the variable set in 5 Received data appears in the data display section 10 ReadVariable 7 Executes all trigg...

Page 34: ...eth 192 168 0 10 Provider implementation caoXG ChangeInspectSetting 1 2 Change to SD1 setting 2 caoXG Trigger 1 Trigger delay 200 vntResult caoXG ReadVariable XPos Receive data letx pTargetPos posx P11 val vntResult Expand X component of received data to position data approach p pTargetPos p 20 s 100 Go to position after correction move l e pTargetPos s 10 call Hand Close depart l p 50 s 100 EndPr...

Page 35: ...t command Modified TriggerAndGetResult command Ver 1 0 4 Ver 1 13 0 Modified the sample program Ver 1 0 5 Ver 2 3 Modified version DENSO WAVE INCORPORATED No part of this manual may be duplicated or reproduced without permission The contents of this manual are subject to change without notice Every effort has been made to ensure that the information in this manual is accurate However should any un...

Page 36: ......

Reviews: