11 sample program, 1 user interface specification – KEYENCE LJ-V7000 Series User Manual

Page 61

Advertising
background image

61

LJ-V7000_COM_RM_E

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.1 User 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
be displayed.* Profiles received using standard (not high-speed) profile receiving are not counted.

Displays commands that have been executed and their results. Displays error codes when there is an
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.

Used to change the size of arrays prepared to receive profiles in this sample program. (Used for
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.

This must be set before high-speed data communication starts. (Set before executing
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.

Refer to 12.1 for
information
about changing
settings.

Advertising