Faithtech FTG Series Owner's manual

Programmable DC Switching Power Supply
Programming Manual
(
FTG Series
)
©Copyright Faithtech
Version V2.02
2020-04

I
Preface
This manual contains reference information for programming the FTG series
programmable switching DC power supply Unit (PSU, i.e. Power Supply Unit) over the
remote interface using the SCPI programming language.
Related Information
The applications in this manual assume that you know how to connect the power supply
to the computer. Please refer to the user manual for the specific online method.
Part of the content in the manual is related to specific accessories. If you need some
special accessories or the accompanied accessories are not enough to meet your needs,
please contact Faithtech Technology sales or after-sales service department.
Announcement
Faithtech Technology owns the copyright and final interpretation right of this manual. The
information contained in the manual is for reference only and is subject to change without
notice. Faithtech Technology is not responsible for the errors that may be contained in this
manual or the damage caused by the provision, execution and use of this manual.
For product latest information, please log on to Faithtech's official website
http://www.faithtech.cn for inquiries.
Version History
Date
Version
Amendment
2016-03
1.00
Complete this manual
2019-04
1.01
Correction of certain examples
2020-04
2.02
Revise and append some prgramming examples

II
Table of Contents
1. Communication Interface...................................................................................................... 1
1.1. Introduction......................................................................................................................1
1.2. Configure communication interface............................................................................. 1
Connect RS232................................................................................................................ 2
Connect LAN....................................................................................................................2
Connect GPIB...................................................................................................................3
1.3. Switching protocol...........................................................................................................3
1.4. Enter remote control mode............................................................................................3
1.5. Others................................................................................................................................4
2. SCPI Status Registers............................................................................................................... 5
2.1. Command introduction.................................................................................................. 5
2.2. Program syntax................................................................................................................ 5
Command keyword........................................................................................................ 6
Root Specifier.................................................................................................................. 6
Command separators.....................................................................................................6
Query syntax....................................................................................................................7
Command terminator.....................................................................................................7
2.3. Paramter Format.............................................................................................................. 8
2.4. Status system....................................................................................................................8
Channel Status Register Group.....................................................................................9
Standard Event Status Register Group.....................................................................10
Status Byte Register....................................................................................................10
2.5. Command version information..................................................................................11
3. SCPI Command Description...............................................................................................12
3.1. IEEE488.2 common command reference................................................................. 12
*CLS...............................................................................................................................12
*ESE............................................................................................................................... 13
*ESR?.............................................................................................................................13
*IDN?.............................................................................................................................13
*OPC..............................................................................................................................13
*PSC.............................................................................................................................. 14
*RST...............................................................................................................................14
*SRE...............................................................................................................................14
*STB?.............................................................................................................................15
*SAV.............................................................................................................................. 15
*RCL...............................................................................................................................15
*TST?............................................................................................................................. 16
*WAI.............................................................................................................................. 16
3.2. CONFigure command................................................................................................. 17
CONFigure:FOLD:BACK.............................................................................................. 17
CONFigure:FOLD:TIME............................................................................................... 17
CONFigure:APG:MODE...............................................................................................17

