func (d *Driver) SetCenterFreqKHz(mhz float32) (status vi.Status) {
	b := fmt.Sprintf("FREQ:CENT %f KHZ", mhz)
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}
SetCenterFreqKHz Sets the center crequency mhz.
package mxa
import (
	"fmt"
	"os"
	"strconv"
	"strings"
	vi "github.com/jpoirier/visa"
)
type Driver struct {
	vi.Driver
}
func OpenGpib(rm vi.Session, ctrl, addr, mode, timeout uint32) (*Driver, vi.Status) {
	name := fmt.Sprintf("GPIB%d::%d", ctrl, addr)
	instr, status := rm.Open(name, mode, timeout)
	if status < vi.SUCCESS {
		fmt.Println("Error, OpenGpib failed with error: ", status)
		os.Exit(0)
	}
	return &Driver{instr}, status
}
func OpenTCP(rm vi.Session, ip string, mode, timeout uint32) (*Driver, vi.Status) {
	if len(ip) == 0 {
		fmt.Println("Error, empty ip address string.")
		os.Exit(0)
	}
	name := fmt.Sprintf("TCPIP::%s::INSTR", ip)
	instr, status := rm.Open(name, mode, timeout)
	if status < vi.SUCCESS {
		fmt.Println("Error, OpenGpib failed with error: ", status)
		os.Exit(0)
	}
	return &Driver{instr}, status
}
func (d *Driver) SetScreenTitle(title string) (status vi.Status) {
	b := fmt.Sprintf("DISP:ANN:TITL:DATA '%s'", title)
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}
func (d *Driver) SaveScreenShot(name string) (status vi.Status) {
	b := fmt.Sprintf("MMEM:STOR:SCR '%s'", name)
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}
func (d *Driver) DeleteFile(name string) (status vi.Status) {
	b := fmt.Sprintf("MMEM:DEL '%s'", name)
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}
func (d *Driver) CreateFolder(name string) (status vi.Status) {
	b := fmt.Sprintf("MMEM:MDIR '%s'", name)
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}
func (d *Driver) SetTraceType(number int, stype string) (status vi.Status) {
	stype = strings.ToUpper(stype)
	var b string
	switch stype {
	default:
		return -1
	case "CLEAR", "WRITE":
		b = fmt.Sprintf("TRAC%d:TYPE WRITE", number)
	case "AVERAGE":
		b = fmt.Sprintf("TRAC%d:TYPE AVERAGE", number)
	case "MAX", "MAXH", "MAXHOLD":
		b = fmt.Sprintf("TRAC%d:TYPE MAXHOLD", number)
	case "MIN", "MINH", "MINHOLD":
		b = fmt.Sprintf("TRAC%d:TYPE MINHOLD", number)
	}
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}
func (d *Driver) SetTraceClearWrite(trace uint32) (status vi.Status) {
	b := fmt.Sprintf("TRAC%d:TYPE WRITE", trace)
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}
func (d *Driver) ClearTrace(trace uint32) (status vi.Status) {
	b := fmt.Sprintf("TRAC:CLEAR TRACE%d", trace)
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}
func (d *Driver) ClearAllTraces() (status vi.Status) {
	b := []byte("TRAC:CLEAR:ALL")
	_, status = d.Write(b, uint32(len(b)))
	return
}