You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Python/Thorlabs PMxxx Power Meters/scpi/Readme.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ anyvisa library. Some others use the third-party pyvisa python library based on
7
7
## Included Examples
8
8
9
9
### Simple Example
10
-
The example ```PMxxx_SCPI_pyvisa.py``` shows how to to open a powermeter connected with USB using the pyvisa library, make settings and get measurement values.
10
+
The example ```PMxxx_SCPI_pyvisa.py``` shows how to to open a powermeter connected with USB using the pyvisa library, make settings and get measurement values. It will not work for ethernet connection, check the anyvisa examples for that case.
11
11
12
12
### Fast Mode
13
13
Demonstrates how to query fast measurement stream of Thorlabs Power Meter.
@@ -24,7 +24,7 @@ The Thorlabs Power Meters supports Scope Mode to measure and store a software or
24
24
For closer details refer to [Readme](scopeMode). Available for PM6x, PM103, PM103E and PM5020.
25
25
26
26
### Open Anyvisa
27
-
Minimal template script ```PMxxx_SCPI_OpenAnyvisa.py``` to open a known instrument resource using anvisa library.
27
+
Minimal template script ```PMxxx_SCPI_OpenAnyvisa.py``` to open a known instrument resource using anyvisa library.
28
28
29
29
### Search Anyvisa
30
30
Minimal template script ```PMxxx_SCPI_SearchAnyvisa.py``` to run instrument search and open one of the devices found using anvisa library.
This function finds all driver compatible devices attached to the PC and returns the number of found devices.
99
+
100
+
Note:
101
+
(1) The function additionally stores information like system name about the found resources internally. This information can be retrieved with further functions from the class, e.g. <Get Resource Description> and <Get Resource Information>.
102
+
103
+
104
+
Args:
105
+
106
+
Returns:
107
+
resourceCount(uint32) : The number of connected devices that are supported by this driver.
size(uint32) : This parameter specifies the buffer size.
150
+
151
+
Notes:
152
+
(1) If received data is less than buffer size, the buffer is additionally terminated with a '' character.
153
+
(2) If received data is same as buffer size no '' character is appended. It's the caller's responsibility to make sure a buffer is '' terminated if the caller wants to interpret the buffer as string.
154
+
(3) You may pass VI_NULL if you don't need this value.
155
+
156
+
Returns:
157
+
buffer(string) : Byte buffer that receives the data read from the instrument.
158
+
returnCount(uint32) : Number of bytes actually transferred and filled into Buffer. This number doesn't count the additional termination '' character. If Return Count == size of the buffer, the content will not be '' terminated.
In this folder you will find sample codes showing how to control and acquire from
5
+
Thorlabs WM20X Wavelength Meters.
6
+
7
+
There are 4 examples in this folder:
8
+
9
+
*[Example 1 - Read the wavelength using TCP](./Thorlabs_WM_example_01.py)
10
+
*[Example 2 - Read the wavelength using TLWAVE dll (USB/TCP)](./Thorlabs_WM_example_02.py)
11
+
*[Example 3 - Read the wavelength using RS232](./Thorlabs_WM_example_03.py)
12
+
*[Example 4 - Set fast mode, then read wavelength and estimated power](./Thorlabs_WM_example_04.py)
13
+
14
+
15
+
### Requirements
16
+
* The example with TCP-connection is cross-plattform compatible, and uses only native python.
17
+
18
+
* The example with USB connection requires windows and installation of [Optical power meter software](https://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=OPM), which includes the USB-driver as well as the needed TLWAVE dll. The DLL is wrapepd by PyTLWAVE.py which is found in the same folder as the example.
19
+
20
+
* The example with RS232-connection is cross-plattform compatible, but utilizes pyserial.
21
+
22
+
### More information
23
+
For details about the available SCPI commands please refer to the instrument manual.
0 commit comments