presto_en.pdf - 第70页

Page 70 the comman d line to the a lready running first insta nce or makes it visible in an other way. However, UP can b e started and run in several instanc es if used together wit h the p arameter /w an d a different w…

100%1 / 101
Page 69
eName:PChar;Value:PChar):BOOL;stdcall;
FunctionUP_SetIntValue_Wnd(WndClass:PChar;Valu
eName:PChar;Value:integer):BOOL;stdcall;
FunctionUP_GetStrValue_Wnd(WndClass:PChar;Valu
eName:PChar;Value:PChar;Size:integer):inte
ger;stdcall;
FunctionUP_GetIntValue_Wnd(WndClass:PChar;Valu
eName:PChar;varValue:integer):LongBool;std
call;
(*
*Allthesefunctionsareusedforchanging
*internalsettingsofUPinruntime.
*UP_GetIntValue,UP_SetStrValue,
*UP_SetIntValuereturnsnonzeroif
*successful
*UP_GetStrValuereturnsamountof
*characterstocopyintoValuestring
*includingnullterminator
*IfSizeislessthanrequiedsize,no
*charactersarecopied.
*)
FunctionUP_GetChecksum(Recalculate:integer;Ch
ecksum:PChar;Size:integer):BOOL;stdcall;
FunctionUP_GetChecksum_Wnd(WndClass:PChar;Reca
lculate:integer;Checksum:PChar;Size:integer
):BOOL;stdcall;
(*
*Thesefunctionsreturnchecksumvaluefromthe
UP,where:
*Recalculate=0;onlyreturnsthechecksum
*Recalculate=1;checksumwillberecalculated
first
*Checksum;thereturnedchecksumasstring
*Size;thelengthoftheChecksumarray,theca
llerhavetofill
*WndClass;theUPwindowclassname
*)
implementation
functionUP_LoadFile;external'up_dll.dll';
functionUP_GetStrValue;external'up_dll.dll';
functionUP_GetIntValue;external'up_dll.dll';
functionUP_SetStrValue;external'up_dll.dll';
functionUP_SetIntValue;external'up_dll.dll';
functionUP_LoadFile_Wnd;external'up_dll.dll';
functionUP_SetStrValue_Wnd;external'up_dll.dl
l';
functionUP_SetIntValue_Wnd;external'up_dll.dl
l';
functionUP_GetStrValue_Wnd;external'up_dll.dl
l';
functionUP_GetIntValue_Wnd;external'up_dll.dl
l';
functionUP_GetChecksum;external'up_dll.dll';
functionUP_GetChecksum_Wnd;external'up_dll.dl
l';
end.
For further information see Appendix A UP_DLL.DLL.
5.9
Running More Than
One Instance of UP
If you need to connect more than one programmer to one
computer, a separate instance of UP must be running for
each programmer connected.
UP should be running in just one instance for standard
use. Each additional instance just sends commands from
Page 70
the command line to the already running first instance or
makes it visible in another way.
However, UP can be started and run in several instances if
used together with the parameter /w and a different
window class name. Those programs (instances) having
the same window class name will communicate with each
other.
Parameters for the program controlled from the command
line are described in
Running UP from Command Line.
Example of use
The first instance of UP can be started the standard way
from the start menu.
Additional instances can be started from the command
line as up.exe /w "another up", for example.
5.10
Access of More UP
Instances to One
Programmer
Only one program or utility can access one programmer
at any one time.
The operating system takes care of the access rights of
programmers connected to the USB interface.
If UP is running, the operating system does not allow any
other program to access the selected programmer as UP
needs to continually check the GO button state and the
voltage on the feeding pin.
UP can temporarily be prohibited to access the
programmer and the programmer freed this way for
another application. This can be done by choosing
Options Select programmer. As long as this dialog is
open, another program can access the programmer. The
data the system works with in HEX editors does not get
lost by closing this dialog window.
5.11
Updating UP
If a newer program version is available on the web, it is
recommended to update the existing version as it may
eliminate known bugs or make the programming
algorithm for a particular device more efficient.
New versions also add newly supported types of devices.
Updates are free and are very easy. You can download a
new program version from
https://www.asix.tech/
prg_up_en.html
and simply install it over the previous one
by running the installer and clicking the Next button till it
finishes.
You do not have to worry about losing the settings you
created in your current program version. The installation
preserves all of them.
You can set an automatic check for newer versions on the
web in Options Program settings Others.
5.12
Appendix A UP_DLL.DLL
This appendix deals with the names of settings and
values of functions in the UP_DLL.DLL library.
Please look at the sample batch files in UP installation
folder for better understanding.
The following information is provided only for experienced
users and does not provide any guarantee.
5.12.1 Data Types
string is string
integer signed 32bit value
boolean accessed like integers; 0 is false, other
value is true
Page 71
5.12.2 List of UP variables
Prog.LoadFileBfgProg
boolean
If true, current file is reloaded before device (or its part) is
programmed.
Prog.LoadFileBfgProgWarnMod
boolean
If true, the program warns when it is set to reload current
file before programming and data in some editor have
been manually modified.
Prog.LoadFileBfgProgWarnOnNoChange
boolean
If true, the program warns when it is set to reload current
file before programming and the content of the loaded file
has not changed from the previous programming.
File.AutoCheck
boolean
If true, current file is periodically tested for changes.
File.LoadOnModify
boolean
If true, when change is detected, question pops up.
FileLoad.ClearData
FileLoad.ClearCfg
FileLoad.ClearID
FileLoad.ClearCode
boolean
If true, the contents of code memory is erased (in UP
memory) before new file is loaded;
all cells not stored in the file will have its default (blank)
state.
Part.Name
string
Selected device name
Prog.Name
string
Selected programmer name
Possible values are PREST, FORTE.
Prog.PortBase
integer
Serial number of programmer
Prog.UseOnlyThisSN
boolean
If true, the SN saved in the up.ini is always used regardles
of the SN contained in a project file.
LanguageFile
string
Relative path to used languange file
Project.File
string
Project file path
Project.Present
boolean
Project.Template
boolean