The Micromeritics 3Flex has the additional capability to collect and display quantity and pressure adsorbed versus time measurements. Every half second, data is collected. This article is a tutorial on how this data can be transmitted via an ethernet cable used for instrument communication using a client such as PuTTY or HyperTerminal. It will also be observed how the captured data can be easily handled using scripts created in languages such as Python.
Installation of the PuTTY Client
PuTTY is an open source that can be downloaded for free and easily used to access all of the transient data output by the 3Flex instrument. No program installation is needed and the .exe file runs directly from a Windows desktop.
Collecting the Pressure Versus Time Data
For connecting the instrument, these items need to be configured:
- Input 3FLEX IP address, found in the Unit Configuration, into the PuTTY software
- Input 54000 in the ‘Port’ field
- Select ‘Raw’ connection type
- Save session settings (optional)
- To save the data, go to the ‘Logging’ settings as shown in Figure 1.
Figure 1. PuTTy Configuration
The steps are as follows:
- Select ‘All session output’
- Select destination (using ‘Browse…’) to save file and create a .txt file
- Click ‘Open’ to start collecting the data and one must note that before the 3FLEX begins collecting data, it will be ‘waiting’ for when data output from the 3Flex begins.
Using the Data
It is possible to access the text file containing the transient data using any means accepting tab separated values. Possibilities include Notepad, Microsoft Excel (or other spreadsheet software), or programming languages that read .txt or .xls files. MATLAB, Python and Octave may be a few that come to mind. MATLAB® has the xlsread() function and Octave has the textread() function which are easy to use.
Python is, however, used as the focus of this article as Python is free to use, contains online documentation and user forums and python code can be used in the 3Flex software (sample files).
Description of All Columns in Collected Data File
The data file produced during this collection process has 58 columns of tab-delimited, or separated, values. When viewed in other spreadsheet programs or Microsoft Excel the data occupy columns ‘A’ though ‘BF’. The identity of each of these columns of data is given below:
Figure 2. Identity of the columns of data
Python Installation Components
For operating Python such that on-demand data can be viewed, 3 components need to be installed: Python 3.2, NumPY (for numerical functions), and MatPlotLIB (for graphical display of the data).
Installing Python 3.2
Installation of Python needs to be done first. Python version 3.2.3 can be downloaded from python.org.
Next, NumPY can be installed and contains numerous numerical functions and libraries which are needed in order to properly handle the transient data extracted from the .txt file collected during an analysis. NumPY version 1.6.2 must be downloaded in order to be compatible with the installed version of Python.
The final component of the installation is MatPlotLIB. Version 1.2.1 is compatible with the previously mentioned / installed software and can be downloaded.
Sample Python Code
An example code that was used for producing the data shown in Figure 1. This is the most basic code needed to see transient data, but the flexibility exists to script a more detailed file, enabling flexibility such as comparing pressure or quantity adsorbed between ports, generating a separate figure for each port, etc.
||import numpy as np
import matplotlib.pyplot as plt
myFile = 'carbon.txt'
data = np.genfromtxt(myFile, skip_header=2, skip_footer = 1)
# Time (minutes)
x = x/1000/60
# Sample pressure PORT 1(torr)
Figure 3. Sample code in Python
This information has been sourced, reviewed and adapted from materials provided by Micromeritics Instrument Corporation.
For more information on this source, please visit Micromeritics Instrument Corporation.