III
CONFigure:APG:VOLTage...........................................................................................17
CONFigure:INHibit......................................................................................................18
CONFigure:AUTO:LOAD............................................................................................. 18
CONFigure:AUTO:OUTPut..........................................................................................18
3.3. OUTPut command....................................................................................................... 19
OUTPut[:STATe]............................................................................................................19
OUTPut:FUNCtion....................................................................................................... 19
OUTPut:PROTect:VOLTage......................................................................................... 19
OUTPut:PROTect:CURRent......................................................................................... 19
OUTPut:PROTect:POWer............................................................................................ 20
OUTPut:PROTect:CLEar............................................................................................... 20
3.4. SOURce command.......................................................................................................20
SOURce:VOLTage[:LEVel]............................................................................................20
SOURce:VOLTage:LIMit:HIGH.................................................................................... 20
SOURce:VOLTage:LIMit:LOW..................................................................................... 21
SOURce:CURRent[:LEVel]............................................................................................21
SOURce:CURRent:LIMit:HIGH....................................................................................21
SOURce:CURRent:LIMit:LOW.....................................................................................22
3.5. SEQuence command...................................................................................................22
SEQuence:STATus........................................................................................................ 22
SEQuence:RUN:NUMBer............................................................................................22
SEQuence:EDIT:NUMBer............................................................................................ 22
SEQuence:EDIT:COUNt...............................................................................................23
SEQuence:EDIT:CYCLe................................................................................................ 23
SEQuence:EDIT:LINK................................................................................................... 23
SEQuence:EDIT:SAVE.................................................................................................. 23
SEQuence:EDIT:STEP...................................................................................................24
SEQuence:EDIT:VOLTage............................................................................................24
SEQuence:EDIT:CURRent............................................................................................24
SEQuence:EDIT:DELay.................................................................................................24
3.6. CP command................................................................................................................ 25
CP:VOLTage..................................................................................................................25
CP:CURRent..................................................................................................................25
CP:POWer.....................................................................................................................25
CP:RESPonse................................................................................................................ 25
3.7. MEASure command.....................................................................................................26
MEASure:VOLTage?.....................................................................................................26
MEASure:CURRent?.................................................................................................... 26
MEASure:POWer?........................................................................................................26
MEASure:TEMPerature?..............................................................................................26
3.8. STATus command.........................................................................................................27
STATus:CHANnel:CONDition?....................................................................................27
STATus:CHANnel[:EVENt]?..........................................................................................27
STATus:CHANnel:ENABle............................................................................................27

IV
3.9. SYSTem command....................................................................................................... 27
SYSTem:ERRor?............................................................................................................ 27
SYSTem:LOCal.............................................................................................................. 28
SYSTem:VERSion?........................................................................................................28
4. SCPI error information........................................................................................................29
4.1. Introduction..................................................................................................................29
4.2. Check error information............................................................................................. 29
4.3. Command errors..........................................................................................................29
4.4. Execution errors........................................................................................................... 31
4.5. Query errors................................................................................................................. 31
5. Programming example....................................................................................................... 32
5.1. VI static output.............................................................................................................32
5.2. Query measurement parameter................................................................................ 32
5.3. Edit SEQ file.................................................................................................................. 32
5.4. Run SEQ File................................................................................................................. 33
5.5. Constant power (CP) output...................................................................................... 33

FTG Series Programming Manual
_________________________________________________________________
1
1. Communication Interface
1.1. Introduction
Faithtech FTG series programmable DC switching power supply provides various remote
communication interfaces such as RS232 port (standard), LAN (standard), GPIB (optional), etc..
You can connect to the power supply through a dedicated cable with the computer, the
computer can control the source.
Table 1-1 Communication Interfaces
Remote Controller
Interface
Explanation
PC
RS232
Universal serial port
LAN
Standard ethernet
◎Caution:
You can only select one communication method at a time. Default is RS232.
1.2. Configure communication interface
This section describes in detail the configuration method of each communication interface. These
configurations can only be set via the front panel keyboard of the power supply. For more
detailed configuration introduction, please refer to the user manual. Press the "Menu" key to
enter the menu, under the "System" column, select the "Communication" item, and press the
"Enter" key to enter the communication configure interface.
Figure 1-1 Communication Configure Interface
Use the knob or direction keys to move the cursor to the setting item, and press the "Enter"

