From 1a8d921a5bf20c5f96ddc45319e71ed70ba6abb6 Mon Sep 17 00:00:00 2001
From: Nicolas Roisin <nicolas.roisin@uclouvain.be>
Date: Thu, 20 Mar 2025 15:49:59 +0100
Subject: [PATCH] equipment script

---
 How to collaborate.docx                       |   0
 README.md                                     |  15 +--
 README_back.md                                |  93 ------------------
 Use and acknowledgement.docx                  |   0
 .../__pycache__/cm110.cpython-311.pyc         | Bin 0 -> 4172 bytes
 .../__pycache__/equipment.cpython-311.pyc     | Bin 5116 -> 7160 bytes
 .../__pycache__/kal100.cpython-311.pyc        | Bin 0 -> 5049 bytes
 equipment_control/cm110.py                    |  10 +-
 .../example/single_equipment/cm110_script.py  |  45 +++++++++
 .../example/single_equipment/dmm_script.py    |  10 +-
 .../example/single_equipment/hp4145_script.py |   6 +-
 .../example/single_equipment/k2400_script.py  |   9 +-
 .../example/single_equipment/k2450_script.py  |   9 +-
 .../example/single_equipment/k4200_script.py  |  10 +-
 .../example/single_equipment/kal100_script.py |  45 +++++++++
 .../example/single_equipment/sh242_script.py  |  52 ++++++++++
 equipment_control/kal100.py                   |  46 +++++----
 equipment_control/temp.py                     |  35 +++++++
 18 files changed, 238 insertions(+), 147 deletions(-)
 delete mode 100644 How to collaborate.docx
 delete mode 100644 README_back.md
 delete mode 100644 Use and acknowledgement.docx
 create mode 100644 equipment_control/__pycache__/cm110.cpython-311.pyc
 create mode 100644 equipment_control/__pycache__/kal100.cpython-311.pyc
 create mode 100644 equipment_control/example/single_equipment/cm110_script.py
 create mode 100644 equipment_control/example/single_equipment/kal100_script.py
 create mode 100644 equipment_control/example/single_equipment/sh242_script.py
 create mode 100644 equipment_control/temp.py

diff --git a/How to collaborate.docx b/How to collaborate.docx
deleted file mode 100644
index e69de29..0000000
diff --git a/README.md b/README.md
index 5853e68..7ca37ab 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,8 @@
 
 ## Description
 Data analysis and Operation Software (DOpeS) provides a set of tools for 
-1. Data analysis for data coming from lab equipment such as Raman spectrometer, white-light interferometer, ...
-2. Controlling lab equipment such as multimeter, source measurement units, pressure generator, climatic chamber, monochromator, ...
+1. the analysis of data coming from lab equipment such as Raman spectrometer, white-light interferometer, ...
+2. the control of lab equipment such as multimeter, source measurement units, pressure generator, climatic chamber, monochromator, ...
 
 ## Structure
 - **data_analysis** for the analysis of lab equipment:
@@ -18,18 +18,13 @@ Data analysis and Operation Software (DOpeS) provides a set of tools for
     - Monochromator *CM110*
     - Pressure generator and monitor *KAL100* 
     - Climatic chamber *SH242* (sh242.py)
-    - script examples for the equipments
 
 ## Requirements
 DOpeS is made from functions, classes and scripts based on Python programming lanquage. The following packages are required for the data analysis and the equipment control:
 - <a href=https://pypi.org/project/numpy/> **Numpy** </a> for the data handling and processing
 - <a href=https://pypi.org/project/scipy/> **SciPy** </a> for the data processing tools such as interpolation and filtering (only for *data_analysis* part)
 - <a href=https://pypi.org/project/PyVISA/> **Pyvisa** </a> for the communication with equipment (only for *equipment_control* part)
-
-The python packages can be installed from python the Python Package Index (pip):
-```
-pip install numpy, scipy, pyvisa
-```
+- <a href=https://pypi.org/project/pyserial/> **Pyserial** </a> for the serial communication with equipment (only for *equipment_control* part)
 
 
 ## Installation
@@ -52,7 +47,7 @@ import sys
 sys.path.insert(1, '/path/to/dopes')
 ```
 
-The various tools can then be accessed as any python packages and classes:
+The various tools can then be accessed as any python package and class:
 ```
 import equipment_control.equipment as eq
 import equipment_control.k2400 as k2400
