376GB LJ-V7000 Series Communication Library Reference Manual Please read this manual before use. After reading this manual, store it in a safe place where it can be used at any time.
Contents 1 Software License Agreement.................................................................................................................. 5 2 Introduction .............................................................................................................................................. 6 3 Operating Environment ........................................................................................................................... 6 4 USB Driver ............................
12 Appendix................................................................................................................................................. 65 12.1 Sending/Receiving Settings .......................................................................................................... 65 12.2 Batch sending/receiving................................................................................................................ 65 12.3 Details of Items for Sending/Receiving Settings .............
1 Software License Agreement NOTICE TO USER: PLEASE READ THIS SOFTWARE LICENSE AGREEMENT (THIS “AGREEMENT”) CAREFULLY. BY USING ALL OR ANY PORTION OF THIS “SOFTWARE”, YOU ARE AGREEING TO BE BOUND BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ANY TERMS OF THIS AGREEMENT, DO NOT USE THIS SOFTWARE. 1. Grant of License. Conditioned upon compliance with all of the terms and conditions of this Agreement, KEYENCE grants you a nonexclusive and nontransferable license. 2.
2 Introduction The LJ-V7000 Series communication library provides a communication interface for controlling the LJ-V7000 Series from a user application (Win32 DLL). For specific ways to use the communication library, refer to the sample program. 3 Operating Environment OS Windows 7 (Home Premium/Professional/Ultimate) Windows Vista (Home Basic/Home Premium/Business/Ultimate) Windows XP (SP2 or later) (Home Edition/Professional Edition) CPU Core i3 2.
6 Incorporating the Library 6.1 File structure The files required at execution are listed below. Place these folders/files in the same folder as the executable file. • LJV7_IF.dll 6.2 Linking 6.2.1 C++ 6.2.1.1 Linking The library can be linked implicitly or explicitly. To implicitly link the library, link with "LJV7_IF.lib". * "LJV7_IF.lib" was built with Visual C++ 2008 SP1. 6.2.1.2 Include files Include the following header files in the necessary source files. • LJV7_IF.h • LJV7_ErrorCode.h 6.2.
Constant, Structure Definitions 8.1 Constant definitions Name Setting value storage level designation Definition Typedef enum { LJV7IF_SETTING_DEPTH_WRITE = 0x00, LJV7IF_SETTING_DEPTH_RUNNING = 0x01, LJV7IF_SETTING_DEPTH_SAVE = 0x02 } LJV7IF_SETTING_DEPTH; Description This enumeration designates the operation target level in functions that modify or read settings. For details on the setting value storage level, refer to "9.2.9.3 Write processing for settings".
Name Definition that indicates the validity of a measurement value Definition Typedef enum { LJV7IF_MEASURE_DATA_INFO_VALID = 0x00, LJV7IF_MEASURE_DATA_INFO_ALARM = 0x01, LJV7IF_MEASURE_DATA_INFO_WAIT = 0x02 } LJV7IF_MEASURE_DATA_INFO; Description This enumeration indicates the validity or invalidity of the measurement value.
Name Get profile batch data position specification method designation (batch measurement: on) Definition Typedef enum { LJV7IF_BATCH_POS_CURRENT = 0x00, LJV7IF_BATCH_POS_SPEC = 0x02, LJV7IF_BATCH_POS_COMMITED = 0x03, LJV7IF_BATCH_POS_CURRENT_ONLY = 0x04 } LJV7IF_BATCH_POS; // From current // Specify position // From current after batch commitment // Current only In the get batch profile command, this enumeration indicates the specification method for the profiles to get in what batch out of the batch d
8.2 Structure definitions Name Ethernet settings structure Definition Typedef struct { BYTE abyIpAddress[4]; WORD wPortNo; BYTE reserve[2]; } LJV7IF_ETHERNET_CONFIG; This structure contains the settings passed during an Ethernet communication connection. Description abyIpAddress The IP address of the controller to connect to. For 192.168.0.1: Set abyIpAddress[0]=192, abyIpAddress[1]=168, and so on. wPortNo(in) The port number of the controller to connect to.
Name Setting item designation structure Definition Typedef struct { BYTE byType; BYTE byCategory; BYTE byItem; BYTE reserve; BYTE byTarget1; BYTE byTarget2; BYTE byTarget3; BYTE byTarget4; } LJV7IF_TARGET_SETTING; Information for specifying target setting items. Description byType, byCategory, byItem When modifying or reading a setting, these variables are used to specify the target setting item.
Name Profile information structure Definition Typedef struct { BYTE byProfileCnt; BYTE byEnvelope; BYTE reserve[2]; WORD wProfDataCnt; BYTE reserve2[2]; LONG lXStart; LONG lXPitch; } LJV7IF_PROFILE_INFO; Information related to the profile. byProfileCnt Wheter dicates the amount of profile data stored. (When 2 head/combine (wide) is off, 2 profile data units is stored, otherwise 1 profile data unit is stored.) Description byEnvelope Whether profile compression (time axis) is on. 0: off, 1: on.
Example: Single phase 1x multiplier encoder trigger with no skipping A phase ON OFF Z phase ON OFF Encoder count Z-phase flag Note: 1 OFF 2 ON 3 ON 4 OFF 5 ON When the Z-phase input uses a negative logic encoder, set the TRG minimum input time, which is a common measurement setting, to 7 μs. With negative logic, the Z-phase flag turns ON as shown in the following figure.
Name High-speed mode get profile request structure (batch measurement: on) Definition Typedef struct { BYTE byTargetBank; BYTE byPosMode; BYTE reserve[2]; DWORD dwGetBatchNo; DWORD dwGetProfNo; BYTE byGetProfCnt; BYTE byErase; BYTE reserve[2]; } LJV7IF_GET_BATCH_PROFILE_REQ; The get profile designation information when the operation mode is "high-speed (profile only)" and batch measurements are on in the get profile command.
Name Advanced mode get profile request structure (batch measurement: on) Definition Typedef struct { BYTE byPosMode; BYTE reserve[3]; DWORD dwGetBatchNo; DWORD dwGetProfNo; BYTE byGetProfCnt; BYTE reserve[3]; } LJV7IF_GET_BATCH_PROFILE_ADVANCE_REQ; The get profile designation information when the operation mode is "advanced (with OUT measurement)" and batch measurements are on in the get batch profile command. byPosMode Specifies the get profile position specification method. See LJV7IF_BATCH_POS.
Name High-speed mode get profile response structure (batch measurement: on) Definition Typedef struct { DWORD dwCurrentBatchNo; DWORD dwCurrentBatchProfCnt; DWORD dwOldestBatchNo; DWORD dwOldestBatchProfCnt; DWORD dwGetBatchNo; DWORD dwGetBatchProfCnt; DWORD dwGetBatchTopProfNo; BYTE byGetProfCnt; BYTE byCurrentBatchCommited; BYTE reserve[2]; } LJV7IF_GET_BATCH_PROFILE_RSP; The profile information returned for the get profiles command when the operation mode is "high-speed (profile only)" and batch measu
Name Advanced mode get profile response structure (batch measurement: on) Definition Typedef struct { DWORD dwGetBatchNo; DWORD dwGetBatchProfCnt; DWORD dwGetBatchTopProfNo; BYTE byGetProfCnt; BYTE reserve[3]; } LJV7IF_GET_BATCH_PROFILE_ADVANCE_RSP; The profile information returned for the get profiles command when the operation mode is "advanced mode (with OUT measurement)" and batch measurements are on. dwGetBatchNo The batch number that was read this time.
Name Storage information structure Definition Typedef struct { BYTE byStatus; BYTE byProgramNo; BYTE byTarget; BYTE reserve[5]; DWORD dwStorageCnt; } LJV7IF_ STORAGE_INFO; Information related to the storage status. byStatus Storage status. 0: Empty (Takes on this value when the target surface has not operated even once in a program with storage on) 1: Storing (only the active storage surface can be 1) 2: Storage complete Description byProgramNo The program number for the relevant storage surface.
Name Get batch profile storage request structure Definition Typedef struct { BYTE reserve[4]; DWORD dwSurface; DWORD dwGetBatchNo; DWORD dwGetBatchTopProfNo; BYTE byGetProfCnt; BYTE reserved[3]; } LJV7IF_GET_BATCH_PROFILE_STORAGE_REQ; Get data designation information in the get batch storage data command. dwSurface Storage surface to read. Description dwGetBatchNo Batch number to read. dwGetBatchTopProfNo Specifies from what profile number in the batch to get the data.
Name Get batch profile storage response structure Definition Typedef struct { DWORD dwGetBatchNo; DWORD dwGetBatchProfCnt; DWORD dwGetBatchTopProfNo; BYTE byGetProfCnt; BYTE reserve[3]; LJV7IF_TIME stBaseTime; } LJV7IF_GET_BATCH_PROFILE_STORAGE_RSP; The get data information returned for the get batch profile storage command. dwGetBatchNo The batch number that was read this time. dwGetBatchProfCnt The number of profiles in the batch that was read this time.
8.3 Callback function interface definition Format void (*pCallBack)( BYTE* pBuffer, DWORD dwSize, DWORD dwCount, DWORD dwNotify, DWORD dwUser); pBuffer(in) A pointer to the buffer that stores the profile data. The profile data is stored in this buffer with "LJV7IF_PROFILE_HEADER - signed 32-bit profile data - LJV7IF_PROFILE_FOOTER" as a single unit of profile data, and only the number of profiles that could be acquired (dwCount) are returned.
8.3.1 Supplement 8.3.1.1 dwNotify parameter This section describes the dwNotify parameter used in the callback function. In high-speed communication, the callback function is called when any number of events occur, in addition to when profile data is received. These events can be checked with the dwNotify parameter. dwNotify = 0: Indicates that profile data is being communicated correctly. Refer to the table below for values other than 0. : May be returned. : Will not be returned.
Bit 0 to 2 and bit 8 indicate that continuous send was stopped. To restart continuous send, start the high-speed data communication in the following order: "Finalize high-speed data communication" "Disconnect ethernet communication" "Start ethernet communication" "Initialize ethernet high-speed communication" "Request preparation for Ethernet high-speed data communication". Bit 16 is only valid when batch measurements are on.
9 Functions 9.1 Function list 9.1.1 Operations for the DLL These functions are processed normally even when the controller is in the system error state. Function name Overview LJV7IF_Initialize Initializes the DLL LJV7IF_Finalize Performs the termination processing for the DLL LJV7IF_GetVersion Gets the DLL version 9.1.2 Establish/disconnect the communication path with the controller These functions are processed normally even when the controller is in the system error state.
9.1.5 Functions related to modifying or reading settings Processing for these functions fails when the controller is in the system error state.
9.1.7 Storage function related Processing for these functions fails when the controller is in the system error state.
9.2 Function reference The type of the return value for the functions where there is a possibility of an error occurring is LONG. Normally, 0 (ERR_NONE) is returned, and the return code is expressed in the lower 2 bytes (the upper 2 bytes are reserved). For the common return codes for functions, see "10 Common Return Codes". For the individual return codes for functions, see the function description in this chapter. The return codes are listed as the lower 2 bytes in hexadecimal (example: 0x0100). 9.2.
9.2.2 Establish/disconnect the communication path with the controller For communication devices, see "9.2.9.1 Communication devices". USB communication connection Format LONG LJV7IF_UsbOpen(LONG lDeviceId); Parameters lDeviceId(in) Specifies the communication device to communicate with. Return value No individual return code Explanation This function establishes a connection with the controller so that the library can communicate with a USB-connected controller. Supported version 1.
Return to factory state Format LONG LJV7IF_RetrunToFactorySetting(LONG lDeviceId); Parameters lDeviceId(in) Specifies the communication device to communicate with. Return value No individual return code Explanation This function returns all of the controller's settings to the factory state. After processing returns from this interface, write processing is being performed to the save area in the controller.
9.2.4 Measurement control For communication devices, see "9.2.9.1 Communication devices". Trigger Format LONG LJV7IF_Trigger(LONG lDeviceId); Parameters lDeviceId(in) Specifies the communication device to communicate with. Return value 0x8080: The trigger mode is not "external trigger" Explanation This function issues a trigger. Supported version 1.
Auto zero Format LONG LJV7IF_AutoZero(LONG lDeviceId, BYTE byOnOff, DWORD dwOut); lDeviceId(in) Specifies the communication device to communicate with. byOnOff(in) Other than 0: Auto zero on request, 0: off request. Parameters dwOut(in) Specifies the OUT to target for processing as a bit. From the LSB, OUT1, OUT2, to OUT16 are indicated by bits, and the OUT is the target for processing when the bit is 1 (upper 16 bits are reserved).
Clear memory Format LONG LJV7IF_ClearMemory(LONG lDeviceId); Parameters lDeviceId(in) Specifies the communication device to communicate with. Return value No individual return code Explanation When the operation mode is "high-speed (profile only)", this function clears the profile data accumulated in internal memory. When the operation mode is "advanced (with OUT measurement)", the accumulated storage data is cleared. Supported version 1.00 9.2.
Get setting Format LONG LJV7IF_GetSetting(LONG lDeviceId, BYTE byDepth, LJV7IF_TARGET_SETTING TargetSetting, void* pData, DWORD dwDataSize); lDeviceId(in) Specifies the communication device to communicate with. byDepth(in) Specifies the level of the setting value to get. (LJV7IF_SETTING_DEPTH) Parameters TargetSetting(in) Identifies the item that is the target to get. pData(out) Specifies the buffer to receive the setting data that was acquired.
Request to reflect settings in the write settings area Format LONG LJV7IF_ReflectSetting(LONG lDeviceId, BYTE byDepth, DWORD*pdwError); lDeviceId(in) Specifies the communication device to communicate with. Parameters byDepth (in) Specifies to what level the settings written in the write settings area will be reflected to. (LJV7IF_SETTING_DEPTH) pdwError(out) The buffer for receiving detailed setting errors (see "9.2.9.4 Detailed setting errors").
Set date/time Format LONG LJV7IF_SetTime(LONG lDeviceId, LJV7IF_TIME* pTime); lDeviceId(in) Specifies the communication device to communicate with. Parameters pTime(in) The date/time to set. For each member, see "8 Constant, Structure Definitions". Return value No individual return code Explanation This function sets the date/time for the controller. Supported version 1.
9.2.6 Acquiring measurement results For communication devices, see "9.2.9.1 Communication devices". Get measurement results Format LONG LJV7IF_GetMeasurementValue(LONG lDeviceId, LJV7IF_MEASURE_DATA* pMeasureData); Parameters lDeviceId(in) Specifies the communication device to communicate with. pMeasureData(out) This buffer stores the data for all 16 OUTs including the OUTs that are not measuring. The host requires the passing of a buffer LJV7IF_MEASURE_DATA[16] in size.
Get batch profiles (operation mode "high-speed (profile only)") Format LONG LJV7IF_GetBatchProfile(LONG lDeviceId, LJV7IF_GET_BATCH_PROFILE_REQ* pReq, LJV7IF_GET_BATCH_PROFILE_RSP* pRsp, LJV7IF_PROFILE_INFO * pProfileInfo, DWORD* pdwBatchData, DWORD dwDataSize); lDeviceId(in) Specifies the communication device to communicate with. pReq(in) Specifies the position, etc., of the profiles to get. For each member, see "8 Constant, Structure Definitions". pRsp(out) Indicates the position, etc.
Get profiles (operation mode "advanced (with OUT measurement)") Format LONG LJV7IF_GetProfileAdvance(LONG lDeviceId, LJV7IF_PROFILE_INFO* pProfileInfo, DWORD* pdwProfileData, DWORD dwDataSize, LJV7IF_MEASURE_DATA* pMeasureData); lDeviceId(in) Specifies the communication device to communicate with. pProfileInfo(out) The profile information for the acquired profiles. For each member, see "8 Constant, Structure Definitions". Parameters pdwProfileData (out) The buffer to get the profile data.
Get batch profiles (operation mode "advanced (with OUT measurement)") Format LONG LJV7IF_GetBatchProfileAdvance(LONG lDeviceId, LJV7IF_GET_BATCH_PROFILE_ADVANCE_REQ* pReq, LJV7IF_GET_BATCH_PROFILE_ADVANCE_RSP* pRsp, LJV7IF_PROFILE_INFO* pProfileInfo, DWORD* pdwBatchData, DWORD dwDataSize, LJV7IF_MEASURE_DATA* pBatchMeasureData, LJV7IF_MEASURE_DATA* pMeasureData); lDeviceId(in) Specifies the communication device to communicate with. pReq(in) Specifies the position, etc., of the profiles to get.
9.2.7 Store function related For communication devices, see "9.2.9.1 Communication devices". Start storage Format LONG LJV7IF_StartStorage(LONG lDeviceId); Parameters lDeviceId(in) Specifies the communication device to communicate with.
Get data storage data Format LONG LJV7IF_GetStorageData(LONG lDeviceId, LJV7IF_GET_STORAGE_REQ* pReq, LJV7IF_STORAGE_INFO* pStorageInfo, LJV7IF_GET_STORAGE_RSP* pRsp, DWORD* pdwData, DWORD dwDataSize); lDeviceId(in) Specifies the communication device to communicate with. pReq(in) Specifies the storage data to get. For each member, see "8 Constant, Structure Definitions". pStorageInfo(out) Represents the actually acquired storage information. For each member, see "8 Constant, Structure Definitions".
Get profile storage data Format LONG LJV7IF_GetStorageProfile(LONG lDeviceId, LJV7IF_GET_STORAGE_REQ* pReq, LJV7IF_STORAGE_INFO* pStorageInfo, LJV7IF_GET_STORAGE_RSP* pRsp, LJV7IF_PROFILE_INFO* pProfileInfo, DWORD* pdwData, DWORD dwDataSize); lDeviceId(in) Specifies the communication device to communicate with. pReq(in) Specifies the profiles to get. For each member, see "8 Constant, Structure Definitions". pStorageInfo(out) Represents the actually acquired storage information.
Get batch profile storage data Format LONG LJV7IF_GetStorageBatchProfile (LONG lDeviceId, LJV7IF_GET_BATCH_PROFILE_STORAGE_REQ* pReq, LJV7IF_STORAGE_INFO* pStorageInfo, LJV7IF_GET_BATCH_PROFILE_STORAGE_RSP* pRsp, LJV7IF_PROFILE_INFO* pProfileInfo, DWORD* pdwData, ·DWORD dwDataSize, DWORD* pdwTimeOffset, LJV7IF_MEASURE_DATA* pMeasureData); Parameters lDeviceId(in) Specifies the communication device to communicate with. pReq(in) Specifies the profiles to get.
9.2.8 High-speed data communication related For communication devices, see "9.2.9.1 Communication devices". Initialize USB high-speed data communication Format LONG LJV7IF_HighSpeedDataUsbCommunicationInitalize (LONG lDeviceId, void (*pCallBack)(BYTE*, DWORD, DWORD, DWORD, DWORD), DWORD dwProfileCnt, DWORD dwThreadId); lDeviceId(in) Specifies the communication device to communicate with. Parameters pCallBack(in) Specifies the callback function to call when data is received by high-speed communication.
Request preparation before starting high-speed data communication Format LONG LJV7IF_PreStartHighSpeedDataCommunication (LONG lDeviceId, LJV7IF_HIGH_SPEED_PRE_START_REQ* pReq, LJV7IF_PROFILE_INFO* pProfileInfo); lDeviceId(in) Specifies the communication device to communicate with. Parameters pReq(in) Specifies what data to send high-speed communication from. pProfileInfo(out) Stores the profile information.
9.2.9 Supplement 9.2.9.1 Communication devices The controller that will communication with the PC is specified as a communication device. The maximum number of controllers that can be communicated with simultaneously is defined by LJV7IF_DEVICE_COUNT (8.1 Constant definitions). In interfaces that involve communication, you can specify the controller to target for communication with IDeviceID. IDeviceID can be specified as 0 to (LJV7IF_DEVICE_COUNT-1). • Only one controller can communicate via USB.
9.2.9.2.1 For operation mode: high-speed (profile only) Save target data: profile When the memory allocation is "double buffer" The change program operation and the memory usage states transition as shown below. (*: Active surface) Program number 1 (measuring) Surface A Saving* Surface B No data Change program (save target surface is surface B) Program number 2 (measuring) Surface A Program number 1 data Surface B Saving* Change program (save target surface is surface A.
When the memory allocation is "entire area (do not overwrite)" Change program operation and memory states transition example Program number 1 (measuring) Surface 1 Saving* Surface 2 Surface 3 No data No data Change program Program number 2 (measuring) Surface 1 Program number 1 data Surface 2 Surface 3 Saving* No data Change program Program number 1 (measuring) Surface 1 Surface 2 Program number 1 data Program number 2 data Surface 3 Saving* Change program and repeat measuremen
9.2.9.3 Write processing for settings The 4 functions listed below are used when performing write processing for settings. • LJV7IF_SetSetting (Send setting) • LJV7IF_ReflectSetting (Request to reflect settings in the write settings area) • LJV7IF_RewriteTemporarySetting (Update write settings area) • LJV7IF_CheckMemoryAccess (Check the status of saving to the save area) Depth must be specified using LJV7IF_SetSetting to send settings. The Depth options and their respective uses are as below.
Changing 1 setting • When not saving settings to the controller Modify setting LJV7IF_SetSetting (RUNNING) • When saving settings to the controller Modify setting LJV7IF_SetSetting (SAVE) NOTICE • Measuring is stopped when writing settings to RUNNING (SAVE). • Do not turn the controller off when writing settings to SAVE. Use LJV7IF_CheckMemoryAccess to check if settings are written to this area.
9.2.9.4 Detailed setting errors The settings have a consistency that must be observed. The detailed setting errors (dwError) that are returned for the send setting and reflect write settings area request commands for settings that not satisfy this consistency are listed below.
9.2.9.6 Profile data amount calculation method The amount of profile data to get with LJV7IF_GetProfile and other functions is a value multiplied by a correction factor determined from the settings below with 800 as the base. Setting Correction Comment Setting factor value Full 1.00 Initial value Measurement range X Middle 0.75 direction Imaging settings Small 0.50 Off 1.00 Initial value Binning On 0.50 Off 1.00 Initial value Combine (wide) On 2.00 Profile settings Off 1.
9.2.9.8 Specific examples (i) For configuration 1 (initial settings) Heads: 2 Measurement range X direction: Full Binning: Off Wide: Off Compression (X axis): Off Compression (time axis): Off The amount of profile data is 800 The profile data storage order is as follows. (See profile data storage order for 1) 1. Head A profiles (800) 3. Head B profiles (800) When getting 10 profiles with LJV7IF_GetProfile, the data below is stored in pdwProfileData. Profile 1 LJV7IF_PROFILE_HEADER 32bit×6 1.
(ii) For configuration 2 Heads: 2 Measurement range X direction: Full Binning: on Wide: off Compression (X axis): 2 Compression (time axis): On The amount of profile data is 200 The profile data storage order is as follows. (See profile data storage order for 1) 1. Head A MAX profiles (200) 2. Head A MIN profiles (200) 3. Head B MAX profiles (200) 4. Head B MIN profiles (200) When getting 10 profiles with LJV7IF_GetProfile, the data below is stored in pdwProfileData.
9.2.9.9 High-speed data communication troubleshooting Symptom Item to check The application exits with Have the callback function call an error after high-speed protocols been specified data communication starts. correctly? The profile data to be obtained becomes abnormal at irregular intervals. The profile data to be obtained becomes abnormal at regular intervals. High-speed communication is interrupted.
9.2.9.11 Data storage data storage order and specific example Stored measurements can be acquired using GetStorageData. The acquired data has the following structure.
9.2.9.12 Profile storage data storage order and specific example Stored profile data, measurement values and internal measurement values (*1) can be acquired using GetStorageProfile. The acquired data has the following structure when there is 1 byte per row. *1 "Internal measurement values" refers to measurements taken immediately before the OUT settings measuring mode processing. Each OUT internal measurement value is saved individually for each piece of profile data.
9.2.9.13 Batch profile storage data storage order and specific example Stored profile data and measurement values can be acquired using GetStorageBatchProfile The acquired data has the following structure. The acquired data has the following structure when there is 1 byte per row. The structure of 1 piece of batch profile storage data 0 Profile data Header䇭LJV7IF_PROFILE_HEADER 1 䌾 22 23 24 When 800 profiles 䌾 3223 * Refer to "Profile data amount calculation method" for the number of profiles.
10 Common Return Codes 10.1 Return codes returned by the communication library The return codes shown below are judged in the communication library and returned to the application. Specifically, these codes are returned when the library fails to communicate with the controller or when processing could not be completed due to a state dependency in the communication library.
11 Sample Program This chapter describes the sample program which has been included as an example of how to create an application using the communication library. The program is fundamentally the same for C#, VB.NET, C++ and VB6. (With VB6, high-speed data communication cannot be performed.) Below is an example using C#. * C#, VB.NET, C++ were built with Visual Studio 2008 SP1, and VB6 was built with Visual Basic 6.0 SP6. 11.
Each command in dotted lines and measurements and profiles received during high-speed data communication can be output to a specified file. Results received in GetMeasurementValue or GetProfileAdvance etc. (OUT1 to 16) are saved to the file specified in "Save destination". 2 files are created. The first file contains measurements, and the second file contains internal measurement values. (Measurements for the profile.
11.2 Save file format This section describes the file format for profiles that are saved in the get profile process. • File format: TSV (tab separated text file) • Values: The values acquired with the get profile interface are saved unmodified. • Units: See "9.2.6 Acquiring measurement results".
Image of the arrangement of data saved to "Save path" in the [DLL functions] Combination sample tab (2 heads, compression (time axis) on) Output file X coordinates First profile data Second profile data ・ ・ ・ Nth profile data Min. profiles Max. profiles Min. profiles Max.
12 Appendix 12.1 Sending/Receiving Settings With the LJ-V7000 Series, settings can be sent and received for each item using send settings (LJV7IF_SetSetting) and receive settings (LJV7IF_GetSetting). (Each item refers to set parameters for Environment settings/Common measurement settings/settings for programs 0 to 15.) To send and receive Environment settings, Common measurement settings and settings for each program together in a batch, refer to "12.2 Batch sending/receiving".
12.3 Details of Items for Sending/Receiving Settings Changing Environmental Settings Type:01h, Category:00h, Item:00h Type:01h, Category:00h Target1~4:00h byte 0 Setting Data Device name, byte 1 1 Device name, byte 2 2 Device name, byte 3 to to 31 Device name, byte 32 Item:07h (TCP command port number)/ 08h (TCP high-speed port) Target1~4:00h byte 0 Setting Data Port number (1~65535) 1 *32 characters max.
Change Program setting Type:02h, Category:00h, Item:03h • Trigger settings Target1~4:00h byte 0 Setting Data Parallel imaging: 0:Disabled, 1:Enabled 1 Reserved (fixed as 0) Category:00h, Item:01h 2 Reserved (fixed as 0) Target1~4:00h 3 Reserved (fixed as 0) Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
• Imaging settings Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Category:00h, Item:06h Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
• Master regist Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Category:02h, Item:10h Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
• Position correction settings <θcorrection detail> Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
• Profilemask settings Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Category:04h, Item:09h Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
• OUT settings Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Category:05h, Item:02h Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
[Unique parameters of measurement mode from 3:Position (when profile compression (time axis) is off) 4byte] byte Measurement mode 0:OFF 4 byte 4 Setting Data ~ Reserved (fixed as 0) 91 4 5 6 Position correction selection: 0: No position correction, 1: Position correction1, 2: Position correction2 7 Reserved (fixed as 0) 8 Unique parameters are assigned to each measurement target. For details on the unique parameters, see "Measurement area details" (page 83).
7:Angle byte 4 5 8:R measurement Setting Data Measurement target head: 0: HeadA, 1: HeadB, 2: Combined profile (only when profile combine (wide) is on) Angle range: 0:0~180deg, 1:-90~90deg 7 Measurement target position correction: 0: No position correction, 1: Position correction1, 2: Position correction2 Reference target position correction: 0: No position correction, 1: Position correction1, 2: Position correction2 9 Reserved (fixed as 0) 10 Reserved (fixed as 0) 11 Reserved (fixed as 0) 12 Me
9:Area byte 4 5 6 7 8 10:Master comparison (Z) Setting Data Measurement target head: 0: HeadA, 1: HeadB, 2: Combined profile (only when profile combine (wide) is on) Measurement reference selection: 0:Reference for 1 line, 1:Reference for 2 lines, 2:Master reference Measurement target position correction: 0: No position correction, 1: Position correction1, 2: Position correction2 Measurement target1 position correction: 0: No position correction, 1: Position correction1, 2: Position correction2 Measurement
12:Distance (point-line) byte 4 5 Measurement target selection: 0:Peak, 1:Bottom, 2:Knee, 3:Intsect (lines), 4:Contact (lin-arc), 5:Center of circle 6 Position correction selection: 0: No position correction, 1: Position correction1, 2: Position correction2 7 Reserved (fixed as 0) 8 Unique parameters are assigned to each measurement target. For details on the unique parameters, see "Measurement area details" (page 83).
17:Step (simple 3D) byte 19:Calculation Setting Data Measurement target head: 0: HeadA, 1: HeadB, 2: Combined profile (only when profile combine (wide) is on) byte 5 Reserved (fixed as 0) 5 Measurement target selection: 0:Peak, 1:bottom, 6:Average 6 Reserved (fixed as 0) 6 Reserved (fixed as 0) 4 7 Reserved (fixed as 0) 8 Unique parameters are assigned to each measurement target. For details on the unique parameters, see "Measurement area details" (page 83).
[Unique parameters of Measuring period from Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) 4byte] 1:Measurement area Category:06h, Item:06h byte 4 Target1:00h~0Fh (OUT1~16) Target2~4:00h Unique parameters are assigned to each measurement value filter.
• Terminal settings Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Category:06h, Item:0Eh (upper limit), 0Fh (lower limit) Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Target1:00h~0Fh (OUT1~16) Target2~4:00h Category:07h, Item:01h byte 0 1 2 3 Target1:00h~0Bh (OUT_PIN1~12) Target2~4:00h Setting Data Tolerance upper/lower limit value: 0.01μm unit. Sined 32-bit integer.
• Storage settings Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
2:Knee byte 0 1 2 3 4 5 6 7 4:Contact (line-arc) Setting Data byte Area Left: any value in measurement range (0.01μm unit Sined 32-bit integer example: 5mm=500000) 0 Setting Data Linear calculation area: 0: Area2 disabled, 1: Area2 enabled 1 Reserved (fixed as 0) 2 Reserved (fixed as 0) 3 Reserved (fixed as 0) Area Right: any value in measurement range (0.
5:Centerof circle byte 0 15:P-P (X) (only for when profile compression (time axis) is on) Setting Data Arc calculation areacount: 0: Area2 disabled, 1: Area2 enabled byte 0 Setting Data Edge measuring area Left: any value in measurement range (0.01μm unit Sined 32-bit integer example: 5mm=500000) 1 Reserved (fixed as 0) 1 2 Reserved (fixed as 0) 2 3 Reserved (fixed as 0) 3 4 Arc calculation area Left: any value in measurement range (0.
12.4 Examples of sending/receiving measurement mode settings Example: When "Height (profile compression (time These can be summarized as follows: axis): OFF" is selected and "Average" height is measured. Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.15) Category:06h, Item:03h Type:10h~1Fh (10h:Program NO.0, 11h:Program NO.1, ・・・ , 1F:Program NO.
13 Using the high-speed data communication command When the high-speed data communication command is used, data for currently measured profiles can be output from the controller to a computer at high speed. While performing measurements using the LJ-V Series, data integrated into the computer can be processed. 13.1 Preparation for high-speed data communication Make sure of and/or carry out the following before performing high-speed data communication.
[Checking read profiles] Profiles read using the callback function each have a header that contains the following information. • Whether the encoder Z phase has been input. (Refer to "Profile header information structure" in "8.2 Structure definitions") • Trigger counter - Indicates which number trigger from the start of measurements this profile is. • Encoder count - The encoder count. (The encoder trigger count value can be checked in A-2 of the User's Manual.
Callback function Use the callback function to deliver profile data to the application each time the amount of profile data specified in high-speed data communication initialization is sent by the computer. *1 The callback function is called in the following circumstances.
[Command procedure] Commands are sent using the following procedure. Confirm that the controller batch setting is ON.
Callback function Use the callback function to deliver profile data to the application each time the amount of profile data specified in high-speed data communication initialization is sent by the computer. *1 The callback function is called in the following circumstances.
Revision History Revision date Revision number Revision details June 2012 2nd edition Ver. 2 October 2012 1st revision Z-phase specifications were added.
LJ-V7000_COM_RM_E 93
Copyright (c) 2014 KEYENCE CORPORATION. All rights reserved.