FTG Series Programming Manual
_________________________________________________________________
2
key to enter the parameter editing mode. Enter the number keys and decimal point keys to
edit the IP address, and turn the knob to select the baud rate and verification mode. The
user presses the "Enter" key to confirm the editing parameters, presses the "Esc" key to exit.
The communication configuration information is stored in the instrument internal
non-volatile memory, and the configuration will not be affected by shutting down or
recalling the preset settings. After changing the communication parameters, the device
needs to be restarted for the changes to take effect.
Connect RS232
The serial port is a universal asynchronous serial communication interface that conforms to
the RS232 level specification and does not support any flow control. RS232 uses 9600 baud
rate by default, which can be set to 4800, 19200, 38400 or 115200bps. The baud rate of the
power supply and the computer must be the same. The factory default parity is off (no
check). If the parity is enabled, the RS232 interface will use odd or even parity to verify data.
For the RS232 interface, only TxD and RxD signals can transmit data, and the pin signals are
described in the following table.
Table 1-2 RS232 PIN signal
Pin NO.
Input/Output
Description
1
---
N.C.
2
Input
RxD
3
Output
TxD
4
---
DSR
5
---
GND
6
---
DTR
7
---
CTS
8
---
RTS
9
---
N.C.
Connect LAN
The FTG series power supply has an Ethernet communication interface, adopts UDP
communication mode, and the default port number is 7000. Before starting communication,
the user needs to set the IP address and subnet mask, and ensure that the address of the PC

FTG Series Programming Manual
_________________________________________________________________
3
and the power supply are in the same network segment, and that there is no duplicate IP
address with the power supply in the network segment, otherwise the connection will not be
correct.
Connect GPIB
GPIB interface and IEEE488.2 GPIB connection cable are optional accessories, please contact
authorized sales agent or Faithtech in case of need.
Use a IEEE488.2 GPIB cable to connect GPIB interfaces of power supply and PC. Please
ensure that the screws have been screwed down in order to have a full connection. Then
press “Menu” button to enter the system menu to set the address. GPIB address is saved in
nonvolatile memory.
1.3. Switching protocol
FTG series support SCPI and Modbus-RTU protocol, select the correct protocol base on
your requirements.
◎Caution:
Restart the power supply after you changed the protocol, so as to let the changes take
effect.
1.4. Enter remote control mode
After the power supply receives any correct SCPI command, it enters the remote control
mode.
In the remote control mode: the local keyboard is locked, the key operation is invalid, and
the power can only be controlled by programming commands; the front panel screen
displays real-time status information such as voltage, current, and power, etc.. There are two
ways to exit the remote control mode:
Press "Enter" key, the system returns to local operation mode.
Send the programming command "SYSTem:LOCal" to make the power supply return to
local mode.

FTG Series Programming Manual
_________________________________________________________________
4
1.5. Others
For instructions on related software operations, driver installation and communication
operations, please refer to the user manual and the accompanying software instructions. For
the latest information about the software and drivers, please log in to Faithtech's website
http://www.faithtech.cn for inquiries.

FTG Series Programming Manual
_________________________________________________________________
5
2. SCPI Status Registers
2.1. Command introduction
SCPI commands can be divided to common and subsystem commands.
Common commands are defined by the IEEE 488.2 standard to perform common interface
functions. They begin with an * and consist of three letters (command) or three letters and
a ? (query).
Subsystem commands are specific to instrument functions. They can be a single command
or a group of commands. The groups are comprised of commands that extend one or more
levels below the root.
Figure 2-1 Command Levels
2.2. Program syntax
FTG series programmable DC power supply SCPI commands are inherited and expanded
from IEEE488.2 standards. SCPI commands are constructed with keyword, seperator,
paramter and terminator. Below is an example,
CURRent:STATic:L1 10.0
In this command, CURRent, STATic, L1 are command keywords, “:” and space character are
seperator, 10.0 is parameter (some commands have multiple parameters seperated with
comma “,”), A <carriage return> at the end of this command is the command terminator.
Throughout this document, the following conventions are used for the SCPI command
syntax:

