0% found this document useful (0 votes)
68 views

SDK Instruction Manual

The SR SDK is a development kit for controlling the SR Series (SR-5000/2000/1000) using .NET Framework 4.6.1, requiring the installation of the Visual C++ library runtime component. It includes various DLL files, sample programs, and instructions for building applications, with specific guidelines for using different CPU architectures. The document also contains a disclaimer stating that KEYENCE does not guarantee the operation of the sample programs or their results.

Uploaded by

Gustavo Yanez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

SDK Instruction Manual

The SR SDK is a development kit for controlling the SR Series (SR-5000/2000/1000) using .NET Framework 4.6.1, requiring the installation of the Visual C++ library runtime component. It includes various DLL files, sample programs, and instructions for building applications, with specific guidelines for using different CPU architectures. The document also contains a disclaimer stating that KEYENCE does not guarantee the operation of the sample programs or their results.

Uploaded by

Gustavo Yanez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

958GB

2 Referencing DLLs

SR SDK When Using LiveviewForm


Instruction Manual .Net Framework 4.6.1 supported 1 Click [Tools] - [Choose Toolbox Items].

Read this manual before using the product.


Keep this manual in a safe place after reading it so that it can be used at any time.

1 Overview
“SR SDK” (SR Software Development Kit) is a development kit for PC applications
that control the SR Series.
 Applicable models
SR-5000/2000/1000 Series
 DLL files 2 Click [Browse].
• Keyence.AutoID.SDK.dll
Select “Keyence.AutoID.SDK.dll”.
• VncClientControlCommon.dll
Click [OK].
• Communication.dll
• VncClientControlCommonLib.dll
 Help file
Keyence.AutoID.SDK_Help
 Sample programs
SampleApplication folder
• First StepApp
• MultiReaderLogger
• ReaderMaintenance
• ErrorImageGetter
Operating environment .NET Framework 4.6.1
(development environment and
Visual C++ library runtime component*1
running environment)
Supported CPUs ×86, ×64, AnyCPU
Interface Ethernet
Visual C# 2017
Supported languages*2
Visual Basic 2017
WinForms
Application classification
(Windows Forms application)

*1 In order to use this SDK, you must install the Visual C++ library runtime * When using the designer, specify the ×86 DLLs. To build an application with the
component. ×64 DLLs, perform step (4) and later in order to change the referenced DLLs to
*2 MultiReaderLogger, ReaderMaintenance and ErrorImageGetter only support ×64 after editing in the designer.
Visual C#.

3 [LiveviewForm] is added under [Toolbox] - [General]. If you place this


Before Executing Applications item in an application, you can display the live view of the SR.
In order to execute applications using SR SDK, you first have to install the “Visual
C++ library runtime component”.

Select the necessary file in the “SR_SDK/Runtime” folder, and then perform the
installation.
• 64-bit OS: vc_redist.×64.exe
• 32-bit OS: vc_redist.×86.exe

* Precautions
The application will not start if the “Visual C++ library runtime component”
is not installed. What’s more, no error message will be displayed.

1 E SR SDK IM
To build an application with the ×64 DLLs, perform the following steps.
When Not Using LiveviewForm

4 Open [References] in the project’s right-hand window (Solution 1 Right-click [References] in a new project’s right-hand window (Solu-
Explorer). tion Explorer).
Right-click each of the four files shown below and click [Remove]. Click [Add Reference].
• Communication
• Keyence.AutoID.SDK
• VncClientControlCommon
• VncClientControlCommonLib

2 Click [Browse], and then specify the four DLL files.

5 Right-click [References] in the project’s right-hand window (Solution


Explorer).
Click [Add Reference].

• Keyence.AutoID.SDK.dll
• VncClientControlCommon.dll
• Communication.dll
• VncClientControlCommonLib.dll

Building Applications With the Any CPU Setting


For applications built with the Any CPU setting, it is necessary to select DLL files to
match the operating environment. Place the following DLL files in the same folder
as the application.

6 Click [Browse], and then specify the four ×64 DLL files.  When the operating environment is a 64-bit OS
• SR_SDK/SDK/AnyCPU/Communication.dll
• SR_SDK/SDK/AnyCPU/Keyence.AutoID.SDK.dll
• SR_SDK/SDK/AnyCPU/VncClientControlCommon.dll
• SR_SDK/SDK/x64/VncClientControlCommonLib.dll

 When the operating environment is a 32-bit OS


• SR_SDK/SDK/AnyCPU/Communication.dll
• SR_SDK/SDK/AnyCPU/Keyence.AutoID.SDK.dll
• SR_SDK/SDK/AnyCPU/VncClientControlCommon.dll
• SR_SDK/SDK/x86/VncClientControlCommonLib.dll

• Keyence.AutoID.SDK.dll
• VncClientControlCommon.dll
• Communication.dll
• VncClientControlCommonLib.dll

E SR SDK IM 2
3 Sample Programs (3) ReaderMaintenance
This sample program assumes that it will be used to perform maintenance, such as
• The sample programs set the SR Series communication settings and commands
executing commands and adjusting banks, on multiple SR Series units.
to the default settings.
• The sample programs have been built for ×86 CPUs. Rebuild the programs when
using them with ×64 or AnyCPU CPUs.
• The referenced DLLs of these sample programs are fixed according to the
supplied folder configuration. To use the sample programs as-is, copy all the
folders.
• For details on each function, see the help file stored in the “SR_SDK/Manual”
folder.

(1) FirstStepApp
This is a sample program that only uses the basic functions of the DLL files.
 Functions
• SR Series search and list display
• Command transmission to multiple SR Series units
• Display of results from multiple SR Series units
• Settings file reception/transmission
• Live view display

(4) ErrorImageGetter
This is a sample program for the SR-5000/2000 Series. When reading errors occur
on multiple SR Series units (advanced multi-head mode), this sample program
 Functions acquires the reading error images from all the SR Series units.

• Live view display


• Trigger on/off
• IP address setting
• Read data display

(2) MultiReaderLogger
This sample program assumes that it will be used to monitor the operation of multi-
ple SR Series units.

 Functions
• SR Series search and list display
• Reading error detection
• Acquisition of reading error images from SR Series units

* For details on the basic functions of the advanced multi-head mode, see the
user's manual of the applicable model.

Command Execution Example


ReaderAccesor m_reader = new ReaderAccessor ();
m_reader.IpAddress = “192.168.100.100”;
m_reader.Connect();
m_reader.ExecCommand(“LON”);

You can execute other commands by changing “LON” to a different SR Series com-
 Functions
mand character string.
• Layout selection
• SR Series search and list display For other information, see the help file.
• Live view display for multiple SR Series units
• Read data display for multiple SR Series units



Log output start/stop
Reading result log output (CSV format)
Captured image logging (acquiring images stored within the SR)
4 Disclaimer
These sample programs are designed for checking the operation of connecting
with a code reader, so KEYENCE Corporation (“KEYENCE”) does not guarantee
the operation of these sample programs. Furthermore, even if there are problems
with these programs, KEYENCE is not obligated to correct these problems or to
provide any other kind of maintenance. KEYENCE does not guarantee the results
or products generated with these programs. Also, regardless of legal foundation,
KEYENCE bears no responsibility for damages arising from the use of these pro-
grams or for direct or indirect damages suffered by third parties due to the use of
these programs, and you promise not to apply any charges to KEYENCE.

3 E SR SDK IM
Copyright (c) 2020 KEYENCE CORPORATION. All rights reserved.

E SR SDK IM 4 193176GB 2050-1 958GB Printed in Japan

You might also like