
#metadef
#idString FeelElec,FeelElec FY6600-20M
#name FeelElec FY6600-20M
#handle FY6600

#replacetext FY6x00-xxM FY6600-20M
#replaceText MaxFrequency 20M
#replaceText MaxVpp 20
#replaceText MinOffset -10
#replaceText MaxOffset 10
#replaceText >CAL >10000
#sections WAVE1

#metadef
#idString FeelElec,FeelElec FY6600-30M
#name FeelElec FY6600-30M
#handle FY6600

#replacetext FY6x00-xxM FY6600-30M
#replaceText MaxFrequency 30M
#replaceText MaxVpp 20
#replaceText MinOffset -10
#replaceText MaxOffset 10
#replaceText >CAL >10000
#sections WAVE1

#metadef
#idString FeelElec,FeelElec FY6600-50M
#name FeelElec FY6600-50M
#handle FY6600

#replacetext FY6x00-xxM FY6600-50M
#replaceText MaxFrequency 50M
#replaceText MaxVpp 20
#replaceText MinOffset -10
#replaceText MaxOffset 10
#replaceText >CAL >10000
#sections WAVE1

#metadef
#idString FeelElec,FeelElec FY6600-60M
#name FeelElec FY6600-60M
#handle FY6600

#replacetext FY6x00-xxM FY6600-60M
#replaceText MaxFrequency 60M
#replaceText MaxVpp 20
#replaceText MinOffset -10
#replaceText MaxOffset 10
#replaceText >CAL >10000
#sections WAVE1

#metadef
#idString FeelElec,FeelElec FY6800-20M
#name FeelElec FY6800-20M
#handle FY6800

#replacetext FY6x00-xxM FY6800-20M
#replaceText MaxFrequency 20M
#replaceText MaxVpp 20
#replaceText MinOffset -10
#replaceText MaxOffset 10
#replaceText >CAL >10000
#sections WAVE1

#metadef
#idString FeelElec,FeelElec FY6800-30M
#name FeelElec FY6800-30M
#handle FY6800

#replacetext FY6x00-xxM FY6800-30M
#replaceText MaxFrequency 30M
#replaceText MaxVpp 20
#replaceText MinOffset -10
#replaceText MaxOffset 10
#replaceText >CAL >10000
#sections WAVE1

#metadef
#idString FeelElec,FeelElec FY6800-50M
#name FeelElec FY6800-50M
#handle FY6800

#replacetext FY6x00-xxM FY6800-50M
#replaceText MaxFrequency 50M
#replaceText MaxVpp 20
#replaceText MinOffset -10
#replaceText MaxOffset 10
#replaceText >CAL >10000
#sections WAVE1

#metadef
#idString FeelElec,FeelElec FY6800-60M
#name FeelElec FY6800-60M
#handle FY6800

#replacetext FY6x00-xxM FY6800-60M
#replaceText MaxFrequency 60M
#replaceText MaxVpp 20
#replaceText MinOffset -10
#replaceText MaxOffset 10
#replaceText >CAL >10000
#sections WAVE1

#metadef
#idString FeelElec,FeelElec FY6900-20M
#name FeelElec FY6900-20M
#handle FY6900

#replacetext FY6x00-xxM FY6900-20M
#replaceText MaxFrequency 20M
#replaceText MaxVpp 24
#replaceText MinOffset -12
#replaceText MaxOffset 12
#replaceText >CAL >12000
#sections WAVE2

#metadef
#idString FeelElec,FeelElec FY6900-30M
#name FeelElec FY6900-30M
#handle FY6900

#replacetext FY6x00-xxM FY6900-30M
#replaceText MaxFrequency 30M
#replaceText MaxVpp 24
#replaceText MinOffset -12
#replaceText MaxOffset 12
#replaceText >CAL >12000
#sections WAVE2

#metadef
#idString FeelElec,FeelElec FY6900-40M

#name FeelElec FY6900-40M
#handle FY6900

#replacetext FY6x00-xxM FY6900-40M
#replaceText MaxFrequency 40M
#replaceText MaxVpp 24
#replaceText MinOffset -12
#replaceText MaxOffset 12
#replaceText >CAL >12000
#sections WAVE2

#metadef
#idString FeelElec,FeelElec FY6900-50M
#name FeelElec FY6900-50M
#handle FY6900

