CYCLONE-User-Manual.pdf - 第69页

User Manual For Cyclone LC Programmers 69 • Read Image and target Properties and Status The GUI application provides the following Advanced features for all Cyclones: • Add/Remove/Update many images in the Cyclone • Remo…

100%1 / 149
User Manual For Cyclone LC Programmers 68
8 CYCLONE PROGRAMMER AUTOMATED CONTROL (CYCLONE CONTROL
SUITE)
Users who wish to control, configure, and automate one or more Cyclone units have several
options available. This chapter presents a brief overview of those options along with some
additional information about each.
8.1 Overview Of Cyclone Control Suite
The Cyclone Control Suite is a new generation of automated control software developed to support
PC based control of the popular Cyclone and Cyclone FX stand-alone programmers.
The suite provides comprehensive control of one or more Cyclones from the PC via the following
components: the Cyclone Control GUI application, the Cyclone Control Console application, or via
custom applications using the Cyclone Control SDK. Ways to control the Cyclone include
programming launch, recovering results, managing images resident on a Cyclone, adding unique
programming data for each target, as well as recovering descriptive errors.
Much of the cyclone control feature set works for all touchscreen Cyclones. Advanced features
require a Cyclone-resident Advanced Automation License which comes built into the Cyclone FX
and is available as an upgrade for all other touch screen Cyclones.
8.1.1 Components
The Cyclone Control Suite consists of three major components:
1. Cyclone Control SDK – This is a Software Development Kit with a comprehensive API
allowing multiple Cyclones to be managed simultaneously from a user developed custom
application that loads the provided Cyclone Control DLL. The DLL can be loaded from
many programming languages that are able to load a DLL (C, Delphi, C#, Java, Python,
etc) as well as environments such as LabVIEW. Examples and interface code are pro-
vided in C (MSVC and GCC), C#, and Delphi/FPC. See Section 8.2 - Cyclone Control
SDK.
2. Cyclone Control Console – This is a powerful command-line application can be launched
from a script, a command-line, or another application and allows control of one or more
Cyclones simultaneously. The command-line application displays comprehensive status
messages and also returns an error code which can be recovered from the calling applica-
tion. See Section 8.3 - Cyclone Control Console.
3. Cyclone Control GUI – This is an interactive GUI based application which provides an
easy way to control Cyclones and manage images resident in the Cyclones. Given its
graphical nature, it is very easy to explore Cyclone Control Suite capabilities to intuitively
control or interact with a Cyclone. See Section 8.4 - Cyclone Control GUI.
The Console and GUI were both built with the SDK and are good examples of the types of
applications which can be built using the SDK.
Additional sample applications come as part of the installation. They contain defined build scripts
that you should be able to use to build the sample application without any modifications.
8.1.2 Features
The SDK, Console, and GUI control applications provide the following Standard features for all
Cyclones:
Control a Cyclone via USB, Serial, or Ethernet connections
Select and Launch Images by Name or Enumeration
Recover programming result and descriptive error information
Use automatically counting local (Cyclone stored) serial numbers
Add/Remove/Update a single image in the Cyclone
Read/write Cyclone properties
User Manual For Cyclone LC Programmers 69
Read Image and target Properties and Status
The GUI application provides the following Advanced features for all Cyclones:
Add/Remove/Update many images in the Cyclone
Remote Display Access and the ability to “touch” the screen
These features require an Advanced license only when using the SDK or Console (see below).
The SDK and Console application provide the following Advanced features for all Cyclone FX units
and any Cyclone upgraded with a resident Cyclone Control Advanced Automation License:
Add/Remove/Update many images in the Cyclone
Simultaneously (Gang) Control multiple Cyclones via the USB, Serial, or Ethernet
connections
Program (and Read) Dynamic Data in addition to fixed image data
Remote Display Access
8.1.3 PEmicro Compatible Hardware
The following lists the PEmicro hardware that is compatible with the Cyclone Control Suite. To
ensure proper operations, PEmicro recommends upgrading all Cyclone units to the latest
firmware.
Cyclone FX Universa
Cyclone LC Universal
Cyclone FX ARM
Cyclone LC ARM
Cyclone PRO (Standard features only)
Cyclone MAX (Standard features only)
Cyclone for ARM (Standard features only)
Cyclone for Renesas (Standard features only)
Cyclone for STMicro (Standard features only)
8.2 Cyclone Control SDK
The Cyclone Control SDK allows the user to interact with the Cyclone via a .DLL.
8.2.1 Introduction
The Cyclone Control SDK is one of the three components that comprise the Cyclone Control Suite.
Its dynamic link library (.DLL) allows you to create an application on the PC that can directly control
one or more PEmicro Cyclone units. These interface routines are designed to be compiled into
visual and non visual applications running on Windows operating systems
The actual interface routines are located in the “CycloneControlSDK.dll” 32 bit DLL file. The DLL
is callable from almost any 32-bit / 64-bit Windows development environment. Since the way the
DLL is called varies depending on the compiler used, you are provided with the DLL interface code
and sample applications for each of the following compilers. Compilers in bold link to a PEmicro
blog post about using that environment with the SDK:
Borland Delphi 2.0+ (Pascal)
GCC
Microsoft Visual C
Microsoft Visual C#
NI LabVIEW 2018
User Manual For Cyclone LC Programmers 70
The sample applications come with build scripts defined for ease of use. Simply run the scripts and
you should be able to build the sample application without any modifications. The callable interface
routines are defined in:
INSTALLDIR\cycloneControl\controlsdk\examples\pascal\cyclone_control_api.pas
INSTALLDIR\cycloneControl\controlsdk\examples\c\cyclone_control_api.h
8.2.2 Backwards Compatibility With Classic Cyclone Control API
The “CycloneControlSDK.dll” is backwards compatible with many of the classic Cyclone Control
API calls. In each header file, there is a constant variable or define (typically DLL_filename) which
is declared as the file name of the DLL. The value of this variable should be changed to new
filename “CycloneControlSDK.dll” instead of the old "CYCLONE_CONTROL.dll". After this
modification, rebuild the project and it should continue working with the new DLL.
8.2.3 Getting Started with the Cyclone Control DLL
This section outlines the steps you need to take to begin developing your own custom application
and offers tips and suggestions to get the Cyclone Control DLL working with your PEmicro
hardware smoothly.
BLOG TIP: Please click here to visit the PEmicro blog for a detailed example of how to set up a
programming image and use the SDK with some advanced options.
8.2.3.1 Example Programs
Located in the installation directory of the package, you will find two example programs that you
can use as a reference for your own application. The examples are located in the following
directories:
INSTALLDIR\cycloneControl\controlsdk\examples\pascal\
INSTALLDIR\cycloneControl\controlsdk\examples\c\
INSTALLDIR\cycloneControl\controlsdk\examples\labview2018
INSTALLDIR\cycloneControl\controlsdk\examples\msvc
INSTALLDIR\cycloneControl\controlsdk\examples\msvcsharp
These example programs are a valuable reference to use when starting your own custom
application.
8.2.3.2 Starting your own project
To gain access to the functions available in the DLL, the following files need to be added to the
new project workspace:
UDelphi 2.0+ Projects
INSTALLDIR\cycloneControl\controlsdk\examples\pascal\cyclone_control_api.pas
All other source files which will call functions from the DLL should include the above file using the
Delphi “uses” command.
UMSVC 5.0+ Projects
INSTALLDIR\cycloneControl\controlsdk\examples\c\cyclone_control_api.h
INSTALLDIR\cycloneControl\controlsdk\examples\c\cyclone_control_api.c
All other source files which will call functions from the DLL should include the above header file
with the C/C++ #include directive.