from Common.Enumerations import PowerState from Common.Enumerations import Transition from Common.Enumerations import PowerState from Common.Enumerations import Transition from Common.Enumerations import Protocol from Common.Enumerations import RailTestMode # from Common.Enumerations import MeasurementItemType # from Common.Enumerations import MeasurementItemUnit from System import String, Char, Int32, UInt16, Boolean, Array, Byte, Double from System.Collections.Generic import List from System.Collections.Generic import Dictionary gen = GeneratorAPI() rails = gen.GetRails() dat = DataAPI() data = DataAPI() display = DisplayAPI() Measurment = MeasurementAPI() #items = MeasurementItemsAPI() from openpyxl.chart import ( ScatterChart, Reference, Series, ) def vr14_3d(rail_name="VCCIN", vout_list=[1.83, 1.73], start_freq=1,
import clr, os, sys, time import numpy as np from instr.gpib_equip import SorensonMM2 import openpyxl from openpyxl import load_workbook, Workbook #sys.path.append(os.path.join(sys.path[0],'intel')) from Common.APIs import DataAPI, DisplayAPI, MeasurementAPI, MeasurementItemsAPI, GeneratorAPI, VectorAPI from Common.Models import TriggerModel, FanModel, RawDataModel, DataModel, DisplayModel from Common.Enumerations import HorizontalScale, ScoplessChannel, Cursors, PowerState, Transition, Protocol, RailTestMode generator_api = GeneratorAPI() rails = generator_api.GetRails() data_api = DataAPI() display_api = DisplayAPI() measurement_api = MeasurementAPI() measurement_items_api = MeasurementItemsAPI() vector_api = VectorAPI() def define_rail_data(testrail): rail = None for r in list(generator_api.GetRails()): if r.Name == testrail: rail = r if rail is None: print( 'Test failed because the test rail could not be found. Please check the rail name.' )
#from CommonBL import * from Common.Enumerations import PowerState from Common.Enumerations import Transition from Common.Enumerations import PowerState from Common.Enumerations import Transition from Common.Enumerations import Protocol from Common.Enumerations import RailTestMode from Common.Enumerations import ScoplessChannel from System import String, Char, Int32, UInt16, Boolean, Array, Byte, Double from System.Collections.Generic import List from System.Collections.Generic import Dictionary gen = GeneratorAPI() rails = gen.GetRails() data = DataAPI() display = DisplayAPI() Measurment = MeasurementAPI() vector = VectorAPI() mn = MainAPI() ##Set-up Excel ######### wb = Workbook() ws1 = wb.create_sheet(title="Load Test", index=1) from openpyxl.chart import ( ScatterChart, Reference, Series, )
# Author - G.Kidwell. # # 12/2/20 - Modified from Intel Preemptive_SVID_Example.py # import clr,sys,os,time,openpyxl #sys.path.append(r'C:\Users\gkidw\Gen5_python36_32\GEN5\PythonScripts') sys.path.append(os.path.join(sys.path[0],'intel')) from Common.APIs import DataAPI, VectorAPI, MainAPI, DisplayAPI, MeasurementAPI, GeneratorAPI from Common.Enumerations import HorizontalScale, ScoplessChannel, Transition, SVIDCMD, SVIDBURSTTRIGGER generator_api = GeneratorAPI(); display_api = DisplayAPI() data_api = DataAPI(); measurement_api = MeasurementAPI() vector_api = VectorAPI(); main_api = MainAPI() def setup_tool_display(testrail,startvoltage,testcurrent): generator_api.AssignRailToDriveOne(testrail) display_api.Ch1_2Rail(testrail) display_api.DisplayDigitalSignal("SVID1ALERT") display_api.DisplayDigitalSignal("CSO1#") display_api.SetChannel(ScoplessChannel.Ch1, True) display_api.SetChannel(ScoplessChannel.Ch2, True) display_api.SetHorizontalScale(HorizontalScale.Scale20us) max_voltage = max(startvoltage,0) min_voltage = 0 display_api.SetVerticalVoltageScale(min_voltage * 0.8, max_voltage * 1.2) display_api.SetVerticalCurrentScale(testcurrent * .8, testcurrent * 1.2) def setup_initial_voltage_and_current(testrail,startvoltage,testcurrent):
low_current = 38 # Low current level (A) duty_cycle = 32 # Duty cycle (%) start_frequency = 1 # Start frequency (kHz) end_frequency = 1000 # End frequency (kHz) drive_rise_time = 100 drive_fall_time = 100 samples_per_decade = 50 num_decades = log10(end_frequency) - log10(start_frequency) frequency_list = numpy.logspace(log10(start_frequency), log10(end_frequency), int(num_decades * samples_per_decade), True) # frequency_list = [10,20,30,123] # Can specify frequencies explicitly generator_api = GeneratorAPI() rails = generator_api.GetRails() data_api = DataAPI() display_api = DisplayAPI() measurement_api = MeasurementAPI() measurement_items_api = MeasurementItemsAPI() # Set-up Excel ######### wb = Workbook() ws1 = wb.create_sheet(title="Load Test", index=1) file_name = os.path.join( sys.path[0], 'FDIM' + time.strftime("_%j_%M_%S", time.localtime()) + ".xlsx") # End Of imports print( "##############################################################################" )
from Common.Enumerations import Cursors from Common.APIs import MeasurementAPI from Common.APIs import GeneratorAPI from Common.Enumerations import PowerState from Common.Enumerations import Transition from Common.Enumerations import Protocol from Common.Enumerations import RailTestMode from Common.Enumerations import FRAME from Common.Enumerations import SVIDBURSTTRIGGER from Common.Enumerations import ScoplessChannel from System import String, Char, Int32, UInt16, Boolean, Array, Byte, Double from System.Collections.Generic import List gen = GeneratorAPI() display = DisplayAPI() data = DataAPI() Meas = MeasurementAPI() vector = VectorAPI() api = MainAPI() def Load_All_Vectors_function(repeat=0, svid_bus=0): vector.LoadAllVectors(repeat, svid_bus) def PrintVector(index, SVID_address, SVID_command, SVID_payload, SVID_delay, Vector_active): if Vector_active == 1: print(index + 1, '\t', SVID_address, '\t', SVID_command, '\t', hex(SVID_payload), '\t', SVID_delay) else:
# Author - G.Kidwell. # # 12/2/20 - Modified from Intel Preemptive_SVID_Example.py # import clr, sys, os, time, openpyxl #sys.path.append(r'C:\Users\gkidw\Gen5_python36_32\GEN5\PythonScripts') sys.path.append(os.path.join(sys.path[0], 'intel')) from Common.APIs import DataAPI, VectorAPI, MainAPI, DisplayAPI, MeasurementAPI, GeneratorAPI from Common.Enumerations import HorizontalScale, ScoplessChannel, Transition, SVIDCMD, SVIDBURSTTRIGGER generator_api = GeneratorAPI() display_api = DisplayAPI() data_api = DataAPI() measurement_api = MeasurementAPI() vector_api = VectorAPI() main_api = MainAPI() def setup_tool_display(testrail, startvoltage, testcurrent): generator_api.AssignRailToDriveOne(testrail) display_api.Ch1_2Rail(testrail) display_api.DisplayDigitalSignal("SVID1ALERT") display_api.DisplayDigitalSignal("CSO1#") display_api.SetChannel(ScoplessChannel.Ch1, True) display_api.SetChannel(ScoplessChannel.Ch2, True) display_api.SetHorizontalScale(HorizontalScale.Scale20us) max_voltage = max(startvoltage, 0) min_voltage = 0
from Common.Enumerations import VECTORINDEX from Common.Enumerations import FRAME from Common.Enumerations import SVIDCMD from Common.Enumerations import SPARITY from Common.Enumerations import VSTATUS from Common.Enumerations import DACTRIGCHN from Common.Enumerations import SVIDBUSVECTORS from Common.Enumerations import SVIDBURSTTRIGGER #from CommonBL import * from System import String, Char, Int32, UInt16, Boolean, Array, Byte, Double from System.Collections.Generic import List gen = GeneratorAPI() display = DisplayAPI() data = DataAPI() meas = MeasurementAPI() vector = VectorAPI() api = MainAPI() ########## End of imports print( "##############################################################################" ) print( "------------------------------------------------------------------------------" ) print( " Vector PS Transition " ) print(