#replacetext FY6x00-xxM FY6900-50M
#replaceText MaxFrequency 50M
#replaceText MaxVpp 24
#replaceText MinOffset -12
#replaceText MaxOffset 12
#replaceText >CAL >12000
#sections WAVE2

#metadef
#idString FeelElec,FeelElec FY6900-60M
#name FeelElec FY6900-60M
#handle FY6900

#replacetext FY6x00-xxM FY6900-60M
#replaceText MaxFrequency 60M
#replaceText MaxVpp 24
#replaceText MinOffset -12
#replaceText MaxOffset 12
#replaceText >CAL >12000
#sections WAVE2


#meta
#author MikeLud
#idString FeelElec,FeelElec FY6x00-xxM
#name FeelElec FY6x00-xxM
#handle FY6x00
#driver Ascii
#port comfixedbaud
#baudrate 115200

; There must be a line for each of the original device commands that will be used, converting it to a similar SCPI command
;#scpiCmd init tx command to init
;#scpiCmd values? txrx? command to read current value or values. It is possible to define value1?, value2?, etc. and then use them all with a ; between in the #askValues statement.

#scpiCmd Model? txrx? UMO

;Output_1
#scpiCmd C1:WRW txrx WMW (value)
#scpiCmd C1:RDW? txrx? RMW
#scpiCmd C1:WRF txrx WMF(formatDouble(value*1000000,0,14,0,0))
#scpiCmd C1:RDF? txrx? RMF
#scpiCmd C1:WRN txrx WMN (value)
#scpiCmd C1:RDN? txrx? RMN
#scpiCmd C1:WRA txrx WMA(formatDouble(value,1,2,4,4))
#scpiCmd C1:RDA? txrx? RMA
:readmath: double(value)/10000
#scpiCmd C1:WRO txrx WMO(formatDouble(value,0,2,3,3))
#scpiCmd C1:RDO? txrx? RMO
:readmath: double(value>CAL?value-4294967296:value)/1000
#scpiCmd C1:WRD txrx WMD(formatDouble(value,0,3,3,3))
#scpiCmd C1:RDD? txrx? RMD
:readmath: double(value)/1000
#scpiCmd C1:WRP txrx WMP(formatDouble(value,0,3,3,3))
#scpiCmd C1:RDP? txrx? RMP
:readmath: double(value)/1000

;Output_2
#scpiCmd C2:WRW txrx WFW (value)
#scpiCmd C2:RDW? txrx? RFW
#scpiCmd C2:WRF txrx WFF(formatDouble(value*1000000,0,14,0,0))
#scpiCmd C2:RDF? txrx? RFF
#scpiCmd C2:WRN txrx WFN (value)
#scpiCmd C2:RDN? txrx? RFN
#scpiCmd C2:WRA txrx WFA(formatDouble(value,0,2,4,4))
#scpiCmd C2:RDA? txrx? RFA
:readmath: double(value)/10000
#scpiCmd C2:WRO txrx WFO(formatDouble(value,0,2,3,3))
#scpiCmd C2:RDO? txrx? RFO
:readmath: double(value>CAL?value-4294967296:value)/1000
#scpiCmd C2:WRD txrx WFD(formatDouble(value,0,3,3,3))
#scpiCmd C2:RDD? txrx? RFD
:readmath: double(value)/1000
#scpiCmd C2:WMP txrx WMP(formatDouble(value,0,3,3,3))
#scpiCmd C2:RDP? txrx? RFP
:readmath: double(value)/1000

;Counter
#scpiCmd WCC txrx WCC (value)
#scpiCmd WCZ txrx WCZ (value)
#scpiCmd WCP txrx WCP (value)
#scpiCmd WCG txrx WCG (value)
#scpiCmd RCG? txrx? RCG
#scpiCmd RCF? txrx? RCF
#scpiCmd RCC? txrx? RCC
#scpiCmd RCT? txrx? RCT
#scpiCmd RC+? txrx? RC+
#scpiCmd RC-? txrx? RC-
#scpiCmd RCD? txrx? RCD
:readmath: double(value)/10

; Use these commands to get a full id line and prevent connection to other devices
;#verifyDevice value commandToGetvalue
#scpiCmd getDeviceSW? txrx? UVE
#scpiCmd getDeviceSN? txrx? UID
#verifyDevice FY6x00-xxM Model?

;Accept this delay when reading values (seconds)
#readingDelay 5