FTG Series Programming Manual
_________________________________________________________________
6
Square brackets ([]) indicate optional keywords or parameters. The braces are not
sent with the command string.
Braces ({}) enclose parameters within a command string.
Triangle brackets (<>) indicate that you must substitute a value or a code for the
enclosed parameter.
A vertical bar (|) separates one of two or more alternative parameters.
Command keyword
Each command keyword has two formats: long mnemonic and short mnemonic. Short
mnemonic is an abbreviation for long mnemonic. Each mnemonic does not exceed 12
characters (including any number suffixes that may appear). The power supply only accepts
precise long or short mnemonics. The rules for generating mnemonics are as follows:
The long mnemonic consists of a word or phrase. If it is a word, the entire word constitutes a
mnemonic; if it is a phrase, the first character of each word and the entire last word
constitute a mnemonic.
CONFIGURE —— CONFigure
Main Value —— MVALue
The short mnemonic is generally composed of the first 4 characters of the long mnemonic.
CONFigure —— CONF
If the character length of the long mnemonic is less than or equal to 4, the long and short
mnemonics are the same; if the length of the long mnemonic is greater than 4, and the
fourth character is a vowel, the short mnemonic will discard this vowel and becomes 3
characters.
SAVE —— SAVE
TIMer —— TIM
The mnemonic is not case sensitive.
Root Specifier
When it precedes the first header of a message unit, the colon becomes the root specifier. It
tells the command parser that this is the root or the top node of the command tree.
Command separators
Colon “:”
A colon (:) is used to separate a command keyword from a lower-level keyword, such as
command “CURR:MVAL 10”; also, when it precedes the first header of a message unit, the

FTG Series Programming Manual
_________________________________________________________________
7
colon becomes the root specifier, it tells the command parser that this is the root or the top
node of the command tree.
Space
Used for seperating command and parameter.
Semicolon “;”
A semicolon (;) is used to separate two commands within the same subsystem, and can
also minimize typing. For example, sending the following command string,
“CURR:RANG 0;MVAL 10”
is the same as sending the following two commands:
“CURR:RANG 0”
“CURR:MVAL 10”
Comma “,”
A comma “,” is used to seperate parameters, as below command,
“CAL:STAT ON,6900”
Query syntax
You can query the value of most parameters by adding a question mark (?) to the command.
For example, the following command sets the output voltage to 80 V:
VOLTage 80
You can query the value by executing:
VOLTage?
After the power supply receives the query command and completes the analysis, it
executes the command and generates a response message. The response message is first
written into the output buffer. If the current remote interface is a GPIB interface, it will wait
for the controller to read the response; otherwise, the response message will be sent to the
interface immediately.
Most of the setting commands have corresponding query syntax. If a command that
cannot be queried is received, the power supply will report the error message "-115
Command can not query" and nothing is returned.
Command terminator
There are two types of command terminators: new line character (ASCII symbol LF,
ASCII
value 10) and EOI (available only in GPIB interface). Command string termination will always

FTG Series Programming Manual
_________________________________________________________________
8
reset the current SCPI command path to the root level.
2.3. Paramter Format
Table 2-1 Parameter types
Symbol
Explanation
Data Example
<NR1>
Integer value
123
<NR2>
Float value
123.,12.3,0.12,1.23E4
<NRf>
Could be NR1 or NR2。
<NRf+>
Extended type, including <NRf>, MIN, MAX
<Bool>
Boolean value
1|0|ON|OFF
<CRD>
String, such as CURR。
<AARD>
Return ASCII data. Allowed for undefined 7-Bit ASCII. It
includes a command terminator.
2.4. Status system
The status system records various conditions and states of the power supply in each status
register group. The structure of this status system is shown in the figure below. The status
system includes the standard event status register group, the channel status register group,
and the status byte register. Each register group consists of multiple registers, including
condition register, event register, and enable register.

