Write your own software!
If you prefer to develop your software instead of using the PT2026 software, MFCToolV10 or EZMag3D, Metrolab provides a set of Application Programming Interfaces to simplify and speed-up your code development.
We are now integrating the MFC2046 and the MFC3045 system cameras in a single “C++ instrument catalog”, offering a standardA standard is the internationally agreed-upon physical representation of a unit. For example, a caesium clock is the standard for... More software layer for both systems and allowing you to incorporate both instruments in your new code seamlessly.
PT2026
LabVIEW API
- This procedure assumes you have installed National Instruments LabVIEW and NI-VISA. The code is LabVIEW 2015. Any version of NI-VISA should work;
see http://www.ni.com/product-documentation/53413/en/ - Version 1.9 of the PT2026 LabVIEW driver requires at least PT2026 ARM firmware version 1.23. To check whether this release is installed, look at the instrument version information in the PT2026 software’s Setup screen; it should read:
elXXXXXX-arm1.23-dsp2.10-cpld1.9-paXXX-optXXXXXXXX
where “X” represents irrelevant letters and digits.
- Installation Procedure
- Download the PT2026 LabVIEW Driver v1.9 from this package:
https://old.metrolab.com/wp-content/uploads/2022/11/PT2026SoftwarePackage_Tag_22_11_03.zip - Unzip it into the “instr.lib” sub-folder of your LabVIEW installation.
- Restart LabVIEW and you should find the PT2026 in the “Instrument I/O” palette.
- Download the PT2026 LabVIEW Driver v1.9 from this package:
- Documentation
- see PT2026 User Manual page 36
- https://old.metrolab.com/wp-content/uploads/2022/11/PT2026-Users-Manual-v2_1r1_3.pdf
- Examples
- follow the source directory to PT2026-API-v1.9/Metrolab PT2026
C++ API
The PT2026 C++ API controls a PT2026 via an IVI-Foundation compatible VISA library. It provides access to the entire functionality of the PT2026 SCPI command set, as documented in chapter 6, “Host Interfaces,” of the “NMR Precision Teslameter PT2026 User’s Manual“.
- Download and extract the C++ Instrument Catalog from the folder
- https://old.metrolab.com/wp-content/uploads/2022/11/PT2026SoftwarePackage_Tag_22_11_03.zip
- Follow the source directory C++InstrumentCatalogDistribution_22_06_29/InstrumentDriver/PT2026
- Examples
- Follow the source directory C++InstrumentCatalogDistribution_20_10_08/InstrumentDriver/PT2026
- Follow the source directory C++InstrumentCatalogDistribution_20_10_08/InstrumentDriver/PT2026
MFC2046 &
MFC3045
C++ Instrument Catalog
If you prefer to develop your own MFC software instead of using the MFToolV10, Metrolab provides a “C++ instrument catalog” interface to simplify and speed-up your code development.
Writing a software interface for an instrument using a list of methods is quite often a tedious task; one has to understand the imbrication and the consequences of calling one method before another. To simplify the developer’s life, Metrolab proposes a unified and straightforward way to controlAn NMR-controlled field is one whose strength is monitored by NMR. As opposed to NMR-regulated. More the instrument using a data-oriented protocol, occulting most of the instrument’s internal specificities. We call this software layer the “C++ instrument catalog”. Utilizing it, you won’t have to interface with low-level instrument commands set like SCPI. This catalog simplifies software development by offering a way to access the instrument through a set of pre-defined variables. Some have a composite data type associated with a convenient notification-upon-value-change system.
For more details, read the documentation available in the “C++ instrument catalog” package.
We are now integrating the MFC2046 and the MFC3045 system cameras in a single “C++ instrument catalog”, offering a standardA standard is the internationally agreed-upon physical representation of a unit. For example, a caesium clock is the standard for... More software layer for both systems, and allowing you to incorporate both instruments in your new code seamlessly.
Beware, do not use PT2026 SCPI commands when developing a new MFC2046’software. These SCPI commands, as stated in the PT2026 User’s Manual, do not encompass all the aspects required to operate the Magnetic Field Camera system optimally. You must use the “C++ instrument catalog “to develop your MFC2046 software.
If you don’t want to develop your software to controlAn NMR-controlled field is one whose strength is monitored by NMR. As opposed to NMR-regulated. More the system camera, but need to export measurement results, instrument, and status information automatically; you may use the plugin mechanism natively available in MFCToolV10 and develop a DLL. Read the MFCToolV10 User’s Manual for more information.
- Download and extract the C++ Instrument Catalog from the folder:
- https://old.metrolab.com/wp-content/uploads/2022/11/PT2026SoftwarePackage_Tag_22_11_03.zip
- Follow the source directory C++InstrumentCatalogDistribution_22_06_29/InstrumentCatalog/MFC
- Documentation
- Access the C++ Instrument catalog by following the Documentation
- Open in browser
- Scroll down to the MFC Catalog section
- Access the C++ Instrument catalog by following the Documentation
- Examples, get started
- Follow the source directory C++InstrumentCatalogDistribution_20_10_08/Example/MFCCatalogExample
- Follow the source directory C++InstrumentCatalogDistribution_20_10_08/Example/MFCCatalogExample
C++ MFCTool Plugins (Header and DLL)
See the MFCTool v10 User Manual starting page 47
https://old.metrolab.com/wp-content/uploads/2022/06/MFCToolV10-Users-Manual_V3.0-r1.6.pdf
THM1176 &
TFM1186
LabVIEW API
- Installation
- Download and extract Metrolab THM1176 API.zip
https://old.metrolab.com/wp-content/uploads/2019/01/Metrolab-THM1176-API-and-Manual.zip - Metrolab THM1176 API
- Download and extract Metrolab THM1176 API.zip
- Documentation:
- See chapter 5 of “THM1176 User Manual v1_3r1_4”
C++ API
This C++ Application Programming Interface (API) controls a Metrolab magnetometerAn instrument to measure magnetic flux density (B) or magnetic field intensity (H). More in the Three-axisThe magnetic field is a three-dimensional vector quantity. A single Hall element only measures one component. A three-axis Hall instrument has... More Hall MagnetometerAn instrument to measure magnetic flux density (B) or magnetic field intensity (H). More THM1176 family (including the Three-axisThe magnetic field is a three-dimensional vector quantity. A single Hall element only measures one component. A three-axis Hall instrument has... More Fluxgate MagnetometerAn instrument to measure magnetic flux density (B) or magnetic field intensity (H). More TFM1186), either via a USBTMC driver accessed by the VISA library (CVISAInstrument) or via a libusb-based USBTMC instrument driver (CUSBTMCInstrument). It provides access to the entire functionality of the THM1176 SCPI command set, as documented in “Three-AxisThe magnetic field is a three-dimensional vector quantity. A single Hall element only measures one component. A three-axis Hall instrument has... More Magnetometers: THM1176 and TFM1186 User’s Manual”.
- Installation
- Download and extract
https://old.metrolab.com/wp-content/uploads/2021/01/THM1176InstrumentDriver.zip
- Download and extract
- Documentation
- After extracting the above zip file, open the file THM1176InstrumentDriver/doc/html/index.html in a browser.
- After extracting the above zip file, open the file THM1176InstrumentDriver/doc/html/index.html in a browser.
- Examples available in the documentation
C++ Instrument Manager
The THM1176 Instrument Manager is a high-level Qt Object abstraction of the Metrolab Three-axisThe magnetic field is a three-dimensional vector quantity. A single Hall element only measures one component. A three-axis Hall instrument has... More Hall MagnetometerAn instrument to measure magnetic flux density (B) or magnetic field intensity (H). More THM1176 / Three-axisThe magnetic field is a three-dimensional vector quantity. A single Hall element only measures one component. A three-axis Hall instrument has... More Fluxgate MagnetometerAn instrument to measure magnetic flux density (B) or magnetic field intensity (H). More TFM1186.
The THM1176 Instrument Manager consists of three objects, running in different threads:
- MTL::CTHM1176InstrumentManager: Public interface
- MTL::CTHM1176InstrumentController: VISA I/O
- MTL::CTHM1176InstrumentScanner: Periodically scans for connected instruments
You only have to worry about the public interface; the two other objects are created and destroyed automatically.
- Installation:
- Download and extract
https://old.metrolab.com/wp-content/uploads/2021/01/THM1176InstrumentManager.zip
- Download and extract
- Documentation
- After extracting the above zip file, open the file THM1176InstrumentManager/doc/html/index.html in a browser.
- After extracting the above zip file, open the file THM1176InstrumentManager/doc/html/index.html in a browser.
- Examples available in the documentation
C++ EZMag3D Plugins (Trigger, Mapper)
Download and install EZMag3D Software for your OS from the Metrolab download section:
https://old.metrolab.com/resources/downloads/#product_THM1176
Windows, Linux, and macOS available.
- Expand the Metrolab-EZMag3D-vXXX.src.zip file located in the EZMag3D_XXX application directory, where “XXX” is the EZMag3D version (e.g. “1.1.2″).
- The source code for the Manual Mapper plugin is located in the directory Metrolab-EZMag3D-vXXX-src/EZMag3D/MapperPlugins/ManualMapperPlugin.
- The source code for the Manual Trigger plugin is located in the directory Metrolab-EZMag3D-vXXX-src/EZMag3D/TriggerPlugins/ManualTriggerPlugin.
- Duplicate the appropriate directory, change the file names, update the sub-project file (xxx.pro), and add your new plugin to the top-level project file (Metrolab-EZMag3D-vXXX-src/EZMag3D/EZMag3D.pro).
- Rebuild the EZMag3D project, to make sure that the project is set up correctly. Do not forget to install the support libraries, as described in Metrolab-EZMag3D-vXXX-src/EZMag3D/README.md.
- Now add the desired functionality in the code.
- Before running, copy all plugins to the appropriate EZMag3D plugin sub-directories, located in a subdirectory of the application directory: ezmag3d/ (Windows and Linux) or EZMag3D.app/Contents/PlugIns/ezmag3d/ (macOS). To render this less tedious, you can use the “Projects > Build > Build Steps > Add Build Step” option in Qt Creator to automatically copy all plugins to the plugin directories.