; Prepare the meter to response to #askValues
;#prepareSample

; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6)
#value Frequency1 Hz SI
#value Amplitude1 V D4
#value Offset1 V D3
#value DutyCycle1 % D3
#value Frequency2 Hz SI
#value Amplitude2 V D4
#value Offset2 V D3
#value DutyCycle2 % D3

; How to poll for data, this is used for table and #values?
; a #askMode, #cmdMode and #prepareSample is used before this is string is used.
; This is a single line command
#askValues C1:RDF?;C1:RDA?;C1:RDO?;C1:RDD?;C2:RDF?;C2:RDA?;C2:RDO?;C2:RDD?


; Switch meter to this mode during start, leave empty to avoid any switching
#initialMode 


; Prepare the meter to response to #askValues
;#prepareSample 


; Initial commands to meter when establishing connection
#initCmd

; Final command to meter before breaking connection
#finalCmd c2:WRN 0;c1:WRN 0

#outputOff c2:WRN 0;c1:WRN 0

#interfaceType ARB ARB:2
#interface setFrequency C(channel):WRF (value)
#interface setAmplitude C(channel):WRA (value)
#interface setOffset C(channel):WRO (value)
#interface setWaveform c(channel):WRW (value)
#interface setOn c(channel):WRN (value)
#interface getFrequency c(channel):RDF?
#interface getAmplitude c(channel):RDA?
#interface getOffset C(channel):RDO?
#interface getWaveform C(channel):RDW?
#interface getOn c(channel):RDN?
#interface readFrequency 0 4 
#interface readAmplitude 1 5
#interface readOffset 2 6
#interface readDutyCycle 3 7


; Strings to configure device in different modes
; First parameter must match a #value (4 parameter) and second parameter must match what #askMode returns
; First parameter is also used in shortcut menu
;#cmdMode 

; Setup menu functions
; The parameters on the first line is: type name page 
; Settings on the following lines are:
; read: SCPI to read value from device, is used to synchronize when opening setup page or setting equal named fields. Not always used
; readformat: Parse read value.
; write: Send the value to device, this field is used in combination with data fields in the details to send updates to device.
; tip: Add this tip to all components for this input field.

#cmdSetup color _ Output_1
(255,255,75)


#cmdSetup indicatornum State Output_1
:read: C1:RDN?
:updatealloff:
Off 0.0 silver
On 255.0 Green

#cmdSetup buttons State Output_1
:write: C1:WRN
:read: C1:RDN?
:update: State 
:updatedelayed: 0.1 
Off 0
On 255