FTG Series Programming Manual
_________________________________________________________________
9
Figure 2- 2 Status system of FTG power supply
Channel Status Register Group
The Channel Status Register group reflects the real-time status and events of the power
supply, including the Channel Condition register, PTR filter register, NTR filter register,
Channel Event register, and Channel Event Enable register.
The Channel Condition register records the real-time status of the power supply. The main
content is the alarm information of the power supply, including over-current status,
over-voltage status, etc. The detailed definition is shown in the following table.
Table 2-2 Channel Condition Register Bit Explanation
Bit
0
1
2
3
4
5
6
7
Explain
FAULT
OV
OT
rsv
rsv
rsv
rsv
rsv
FAULT:Power supply module fault
OV:Overvoltage protection
OT:Over-temperature protection
rsv:Reserved

FTG Series Programming Manual
_________________________________________________________________
10
The channel event register records the status change event of the power supply, and the
meaning of each binary bit corresponds to the bit of the channel condition register. The
channel event register can be cleared by the related query command or "*CLS" command.
After clearing, it will restart to record new events.
Standard Event Status Register Group
Standard Event Status Register Group records important events that occur during power
supply analyzing programming commands or executing operations, including Standard
Event register and Standard Event Enable register.
The definition of each bit of the standard event register is compatible with the IEEE 488.2
standard, and the detailed definition is as follows:
Table 2-3 Standard Event Register Bit Explanation
Bit
7
6
5
4
3
2
1
0
Name
rsv
rsv
CME
EXE
DDE
QYE
rsv
OPC
OPC All operations & commands completed
QYE Query Error
DDE Device specific Error
EXE Excecution Error
CME Command Error
Bits in the Standard Event register are automatically cleared by a query of that register (such
as *ESR?) or by sending the *CLS (clear status) command. Querying an event register returns
a decimal value which corresponds to the binary-weighted sum of all bits set in the register.
The Standard Event ENABle register is used to define which bits of the Standard Event
register will latch ESB (bit 5) of the Status Byte register.
Status Byte Register
The Status Byte Register records important states that IEEE 488.2 bus-compatible devices
need to support. Its status bits record whether there are currently unserviced events, errors,
standard events, etc. in the power supply.
The bits definition of the Status Byte Register are fully compatible with IEEE 488.2
specifications, details are as follows:

FTG Series Programming Manual
_________________________________________________________________
11
Table 2-4 Status Byte Register Bits
Bit
6
5
4
3
2
1
0
Name
RQS
ESB
MAV
rsv
CSUM
rsv
rsv
CSUM The summary bit for the Channel Status Register group
MAV (Message Available) This is set when there is data in the Output Queue
ESB The summary bit for the Standard Event Status Register group
RQS Exsit Request for service
rsv Reserved
2.5. Command version information
The version information of programming commands can only be queried remotely.
Implement the following command via remote interface to check PSU’s programming
command version:
SYSTem:VERSion?
The return message format “YYYY.V”, and “YYYY” stands for year, “V” stands for version
code.

FTG Series Programming Manual
_________________________________________________________________
12
3. SCPI Command Description
3.1. IEEE488.2 common command reference
This section summarizes the mandatory subset of IEEE 488.2 commands required for
any SCPI compliant instrument.
Common
command
Description
*CLS
Clears all event registers, besides status byte register and error queue
*ESE {<value>}
Programs bits in the Standard Event Enable register
*ESR?
Query the Standard Event Register
*IDN?
Returns the UNIQUE identification of the PSU
*OPC
Operation Complete Command used for program synchronization
*RCL {<profile>}
Recalls the PSU state stored in the specified storage location
*RST
Reset PSU to the initial state
*SAV {<profile>}
Stores the current PSU state in the specified storage location
*SRE
Programs bits in the Service Request Enable register
*STB?
Query the Status Byte register
*PSC
Define power on state for service request enable register and standard
event enable register
*TST?
Returns Self-Test results
*WAI
Waits until all pending commands are completed
*CLS
Clear command. This command clears all event registers in the PSU:
Standard Event Register
Channel Event Register
Status Byte Register
Error Queue
Command syntax: *CLS
Parameter: None

