Skip to content

Commit

Permalink
Merge 12bf1e5 into 162a80a
Browse files Browse the repository at this point in the history
  • Loading branch information
jharajeev55 authored Sep 20, 2024
2 parents 162a80a + 12bf1e5 commit 285517c
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
Fixed -- for any bug fixes.
Security -- in case of vulnerabilities.
-->
## [0.18.0]

### Added
- Added language feature support for 2651A, 2657A and 2601B-PULSE models
- **tsp-toolkit-webhelp:** Added webhelp documents for 2651A, 2657A and 2601B-PULSE models

## [0.16.0]

### Fixed
Expand Down
23 changes: 18 additions & 5 deletions Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,32 @@ class Confiurations:
"2600B",
"2651A",
"2657A",
"2601B-PULSE"
]

MODEL_2650A_CHANNELS= {"2651A":["a"],
"2657A":["a"],
}
MODEL_2600B_MODELS = [
"2601B",
"2611B",
"2635B",
"2604B",
"2614B",
"2602B",
"2612B",
"2634B",
"2636B"
]

MODEL_2600B_CHANNELS= {"2601B":["a"],
MODEL_CHANNELS= {"2601B":["a"],
"2611B":["a"],
"2635B": ["a"],
"2604B": ["a", "b"],
"2614B": ["a", "b"],
"2602B": ["a", "b"],
"2612B": ["a", "b"],
"2634B": ["a", "b"],
"2636B": ["a", "b"]
"2636B": ["a", "b"],

"2651A":["a"],
"2657A":["a"],
"2601B-PULSE": ["a"]
}
20 changes: 20 additions & 0 deletions Json_parser/StaticLuaDefinations/2601B-PULSE/digioTriggerModes.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
digio.TRIG_BYPASS = nil
digio.TRIG_FALLING = nil
digio.TRIG_RISING = nil
digio.TRIG_EITHER = nil
digio.TRIG_SYNCHRONOUSA = nil
digio.TRIG_SYNCHRONOUS = nil
digio.TRIG_SYNCHRONOUSM = nil
digio.TRIG_RISINGA = nil
digio.TRIG_RISINGM = nil

---@alias digioTriggerModes
---| `digio.TRIG_BYPASS`
---| `digio.TRIG_FALLING`
---| `digio.TRIG_RISING`
---| `digio.TRIG_EITHER`
---| `digio.TRIG_SYNCHRONOUSA`
---| `digio.TRIG_SYNCHRONOUS`
---| `digio.TRIG_SYNCHRONOUSM`
---| `digio.TRIG_RISINGA`
---| `digio.TRIG_RISINGM`
30 changes: 30 additions & 0 deletions Json_parser/StaticLuaDefinations/2601B-PULSE/statsVartype.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---@meta

---@class statsVar
---@field min min
---@field mean number
---@field stddev number
---@field n number
---@field max max

---@class min
---@field measurefunction string
---@field measurerange number
---@field reading number
---@field sourcefunction string
---@field sourceoutputstate string
---@field sourcerange number
---@field sourcevalue number
---@field status number
---@field timestamp number

---@class max
---@field measurefunction string
---@field measurerange number
---@field reading number
---@field sourcefunction string
---@field sourceoutputstate string
---@field sourcerange number
---@field sourcevalue number
---@field status number
---@field timestamp number
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
tsplink.TRIG_BYPASS = nil
tsplink.TRIG_FALLING = nil
tsplink.TRIG_RISING = nil
tsplink.TRIG_EITHER = nil
tsplink.TRIG_SYNCHRONOUSA = nil
tsplink.TRIG_SYNCHRONOUS = nil
tsplink.TRIG_SYNCHRONOUSM = nil
tsplink.TRIG_RISINGA = nil
tsplink.TRIG_RISINGM = nil

---@alias tsplinkTriggerModes
---| `tsplink.TRIG_BYPASS`
---| `tsplink.TRIG_FALLING`
---| `tsplink.TRIG_RISING`
---| `tsplink.TRIG_EITHER`
---| `tsplink.TRIG_SYNCHRONOUSA`
---| `tsplink.TRIG_SYNCHRONOUS`
---| `tsplink.TRIG_SYNCHRONOUSM`
---| `tsplink.TRIG_RISINGA`
---| `tsplink.TRIG_RISINGM`
18 changes: 10 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ def parse_web_help_files(webHelpFoldersDir):
if dir in Confiurations.SUPPORTED_MODELS:
Confiurations.HELP_FILE_FOLDER_PATH = folder
if str(dir).find("2600B")!= -1:
for model in Confiurations.MODEL_2600B_CHANNELS.keys():
for model in Confiurations.MODEL_2600B_MODELS:
Confiurations.MODEL_NUMBER = model
Confiurations.CHANNELS = Confiurations.MODEL_2600B_CHANNELS.get(model)
Confiurations.CHANNELS = Confiurations.MODEL_CHANNELS.get(model)
parse()

elif str(dir).find("2651A")!= -1 or str(dir).find("2657A")!= -1:
Confiurations.CHANNELS = Confiurations.MODEL_2650A_CHANNELS.get(dir)
Confiurations.MODEL_NUMBER = dir
parse()


else:
Confiurations.CHANNELS = Confiurations.MODEL_CHANNELS.get(dir)
Confiurations.MODEL_NUMBER = dir
parse()
else:
Expand All @@ -58,6 +54,12 @@ def parse():
except:
command= ""

# for 2601B-PULSE the commands are already having smua.
# Making this to similar to other 2600 models
if Confiurations.MODEL_NUMBER == "2601B-PULSE" and command.startswith('smua.'):
command = command.replace("smua", "smuX")


if command == "*CLS" or command == "*ESR?" or command == "*OPC" or command == "*OPC?" or command == "*ESE" or command == "*ESE?" or command == "*IDN?" or command == "*LANG?" or command == "*LANG" or command == "*RST" or command == "*SRE?" or command == "*SRE" or command == "*STB?" or command == "*TRG" or command == "*TST?" or command == "*WAI":
continue

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tektronix/keithley_instrument_libraries",
"version": "0.16.0",
"version": "0.18.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 285517c

Please sign in to comment.