@@ -64,7 +59,7 @@ import data_analysis.raman as ram
 We welcome any feedback on issued, missing operation or equipment but also idea for further improvements.
 
 ## Authors and acknowledgment
-The intitial idea of this project has been thought by **Loïc Lahaye** with the help of **Nicolas Roisin**.
+The initial idea of this project has been thought by **Loïc Lahaye** with the help of **Nicolas Roisin**.
 
 ## License
  DOpeS © 2025 by Loïc Lahaye and Nicolas Roisin is licensed under <a href=https://creativecommons.org/licenses/by-nc-sa/4.0/> Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International </a> (<a href=https://creativecommons.org/licenses/by-nc-sa/4.0/> CC BY-NC-SA 4.0</a>) 
diff --git a/README_back.md b/README_back.md
deleted file mode 100644
index d87b50e..0000000
--- a/README_back.md
+++ /dev/null
@@ -1,93 +0,0 @@
-# ChOpeS
-
-
-
-## Getting started
-
-To make it easy for you to get started with GitLab, here's a list of recommended next steps.
-
-Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
-
-## Add your files
-
-- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
-- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
-
-```
-cd existing_repo
-git remote add origin https://forge.uclouvain.be/LocLahaye/chopes.git
-git branch -M main
-git push -uf origin main
-```
-
-## Integrate with your tools
-
-- [ ] [Set up project integrations](https://forge.uclouvain.be/LocLahaye/chopes/-/settings/integrations)
-
-## Collaborate with your team
-
-- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
-- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
-- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
-- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
-- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
-
-## Test and Deploy
-
-Use the built-in continuous integration in GitLab.
-
-- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
-- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
-- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
-- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
-- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
-
-***
-
-# Editing this README
-
-When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
-
-## Suggestions for a good README
-
-Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
-
-## Name
-Choose a self-explaining name for your project.
-
-## Description
-Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
-
-## Badges
-On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
-
-## Visuals
-Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
-
-## Installation
-Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
-
-## Usage
-Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
-
-## Support
-Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
-
-## Roadmap
-If you have ideas for releases in the future, it is a good idea to list them in the README.
-
-## Contributing
-State if you are open to contributions and what your requirements are for accepting them.
-
-For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
-
-You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
-
-## Authors and acknowledgment
-Show your appreciation to those who have contributed to the project.
-
-## License
-For open source projects, say how it is licensed.
-
-## Project status
-If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
diff --git a/Use and acknowledgement.docx b/Use and acknowledgement.docx
deleted file mode 100644
index e69de29..0000000
diff --git a/equipment_control/__pycache__/cm110.cpython-311.pyc b/equipment_control/__pycache__/cm110.cpython-311.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1553e0925545cc597fbb0e31ac92af776f35abc7
GIT binary patch
literal 4172
zcmeHKO>7&-6`tjvRum=6apXXiYfmCO5K~B^tSF6H$F}S^k`IxM$d?iZHtXFrxdL~W
znOT-Fp#%i#gHaS{Z@RRAQM7Ii_uykM1=^l^Bntv1HZTw%=s`CHPA|En@6GNGwUUzt
zMvonmk2CM>y!rdS_hx@TKAtB~-v8I9)vuxUIX2>wjVjO9p|V3vVk&jwC>2Es>#0gg
z=+c#RimVYcb&r^7OW9Il2M^PPJceIbDj8GRB*n}wHaCn&EB;bZ<Jo1X>=27o6qA5=
zrII#N&@Wxdnwd(@%-$oF5p%*+?<p14JYweIf7F~b$KXG27Qi}Yj>8y7gRJ2!EtT4*
zuhezUsqaz4bA9I3>6Q0EPaV(oj2iPC-S=3K70UMHX2UXkrq}5W=9x{yZ@*si{RS^D
zF1A{&1s+)&p^+~bp0g-=8u9#b86)t+H9z|V#18T0ZV)ounQg^Xe6Yu5OL|CX<=!Q<
znYh;<QxD;c9>?cIwuvU|W*Yap{b%}K(=~kCbE%=%>y}AdHOr;COKq3?x@%a}yF>k&
zMGdi2Hm3%&bl)=bG%B)!ZJkwlIiW%AJZ*T)r*qtAwp%UIa_G@>8cp9~p%KoYR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2`7k|L`Q_@Vk?+dAkI*Xrnk1q#?ivYOoWa
z7Q|rR#~P*sb_zsHi2QIt>{ZYQ1=v+BX5;}XOrUMpq5X15hotrm@WOQvK#2)5J@f13
z2l+pgpBRrW^ys-iE%#1c=*?X0&s_XV{_o3wo#?)D{eIyP^3V5XFZE|H_0-kAy4qD&
zzXkcv2mQ}r{GAt0C??S3f0fkC6kNN~x_%hE2V%cGN<<Ns`4|`fPaEHwHmKY=Cb9y<
zpj=FgfX^t@1+Y0@SzuSgpbkjJ?bjma4UxQGy8=D<B@lq*JQ*E-ftbE8L>qtrSul!<
zTiDxB`7S_x2+uv1-Qj%;-<(qIcM=yBqwewWjsp1@FTC+h8gKh88{#8I8+j|G8^u(V
zKt<1@BKC~qM5BG06b8J$;)NXCw2z0JKd65P`fv;}9kM_B_0-dS^>jD>id==G9)~B{
zD<ELZ)8U_J74Ty0>W-ypL0;1wc<ZWTy`X6yHT8OA8PPP;GeDh%2dsK90xw<--Mt&6
zo2<@WM&Gk2et=>gMG3?sB8C?LU>Ve+z{JUa3Zf%FpJf)hnT0|AXy@vnaI&*DP)nUF
zdznHuzel7vIi7uWk0iy(QPd^H@f_-sVltIIvquh#aDF%|c*U8K=M=v^EJ#f-Dyv~g
z$E#1cCIr-QonNWv!#%vf@SOrrmVXFhFRdubfGl>C-vJrxh|hqGcf@BeQ&wQEhsFJC
Q{lcj)(D3DRtYQZL0f}Vc^8f$<

literal 0
HcmV?d00001

diff --git a/equipment_control/__pycache__/equipment.cpython-311.pyc b/equipment_control/__pycache__/equipment.cpython-311.pyc
index 83a47f5dd9896150bb92f4f2dfbbd2fe940651ea..ccc66f67e0f1cff8171944478d0dc59abed12789 100644
GIT binary patch
literal 7160
zcmcgxU2Gf25x(O;#iK;ZvMoD`bhgDvR3sVxsY?s7lmv=pC$;P(PK&Az4rkuUI)^;U
zcSrva6d(k7par3!jR02C1YwIdRge}i3ZuwlfucYk?}P(H9ALmeVHAE->-I%2?acj=
zCzEdS(&civw>!5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i(};-e^*?
z&lT;wGf~LXSEKE;5Z#7ldM&zBe-V_NL-5oqXjzHSYSiS}{5aaPFpBG{_Q~j_(aT3}
zy<0P%dtmn6H~XsQo|?JmfjM~J9Q?jmH4oR!!_~-eRUN6RBTMQC6#nw5Te+&Txu$Gx
zAWqs|kC|VnH`Uu?)!2?&Y)1oOZMz4TeRU(W=)dZ}?z=vAL%O~7hF&$gYex4H`{VBK
z?#2l2WOav5K*DSmywFK6@FSVAv`Y84_b#}?RKc<*U4O1HHJ#1RxqOLCl6KG`tVCox
z1J+B)F@QUWup_;mNesp@2*PmQ2dJ$5mVK!uUus#^E5mi&sEpQSwQ{K8^9chD^fW9C
zG*nr5p@G(*T@>~=&>DoXkb;0)AZ`=F4YUq4@8(_02e(Q4n{DqU;9VhKnwp*?gTNEk
z*1i5t46iG^!PaYWtpxT$N=lRVAbE@0@!cnR+|@w;2bse<)Taf3V;IA=o{fKb`;XU=
HdVc={Fa3uw

diff --git a/equipment_control/__pycache__/kal100.cpython-311.pyc b/equipment_control/__pycache__/kal100.cpython-311.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..84492bed45d4149ecd557d603aae5fefaeb2d078
GIT binary patch
literal 5049
zcmd5=&2JmW6`$pj)RJ1-vSm4O6vtcAvc%Y?{80;ukhrxh#gZH|Or%4@INq)~BWdjw
zN$)PLnos~9d{6)%dUFmr2mxZta1ZItmjVX*4{(JAOl)hwKu^BWaC&ij=zF`|6)9V8
zE7U-TyKiUSn|bqQ=FR)f@NOazCy@U7kH5_SIYG$Zu;8aiEAxC3GPemOl+(x}m*+Sy
zAIgVZ9-rq!<Q$=)n}qU=yTbVj?(l@%hu2H_Fy&@QI{Xxi*+Pr!enPFn^A8|%n=q2+
zC;{zUo~I#b$LAw7oR8ATO_J}TJ8Ab#E-z3KN->%M8mBuzbB`0fs%XcL9jgwW)fB^!
z%#u_n6-~XQN$1ae3IeIDGsCFpOfqg5CR=o(9>3bNplF7vSIS416s@qp^y<ihX_k%A
z;o+s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t4z9c?7<hUi~k
z@nEo|nw#&p*>tFdKyJ%4=Pr(chPF_k#}(i$5pThurutTEAvOy>g+>PYMUD7#fiq|c
z2W{bC-GAJf$fhGM=IXeWTyS(Tb~fFOm(QZI$Yj}x%QB!-MZ>%(%hxK3){=C|GA$K=
z9YOfgoUQ`g<(1+Mhp*_Gz87_lAQ?sSF_3%2?bgLL9V3xTa6=ncfz*QElko9+_;@3}
zyEf4f->aQ#2*0kKZH5z(c#{O=y<bF5Hc2P>gcBpfO%jlILy>_dd6{^2pb6=S)Bn;f
zJQHx7Sdi5-Xz>mtuI&?;!|?2m=Y{Z*H%+JYN#Nnq85oV5JjZbjGF<O`8l=1C{u(4v
cbAQe76vu(Fucj+s+6n2IEBtwjDy}X60=T|lWB>pF

literal 0
HcmV?d00001

diff --git a/equipment_control/cm110.py b/equipment_control/cm110.py
index 73db0f5..96d502f 100644
--- a/equipment_control/cm110.py
+++ b/equipment_control/cm110.py
@@ -39,7 +39,7 @@ class cm110(equipment.equipment):
         self.serial_resource.write(serial.to_bytes(reset))
         time.sleep(waiting_time)
         
-    def set_wavelength(self, wavelength,waiting_time=10):
+    def set_wavelength(self, wavelength,waiting_time=5):
         """ Function to set the wavelength of the monochromator
         
             args:
@@ -50,6 +50,14 @@ class cm110(equipment.equipment):
         self.serial_resource.write(serial.to_bytes(set_position))
         time.sleep(waiting_time)
         
+    def select_grating(self, grating_number,waiting_time=30):
+        """ Function to select the gratin
+                - grating_number (int) : select the grating (Grating 1 : AG2400-00240-303 (2400 G/mm and 180 nm - 680 nm) and Grating 2 : AG1200-00750-303 (1200 G/mm and 480 nm - 1500 nm))
+                - waiting_time (int) : waiting time in seconds after changing the grating and reset to the initial position 
+        """
+        self.serial_resource.write(serial.to_bytes([26,grating_number]))
+        time.sleep(waiting_time)
+
     def close_connection(self):
         """ Function to close the  serial connection with the equipment """
         self.serial_resource.close()
diff --git a/equipment_control/example/single_equipment/cm110_script.py b/equipment_control/example/single_equipment/cm110_script.py
new file mode 100644
index 0000000..d6be335
--- /dev/null
+++ b/equipment_control/example/single_equipment/cm110_script.py
@@ -0,0 +1,45 @@
+
+
+# =============================================================================
+# 1. Import classes and modules
+# =============================================================================
+
+import sys
+#sys.path.insert(1, '/path/to/application/app/folder')
+sys.path.insert(1, 'D:/Roisin/Documents/chopes')
+
+import equipment_control.equipment as eq
+import equipment_control.cm110 as cm110
+
+# =============================================================================
+# 2. List  available connections (chopes use pyvisa package for communicate with most equipments)
+# =============================================================================
+rm=eq.resource_manager()
+list_connections= eq.available_connections()
+print("Available connections: %s"%str(list_connections))
+
+# =============================================================================
+# 3. Connection to the equipments
+# =============================================================================
+mycm110=cm110.cm110('COM5') # serial link through port COM5
+
+# =============================================================================
+# 4. Measurement parameters
+# =============================================================================
+wavelength=600
+grating=1 # Grating 1 : AG2400-00240-303 (2400 G/mm and 180 nm - 680 nm) and Grating 2 : AG1200-00750-303 (1200 G/mm and 480 nm - 1500 nm)
+
+# =============================================================================
+# 5. Initialization of the equipment
+# =============================================================================
+mycm110.initialize(grating_number=grating,waiting_time=30)
+
+# =============================================================================
+# 6. Set wavelength
+# =============================================================================
+# mycm110.set_wavelength(wavelength,waiting_time=1)
+
+# =============================================================================
+# 7. Close connection
+# =============================================================================
+mycm110.close_connection()
\ No newline at end of file
diff --git a/equipment_control/example/single_equipment/dmm_script.py b/equipment_control/example/single_equipment/dmm_script.py
index cf0643d..3cf3749 100644
--- a/equipment_control/example/single_equipment/dmm_script.py
+++ b/equipment_control/example/single_equipment/dmm_script.py
@@ -20,7 +20,7 @@ list_connections= eq.available_connections()
 print("Available connections: %s"%str(list_connections))
 
 # =============================================================================
-# 3. Connection to the equipments
+# 3. Connection to the equipment
 # =============================================================================
 mydmm=dmm.dmm('USB0::0x05E6::0x6500::04529651::INSTR',timeout=1e3)
 
@@ -31,7 +31,6 @@ units={"voltage":"V", "current":"A", "resistance":"Ohms", "4wires":"Ohms"}
 
 mode="current"
 autozero=True
-offset_compensation=True
 nplc=1
 digits=4
 continuous_trigger = False
@@ -41,11 +40,10 @@ file_path='temp.txt'
 t_init=time.time()
 
 # =============================================================================
-# 5. Initialization of the equipments
+# 5. Initialization of the equipment
 # =============================================================================
-mydmm.initialize( mode=mode, autozero=autozero, offset_compensation=offset_compensation, 
-                 continuous_trigger=continuous_trigger, digits=digits,nplc=nplc,disp_enable=disp_enable
-                 ,k2000=k2000)
+mydmm.initialize( mode=mode, autozero=autozero, continuous_trigger=continuous_trigger, 
+                 digits=digits,nplc=nplc,disp_enable=disp_enable,k2000=k2000)
 
 # =============================================================================
 # 6. Measurement script
diff --git a/equipment_control/example/single_equipment/hp4145_script.py b/equipment_control/example/single_equipment/hp4145_script.py
index 5c50d64..da9b760 100644
--- a/equipment_control/example/single_equipment/hp4145_script.py
+++ b/equipment_control/example/single_equipment/hp4145_script.py
@@ -19,7 +19,7 @@ list_connections= eq.available_connections(rm=rm) # you can use the function fro
 print("-------------------------------------------------\n Available connections: %s"%str(list_connections))
 
 # =============================================================================
-# 3. Connection to the equipments
+# 3. Connection to the equipment
 # =============================================================================
 myHP4145=hp4145.hp4145("GPIB0::1::INSTR",timeout=100e3)
 
@@ -35,13 +35,13 @@ smu_bias={"SMU1":10,"SMU2":0,"SMU3":0,"SMU4":0}
 smu_compliance={"SMU1":1e-6,"SMU2":1e-6,"SMU3":1e-6,"SMU4":1e-6}
 sweep_param={"start":0,"stop":1,"step":0.05}
 sweep_type="linear"
-integration_mode="IT1"
+integration_mode="S"
 delay_time=0
 hold_time=0
 
 
 # =============================================================================
-# 5. Initialization of the equipments
+# 5. Initialization of the equipment
 # =============================================================================
 
 print("-------------------------------------------------\n Starting initialisation ...", end='')
diff --git a/equipment_control/example/single_equipment/k2400_script.py b/equipment_control/example/single_equipment/k2400_script.py
index b94598f..33f0cab 100644
--- a/equipment_control/example/single_equipment/k2400_script.py
+++ b/equipment_control/example/single_equipment/k2400_script.py
@@ -20,7 +20,7 @@ list_connections= eq.available_connections()
 print("Available connections: %s"%str(list_connections))
 
 # =============================================================================
-# 3. Connection to the equipments
+# 3. Connection to the equipment
 # =============================================================================
 myk2400=k2400.k2400("GPIB0::29::INSTR",timeout=1e3)
 
@@ -33,7 +33,6 @@ source_mode = "current"
 measurement_mode = "voltage"
 compliance = 1
 autozero = True
-offset_compensation = True
 nplc = 1
 digits = 6
 continuous_trigger = False
@@ -42,11 +41,11 @@ bias_source = 1e-6
 file_path = 'temp.txt'
 t_init=time.time()
 # =============================================================================
-# 5. Initialization of the equipments
+# 5. Initialization of the equipment
 # =============================================================================
 myk2400.initialize(source_mode=source_mode, measurement_mode=measurement_mode,
-                   compliance=compliance, autozero=autozero, offset_compensation=offset_compensation,
-                   digits=digits,continuous_trigger=continuous_trigger,disp_enable=disp_enable, nplc=nplc)
+                   compliance=compliance, autozero=autozero, digits=digits,
+                   continuous_trigger=continuous_trigger,disp_enable=disp_enable, nplc=nplc)
 
 # =============================================================================
 # 6. Measurement script
diff --git a/equipment_control/example/single_equipment/k2450_script.py b/equipment_control/example/single_equipment/k2450_script.py
index e3aad27..c09d9f0 100644
--- a/equipment_control/example/single_equipment/k2450_script.py
+++ b/equipment_control/example/single_equipment/k2450_script.py
@@ -20,7 +20,7 @@ list_connections= eq.available_connections()
 print("Available connections: %s"%str(list_connections))
 
 # =============================================================================
-# 3. Connection to the equipments
+# 3. Connection to the equipment
 # =============================================================================
 myk2450=k2450.k2450("GPIB0::29::INSTR",timeout=5e3)
 
@@ -33,7 +33,6 @@ source_mode = "voltage"
 measurement_mode = "current"
 compliance = 1e-6
 autozero = True
-offset_compensation = True
 nplc = 1
 digits = 6
 continuous_trigger = True
@@ -42,11 +41,11 @@ bias_source = 1
 file_path = 'temp.txt'
 t_init=time.time()
 # =============================================================================
-# 5. Initialization of the equipments
+# 5. Initialization of the equipment
 # =============================================================================
 myk2450.initialize(source_mode=source_mode, measurement_mode=measurement_mode,
-                   compliance=compliance, autozero=autozero, offset_compensation=offset_compensation,
-                   digits=digits,continuous_trigger=continuous_trigger,disp_enable=disp_enable, nplc=nplc)
+                   compliance=compliance, autozero=autozero, digits=digits,
+                   continuous_trigger=continuous_trigger,disp_enable=disp_enable, nplc=nplc)
 
 # =============================================================================
 # 6. Measurement script
diff --git a/equipment_control/example/single_equipment/k4200_script.py b/equipment_control/example/single_equipment/k4200_script.py
index 557ae5c..efa46ff 100644
--- a/equipment_control/example/single_equipment/k4200_script.py
+++ b/equipment_control/example/single_equipment/k4200_script.py
@@ -12,14 +12,14 @@ import traceback # to write error message in try/except command
 import datetime
 
 # =============================================================================
-# 2. List  available connections (chopes use pyvisa package for communicate with most equipments)
+# 2. List  available connections
 # =============================================================================
 rm=eq.resource_manager() # you can use the function from equipment class or directly the pyvisa command rm = pyvisa.ResourceManager()
 list_connections= eq.available_connections(rm=rm) # you can use the function from equipment class or directly the pyvisa command rm.list_resources()
 print("-------------------------------------------------\n Available connections: %s"%str(list_connections))
 
 # =============================================================================
-# 3. Connection to the equipments
+# 3. Connection to the equipment
 # =============================================================================
 myK4200=k4200.k4200("GPIB0::17::INSTR",timeout=10e3)
 
@@ -41,7 +41,7 @@ hold_time=0
 
 
 # =============================================================================
-# 5. Initialization of the equipments
+# 5. Initialization of the equipment
 # =============================================================================
 
 print("-------------------------------------------------\n Starting initialisation ...", end='')
@@ -70,10 +70,10 @@ myK4200.close_connection()
 # 8. Save data
 # =============================================================================
 custom_header="IV results with K4200\n"
-
+comment_delimiter="#"
 print("-------------------------------------------------\n Print in file %s"%file_path)
 print(" - Header:")
 print("   # %s"%(datetime.datetime.now().strftime("%c")))
 for line in (custom_header+data_header).split('\n'):
     print("   # "+line)
-myK4200.write_in_file(file_path,data,overwrite=True,header=custom_header+data_header)
+myK4200.write_in_file(file_path,data,overwrite=True,header=custom_header+data_header,comment=comment_delimiter)
diff --git a/equipment_control/example/single_equipment/kal100_script.py b/equipment_control/example/single_equipment/kal100_script.py
new file mode 100644
index 0000000..0e26c8c
--- /dev/null
+++ b/equipment_control/example/single_equipment/kal100_script.py
@@ -0,0 +1,45 @@
+
+
+# =============================================================================
+# 1. Import classes and modules
+# =============================================================================
+
+import sys
+#sys.path.insert(1, '/path/to/application/app/folder')
+sys.path.insert(1, 'D:/Roisin/Documents/chopes')
+
+import equipment_control.equipment as eq
+import equipment_control.kal100 as kal100
+
+# =============================================================================
+# 2. List  available connections (chopes use pyvisa package for communicate with most equipments)
+# =============================================================================
+rm=eq.resource_manager()
+list_connections= eq.available_connections()
+print("Available connections: %s"%str(list_connections))
+
+# =============================================================================
+# 3. Connection to the equipments
+# =============================================================================
+mykal100=kal100.kal100('COM7') # serial link through port COM7
+
+# =============================================================================
+# 4. Measurement parameters
+# =============================================================================
+pressure=1 # in kPa
+
+# =============================================================================
+# 5. Initialization of the equipment
+# =============================================================================
+mykal100.initialize(units="hPa")
+
+# =============================================================================
+# 6. Set wavelength
+# =============================================================================
+mykal100.set_pressure(pressure)
+
+# =============================================================================
+# 7. Close connection
+# =============================================================================
+mykal100.close_connection()
+
diff --git a/equipment_control/example/single_equipment/sh242_script.py b/equipment_control/example/single_equipment/sh242_script.py
new file mode 100644
index 0000000..b865627
--- /dev/null
+++ b/equipment_control/example/single_equipment/sh242_script.py
@@ -0,0 +1,52 @@
+# =============================================================================
+# 1. Import classes and modules
+# =============================================================================
+
+import sys
+#sys.path.insert(1, '/path/to/application/app/folder')
+sys.path.insert(1, 'D:/Roisin/Documents/chopes')
+
+import equipment_control.equipment as eq
+import equipment_control.sh242 as sh242
+
+# =============================================================================
+# 2. List  available connections (chopes use pyvisa package for communicate with most equipments)
+# =============================================================================
+rm=eq.resource_manager()
+list_connections= eq.available_connections()
+print("Available connections: %s"%str(list_connections))
+
+# =============================================================================
+# 3. Connection to the equipments
+# =============================================================================
+mysh242=sh242.sh242('USB0::0x05E6::0x6500::04529651::INSTR',timeout=1e3)
+
+# =============================================================================
+# 4. Measurement parameters
+# =============================================================================
+temperature=30
+humidity=50
+wait_for_stabilization=True # if True, wait for the temperature and humidity to be stabilized to continue the script
+
+# =============================================================================
+# 5. Initialization of the equipment
+# =============================================================================
+mysh242.initialize(temperature=True, humidity=True,temperature_dic={"upper":125,"lower":-45,"set":20},humidity_dic={"upper":100,"lower":0,"set":55})
+
+# =============================================================================
+# 6. Read temperature and humidity
+# =============================================================================
+data_temperature=mysh242.read_temperature()
+data_humidity=mysh242.read_humidity()
+print("\n- Temperature: %.2f °C\n- Humidity: %.2f %%"%(data_temperature,data_humidity))
+
+# =============================================================================
+# 7. Set temperature and humidity
+# =============================================================================
+mysh242.set_temperature(temperature,wait_for_stabilization=wait_for_stabilization)
+mysh242.set_humidity(humidity,wait_for_stabilization=wait_for_stabilization)
+
+# =============================================================================
+# 8. Close connection
+# =============================================================================
+mysh242.close_connection()
\ No newline at end of file
diff --git a/equipment_control/kal100.py b/equipment_control/kal100.py
index 5e87a11..91fa12d 100644
--- a/equipment_control/kal100.py
+++ b/equipment_control/kal100.py
@@ -20,10 +20,11 @@ class kal100(equipment.equipment):
             baudrate=9600,
             parity=serial.PARITY_NONE,
             stopbits=serial.STOPBITS_ONE,
-            bytesize=serial.EIGHTBITS
+            bytesize=serial.EIGHTBITS,
+            timeout=10
         )
 
-    def initialize(self,units="kPa",percentage=100, mode_operation="MS", mode_input="positive"):    
+    def initialize(self,units="kPa",percentage=100, mode_operation="MS", mode_input="positive",zero_adjust=True):    
         """ Function to initialize the KAL100
         
             args:
@@ -33,26 +34,30 @@ class kal100(equipment.equipment):
                 - mode_input (string) : Positive P-input ("positive"), Negative P-input ("negative"), Differential pressure measurement  ("differential")
                 
         """
-        units_dic={"kPa":0,"Pa":1,"hPa":0}
+        units_dic={"kPa":0,"Pa":1,"hPa":2}
         mode_dic={"positive":"MI0","negative":"MI1","differential":"MI2"}
 
         self.units=units
-        self.serial_resource.write(">PD%d"%units_dic[units])
-        time.sleep(1)
-        self.serial_resource.write(">PP%d"%percentage) # percentage of the target 
-        time.sleep(1)
+        # self.serial_resource.write(str.encode(">PD%d\n"%units_dic[units]))
+        # self.serial_resource.read_until(b'\r')
+        self.serial_resource.write(str.encode(">PE%d\n"%units_dic[units]))
+        self.serial_resource.read_until(b'\r')
+        self.serial_resource.write(str.encode(">PP%d\n"%percentage)) # percentage of the target 
+        self.serial_resource.read_until(b'\r')
 
-        self.serial_resource.write("%s"%mode_dic[mode_input]) # MI0: Positive P-input, MI1: Negative P-input, MI2: Differential pressure measurement 
-        time.sleep(1)
+        self.serial_resource.write(str.encode("%s\n"%mode_dic[mode_input])) # MI0: Positive P-input, MI1: Negative P-input, MI2: Differential pressure measurement 
+        self.serial_resource.read_until(b'\r')
 
-        self.serial_resource.write("MZ") # mode zeroing
-        time.sleep(1)            
-        self.serial_resource.write("%s"%mode_operation) #MT: mode test, MZ: mode zeroing, MS: mode target value, MP: mode pressure measurement 
-        time.sleep(1)            
+        if zero_adjust:
+            self.serial_resource.write(str.encode("MZ\n")) # mode zeroing
+            self.serial_resource.read_until(b'\r')
+            time.sleep(10)
+        self.serial_resource.write(str.encode("%s\n"%mode_operation)) #MT: mode test, MZ: mode zeroing, MS: mode target value, MP: mode pressure measurement 
+        self.serial_resource.read_until(b'\r')
         
         if mode_operation=="MS":
-            self.serial_resource.write("PS%3.5f"%0) 
-            time.sleep(1)  
+            self.serial_resource.write(str.encode(">PS%3.5f\n"%0))
+            self.serial_resource.read_until(b'\r')
             
     def set_pressure(self,pressure):
         """ Function to set pressure level of the KAL100
@@ -60,10 +65,13 @@ class kal100(equipment.equipment):
             args:
                 - pressure (scalar) : targeted pressure
         """
-        self.serial_resource.write("MS") 
-        time.sleep(1)
-        self.serial_resource.write("PS%3.5f"%pressure) 
-        time.sleep(1)      
+        units_mult={"kPa":10,"Pa":1e-3,"hPa":1}
+
+        self.serial_resource.write(str.encode("MS\n"))
+        self.serial_resource.read_until(b'\r')
+        self.serial_resource.write(str.encode(">PS%3.5f\n"%(pressure*units_mult[self.units])))
+        # self.serial_resource.write(str.encode(">PS%3.5f\n"%(pressure)))
+        self.serial_resource.read_until(b'\r')
             
     def close_connection(self):
         """ Function to close the  serial connection with the equipment """
diff --git a/equipment_control/temp.py b/equipment_control/temp.py
new file mode 100644
index 0000000..aad3c61
--- /dev/null
+++ b/equipment_control/temp.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Thu Mar 20 11:42:02 2025
+
+@author: nroisin
+"""
+
+import serial
+import pyvisa
+rm = pyvisa.ResourceManager()    
+print(rm.list_resources())
+mykal100=serial.Serial(
+    port="COM7",
+    baudrate=9600,
+    parity=serial.PARITY_NONE,
+    stopbits=serial.STOPBITS_ONE,
+    bytesize=serial.EIGHTBITS,
+    timeout=10
+)
+
+mykal100.write(str.encode('MS\n'))
+print(mykal100.read_until(b'\r'))
+
+mykal100.write(str.encode('>PD0\n'))
+print(mykal100.read_until(b'\r'))
+# mykal100.write(str.encode('>PP100\n'))
+# print(mykal100.read())
+
+# mykal100.write('MZ\n'.encode('utf-8'))
+
+# mykal100.write('?PS\n'.encode('ascii'))
+# print(mykal100.readline())
+
+# mykal100.write('MZ\n'.encode('ascii'))
+mykal100.close()
\ No newline at end of file
-- 
GitLab