#cmdSetup comboboxHot Waveform Output_1
:write: C1:WRW
:read: C1:RDW?
:update: Frequency P-P_Amplitude Offset Duty_cycle Phase
:updatedelayed: 0.1 
#metaSection WAVE1
sine 0
Square 1
CMOS 2
Adj-Pulse 3
DC 4
Triangle 5
Ramp 6
NegRamp 7
Stair_TRGL 8
Stairstep 9
NegStair 10
PosExponent 11 
NegExponent 12
P-Fall-Exp 13
N-Fall-Exp 14
PosLogarithm 15
NegLogarithm 16
P-Fall-Log 17
N-Fall-Log 18
P-Full_Wave 19
N-Full_Wave 20
P-Half_Wave 21
N-Half_Wave 22
Lorentz-Pulse 23
Multitone 24
Ramdom-Noise 25
ECG 26
Trapezoid 27
Sinc-Pulse 28
Impluse 29
AWGN 30
AM 31
FM 32
Chirp 33
ARB1 34
ARB2 35
ARB3 36
ARB4 37
ARB5 38
ARB6 39
ARB7 40
ARB8 41
ARB9 42
ARB10 43
ARB11 44
ARB12 45
ARB13 46
ARB14 47
ARB15 48
ARB16 49
ARB17 50
ARB18 51
ARB19 52
ARB20 53
ARB21 54
ARB22 55
ARB23 56
ARB24 57
ARB25 58
ARB26 59
ARB27 60
ARB28 61
ARB29 62
ARB30 63
ARB31 64
ARB32 65
ARB33 66
ARB34 67
ARB35 68
ARB36 69
ARB37 70
ARB38 71
ARB39 72
ARB40 73
ARB41 74
ARB42 75
ARB43 76
ARB44 77
ARB45 78
ARB46 79
ARB47 80
ARB48 81
ARB49 82
ARB50 83
ARB51 84
ARB52 85
ARB53 86
ARB54 87
ARB55 88
ARB56 89
ARB57 90
ARB58 91
ARB59 92
ARB60 93
ARB61 94
ARB62 95
ARB63 96
ARB64 97
#metaSection WAVE2
Sine 0
Square 1
Rectangle 2
Trapezoid 3
CMOS 4
Adj-Pulse 5
DC 6
Triangle 7
Ramp 8
NegRamp 9
Stair_TRGL 10
Stairstep 11
NegStair 12
PosExponent 13 
NegExponent 14
P-Fall-Exp 15
N-Fall-Exp 16
PosLogarithm 17
NegLogarithm 18
P-Fall-Log 19
N-Fall-Log 20
P-Full_Wave 21
N-Full_Wave 22
P-Half_Wave 23
N-Half_Wave 24
Lorentz-Pulse 25
Multitone 26
Ramdom-Noise 27
ECG 28
Trapezoid 29
Sinc-Pulse 30
Impulse 31
AWGN 32
AM 33
FM 34
Chirp 35
ARB1 36
ARB2 37
ARB3 38
ARB4 39
ARB5 40
ARB6 41
ARB7 42
ARB8 43
ARB9 44
ARB10 45
ARB11 46
ARB12 47
ARB13 48
ARB14 49
ARB15 50
ARB16 51
ARB17 52
ARB18 53
ARB19 54
ARB20 55
ARB21 56
ARB22 57
ARB23 58
ARB24 59
ARB25 60
ARB26 61
ARB27 62
ARB28 63
ARB29 64
ARB30 65
ARB31 66
ARB32 67
ARB33 68
ARB34 69
ARB35 70
ARB36 71
ARB37 72
ARB38 73
ARB39 74
ARB40 75
ARB41 76
ARB42 77
ARB43 78
ARB44 79
ARB45 80
ARB46 81
ARB47 82
ARB48 83
ARB49 84
ARB50 85
ARB51 86
ARB52 87
ARB53 88
ARB54 89
ARB55 90
ARB56 91
ARB57 92
ARB58 93
ARB59 94
ARB60 95
ARB61 96
ARB62 97
ARB63 98
ARB64 99
#metaSection

#cmdSetup number Frequency Output_1
:read: C1:RDF?
:write: C1:WRF
:string:
:tip: MaxFrequency is only possible in sine mode.
Hz 0 MaxFrequency


#cmdSetup number P-P_Amplitude Output_1
:read: C1:RDA?
:write: C1:WRA
:tip: Amplitude + offset must be within ±10V.
Vpp 1m MaxVpp

#cmdSetup number Offset Output_1
:read: C1:RDO?
:write: C1:WRO
:tip: Amplitude + offset must be within ±10V.
V MinOffset MaxOffset

#cmdSetup number Duty_cycle Output_1
:read: C1:RDD?
;:visible: inList(Output_1.Waveform,"1 3");
:write: C1:WRD
:tip: Duty cycle is used for square and pulse
% 0 99.999

#cmdSetup number Phase Output_1
:read: C1:RDP?
;:visible: inList(Output_1.Waveform,"1 3");
:write: C1:WRP
:tip: Duty cycle is used for square and pulse
Deg 0 359.999

;--------------------------------------------------------------------------------------

#cmdSetup color _ Output_2
(0,191,255)

#cmdSetup indicatornum State Output_2
:read: C2:RDN?
:updatealloff:
Off 0 silver
On 255 Green


#cmdSetup buttons State Output_2
:write: C2:WRN
:read: C2:RDN?
:update: State 
:updatedelayed: 0.1 
Off 0
On 255

