10 Common Return Codes ......................................................................................................................... 60
10.1 Return codes returned by the communication library................................................................... 60
10.2 Return codes returned from the controller .................................................................................... 60
11 Sample Program .................................................................................................................................... 61
11.1 User interface specification........................................................................................................... 61
11.2 Save file format .............................................................................................................................. 63
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. Restrictions
Except for installation of updates or new functions provided by KEYENCE, you may not modify or add any
function to this Software.
a) You may not reverse engineer, decompile or disassemble this Software.
b) You may not create derivative works based on this Software.
c) Other than expressly stated by KEYENCE, you may not resell, retransfer, rent or otherwise redistribute this
Software to any third parties. However, you may redistribute this Software with the application that you
developed using this Software.
3. Intellectual Property Rights.
Except as expressly stated herein, KEYENCE reserves all right, title and interest in this Software, and all
associated copyrights, trademarks, and other intellectual property rights therein.
4. Disclaimer.
Keyence is licensing this Software to you “AS IS” and without any warranty of any kind. In no event will
KEYENCE or its suppliers be liable to you for any damages, claims, costs or any lost profits caused by using
this Software.
5. Support
KEYNCE shall not provide technical support in accordance with this Software including the use of this
Software.
6. Termination.
6.1 Your license under this Agreement will terminate automatically if you destroy this Software and the
copy of this Software in your possession or voluntarily return this Software to us.
6.2 Your license under this Agreement will terminate automatically without any notice from KEYENCE if you
fail to comply with any of the terms and conditions of this Agreement. Promptly upon termination, you
shall cease all use of this Software and destroy all copies, full or partial, of this Software in your
possession or control.
6.3 You will compensate KEYENCE for costs or any lost profits caused by your violation or breach of any
term of this Agreement.
7. Governing Law.
This Agreement will be governed by and construed in accordance with the substantive laws of Japan without
regards to the principles of conflicts of law.
5LJ-V7000_COM_RM_E
Page 6
2Introduction
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.
3Operating Environment
Windows 7 (Home Premium/Professional/Ultimate)
OS
CPUCore i3 2.3 GHz or faster
Memory2 GB or more
Windows Vista (Home Basic/Home Premium/Business/Ultimate)
Windows XP (SP2 or later) (Home Edition/Professional Edition)
Secondary cache
memory
Free drive space10 GB or more
Interface
*1 Operation is not guaranteed with connections via a USB hub
*2 Operation is not guaranteed with connections to a LAN or via a router
2 MB or more
A PC equipped with either of the interfaces below.
*1
USB 2.0/1.1
, Ethernet 1000BASE-T/100BASE-TX
*2
3.1Execution environment
This section describes the necessary environment to execute applications that use the LJ-V7000 Series
communication library.
3.1.1Microsoft C runtime library
The Microsoft C runtime library is required for the DLL to operate.
Run vcredist_x86.exe included on the installation media to install the library.
3.1.2Microsoft .NET Framework
The Microsoft .NET Framework is required to run the sample application.
Run NetFx20SP2_x86.exe included on the installation media to install the library.
4USB Driver
Install and use LJ-Navigator2 for the USB driver.
5File Structure
LJV7_IF.dllThe DLL.
LJV7_IF.libThe import library for LJV7_IF.dll.
LJV7_ErrorCode.hThe header file that defines the error codes.
LJV7_IF.hThe header file that defines the LJV7_IF.dll interface.
Source
The folder for the sample source code.
The source code for the sample program created in C#.
6LJ-V7000_COM_RM_E
Page 7
6Incorporating the Library
6.1File 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.2Linking
6.2.1C++
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.2C#/VB.NET
Call each interface using the DllImport attribute.
When passing a structure as an interface argument, specify the StructLayout attribute and pass a structure
of the same memory structure as the DLL.
For details, refer to the NativeMethods class (NativeMethods.cs) in the sample.
The processing to call each function has been implemented.
7Types
In this document, variable types are described according to the following definitions.
CHARSigned 8-bit integer
BYTEUnsigned 8-bit integer
SHORTSigned 16-bit integer
WORDUnsigned 16-bit integer
LONGSigned 32-bit integer
DWORDUnsigned 32-bit integer
FLOATSingle precision floating point number (32 bits)
DOUBLEDouble precision floating point number (64 bits)
7LJ-V7000_COM_RM_E
Page 8
8Constant, Structure Definitions
8.1Constant definitions
NameSetting value storage level designation
Typedef enum {
LJV7IF_SETTING_DEPTH_WRITE = 0x00, // Write settings area
Definition
Description
Comment
LJV7IF_SETTING_DEPTH_RUNNING = 0x01,// Running settings area
LJV7IF_SETTING_DEPTH_SAVE = 0x02// Save area
} LJV7IF_SETTING_DEPTH;
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".
The controller retains three sets of settings data.
Those levels are used in the applications below.
Write settings area
Settings that do not affect operation.
In order to not allow an error in controller operations from inconsistencies in settings that
occur temporarily when changing multiple settings, the operation of the controller can be
changed without causing an error by reflecting the settings from this area to the running
settings area after writing the settings to this area.
Running settings area
The settings the controller is using in its operation.
When the controller starts, this area is initialized with the settings in the save area.
Save area
The settings that are saved even when the controller's power is turned off.
LJV7IF_INIT_SETTING_TARGET_PRG0 = 0x00, // Program 0
LJV7IF_INIT_SETTING_TARGET_PRG1 = 0x01, // Program 1
LJV7IF_INIT_SETTING_TARGET_PRG2 = 0x02, // Program 2
LJV7IF_INIT_SETTING_TARGET_PRG3 = 0x03, // Program 3
LJV7IF_INIT_SETTING_TARGET_PRG4 = 0x04, // Program 4
LJV7IF_INIT_SETTING_TARGET_PRG5 = 0x05, // Program 5
LJV7IF_INIT_SETTING_TARGET_PRG6 = 0x06, // Program 6
Definition
Description
Comment
LJV7IF_INIT_SETTING_TARGET_PRG7 = 0x07, // Program 7
LJV7IF_INIT_SETTING_TARGET_PRG8 = 0x08, // Program 8
LJV7IF_INIT_SETTING_TARGET_PRG9 = 0x09, // Program 9
LJV7IF_INIT_SETTING_TARGET_PRG10 = 0x0A, // Program 10
LJV7IF_INIT_SETTING_TARGET_PRG11 = 0x0B, // Program 11
LJV7IF_INIT_SETTING_TARGET_PRG12 = 0x0C, // Program 12
LJV7IF_INIT_SETTING_TARGET_PRG13 = 0x0D, // Program 13
LJV7IF_INIT_SETTING_TARGET_PRG14 = 0x0E, // Program 14
LJV7IF_INIT_SETTING_TARGET_PRG15 = 0x0F, // Program 15
} LJV7IF_INIT_SETTING_TARGET;
This enumeration designates which settings to initialize in settings initialization function.
-
8LJ-V7000_COM_RM_E
Page 9
NameDefinition that indicates the validity of a measurement value
Typedef enum {
LJV7IF_MEASURE_DATA_INFO_VALID = 0x00,// Normal measurement data
Definition
LJV7IF_MEASURE_DATA_INFO_ALARM = 0x01,// Measurement alarm data
LJV7IF_MEASURE_DATA_INFO_WAIT = 0x02// Judgment wait data
} LJV7IF_MEASURE_DATA_INFO;
Description
Comment
NameDefinition that indicates the tolerance judgment result of the measurement value
Definition
Description
Comment
NameGet profile target buffer designation
Definition
This enumeration indicates the validity or invalidity of the measurement value.
-
Typedef enum {
LJV7IF_JUDGE_RESULT _HI = 0x01,// HI
LJV7IF_JUDGE_RESULT _GO = 0x02,// GO
LJV7IF_JUDGE_RESULT _LO = 0x04// LO
} LJV7IF_JUDGE_RESULT;
This enumeration indicates the tolerance judgment result for the measurement value in bit
units.
If the measurement value is measurement alarm data, the judgment result is 0x05 (both HI
and LO bits are 1).
Typedef enum {
LJV7IF_PROFILE_BANK_ACTIVE = 0x00,// Active surface
LJV7IF_PROFILE_BANK_INACTIVE = 0x01// Inactive surface
} LJV7IF_PROFILE_BANK;
Description
Comment
NameGet profile position specification method designation (batch measurement: off)
Definition
Description
When the memory allocation is "double buffer" in the get profile command, this enumeration
designates which surface to get the profiles from.
"Active surface" refers to the surface of the buffer that profile data is being written onto. For
further details, refer to "9.2.9.2 Internal memory".
Typedef enum {
LJV7IF_PROFILE_POS_CURRENT = 0x00,// From current
LJV7IF_PROFILE_POS_OLDEST = 0x01,// From oldest
LJV7IF_PROFILE_POS_SPEC = 0x02,// Specify position
} LJV7IF_PROFILE_POS;
In the get profile command, this enumeration indicates the specification method for the
profiles to get out of the profile data retained in the controller. In get profile, the profiles are
stored from oldest to newest.
From current
Gets the current profiles.
The end of the acquired profiles becomes the current profile.
From oldest
Gets the oldest profile.
The head of the acquired profiles becomes the oldest profile.
Specify position
Gets the specified number of profiles from the specified profile position.
The head of the acquired profiles becomes the profiles at the specified position.
Comment
For the specified number of profiles, refer to the individual structure definitions.
9LJ-V7000_COM_RM_E
Page 10
NameGet profile batch data position specification method designation (batch measurement: on)
Typedef enum {
LJV7IF_BATCH_POS_CURRENT = 0x00,// From current
LJV7IF_BATCH_POS_SPEC = 0x02,// Specify position
Definition
Description
LJV7IF_BATCH_POS_COMMITED = 0x03,// From current after batch
commitment
LJV7IF_BATCH_POS_CURRENT_ONLY = 0x04// Current only
} LJV7IF_BATCH_POS;
In the get batch profile command, this enumeration indicates the specification method for the
profiles to get in what batch out of the batch data retained in the controller. In get profile, the
profiles are stored from oldest to newest.
From current
Gets the profiles in the current batch data.
Specify position
Gets the profiles in the batch data with the specified number.
From current after batch commitment
Gets the profiles in the current batch data after commitment.
Current only
Gets one current profile in the current batch data.
Comment
NameNumber of OUT settings
Definition
Description
Comment
NameNumber of simultaneously connectable controllers
Definition
Description
Comment
For the specified number of profiles, refer to the individual structure definitions.
Const static LONG LJV7IF_OUT_COUNT = 16;
This constant indicates the number of OUT settings.
-
Const static LONG LJV7IF_DEVICE_COUNT = 6;
This constant is the upper limit for the number of controllers that can simultaneously
communicate.
-
10LJ-V7000_COM_RM_E
Page 11
8.2Structure definitions
NameEthernet settings structure
Typedef struct {
BYTEabyIpAddress[4];
Definition
Description
WORDwPortNo;
BYTEreserve[2];
} LJV7IF_ETHERNET_CONFIG;
This structure contains the settings passed during an Ethernet communication connection.
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.
byYearYear. Set from 0 to 99, which means 2000 to 2099.
byMonthMonth.1 to 12.
byDayDay.1 to 31.
byHourHour.0 to 23.
byMinuteMinute.0 to 59.
bySecondSecond.0 to 59.
When modifying or reading a setting, these variables are used to specify the target setting
Description
item.
byTarget1, byTarget2, byTarget3, byTarget4
These variables are used when specifying further details for the setting item.
For example, when configuring OUT measurement mode, these are used to specify the
OUT number.
Comment
For details, see the appendix.
NameMeasurement results structure
Typedef struct {
BYTEbyDataInfo;
Definition
BYTEbyJudge;
BYTEreserve[2];
FLOATfValue;
} LJV7IF_MEASURE_DATA;
Measurement value and judgment results.
byDatainfo
This variable indicates whether or not the measurement value (fValue) is valid, and if it is
not a valid value, what kind of data it is. See LJV7IF_MEASURE_DATA_INFO.
byJudge
Tolerance judgment result. See LJV7IF_JUDGE_RESULT.
Description
fValue
Measurement value. The unit used for measurement values is the minimum display unit
set for Target OUT in program settings.
When the minimum display unit is 1 mm to 0.001 mm, the measurement value unit is [mm].
When 1 um to 0.1 um, the measurement value unit is [um]. The unit for sectional areas is
2
, and the unit for angles is deg.
mm
When not a valid value, a large negative value is stored (-10
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.)
byEnvelope
Description
Whether profile compression (time axis) is on.
0: off, 1: on.
7th bit: Indicates whether the encoder's Z phase has been entered. (*)
Description
㪊㪈㵺㪎
dwTriggerCnt
㪍㪌㪋㪊㪉㪈㪇
Indicates which number trigger from the start of measurements this profile is.
(Trigger counter)
dwEncoderCnt
The encoder count when the trigger was issued.
(Encoder counter)
Other than when settings are modified or the program is switched, the trigger counter and the
encoder counter are reset at the following times.
Comment
• When the memory is cleared in high-speed mode (profile only)
• When laser emission stops and is restarted with the LASER_OFF terminal
• When laser emission is allowed after it was prohibited with the REMOTE terminal
㪙㪪㪣㸣㪙㪪㪤
*: About the Z-phase flag
This flag can be used when the controller is version 3.0 or later.
This flag is turned ON when Z-phase ON input is received during the period between the previous trigger input (or the start of
measurement if there was no previous trigger input) and the current trigger input.
13LJ-V7000_COM_RM_E
Page 14
Example: Single phase 1x multiplier encoder trigger with no skipping
A phaseON
Z phaseON
Encoder count
Z-phase flag
Note: 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.
A phaseON
Z phaseON
Encoder count
Z-phase flag
OFF
OFF
OFF
OFF
1
OFF
1
OFF
2
ON
2
ON
3
ON
3
ON
4
OFF
4
OFF
5
ON
5
OFF
NameProfile footer information structure
Typedef struct {
Definition
DWORDreserve;
} LJV7IF_PROFILE_FOOTER;
Description
The footer information added to the profile.
None (reserved only).
Comment
-
NameHigh-speed mode get profile request structure (batch measurement: off)
The get profile designation information when the operation mode is "high-speed (profile only)"
and batch measurements are off in the get profile command.
byTargetBank
Specifies whether to get the profiles from the active surface or whether to get the profiles
from the inactive surface. See LJV7IF_PROFILE_BANK. (P.9)
byPosMode
Specifies the get profile position specification method. See LJV7IF_PROFILE_POS.
Description
dwGetProfNo
When byPosMode is LJV7IF_PROFILE_POS_SPEC, specifies the profile number for the
profile to get.
byGetProfCnt
The number of profiles to read.
byErase
Specifies whether or not to erase the profile data that was read and the profile data older
than that.
0: Do not erase, 1: erase
Comment
If the communication buffer is insufficient, the number of profiles specified by byGetProfCnt
may not be acquired. In this situation, the maximum number of profiles that can be acquired
is returned.
14LJ-V7000_COM_RM_E
Page 15
NameHigh-speed mode get profile request structure (batch measurement: on)
The get profile designation information when the operation mode is "high-speed (profile only)"
and batch measurements are on in the get profile command.
byTargetBank
Specifies whether to get the profiles from the active surface or whether to get the profiles
from the inactive surface. See LJV7IF_PROFILE_BANK. (P.9)
byPosMode
Specifies the get profile position specification method. See LJV7IF_BATCH_POS.
dwGetBatchNo
When byPosMode is LJV7IF_BATCH_POS_SPEC, specifies the batch number for the
profile to get.
dwGetProfNo
Specifies the profile number to start getting profiles from in the specified batch number.
byGetProfCnt
The number of profiles to read.
byErase
Specifies whether or not to erase the batch data that was read and the batch data older
than that.
0: Do not erase, 1: erase
Comment
If the communication buffer is insufficient, the number of profiles specified by byGetProfCnt
may not be acquired. In this situation, the maximum number of profiles that can be acquired
is returned.
15LJ-V7000_COM_RM_E
Page 16
NameAdvanced mode get profile request structure (batch measurement: on)
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.
dwGetBatchNo
When byPosMode is LJV7IF_BATCH_POS_SPEC, specifies the batch number for the
profiles to get.
dwGetProfNo
Specifies the profile number for the profiles to get.
byGetProfCnt
The number of profiles to read.
If the communication buffer is insufficient, the number of profiles specified by byGetProfCnt
may not be acquired. In this situation, the maximum number of profiles that can be acquired
is returned.
NameHigh-speed mode get profile response structure (batch measurement: off)
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.
dwGetBatchProfCnt
The number of profiles in the batch that was read this time.
dwGetBatchTopProfNo
Indicates what number profile in the batch is the oldest profile out of the
profiles that were read this time.
byReadProfCnt
The number of profiles that were read this time.
Comment
NameGet storage status request structure
Definition
Description
Comment
NameGet storage status response structure
Definition
-
Typedef struct {
DWORDdwReadArea;
}LJV7IF_GET_ STRAGE_STATUS_REQ;
Get target designation information in the get storage status command.
dwReadArea
The storage surface to read.
• When the memory allocation setting is "double buffer"
0: Active surface, 1: Surface A, 2: Surface B
• When the memory allocation setting is "entire area (overwrite)", fixed as 1
• When the memory allocation setting is "entire area (do not overwrite)"
0: Active surface, surface specification (1 to 999)
"Active surface" refers to the surface of the buffer that profile data is being written onto. For
further details, refer to "9.2.9.2 Internal memory".
Typedef struct {
DWORDdwSurfaceCnt;
DWORDdwActiveSurface;
} LJV7IF_GET_STRAGE_STATUS_RSP;
Description
Comment
The storage status information returned for the get storage status command.
dwSurfaceCnt
Storage surface count
dwActiveSurface
The active storage surface.
When the active program has storage off, 0.
For details about "Storage surface", refer to "9.2.9.2.2 For operation mode: advanced (with
OUT measurement)".
18LJ-V7000_COM_RM_E
Page 19
NameStorage information structure
Typedef struct {
BYTEbyStatus;
BYTEbyProgramNo;
Definition
Description
BYTEbyTarget;
BYTEreserve[5];
DWORDdwStorageCnt;
} 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
byProgramNo
The program number for the relevant storage surface.
byTarget
Storage target.0: Data storage, 2: profile storage, 3: batch profile storage.
However, when batch measurements are on and profile compression (time axis) is on, 2:
profile storage is stored.
dwStorageCnt
Storage count (batch count when batch is on)
Comment
NameGet storage data request structure
Definition
Description
Comment
For details about "Storage surface", refer to "9.2.9.2.2 For operation mode: advanced (with
OUT measurement)".
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.
dwSize(in)
The size in BYTEs per single unit of the profile "LJV7IF_PROFILE_HEADER - signed 32bit profile data - LJV7IF_PROFILE_FOOTER" contained in pBuffer.
dwCount(in)
The number of profiles stored in pBuffer.
dwNotify(in)
Notification of an interruption in high-speed communication or a break in batch
measurements.
For details, see "8.3.1 Supplement".
dwUser(in)
User information set when high-speed communication was initialized.
Return
value
Explanation
None
When using the high-speed communication function, this callback function is called when
data is received and when there is a change in the communication state.
This callback function is called from a thread other than the main thread.
Take care to only implement storing profile data in a thread save buffer in the callback
function. As the thread used to call the callback function is the same as the thread used to
receive data, the processing time of the callback function affects the speed at which data
is received, and may stop communication from being performed properly in some
environments. Refer to the sample program for details.
Profile data is stored in 0.01 μm units.
22LJ-V7000_COM_RM_E
Page 23
8.3.1Supplement
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.
Batch
off
Batch
on
LSB0Continuous send was stopped (stop by command)
1
Continuous send was stopped (automatic stop)
2
Continuous send was stopped (automatic stop)
*1
*2
3Reserved
4Reserved
5Reserved
6Reserved
7Reserved
8Send interrupted by clear memory
LJV7IF_StartHighSpeedDataCommunicationStarts high-speed data communication
Performs the initialization required for
high-speed data communication (USB)
Performs the initialization required for
high-speed data communication
(Ethernet)
Requests preparation before starting
high-speed data communication
LJV7IF_StopHighSpeedDataCommunicationStops high-speed data communication
LJV7IF_HighSpeedDataCommunicationFinalize
Performs high-speed data
communication termination processing
27LJ-V7000_COM_RM_E
Page 28
9.2Function 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.1Operations for the DLL
Initialize DLL
FormatLONG LJV7IF_Initialize(void);
Parameters-
Return valueNo individual return code
ExplanationThis function initializes the DLL. (Always run this function)
Supported version1.00
Finalize DLL
FormatLONG LJV7IF_Finalize(void);
Parameters-
Return valueNo individual return code
Explanation
Supported version1.00
This function performs the termination processing for the DLL. (Always run this
function)
Get DLL version
FormatDWORD LJV7IF_GetVersion(void);
Parameters-
Return valueDLL version
This function gets the DLL version.
The version is expressed as a hexadecimal number. Viewed as hexadecimal,
the 4th digit is the major version, the 3rd digit is the minor version, the 2nd digit
is the revision, and the 1st digit is the build. For example, the initial version
Explanation
(1.2.3.4) is expressed as 0x1234.
The major version is incremented when the DLL's backward compatibility is lost.
The minor revision is incremented when the version is updated with additional
functions.
Supported version1.00
28LJ-V7000_COM_RM_E
Page 29
9.2.2Establish/disconnect the communication path with the controller
For communication devices, see "9.2.9.1 Communication devices".
USB communication connection
FormatLONG LJV7IF_UsbOpen(LONG lDeviceId);
Parameters
Return valueNo individual return code
Explanation
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
This function establishes a connection with the controller so that the library can
communicate with a USB-connected controller.
Ethernet communication connection
Format
Parameters
Return valueNo individual return code
Explanation
Supported version1.00
LONG LJV7IF_EthernetOpen
(LONG lDeviceId, LJV7IF_ETHERNET_CONFIG* pEthernetConfig);
lDeviceId(in)
Specifies the communication device to communicate with.
pEthernetConfig(in)
Ethernet communication settings.
For each member, see "8 Constant, Structure Definitions"
This function establishes a connection with the controller so that the library can
communicate with an Ethernet-connected controller.
Disconnect communication path
FormatLONG LJV7IF_CommClose(LONG lDeviceId);
Parameters
Return valueNo individual return code
Explanation
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
This function closes the USB or Ethernet connection.
Even if this function is called when a connection has not been established, an
error does not occur.
9.2.3System control
For communication devices, see "9.2.9.1 Communication devices".
Specifies the communication device to communicate with.
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.
Before turning off the power, ensure that you check the access status to the save
area with the LJV7IF_CheckMemoryAccess function (see "9.1.5 Functions
related to modifying or reading settings").
Get system error information
Format
Parameters
LONG LJV7IF_GetError
(LONG lDeviceId, BYTE byRcvMax, BYTE* pbyErrCnt, WORD* pwErrCode);
lDeviceId(in)
Specifies the communication device to communicate with.
byRcvMax(in)
Specifies the maximum amount of system error information to receive.
(Size of the buffer passed in pwErrCode)
pbyErrCnt(out)
The buffer to receive the amount of system error information.
pwErrCode(out)
The buffer to receive the system error information. In order from the newest
error, *pbyErrCnt items (byRcvMax items max) worth of system error
information is stored.
Return valueNo individual return code
This function gets the controller's system error information.
Explanation
Supported version1.00
For the details of the meanings of the error codes that are returned, refer to the
"LJ-V7000 Series User's Manual".
Clear system error
FormatLONG LJV7IF_ClearError(LONG lDeviceId, WORD wErrCode);
lDeviceId(in)
Parameters
Return valueNo individual return code
Explanation
Specifies the communication device to communicate with.
wErrCode(in)
The error code for the error you wish to clear.
This function clears the system error occurring on the controller.
When all of the system errors that are occurring are successfully cleared, the
controller will start measurements.
Only the errors listed below can be cleared.
0x0084: Two heads were connected when previously started, but only one head
could be recognized
0x0085: The connected head type is different than when previously started
Supported version1.00
30LJ-V7000_COM_RM_E
Page 31
9.2.4Measurement control
For communication devices, see "9.2.9.1 Communication devices".
Trigg er
FormatLONG LJV7IF_Trigger(LONG lDeviceId);
Parameters
Return value0x8080: The trigger mode is not "external trigger"
ExplanationThis function issues a trigger.
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
Start batch measurements
FormatLONG LJV7IF_StartMeasure(LONG lDeviceId);
Parameters
Return value
Explanation
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
0x8080: Batch measurements are off
0x80A0: Batch measurement start processing could not be performed
because the REMOTE terminal is off or the LASER_OFF terminal is
on
This function starts batch measurements. When batch measurements have
already been started, nothing happens and there is no error.
Stop batch measurements
FormatLONG LJV7IF_StopMeasure(LONG lDeviceId);
Parameters
Return value
Explanation
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
0x8080: Batch measurements are off
0x80A0: Batch measurement stop processing could not be performed
because the REMOTE terminal is off or the LASER_OFF terminal is
on
This function stops batch measurements. When batch measurements have not
been started, nothing happens and there is no error.
Specifies the communication device to communicate with.
byOnOff(in)
Other than 0: Auto zero on request, 0: off request.
Parameters
Return value0x8080: The operation mode is "high-speed (profile only)"
Explanation
Supported version1.00
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).
Example: When you wish to set OUT1 and OUT5 to be the targets for
processing
Specify dwOut = 0x00000011 (... 0000 0000 0001 0001).
This function issues an auto zero request.
Even when the OUT targeted for processing is configured to not be measured,
an error will not occur.
Specifies the communication device to communicate with.
dwOut(in)
Same specification method as auto zero (LJV7IF_AutoZero).
Return value0x8080: The operation mode is "high-speed (profile only)"
This function issues a reset request.
Explanation
Supported version1.00
Even when the OUT targeted for processing is configured to not be measured,
an error will not occur.
32LJ-V7000_COM_RM_E
Page 33
Clear memory
FormatLONG LJV7IF_ClearMemory(LONG lDeviceId);
Parameters
Return valueNo individual return code
Explanation
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
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.
9.2.5Functions related to modifying or reading settings
For communication devices, see "9.2.9.1 Communication devices".
Send setting
LONG LJV7IF_SetSetting(LONG lDeviceId, BYTE byDepth,
Specifies the communication device to communicate with.
byDepth(in)
Specifies the level of the setting value to get. (LJV7IF_SETTING_DEPTH)
TargetSetting(in)
Identifies the item that is the target to get.
pData(out)
Specifies the buffer to receive the setting data that was acquired.
dwDataSize(in)
The size of the buffer to receive the acquired data in BYTEs.
* For details on the parameters, see the appendix.
Initialize setting
Format
LONG LJV7IF_InitializeSetting(LONG lDeviceId, BYTE byDepth, BYTE
byTarget);
lDeviceId(in)
Specifies the communication device to communicate with.
byDepth(in)
Parameters
Return valueNo individual return code
Explanation
Supported version1.00
Specifies the level to reflect the initialized setting. (LJV7IF_SETTING_DEPTH)
byTarget (in)
Specifies the setting that is the target for initialization.
(LJV7IF_INIT_SETTING_TARGET)
This function initializes the setting specified as the initialization target.
For the procedure to reflect the setting on the controller, see "9.2.9.3 Write
processing for settings".
34LJ-V7000_COM_RM_E
Page 35
Request to reflect settings in the write settings area
Format
Parameters
Return valueNo individual return code
Explanation
Supported version1.00
LONG LJV7IF_ReflectSetting(LONG lDeviceId, BYTE byDepth,
DWORD*pdwError);
lDeviceId(in)
Specifies the communication device to communicate with.
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").
This function reflects the settings stored in the write settings area to the running
settings area.
When LJV7IF_SETTING_DEPTH_SAVE is specified as a parameter, the settings
in the save area can be saved.
When the controller was instructed to overwrite the settings in the save area with
this function, ensure that you check the access status to the save area with the
LJV7IF_CheckMemoryAccess function before turning the power off.
Specifies the communication device to communicate with.
Parameters
Return valueNo individual return code
Explanation
Supported version1.00
byDepth (in)
Specifies the level of the settings to update the write settings area with.
(LJV7IF_SETTING_DEPTH)
This function updates the contents of the write settings area with either the
settings in the running settings area or the settings saved in the save area.
Specifies the communication device to communicate with.
Parameters
Return valueNo individual return code
pbyBusy(out)
The buffer for receiving information on whether the save area is being
accessed
Other than 0: Accessing the save area, 0: no access.
This function checks whether or not the controller is accessing the save area
with an operation such as that to save settings.
When the controller was instructed to save settings to the save area with the
Explanation
Supported version1.00
LJV7IF_RetrunToFactorySetting function (see "9.1.3 System control"), the
LJV7IF_SetSetting function, the LJV7IF_InitializeSetting function, or the
LJV7IF_ReflectSetting function, check that access to the save area has
completed with this function before turning off the power.
Specifies the communication device to communicate with.
Parameters
Return value0x8080: The change program setting is "terminal"
Explanation
Supported version1.00
byProgNo(in)
Program number after the change.
Specify as 0 to 15 (0: Program 0, 1: Program 1, and so on).
This function changes the active program number.
When specifying the same number as the active program number in byProgNo,
or when an invalid program number is specified, the operation to change the
program is performed (internal memory is cleared, etc.), but the active program
number is not changed.
Specifies the communication device to communicate with.
Parameters
Return valueNo individual return code
ExplanationThis function gets the active program number.
Supported version1.00
pbyProgNo(out)
The buffer to receive the active program number.
It is stored as 0 to 15 (0: Program 0, 1: Program 1, and so on).
36LJ-V7000_COM_RM_E
Page 37
9.2.6Acquiring measurement results
For communication devices, see "9.2.9.1 Communication devices".
Get measurement results
Format
Parameters
Return value0x8080: The operation mode is "high-speed (profile only)"
Explanation
Supported version1.00
Get profiles (operation mode "high-speed (profile only)")
Format
LONG LJV7IF_GetMeasurementValue(LONG lDeviceId,
LJV7IF_MEASURE_DATA* pMeasureData);
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.
This function gets the newest measurement results (measurement values and
judgment results). All measurements, including OUT measurements where the
measurement mode is set to "do not measure" are acquired.
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., of the profiles that were actually acquired.
For each member, see "8 Constant, Structure Definitions".
pProfileInfo(out)
The profile information for the acquired profiles.
For each member, see "8 Constant, Structure Definitions".
pdwProfileData (out)
The buffer to get 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 are
returned.
dwDataSize(in)
pdwProfileData size in BYTEs
0x8080:The operation mode is "advanced (with OUT measurement)"
0x8081:"Batch measurements on and profile compression (time axis) off"
0x80A0:No profile data
This function gets profile data.
Profile data is stored in 0.01 μm units.
For the details on the data stored in the profile data (storage order and size), see
"9.2.9 Supplement".
There is a limit to the number of profiles that can be read at once. This limit
depends on the measurement settings. Refer to byGetProfCnt (the number of
profiles read this time) in pRsp, and confirm that the data you wish to acquire
has all been acquired. If it could not be acquired, specify the following in this
function to acquire the remaining data:
byPosMode in pReq = LJV7IF_PROFILE_POS_SPEC
dwGetProfNo in pReq = dwGetTopProfNo in pRsp + byGetProfCnt in pRsp
(Specify the profile data to be read as the next profile data after the profile data
that was read this time)
Supported version1.00
37LJ-V7000_COM_RM_E
Page 38
Get batch profiles (operation mode "high-speed (profile only)")
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., of the profiles that were actually acquired.
For each member, see "8 Constant, Structure Definitions".
pProfileInfo(out)
The profile information for the acquired profiles.
For each member, see "8 Constant, Structure Definitions".
pdwBatchData(out)
The buffer to get 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 are
returned.
dwDataSize(in)
pdwProfileData size in BYTEs
0x8080: The operation mode is "advanced (with OUT measurement)"
Return value
Explanation
Supported version1.00
0x8081: Not "batch measurements on and profile compression (time axis) off"
0x80A0: No batch data (batch measurements not run even once)
This function gets profile data.
Profile data is stored in 0.01 μm units.
For the details on the data stored in the profile data (storage order and size), see
"9.2.9 Supplement".
To read all of the profiles in one batch, read them with the procedure below.
1. Call this function by specifying LJV7IF_BATCH_POS_CURRENT for
2. Configure pReq as listed below and call this function again.
3. Update dwGetProfNo in step 2 and call this function until all of the profiles in
byPosMode in pReq. Save the start position and the amount of profiles that
were read and the batch number that was read.
byPosMode = LJV7IF_BATCH_POS_SPEC
dwGetBatchNo = batch number that was read
byGetProfNo = starting profile number of the unread profiles in the batch
the batch can be read.
38LJ-V7000_COM_RM_E
Page 39
Get profiles (operation mode "advanced (with OUT measurement)")
LONG LJV7IF_GetProfileAdvance(LONG lDeviceId, LJV7IF_PROFILE_INFO*
Specifies the communication device to communicate with.
pProfileInfo(out)
The profile information for the acquired profiles.
For each member, see "8 Constant, Structure Definitions".
pdwProfileData (out)
The buffer to get the profile data.
In the "LJV7IF_PROFILE_HEADER - signed 32-bit profile data LJV7IF_PROFILE_FOOTER" format, one item of profile data is stored.
dwDataSize(in)
pdwProfileData size in BYTEs
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.
0x8080: The operation mode is "high-speed (profile only)"
0x8081: "Batch measurements on and profile compression (time axis) off"
0x80A0: No profile data
This function gets profile data.
Profile data is stored in 0.01 μm units.
Explanation
Supported version1.00
For the details on the data stored in the profile data (storage order and size), see
"9.2.9 Supplement". For pMeasureData, OUT measurements where the
measurement mode is set to "do not measure" are also stored.
39LJ-V7000_COM_RM_E
Page 40
Get batch profiles (operation mode "advanced (with OUT measurement)")
LONG LJV7IF_GetBatchProfileAdvance(LONG lDeviceId,
LJV7IF_GET_BATCH_PROFILE_ADVANCE_REQ* pReq,
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., of the profiles that were actually acquired.
For each member, see "8 Constant, Structure Definitions"
pProfileInfo(out)
The profile information for the acquired profiles.
For each member, see "8 Constant, Structure Definitions".
dwBatchData(out)
The buffer to get the profile data.
The profile data is stored in this buffer with "LJV7IF_PROFILE_HEADER signed 32-bit profile data - LJV7IF_PROFILE_FOOTER LJV7IF_MEASURE_DATA x 16 OUTs" as a single unit of profile data, and only
the number of profiles that could be acquired are returned.
The results of the measurement process for the relevant profile are stored in
LJV7IF_MEASURE_DATA.
dwDataSize(in)
pdwProfileData size in BYTEs.
pBatchMeasureData(out)
The measurement results for the batch data that is the target to get.
This buffer stores the data for all 16 OUTs including the OUTs that are not
measuring.
pMeasureData(out)
The newest measurement results at the time the command was processed.
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.
0x8080: The operation mode is "high-speed (profile only)"
Return value
Explanation
Supported version1.00
0x8081: Not "batch measurements on and profile compression (time axis) off"
0x80A0: No batch data (batch measurements not run even once)
This function gets profile data.
Profile data is stored in 0.01 μm units.
For the details on the data stored in the profile data (storage order and size), see
"9.2.9 Supplement". For pdwBatchData/pBatchMeasureData, OUT
measurements where the measurement mode is set to "do not measure" are also
stored.
To read all of the profiles in one batch, read them with the procedure below.
When calling this function, do not perform communication between the target
controller and LJ-Navigation 2.
1. Call this function by specifying LJV7IF_BATCH_POS_CURRENT for
byPosMode in pReq. Save the start position and the amount of profiles
that were read and the batch number that was read.
2. Configure pReq as listed below and call this function again.
byPosMode=LJV7IF_BATCH_POS_SPEC
dwGetBatchNo = batch number that was read
dwGetProfNo = starting profile number of the unread profiles in the batch
3. Update dwGetProfNo in step 2 and call this function until all of the profiles
in the batch can be read.
40LJ-V7000_COM_RM_E
Page 41
9.2.7Store function related
For communication devices, see "9.2.9.1 Communication devices".
Start storage
FormatLONG LJV7IF_StartStorage(LONG lDeviceId);
Parameters
Return value
Explanation
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
0x8080: The operation mode is "high-speed (profile only)"
0x8081: Storage target setting is "OFF" (no storage)
0x8082: The storage condition setting is not "terminal/command"
When the storage condition setting is terminal/command, this function requests
the start of storage.
Stop storage
FormatLONG LJV7IF_StopStorage(LONG lDeviceId);
Parameters
Return value
Explanation
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
0x8080: The operation mode is "high-speed (profile only)"
0x8081: Storage target setting is "off" (no storage)
0x8082: The storage condition setting is not "terminal/command"
When the storage condition setting is terminal/command, this function requests
the stop (cancellation) of storage.
Get storage status
LONG LJV7IF_GetStorageStatus(LONG lDeviceId,
Format
Parameters
Return value0x8080: The operation mode is "high-speed (profile only)"
ExplanationWhen the storage target setting is not off, this function gets the storage status.
Specifies the communication device to communicate with.
Specifies the storage data to get.
For each member, see "8 Constant, Structure Definitions".
Represents the actually acquired storage information.
For each member, see "8 Constant, Structure Definitions".
Represents the position and size of the actually acquired storage data.
For each member, see "8 Constant, Structure Definitions".
The buffer to get the storage data.
The storage data is stored in this buffer with "counter value in 10 ms units
from the 32-bit base time - LJV7IF_MEASURE_DATA[16]" as a single unit of
storage data, and only the amount of storage data that could be acquired is
returned.
For each member, see "8 Constant, Structure Definitions". For details about
counter value in 10 ms units, refer to "9.2.9.10 Time data added to storage
data".
pdwData size in BYTEs
Return value
Explanation
Supported version1.00
0x8080: The operation mode is "high-speed (profile only)"
0x8081: The storage target setting is not "OUT value"
When the storage target setting is "OUT value", this function gets the storage
data. Data can be acquired even if it is within the storage period. If there is no
accumulated data, 0 is returned for the number of items read in pRsp. If the data
specified by the data number to start reading in pRep has not been
accumulated, one piece of the newest data that has been accumulated is
returned. In pdwData, OUT measurements where the measurement mode is set
to "do not measure" are also stored. There is a limit to the amount of data that
can be read at once. This limit depends on the measurement settings. Refer to
dwDataCnt (the number of items read) in pRsp, and confirm that the data you
wish to acquire has all been acquired. If it could not be acquired, specify the
following in this function to acquire the remaining data:
dwStartNo in pReq = dwStartNo in pRsp + dwDataCnt (Specify the data to be
read as the next piece of data after the data that was read this time)
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.
For each member, see "8 Constant, Structure Definitions".
pRsp(out)
Indicates the position and size of the profiles that were actually acquired.
For each member, see "8 Constant, Structure Definitions".
pProfileInfo(out)
Indicates the profile information that was actually acquired.
For each member, see "8 Constant, Structure Definitions".
pdwData(out)
The buffer to get the storage data.
The profile storage data is stored in this buffer with "counter value in 10 ms
units from the 32-bit base time - LJV7IF_MEASURE_DATA[16] LJV7IF_PROFILE_HEADER - signed 32-bit profile data LJV7IF_PROFILE_FOOTER - LJV7IF_MEASURE_DATA[16]" as a single unit of
profile storage data, and only the amount of profile storage data that could
be acquired is returned.
The first LJV7IF_MEASURE_DATA[16] stores the newest measurement
values at that time, the second stores the measurement values for that profile.
For each member, see "8 Constant, Structure Definitions". For details about
counter value in 10 ms units, refer to "9.2.9.10 Time data added to storage
data".
dwDataSize(in)
pdwData size in BYTEs
0x8080:The operation mode is "high-speed (profile only)"
Return value
Explanation
Supported version1.00
0x8081:The storage target setting is not profile, or "batch measurements on
When the storage target setting is profile, this function gets the stored profile
data. (Batch setting: off) Data can be acquired even if it is within the storage
period.
For the details on the data stored in the profile data (storage order and size), see
"9.2.9 Supplement".
If there is no accumulated data, 0 is returned for the number of items read in
pRsp. If the data specified by the data number to start reading in pRep has not
been accumulated, one item of the newest data that has been accumulated is
returned.
In pdwData, OUT measurements where the measurement mode is set to "do not
measure" are also stored.
There is a limit to the amount of profile data that can be read at once. This limit
depends on the measurement settings. Refer to dwDataCnt (the number of
items read) in pRsp, and confirm that the profile data you wish to acquire has all
been acquired. If it could not be acquired, specify the following in this function
to acquire the remaining data:
dwStartNo in pReq = dwStartNo in pRsp + dwDataCnt in pRsp
(Specify the profile data to be read as the next profile data after the profile data
that was read this time)
and profile compression (time axis) off"
43LJ-V7000_COM_RM_E
Page 44
Get batch profile storage data
LONG LJV7IF_GetStorageBatchProfile (LONG lDeviceId,
LJV7IF_GET_BATCH_PROFILE_STORAGE_REQ* pReq, LJV7IF_STORAGE_INFO*
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.
For each member, see "8 Constant, Structure Definitions".
pRsp(out)
Indicates the position and size of the profiles that were actually acquired.
For each member, see "8 Constant, Structure Definitions".
pProfileInfo(out)
Indicates the profile information that was actually acquired.
For each member, see "8 Constant, Structure Definitions".
pdwData (out)
The buffer to get the storage data.
The storage data is stored in this buffer with "LJV7IF_PROFILE_HEADER signed 32-bit profile data - LJV7IF_PROFILE_FOOTER LJV7IF_MEASURE_DATA[16]" as a single unit of storage data, and only the
storage data that could be acquired is returned.
The measurement results for each profile are stored in
LJV7IF_MEASURE_DATA[16].
For each member, see "8 Constant, Structure Definitions".
dwDataSize(in)
pdwData size in BYTEs
pdwTimeOffset(out)
The buffer for receiving the counter value in 10 ms units from the 32 bit base time.
For details about counter value in 10 ms units, refer to "9.2.9.10 Time data
added to storage data".
pMeasureData(out)
The measurement results for the relevant batch data.
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.
·
DWORD dwDataSize,
0x8080:The operation mode is "high-speed (profile only)"
0x8081:The storage target setting is not profile, or not "batch measurements
Return value
0x80A0:The batch data specified by the batch number to read
When the storage target setting is profile, this function gets the stored profile
data. (Batch setting: on)
Data can be acquired even if it is within the storage period.
For the details on the data stored in the profile data (storage order and size), see
"9.2.9 Supplement"
If the data specified by the number of the profile in the batch to get in pRep has
not been accumulated, one item of the newest data that has been accumulated
is returned.
In pdwData/pMeasureData, OUT measurements where the measurement mode
Explanation
Supported version1.00
is set to "do not measure" are also stored.
Use the following procedure to read all profiles in a batch.
1. Call this function by specifying 0 for dwGetBatchTopProfNo in pReq. Save the
start position and the number of profiles that were read and the batch number
that was read.
2. Configure pReq as listed below and call this function again.
dwGetBatchNo = batch number that was read
dwGetBatchTopProfNo = first profile number of the unread profiles in the batch
3. Update by dwGetBatchTopProfNo in step 2 and call this function until all of
the profiles in the batch can be read.
on and profile compression (time axis) off"
(dwGetBatchNo) in pReq has not been accumulated yet
44LJ-V7000_COM_RM_E
Page 45
9.2.8High-speed data communication related
For communication devices, see "9.2.9.1 Communication devices".
Initialize USB high-speed data communication
LONG LJV7IF_HighSpeedDataUsbCommunicationInitalize (LONG lDeviceId,
Specifies the communication device to communicate with.
pCallBack(in)
Specifies the callback function to call when data is received by high-speed
communication.
dwProfileCnt(in)
Specifies the frequency to call the callback function. The callback function is
called when the specified number of profiles is received.
dwThreadId(in) (synonymous with dwUser)
Thread ID.
This function initializes high-speed communication for a USB connected
controller. It is necessary to maintain a unique communication path (not used for
normal command communication) for high-speed communication. This function
establishes a unique high-speed communication path.
Supported version1.00
Initialize Ethernet high-speed data communication
LONG LJV7IF_HighSpeedDataEthernetCommunicationInitalize (LONG
Specifies the communication device to communicate with.
pEthernetConfig(in)
Specifies the Ethernet settings used in high-speed communication.
wHighSpeedPortNo(in)
Specifies the port number used in high-speed communication.
pCallBack(in)
Specifies the callback function to call when data is received by high-speed
communication.
dwProfileCnt(in)
Specifies the frequency to call the callback function. The callback function is
called when the specified number of profiles is received.
dwThreadId(in) (synonymous with dwUser)
Thread ID.
Return valueNo individual return code
This function initializes high-speed communication for an Ethernet connected
controller. It is necessary to maintain a unique communication path (not used for
normal command communication) for high-speed communication. This function
Explanation
Supported version1.00
establishes a unique high-speed communication path.
It is necessary to set different TCP/IP port numbers for normal command
communication and high-speed communication (see the LJ-V7000 Series
User's Manual for details on setting port numbers).
45LJ-V7000_COM_RM_E
Page 46
Request preparation before starting high-speed data communication
LONG LJV7IF_PreStartHighSpeedDataCommunication (LONG lDeviceId,
Format
Parameters
Return value
ExplanationThis function performs the preparation to start high-speed data communication.
Specifies the communication device to communicate with.
pReq(in)
Specifies what data to send high-speed communication from.
pProfileInfo(out)
Stores the profile information.
0x8080: The operation mode is "advanced (with OUT measurement)"
0x8081: The data specified as the send start position does not exist
0x80A1: Already performing high-speed data communication
Specifies the communication device to communicate with.
0x80A0: A high-speed data communication connection was not established
0x80A2: High-speed data communication was not prepared before starting
0x80A4: The send target data was cleared
This function starts high-speed data communication.
If high-speed data communication does not operate correctly, see "9.2.9.9 Highspeed data communication troubleshooting".
ExplanationThis function finalizes high-speed data communication.
Supported version1.00
lDeviceId(in)
Specifies the communication device to communicate with.
46LJ-V7000_COM_RM_E
Page 47
9.2.9Supplement
Surface A
Surface B
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.
Example:When USB has been opened specifying the communication device 0, and USB is
opened again specifying communication device 1, it will fail and 0x1001
(LJV7IF_RC_ERR_OPEN) is returned.
• One controller can communicate with three PCs via Ethernet communication.
When a fourth PC connects to the controller, the PC with the oldest date/time of last
communication of the three connected PCs is disconnected.
• High-speed communication is only possible between a single controller and a single PC.
9.2.9.2 Internal memory
The size of measurement data that can be saved and the save interval differs according to the
memory allocation setting and the operation mode.
Use caution when using the following functions.
The memory usage area for each memory allocation setting is listed below.
Double bufferEntire area (overwrite)
The internal memory is split
into two surfaces, surface A
and surface B. Each time the
program changes, surface A
and surface B are alternately
*2
used.
The entire internal memory
area is used.
Entire area (do not overwrite)
Of the entire internal memory
area, the areas where data has
not accumulated can be used
to accumulate data.
The save data is not deleted,
even when the program is
changed.
*1
*1Can only be specified when the operation mode is "advanced (with OUT measurement)".
*2The memory area being used by the active program is called the active surface. The unused
Settings written to this area are not applied to the
controller. Settings written to this area are applied to
RUNNING or SAVE by LJV7IF_ReflectSetting.
Settings written to this area are applied to the
controller, but are not saved if the power is turned off.
(When rebooted, the SAVE settings are applied)
Settings written to this area are applied to the
controller. The settings are saved on the controller
LJV7IF_SETTING_DEPTH_SAVE
(Save area)
even if the power is turned off. Writing to this area
takes time. (Use LJV7IF_CheckMemoryAccess to
check if settings are currently being written to this
area. Make sure that writing using this function is
complete before turning off the power.)
<Usage example 1> Changing multiple settings at the same time
1:Modify settings LJV7IF_SetSetting (WRITE)
2:Modify settings LJV7IF_SetSetting (WRITE)
Last: Modify settings LJV7IF_SetSetting (WRITE)
Update write settings area LJV7IF_ReflectSetting (RUNNING)
The consistency of the settings is checked when writing to RUNNING or SAVE. If they are
inconsistent, an error occurs. (Refer to "9.2.9.4 Detailed setting errors" for information about errors)
Therefore, when multiple settings are changed and each setting is written individually to RUNNING
(SAVE), there will be inconsistencies depending on the setting item, and the settings will not be
applied to the controller. Write multiple settings to WRITE to create consistent settings before
applying them to the controller
Use LJV7IF_RewriteTemporarySetting to rewrite inconsistent WRITE settings with the settings in the
controller.
• 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.
• The same results are achieved if the last LJV7IF_SetSetting (WRITE) is replaced with
LJV7IF_SetSetting (RUNNING). (Update write settings area is not required.)
50LJ-V7000_COM_RM_E
Page 51
<Usage example 2> Changing 1 setting
NOTICE
• When not saving settings to the controller
Modify setting LJV7IF_SetSetting (RUNNING)
• When saving settings to the controller
Modify setting LJV7IF_SetSetting (SAVE)
• 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.
51LJ-V7000_COM_RM_E
Page 52
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.
dwError valueError details
0x01000000
0x1X000000 (*1)The sampling period is outside the configurable range
0x1X06YY00 (*2)
0x1X06YY01 (*2)Measurement mode "operator" is set for OUT1
0x1X06YY02 (*2)
0x1X06YY03 (*2)Measurement value filter cutoff frequency error
0x1X06YY04 (*2)
0x1X06YY05 (*2)
0x1X06YY06 (*2)
0x1X06YY07 (*2)
0x1X06YY08 (*2)
The operation mode is "high-speed (profile only)" and the memory
allocation is set to entire area (do not overwrite)
Invalid measurement mode (when set to simple 3D measurements in
batch measurement OUT, etc.)
When the measurement mode is operator, the operator target OUT is
invalid
Prohibited combination in the measuring range settings (when
configured to specify the measuring area when batch is off, etc.)
Measuring range setting (when the batch count and the measuring
range do not match (also including simple 3D measurement Y
direction measurement range))
When the measuring range setting is reference OUT, the consistency
conditions were not fulfilled
Could not match the tolerance setting (upper/lower limit and
hysteresis)
Could not match the scaling setting (measurement value 1/2, span
after calculation)
0x1X070000 (*2)
0x1X080000 (*2)The amount of storage has exceeded the configurable range
*1: X indicates the program number and 0 to F is stored there.
*2: YY indicates the OUT number and 00 to 0F is stored there.
9.2.9.5 Profile data values
Profile data is output as signed 32-bit data, but for points where the profile could not be correctly
detected, the following values are output.
Value (hexadecimal
notation)
-2147483648
(0x80000000)
-2147483647
(0x80000001)
-2147483646
(0x80000002)
Could not match the analog output scaling setting (OUT display value
1/2, span after calculation)
NameReason
Invalid dataThis value is output when the peak could not
be detected.
This value is output when the data is invalid
due to a setting such as a mask having been
set.
Dead zone dataThis value is output when the data is located
in a dead zone.
This value is only output when dead zone
processing is enabled.
-2147483645
(0x80000003)
Judgment wait dataThis value is output when there is an
insufficient amount of profiles for averaging.
52LJ-V7000_COM_RM_E
Page 53
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
CategoryItem
Measurement range X
Imaging settings
Profile settings
For example, the amount of profile data with the settings below is 300 (= 800 x 0.75 x 1.00 x 1.00 x
0.50) items of data.
Measurement range X direction: Middle
Binning: Off
Combine (wide): Off
Compression (X axis): 2
However, when the amount of profile data found as a result of the equation above is less than 200,
the profile compression (X axis) setting is adjusted so that the amount of profile data is 200 or
higher.
For example, in a situation like that below, the amount of profile data is 300.
Measurement range X direction: Middle
Binning: Off
Combine (wide): Off
Compression (X axis): 4
The specific calculation is described below.
1. 800 x 0.75 x 1.00 x 1.00 x 0.25 = 150
2. The result is less than 200, so the profile compression (X axis) setting is adjust to 2 instead of
4
3. 800 x 0.75 x 1.00 x 1.00 x 0.5 = 300
4. The result is 200 or higher, so the amount of profile data above is confirmed
direction
Binning
Combine (wide)
Compression (X axis)
Setting
value
Full1.00Initial value
Middle0.75
Small0.50
Off1.00Initial value
On0.50
Off1.00Initial value
On2.00
Off1.00Initial value
20.50
40.25
Correction
factor
Comment
9.2.9.7 Profile data storage order
In functions that get profile data, such as LJV7IF_GetProfile, the profile data stored in the area
between LJV7IF_PROFILE_HEADER and LJV7IF_PROFILE_FOOTER is 1 unit of profile data found
with "Profile data amount calculation method", and the data is stored in the order below.
• Storage order
1. 1st head profiles (when compression (time axis) is on, MAX profiles)
2. 1st head MIN profiles
3. 2nd head profiles (when compression (time axis) is on, MAX profiles)
4. 2nd head MIN profiles
• Notes
3 and 4 only exist when the number of heads is 2 and wide is off.
2 and 4 only exist when compression (time axis) is on.
53LJ-V7000_COM_RM_E
Page 54
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 1LJV7IF_PROFILE_HEADER32bit×6
1. Head A profiles (800)32bit×800
3. Head B profiles (800)32bit×800
LJV7IF_PROFILE_FOOTER32bit×1
.
.
.
Profile 10LJV7IF_PROFILE_HEADER32bit×6
1. Head A profiles (800)32bit×800
3. Head B profiles (800)32bit×800
LJV7IF_PROFILE_FOOTER32bit×1
54LJ-V7000_COM_RM_E
Page 55
(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.
Profile 1LJV7IF_PROFILE_HEADER32bit×6
1. Head A MAX profiles (200)
2. Head A MIN profiles (200)
3. Head B MAX profiles (200)
4. Head B MIN profiles (200)
LJV7IF_PROFILE_FOOTER32bit×1
.
.
.
Profile 10LJV7IF_PROFILE_HEADER32bit×6
1. Head A MAX profiles (200)
2. Head A MIN profiles (200)
3. Head B MAX profiles (200)
4. Head B MIN profiles (200)
LJV7IF_PROFILE_FOOTER32bit×1
32bit×800
(800=200×4)
32bit×800
(800=200×4)
55LJ-V7000_COM_RM_E
Page 56
9.2.9.9 High-speed data communication troubleshooting
SymptomItem to checkRemedy
The application exits with
an error after high-speed
data communication starts.
Have the callback function call
protocols been specified
correctly?
Match the callback function call
protocols with those in the header
file.
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.
Is the data that is used by the
main thread being used by a
callback function without first
acquiring exclusive processing
access?
Is heavy processing (such as the
saving of files) being performed
within a callback function?
Is the communication speed of
your communication path
sufficient?
Is heavy processing (such as the
saving of files) being performed
within a callback function?
Is the communication speed of
your communication path
sufficient?
9.2.9.10 Time data added to storage data
Information that indicates the time that data was accumulated is added to storage data. The
information added is "Base time (LJV7IF_TIME)" and "counter value in 10 ms units".
The counter value refers to the amount of time passed since the base time. If it is 1, 10 ms have
passed, if it is 100, 10 ms x 100 = 1 s has passed. The time at which data was accumulated is
calculated using the following formula: base time + counter value x 10 ms.
Note 1 The most application must calculate "counter value x 10 ms" and change the time so it is
displayed in the following format: year, month, day, hour, minute and second.
Note 2 When the data is accumulated at a frequency greater than 10 ms, multiple pieces of data
may have the same counter value. (The time cannot be shown in units smaller than 10 ms)
Acquire exclusive processing
access for shared data.
Change the callback function so
that its processing time becomes
shorter.
Change to a high-speed
communication path such as
100BASE-T.
Change the callback function so
that its processing time becomes
shorter.
Change to a high-speed
communication path such as
100BASE-T.
56LJ-V7000_COM_RM_E
Page 57
9.2.9.11 Data storage data storage order and specific example
0
1
2
3
4 Measurement results (OUT1)Measurement value informationBYTE
* Refer to "Profile data amount calculation method" for the number of profiles.
The number changes according to the settings. Unsigned 32 bit data
䌾
Internal
measurement value
(Example:
Measurements for
the profile.
Measurements taken
immediately before
measuring mode
processing)
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
* The tolerance judgment result of internal measurement values is always 0.
59LJ-V7000_COM_RM_E
Page 60
10Common Return Codes
10.1Return 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.
Definition name
LJV7IF_RC_OK0x0000Normal termination
LJV7IF_RC_ERR_OPEN0x1000Failed to open the communication path.
LJV7IF_RC_ERR_NOT_OPEN0x1001
LJV7IF_RC_ERR_SEND0x1002Failed to send the command.
LJV7IF_RC_ERR_RECEIVE0x1003Failed to receive a response.
LJV7IF_RC_ERR_TIMEOUT0x1004
LJV7IF_RC_ERR_NOMEMORY0x1005Failed to allocate memory.
LJV7IF_RC_ERR_PARAMETER0x1006An invalid parameter was passed.
LJV7IF_RC_ERR_RECV_FMT0x1007The received response data was invalid.
LJV7IF_RC_ERR_HISPEED_NO_DEVICE0x1009
LJV7IF_RC_ERR_HISPEED_OPEN_YET0x100A
LJV7IF_RC_ERR_HISPEED_RECV_YET0x100B
Data
(Lower 2 bytes)
Cause
The communication path was not
established.
A timeout occurred while waiting for the
response.
High-speed communication initialization
could not be performed.
High-speed communication was
initialized.
Error already occurred during highspeed communication (for high-speed
communication)
LJV7IF_RC_ERR_BUFFER_SHORT0x100C
The buffer size passed as an argument
is insufficient.
10.2Return codes returned from the controller
The return codes shown below are returned when communication with the controller was successful but the
controller could not process the command.
Data
(Lower 2 bytes)
0x8041Status error (when a system error has occurred, etc.)
0x8042Parameter error (when an invalid parameter was set, etc.)
Cause
60LJ-V7000_COM_RM_E
Page 61
11Sample Program
①
②②
③
④
⑤
⑤
Refer to 12.1 for
information
about changing
settings.
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.1User interface specification
[DLL functions] Simple function sample tab
On each button is the name of a function. Click the button to perform that function.
Displays the number of profiles received using high-speed data communication. Up to 6 controllers can
Displays commands that have been executed and their results. Displays error codes when there is an
Used to change the size of arrays prepared to receive profiles in this sample program. (Used for
This must be set before high-speed data communication starts. (Set before executing
be displayed.* Profiles received using standard (not high-speed) profile receiving are not counted.
error. For details about error codes, refer to each function's return value in "9.2 Function reference"
(P.28~P.46) or the list of return codes in "10 Common Return Codes" P.60.
GetProfile, GetBatchProfile, GetProfileAdvance, GetBatchProfileAdvance, GetStorageProfile and
GetStorageBatchProfile.)
Align with the LJV main unit settings. If the prepared arrays are too small, profiles cannot be read
correctly.
HighSpeedDataUSBCommunicationInitialize or HighSpeedData EthernetCommunicationInitialize.)
<Start the timer>
Check this box to check and store received profiles at the frequency specified to the right (unit: ms). The
display in will be updated. If "Save the profile" in is clicked, the result data is stored in the specified
save destination. The default setting is 500 ms.
<Count only the number of profiles>
Use this to check the communication speed. When the Callback function and a process are carried out,
profiles may not be received at the estimated speed. When the box is checked, only the number of calls
is counted in the Callback function. Use this to check if the required communication speed is acquired.
If the speed is acquired, one of the processes may be heavy. If the speed is not acquired, the requested
speed may be too high for the device configuration and settings.
61LJ-V7000_COM_RM_E
Page 62
Each command in dotted lines and measurements and profiles received during high-speed data
communication can be output to a specified file.
<Example when using Save the measurement>
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. Measurements taken
immediately before measuring mode processing). When using GetMeasurementValue the second file is
empty as only measurement values are acquired.
<Example when using Save the profile>
Profiles received in GetProfile or GetProfileAdvance etc. are saved to the file specified in "Save
destination". In this case, set "Index of the profile to save" to 0.
From profiles received with GetStorageProfile, etc., the profile specified in "Index of the profile to save" is
saved to the file specified in "Save destination". (In Index of the profile to save, 0 refers to the first piece
of data. If, for example, 10 pieces of data are received, enter "5" to save the 6th piece.)
[DLL functions] Combination sample tab
The contents of previously distributed sample software can be found here. Communication establishment
(finalization) to the top left is a combined sample of DLL Initialize and Establish the communication path
(disconnect the communication path).
* The number of profiles that can be received at one time using the "Get high-speed mode profiles"
command in the Combination sample tab is specified as 10 in the source code. If you wish change this
specification refer to the "Get Profile" command in the Simple function sample tab.
"Start" and "Finalize" in High-speed data communication to the bottom right is a combined sample of the
following functions.
Reading or writing settings for each program number to the bottom left is a sample of "12.2 Batch sending/
receiving". Environment settings, Common measurement settings and settings for each program can be
saved in the specified file, or can be sent from the specified file.
62LJ-V7000_COM_RM_E
Page 63
11.2Save file format
Output file
OUT1 measurement value OUT2 measurement valueOUT16 measurement value
Output file
X
coordinates
Max. profiles for
head A
Min. profiles for
head A
Max. profiles for
head B
Min. profiles for
head B
Profile data
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 in the save file when "Save the measurement" in
the [DLL functions] Simple function sample tab is clicked
* 2 files are created. The second file contains internal measurement values (Measurements for the profile.
Measurements taken immediately before measuring mode processing). When using GetMeasurement-
Value the second file is empty as only measurement values are acquired.
Image of the arrangement of data in the save file when "Save the profile" in the
[DLL functions] Simple function sample tab is clicked (2 heads, compression (time
axis) on)
63LJ-V7000_COM_RM_E
Page 64
Image of the arrangement of data saved to "Save path" in the [DLL functions]
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".
This section explains Target Setting and pData, which are input and output into Sending/Receiving Settings
commands. (Refer to "9.2.9.3 Write processing for settings" for information about byDepth)
Target Setting: Specify the item to send/receive settings for. Members are as follows. For detailed parameters
for each member refer to "Details of Items for Sending/Receiving Settings" on the following page.
Type
Category
ItemSpecify the settings to send/receive for the item specified in Category.
Ta rg e t1
Ta rg e t2
Ta rg e t3
Ta rg e t4
pData: Specifies the setting data to send/receive. For details, refer to "Details of Items for Sending/Receiving
Settings" on the following page.
Specify the settings to send/receive from Environment settings (01h), Common
measurement settings (02h) and program 0 to program 15 (10h to 1Fh).
When sending/receiving program 0 to 15 settings, specify the settings to send/
receive from Trigger settings, Imaging settings etc.
Specify 0 when sending/receiving Environment settings and Common
measurement settings.
Specification may be required according to the setting to be sent/received.
When no setting is required, specify 0.
12.2Batch sending/receiving
Specify FFh in Category above to send/receive Environment settings/Common measurement settings/
settings for each program in a batch.
Example 1: Sending/receiving Common measurement setting data in a batch
* 24 characters max. 0 is not appended to the end.
* SHIFT-JIS
Measurement area details
•
The correction target selection of feature point
correction of position correction and the unique
parameters of the measurement target of the
measurement mode are shown below.The byte
numbers shown here indicate the byte numbers from
the start of the corresponding data block. (see the
example at 12.4)
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.1Preparation for high-speed data communication
Make sure of and/or carry out the following before performing high-speed data communication.
[Device]
• Use a network interface card that supports gigabit communication.
• Use a hub that supports gigabit communication.
• Use an ethernet cable that is either category 7 or above, or that supports 10GBASE-T.
[Settings]
• Change the controller operation mode to "high-speed (profile only)".
* To create programs more easily.*
When LJ-H2 (setting/monitoring software for the LJ-V7000 Series) is installed, the DLL sample program is stored in the folder that LJ-Navigator2 is installed in. Use this as a reference to make it easier
to create programs.
Example) When LJ-Navigator2 is stored in C:\Program Files, the DLL sample program is stored in the
following folder:
C:\Program Files\KEYENCE\LJ-Navigator 2\lib
• About Req and SendPos parameters which must be specified in request preparation before starting
high-speed data communication
■Req
Sendpos: Send start position.
0: From previous send complete position (from oldest data if first time)
1: From oldest data
2: From next data
* Specify 2 to read profiles after high-speed communication starts.
When 0 or 1 is selected, profiles stored in the controller are read before starting high-speed commu-
nication.
* Read profiles are deleted from the controller memory.
* If the sampling period is faster than the reading speed, the memory becomes FULL. If the setting
specified for "Operation when memory full" in Common measurement settings is "Stop", profiles are
not accumulated. If "Overwrite", data is overwritten from the oldest data.
* If there is a long period between the first high-speed data communication and the next, the memory
will be overwritten (when "Operation when memory full" is set to "Overwrite"), and previously sent
position data will be overwritten. In this case specifying 0 will cause an error.
[Performing high-speed data communication]
High-speed data communication uses one of two procedures listed below, according to the format and
measurement contents of the target.
• Without using the batch setting
• Using the batch setting
Batch setting is a function that treats the specified number of profiles as a batch.
It can be set to on or off in LJ-navigator2.