QUICK SUN错误列表QuickSun CL-API

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

OV
Endeas Oy
Command Line / Application Programming Interface of QuickSun Software
OV
Endeas Oy
Contents
Introduction....................................................................................................................4 Communicating..............................................................................................................4 Notices...........................................................................................................................4 Usage (5)
Code example 1......................................................................................................5 Code example 2......................................................................................................5 Commands.....................................................................................................................6 Command list.............................................................................................................6 Calibration. (8)
SET REF................................................................................................................8 GET REF.............................................................................................................10 Measurement properties...............................................................................................11 Temperature Correction...........................................................................................11 SET TEMP...........................................................................................................11 GET TEMP..........................................................................................................12 Manufacturer............................................................................................................13 SET MANUFACTURER....................................................................................13 GET MANUFACTURER....................................................................................14 Product.....................................................................................................................15 SET PRODUCT...................................................................................................15 GET PRODUCT..................................................................................................16 Operator...................................................................................................................17 SET OPERATOR................................................................................................17 GET OPERATOR................................................................................................18 ADD OPERATOR...............................................................................................19 REMOVE OPERATOR.......................................................................................20 Measuring and Results.................................................................................................21 Measurement............................................................................................................21 FLASH.................................................................................................................21 MEASURE..........................................................................................................22 MEASURE-D......................................................................................................24 Storing......................................................................................................................27 STORE.................................................................................................................27 SAVE...................................................................................................................28 Printing.....................................................................................................................29 PRINT..................................................................................................................29 Product Database.....................................................................................................30 GET DATABASE...............................................................................................30 SET DATABASE................................................................................................32 REMOVE DATABASE......................................................................................34 Scales...........................................................................................................................35 Voltage Scale.. (35)
OV
Endeas Oy
SET VOLTAGESCALE......................................................................................35 GET VOLTAGESCALE.....................................................................................36 ADD VOLTAGESCALE....................................................................................37 REMOVE VOLTAGESCALE............................................................................38 Current Scale............................................................................................................39 SET CURRENTSCALE......................................................................................39 GET CURRENTSCALE.....................................................................................40 ADD CURRENTSCALE.....................................................................................41 REMOVE CURRENTSCALE............................................................................42 Counters and Indexes...................................................................................................43 Flash Interval Timer.................................................................................................43 GET FLASHINTERVALTIMER........................................................................43 Flash counter............................................................................................................44 SET FLASHCOUNTER......................................................................................44 GET FLASHCOUNTER.....................................................................................45 BIN#.........................................................................................................................46 SET BIN...............................................................................................................46 GET BIN..............................................................................................................47 #................................................................................................................................48 SET #...................................................................................................................48 GET #...................................................................................................................49 Special Commands.......................................................................................................50 FTP Code.................................................................................................................50 SET FTPCODE....................................................................................................50 GET FTPCODE...................................................................................................51 Exiting program.. (52)
QUIT....................................................................................................................52 SHUTDOWN.......................................................................................................52 Appendix A1: Error Codes..........................................................................................53 Appendix A2: Version History (54)
OV
Endeas Oy
Command Line / Application Programming Interface of QuickSun Software
Introduction
QuickSun software has built-in interface for command line usage also. The Command Line Interface (CLI) can be used as an Application Programming Interface (API) to build your own applications for using internal features of QuickSun software.
Communicating
The QuickSun software can act as a server for external usage. The QuickSun server allows one simultaneous incoming connection. To communicate with QuickSun server you need to establish a TCP-connection to port 43210 which the QuickSun server listens. When connecting to QuickSun server within the same computer, the TCP-connection is made to localhost (127.0.0.1). When connection to port is established commands can be sent to and results received from the QuickSun software.
Notices
1. If you wish to test the system while programming, note that some of the commands do NOT work properly if tested offline (e.g. electronics unit not connected).
2. Some commands may not work in every version of QuickSun software.
3. Error codes are described in Appendix A1.
4. Version history of the CLI / API is described in Appendix A2.
OV
Endeas Oy
Usage
If you wish to use the QuickSun API to program your own applications, you need to create a connection to the QuickSun software and send your commands to the program and capture results for processing. For example in C++ you need to create a socket to which you send the command as text.
Code example 1
Here is an example of establishing a connection in C++:
void __fastcall TBangForm::SocketConnection(TClientSocket *Socket) {
Socket->Socket->ASyncStyles << asRead << asClose; Socket->Address = EditIPAddr->Text; Socket->Port = EditTCPPort->Text; Socket->Open(); }
Code example 2
Here is an example of sending commands to the QuickSun software through the socket in C++.
void __fastcall TBangForm::DisconnectButtonClick(TObject *Sender) {
ClientSocket1->Socket->SendText("QUIT\r\n"); ClientSocket1->Close();
sock_state = st_disconnected;
StateLabel->Caption = "Disconnected"; }
OV
Endeas Oy
Commands
All the commands and responses are sent in text form, with a CRLF sequence as line terminator. Commands are not case sensitive.
Command list
List of all commands:
SET REF 8 GET REF 10 SET TEMP 11 GET TEMP
12 SET MANUFACTURER 13 GET MANUFACTURER 14 SET PRODUCT 15 GET PRODUCT 16 SET OPERATOR 17 GET OPERATOR 18 ADD OPERATOR
19 REMOVE OPERATOR 20 FLASH 21 MEASURE 22 MEASURE-D 24 STORE 27 SAVE 28 PRINT
29 GET DATABASE 30 SET DATABASE
32 REMOVE DATABASE 34 SET VOLTAGESCALE 35 GET VOLTAGESCALE 36 ADD VOLTAGESCALE
37 REMOVE VOLTAGESCALE 38 SET CURRENTSCALE 39 GET CURRENTSCALE 40 ADD CURRENTSCALE
41 REMOVE CURRENTSCALE 42 GET FLASHINTERVALTIMER 43 SET FLASHCOUNTER 44 GET FLASHCOUNTER 45 SET BIN 46 GET BIN
47
OV
Endeas Oy
SET # 48 GET #
49 SET FTPCODE 50 GET FTPCODE 51 QUIT
52 SHUTDOWN 52
OV
Endeas Oy
Calibration
Commands for calibrating the system.
SET REF
Sets the [known] short-circuit current for the module last measured. QuickSun calibrates itself according to the current given. Used only when calibrating the system.
INPUT
SET REF x,x
- Sets reference cell a short-circuit current value of “x,x” - Decimals separated with comma “,”
OUTPUT
Returns acknowledgment or error in one line response.
Successful execution returns: - OK
- reference current [A]
- calculation trig. voltage [mV]
Failed execution returns: - ERROR - Error code
Example 1: Successful execution
SET REF 0,5
OK 0.5 2500
Example 2: Failed execution
SET REF n
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
USAGE
First, measure a reference module with known short circuit current, e.g.
MEASURE OK
3.402 0.642 1.585 0.503 3.152 0.726 22.00 0.00 87.120, 15.856, 1000 -0.006 3.403 -0.004 3.402 -0.002 3.402 0.000 3.402 ...
Next, tell QuickSun the actual short circuit current:
SET REF 3.452
QuickSun responds with
OK 3.452000 2456
A new measurement should now give a more accurate result:
MEASURE OK
3.452 0.642 1.607 0.501 3.209 0.725 22.00 0.00 88.312 16.073 1000 -0.006 3.453 -0.004 3.453 -0.002 3.453 0.000 3.453 0.002 3.452 0.003 3.452 ...
If there still is a considerable error in Isc, repeat the "set ref" command and check again.
OV
Endeas Oy
GET REF
Returns currently used calibration parameters.
INPUT
GET REF
- Requests currently used parameters
OUTPUT
Returns parameters or error in one line response.
Successful execution returns: - REF
- reference current [A]
- calculation trig. voltage [mV]
Failed execution returns: - ERROR - Error code
Example 1: Successful execution
GET REF
OK 0.5 0.6
Example 2: Failed execution
GET REF
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
Measurement properties
Temperature Correction
Commands for enabling temperature correction and setting correction values.
SET TEMP
Sets temperature correction on and sets new reference temperature value or sets temperature correction off.
INPUT
SET TEMP xx,x
- Sets temperature correction on and value to “xx,x” °C - Decimals separated with comma “,”
SET TEMP N/A
- Sets temperature correction off.
OUTPUT
Returns acknowledgment or error in one line response.
Successful execution returns: - OK
- Temperature correction or N/A
Failed execution returns: - ERROR - Error code
Example 1: Successful execution
SET TEMP 25,0 OK 25.0
Example 2: Failed execution
SET TEMP n
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
GET TEMP
Returns ambient and reference temperatures.
INPUT
GET TEMP
- Request ambient and reference temperature values in °C
OUTPUT
Returns values in one line response.
Successful execution returns: - TEMP
- Ambient temperature - Reference temperature
Example 1: Successful execution
GET TEMP
TEMP 20.21 21.09
OV
Endeas Oy
Manufacturer
Commands for selecting manufacturer of the product in measure and requesting list of manufacturers.
SET MANUFACTURER
Sets manufacturer to desired value. The selected manufacturer needs to exist in the database.
INPUT
SET MANUFACTURER Endeas
- Sets manufacturer to “Endeas”
OUTPUT
Returns acknowledgment or error in one line response.
Successful execution returns: - OK
- Manufacturer
Failed execution returns: - ERROR - Error code - Manufacturer
Example 1: Successful execution
SET MANUFACTURER Endeas
OK Endeas
Example 2: Failed execution
SET MANUFACTURER Endeas
ERROR xxx (see Appendix A1: Error codes) Endeas
OV
Endeas Oy
GET MANUFACTURER
Lists manufacturers in the QuickSun database (i.e. the contents of the "Manufacturer" dropdown list).
INPUT
GET MANUFACTURER
- Request list of manufacturers
OUTPUT
Returns acknowledgment and list of manufacturers in separate lines or an error message.
Successful execution returns: - OK
- Manufacturer (one in each line)
- . (The message ends with a dot on a line of its own)
Failed execution returns in one line: - ERROR - Error code
Example 1: Successful execution
GET MANUFACTURER OK Endeas NESTE Sanyo .
Example 2: Failed execution
GET MANUFACTURER
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
Product
Commands for selecting product in measure and requesting list of products of the selected manufacturer.
SET PRODUCT
Sets product to desired value. The selected product needs to exist in the database under the selected manufacturer.
INPUT
SET PRODUCT Cell
- Sets product to “Cell”
OUTPUT
Returns acknowledgment or error in one line response.
Successful execution returns: - OK - Product
Failed execution returns: - ERROR - Error code - Product
Example 1: Successful execution
SET PRODUCT Cell
OK Cell
Example 2: Failed execution
SET PRODUCT Cell
ERROR xxx (see Appendix A1: Error codes) Cell
OV
Endeas Oy
GET PRODUCT
Lists products in the QuickSun database of the selected manufacturer (ie. the contents of the "Product" dropdown list).
INPUT
GET PRODUCT
- Request list of products
OUTPUT
Returns acknowledgment and list of products in separate lines or an error message.
Successful execution returns: - OK
- Product (one in each line)
- . (The message ends with a dot on a line of its own)
Failed execution returns in one line: - ERROR - Error code
Example 1: Successful execution
GET PRODUCT OK Cell Module .
Example 2: Failed execution
GET PRODUCT
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
Operator
Commands for selecting listing operators in the system and setting, adding and removing an operator.
SET OPERATOR
Sets operator to desired value. The selected operator needs to exist in the database.
INPUT
SET OPERATOR NN
- Sets operator to “NN”
OUTPUT
Returns acknowledgment or error in one line response.
Successful execution returns: - OK
- Operator
Failed execution returns: - ERROR - Error code - Operator
Example 1: Successful execution
SET OPERATOR NN
OK NN
Example 2: Failed execution
SET OPERATOR NN
ERROR xxx (see Appendix A1: Error codes) NN
OV
Endeas Oy
GET OPERATOR
Lists operators in the QuickSun database (ie. the contents of the "Operator" dropdown list).
INPUT
GET OPERATOR
- Request list of operators
OUTPUT
Returns acknowledgment and list of operators in separate lines or an error message.
Successful execution returns: - OK
- Operator (one in each line)
- . (The message ends with a dot on a line of its own)
Failed execution returns in one line: - ERROR - Error code
Example 1: Successful execution
GET OPERATOR OK NN
TestPerson
Oskari Vuorinen .
Example 2: Failed execution
GET OPERATOR
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
ADD OPERATOR
Adds operator to the QuickSun database.
INPUT
ADD OPERATOR NN
- Adds operator called “NN” to the database
OUTPUT
Returns acknowledgment or an error message.
Successful execution returns: - OK
- Operator
Failed execution returns in one line: - ERROR - Error code - Operator
Example 1: Successful execution
ADD OPERATOR nn OK nn
Example 2: Failed execution
ADD OPERATOR nn
ERROR xxx (see Appendix A1: Error codes) nn
OV
Endeas Oy
REMOVE OPERATOR
Removes operator from the QuickSun database.
INPUT
REMOVE OPERATOR NN
- Removes operator called “NN” from the database
OUTPUT
Returns acknowledgment or an error message.
Successful execution returns: - OK
- Operator
Failed execution returns in one line: - ERROR - Error code - Operator
Example 1: Successful execution
REMOVE OPERATOR nn OK nn
Example 2: Failed execution
REMOVE OPERATOR nn
ERROR xxx (see Appendix A1: Error codes) nn
OV
Endeas Oy
Measuring and Results
Measurement
Commands for measuring.
FLASH
Flashes the lamp if possible, but doesn’t return measuring results. Has little or no use to programming.
INPUT
FLASH
- flashes the lamp
OUTPUT
Returns acknowledgment or error in one line message.
Successful execution returns: - OK
Failed execution returns: - ERROR - Error code
Example 1: Successful execution
FLASH OK
Example 2: Failed execution
FLASH
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
MEASURE
Measures the connected module / cell, tries to flash the system. Manufacturer, Product and Operator should be set either manually or programmatically before issuing this command.
INPUT
MEASURE
- Flashes the system
MEASURE x
- Flashes the system and sets “Module Name” to “x”, which can be used as
serial number for the module also.
OUTPUT
Returns acknowledgment and result data in multiple lines or error in one line response.
Successful execution returns:
- First line (last three separated with semicolon “;”
o OK
o Module Name / serial number o Manufacturer o Product
o Reference Module
- Second line
o flash counter
o short circuit current [A] o open circuit voltage [V]
o estimated series resistance [ohm] o estimated shunt resistance [ohm]
o maximum power at the target irradiance [W] o voltage giving maximum power [V] o current giving maximum power [A] o fill factor
o ambient temperature [C] o reference temperature [C] o cell efficiency o module efficiency
OV
Endeas Oy
o target irradiance level
- Following lines list (one pair each row)
o Measured voltage [V] o Measured current [A] - Last line
o . (The message end with a dot on a line of its own)
As the number of lines is not fixed, the end is indicated with a line consisting of a point character only.
Failed execution returns:
- ERROR - Error code
Example 1: Successful execution
MEASURE
OK 12345; endeas; cell; xyz123
10 0.498 6.867 0.072 11.267 0.851 3.485 0.244 0.249 21.90 22.19 34.031, 3.781, 1 000
0.000 3.020 0.013 3.019 0.025 3.016 0.039 3.015 ---
20.028 0.081 20.030 0.000 .
Example 2: Failed execution
MEASURE
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
MEASURE-D
Similar to MEASURE, but sends possible diagnostic messages over TCP connection instead of presenting them to the user as dialog boxes. The message(s) are each sent on one line and enclosed in a pair of double quotes.
INPUT
MEASURE-D
- Flashes the system
MEASURE-D x
- Flashes the system and sets “Module Name” to “x”, which can be used as
serial number for the module also.
OUTPUT
Returns acknowledgment and result data in multiple lines or error in one line response. Also returns possible diagnostic messages.
Currently, the following messages may be received:
"Please, check bias setting."
"Sweep seems to be too long. Please, check the Voc value in product database." "Sweep seems to be too short. Please, check the Voc value in product database." "Please, select a more optimal voltage scale." "Please, select a more optimal current scale."
Additionally, the measurement fails with error 108 instead of showing the question "Overwrite previously stored module?".
Successful execution returns:
- (Possible diagnostics messages, one in each line enclosed in a pair of double
quotes.)
- First line (last three separated with semicolon “;”
o OK
o Module Name / serial number o Manufacturer o Product
o Reference Module
OV
Endeas Oy
- Second line
o flash counter
o short circuit current [A] o open circuit voltage [V]
o estimated series resistance [ohm] o estimated shunt resistance [ohm]
o maximum power at the target irradiance [W] o voltage giving maximum power [V] o current giving maximum power [A] o fill factor
o ambient temperature [C] o reference temperature [C] o cell efficiency o module efficiency o target irradiance level
- Following lines list (one pair each row)
o Measured voltage [V] o Measured current [A] - Last line
o . (The message end with a dot on a line of its own)
As the number of lines is not fixed, the end is indicated with a line consisting of a point character only.
Failed execution returns:
- ERROR - Error code
Example 1: Successful execution
MEASURE-D 12345
"Please, check bias setting."
"Please, select a more optimal voltage scale." OK 123456; endeas; cell; xyz123
10 0.498 6.867 0.072 11.267 0.851 3.485 0.244 0.249 21.90 22.19 34.031, 3.781, 1 000
0.000 4.193 0.001 4.193 0.003 4.193 0.005 4.193 0.007 4.192 0.009 4.192
OV
Endeas Oy
0.011 4.192 0.013 4.191 0.015 4.191 0.017 4.191 ---
0.646 0.000 .
Example 2: Failed execution
MEASURE-D
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
Storing
With QuickSun software it is possible to save measurement data into internal database by using .lot –files, which you can view later with QuickSun software. Within a measuring session you can save individual measurements by storing them into the database.
STORE
Stores the currently measured data into the internal (.lot) database and initializes the data fields for next measurement.
INPUT
STORE
- Stores the measurement data into the database
OUTPUT
Returns acknowledgment or error in one line response.
Successful execution returns: - OK
Failed execution returns: - ERROR - Error code
Example 1: Successful execution
STORE OK
Example 2: Failed execution
STORE
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
SAVE
Saves the measurement database into a .lot –file.
INPUT
SAVE
- Saves the measurement database
OUTPUT
Returns acknowledgment or error in one line response.
Successful execution returns: - OK
Failed execution returns: - ERROR - Error code
Example 1: Successful execution
SAVE OK
Example 2: Failed execution
SAVE
ERROR xxx (see Appendix A1: Error codes)
OV
Endeas Oy
Printing
Commands to send data to the printer.
PRINT
Equivalent to pushing the PRINT button. A report page is printed.
Example
PRINT OK
OV
Endeas Oy
Product Database
QuickSun stores product details in an internal database, which can be accessed with following commands.
GET DATABASE
Queries the product database for desired product details.
INPUT
GET DATABASE man;prod
- Queries the database for product details. Requires parameters “man” for
manufacturer and “prod” for product, separated by semicolon “;”.
OUTPUT
Returns acknowledgment with product details in four line response or error in one line response.
Successful execution returns: - First line:
o OK
o Manufacturer o Product
- Second line: (Temperature correction)
o current temp. coeff [uA/cm2/deg.] o voltage temp. coeff [mV/cell/deg.]
o curve correction factor [mOhm/cell/deg.] o series resistance [mOhm/cell]
- Third line: (Physical properties)
o module length [cm] o module width [cm] o cell area [cm2] o cells parallel o cells serial
- Fourth line: (Electrical properties)
o Voc [V] o Isc [A]
OV
Endeas Oy
o Fill factor [%] o Pmax [V] o Ppass [V]
Failed execution returns: - ERROR - Error code
- Manufacturer / Manufacturer; Product (may vary due error type)
Example 1: Successful execution
GET DATABASE Kyocera; KC165G-2
OK Kyocera; KC165G-2 37 -2.3 0.04 4 129 99 232.5 1 48 28.9 8 72.2 167 160
Example 2: Failed execution
GET DATABASE Kyocera; KC165G-2
ERROR xxx (see Appendix A1: Error codes) Kyocera; KC165G-2
OV
Endeas Oy
SET DATABASE
Inserts the product database an entry with desired details or updates details of existing entry.
INPUT
SET DATABASE man; prod; ctc; vtc; ccf; sres; mlen; mwid; carea; cpar; cser; voc; isc; ff; pmax; ppass
- Inserts/updates the database an entry with desired details, where
o “man” is Manufacturer o “prod” is Product
o “ctc” is current temp. coeff [uA/cm2/deg.] o “vtc” is voltage temp. coeff [mV/cell/deg.]
o “ccf” is curve correction factor [mOhm/cell/deg.] o “sres” is series resistance [mOhm/cell] o “mlen” is module length [cm] o “mwid” is module width [cm] o “carea” is cell area [cm2] o “cpar” is cells parallel o “cser” is cells serial o “voc” is Voc [V] o “isc” is Isc [A]
o “ff” is Fill factor [%] o “pmax” is Pmax [V] o “ppass” is Ppass [V]
OUTPUT
Returns acknowledgment or error in one line response.
Successful execution returns: - OK
- Manufacturer - Product
Failed execution returns: - ERROR - Error code - Manufacturer - Product。

相关文档
最新文档