FTG Series Programming Manual
_________________________________________________________________
13
Query syntax: None
*ESE
This command sets the Standard Event Enable register bits in the PSU. A 1 in the bit position
enables the corresponding event. All of the enabled events of the Standard Event Enable
Register are logically ORed sets the Event Summary Bit (ESB) of the Status Byte Register.
Command syntax: *ESE <NR1>
Parameter: 0~255
The value when power on: refer to *PSC command.
Example: *ESE 128
Query syntax: *ESE?
Returned parameter: <NR1> (returns a decimal value which corresponds to the
binary-weighted sum of all bits in the Standard Event Enable register)
Related commands: *ESR?、*PSC、*STB?
*ESR?
Standard Event Register Query. Reading the Standard Event register clears it.
Query syntax: *ESR?
Parameter: None
Returned parameter: <NR1> (returns a decimal value which corresponds to the
binary-weighted sum of all bits in the Standard Event register)
Related commands: *CLS、*ESE、*OPC
*IDN?
Queries the manufacturer, model name, reserved code, and firmware version of the PSU.
Query syntax: *IDN?
Parameter: None
Return parameter example: Faith,FTG050-100-50,0,V1.00
*OPC
It causes the PSU to set the OPC bit (bit 0) of the Standard Event register. OPC bit value is “1”,
that is all commands before *OPC operation have been completed.

FTG Series Programming Manual
_________________________________________________________________
14
Command syntax: *OPC
Parameter: None
Query syntax: *OPC?
Returned parameter: <NR1>
Related commands: *TRG *WAI
*PSC
It determines to save or not for the Service Request Enable Register and Standard Event
Enable Register at the moment when PSU is powered on.
1: Not save. When powered on, the PSU will clear the Service Request Enable Register and
Standard Event Enable Register.
0: Save. When powered on, the data will not be cleared.
Command syntax: *PSC <bool>
Parameter: 0 | 1
Usage example: *PSC 1
Query syntax: *PSC?
Return: OFF | ON(return *PSC current status)
Related commands: *ESE, *SRE
*RST
Reset Command. Restores the PSU to its initial factory default state.
Command syntax: *RST
Parameter: None
Returned parameter: 无
Related commands: 无
*SRE
Sets or queries the Service Request Enable register. The Service Request Enable register
determines which bits of the Status Byte register are able to generate service requests.
The RQS bit of the Status Byte Register will be set “1” when the same bit are “1” for both
Status Byte Register and Service Request Enable Register.
Command syntax: *SRE <NR1>
Parameter: 0~255
Query syntax: *SRE?

FTG Series Programming Manual
_________________________________________________________________
15
Returned parameter: <NR1>
Related commands: *ESE *ESR *PSC
*STB?
Query Status Byte register. The Status Byte Register bits are cleared when it is read.
Command syntax: *STB?
Parameter: None
Returned parameter: <NR1>
Related commands: *CLS *ESE *ESR
*SAV
This command stores the current instrument state in the specified storage location. Any
state previously stored in the same location is overwritten without generating any errors.
The PSU has 20 storage locations in non-volatile memory which are available to the user for
storing PSU states. (location 1 ~ 20)
Command syntax: *SAV <NR1>
Parameter: 1~20
Usage example: *SAV 3
Query syntax: None
Related commands: *RCL
◎Caution:
*SAV command takes an excution time of 500ms, do not operate the instrument while
implementing this command.
*RCL
This command recalls the PSU state stored in the specified storage location. The PSU has 20
storage locations in non-volatile memory to store PSU states. It is not possible to recall the
PSU state from a storage location that is empty or was deleted.
Command syntax: *RCL <NR1>
Parameter: 1~20
Table of contents
Other Faithtech Power Supply manuals