#cmdSetup comboboxHot Waveform Output_2
:write: C2:WRW
:read: C2:RDW?
:update: Frequency P-P_Amplitude Offset Duty_cycle Phase
:updatedelayed: 0.1 
#metaSection WAVE1
sine 0
Square 1
CMOS 2
Adj-Pulse 3
DC 4
Triangle 5
Ramp 6
NegRamp 7
Stair_TRGL 8
Stairstep 9
NegStair 10
PosExponent 11 
NegExponent 12
P-Fall-Exp 13
N-Fall-Exp 14
PosLogarithm 15
NegLogarithm 16
P-Fall-Log 17
N-Fall-Log 18
P-Full_Wave 19
N-Full_Wave 20
P-Half_Wave 21
N-Half_Wave 22
Lorentz-Pulse 23
Multitone 24
Ramdom-Noise 25
ECG 26
Trapezoid 27
Sinc-Pulse 28
Impluse 29
AWGN 30
AM 31
FM 32
Chirp 33
ARB1 34
ARB2 35
ARB3 36
ARB4 37
ARB5 38
ARB6 39
ARB7 40
ARB8 41
ARB9 42
ARB10 43
ARB11 44
ARB12 45
ARB13 46
ARB14 47
ARB15 48
ARB16 49
ARB17 50
ARB18 51
ARB19 52
ARB20 53
ARB21 54
ARB22 55
ARB23 56
ARB24 57
ARB25 58
ARB26 59
ARB27 60
ARB28 61
ARB29 62
ARB30 63
ARB31 64
ARB32 65
ARB33 66
ARB34 67
ARB35 68
ARB36 69
ARB37 70
ARB38 71
ARB39 72
ARB40 73
ARB41 74
ARB42 75
ARB43 76
ARB44 77
ARB45 78
ARB46 79
ARB47 80
ARB48 81
ARB49 82
ARB50 83
ARB51 84
ARB52 85
ARB53 86
ARB54 87
ARB55 88
ARB56 89
ARB57 90
ARB58 91
ARB59 92
ARB60 93
ARB61 94
ARB62 95
ARB63 96
ARB64 97
#metaSection WAVE2
Sine 0
Square 1
Rectangle 2
Trapezoid 3
CMOS 4
Adj-Pulse 5
DC 6
Triangle 7
Ramp 8
NegRamp 9
Stair_TRGL 10
Stairstep 11
NegStair 12
PosExponent 13 
NegExponent 14
P-Fall-Exp 15
N-Fall-Exp 16
PosLogarithm 17
NegLogarithm 18
P-Fall-Log 19
N-Fall-Log 20
P-Full_Wave 21
N-Full_Wave 22
P-Half_Wave 23
N-Half_Wave 24
Lorentz-Pulse 25
Multitone 26
Ramdom-Noise 27
ECG 28
Trapezoid 29
Sinc-Pulse 30
Impulse 31
AWGN 32
AM 33
FM 34
Chirp 35
ARB1 36
ARB2 37
ARB3 38
ARB4 39
ARB5 40
ARB6 41
ARB7 42
ARB8 43
ARB9 44
ARB10 45
ARB11 46
ARB12 47
ARB13 48
ARB14 49
ARB15 50
ARB16 51
ARB17 52
ARB18 53
ARB19 54
ARB20 55
ARB21 56
ARB22 57
ARB23 58
ARB24 59
ARB25 60
ARB26 61
ARB27 62
ARB28 63
ARB29 64
ARB30 65
ARB31 66
ARB32 67
ARB33 68
ARB34 69
ARB35 70
ARB36 71
ARB37 72
ARB38 73
ARB39 74
ARB40 75
ARB41 76
ARB42 77
ARB43 78
ARB44 79
ARB45 80
ARB46 81
ARB47 82
ARB48 83
ARB49 84
ARB50 85
ARB51 86
ARB52 87
ARB53 88
ARB54 89
ARB55 90
ARB56 91
ARB57 92
ARB58 93
ARB59 94
ARB60 95
ARB61 96
ARB62 97
ARB63 98
ARB64 99
#metaSection

#cmdSetup number Frequency Output_2
:read: C2:RDF?
:write: C2:WRF
:tip: MaxFrequency is only possible in sine mode.
Hz 0 MaxFrequency

#cmdSetup number P-P_Amplitude Output_2
:read: C2:RDA?
:write: C2:WRA
:tip: Amplitude + offset must be within ±10V.
Vpp 1m MaxVpp

#cmdSetup number Offset Output_2
:read: C2:RDO?
:write: C2:WRO
:tip: Amplitude + offset must be within ±10V.
V MinOffset MaxOffset

#cmdSetup number Duty_cycle Output_2
:read: C2:RDD?
;:visible: inList(Output_1.Waveform,"1 3");
:write: C2:WRD
:tip: Duty cycle is used for square and pulse
% 0 99.999

#cmdSetup number Phase Output_2
:read: C2:RDP?
;:visible: inList(Output_1.Waveform,"1 3");
:write: C2:WRP
Deg 0 359.999
