What Is the Correct File Encoding Format for Touchstone (S2P) Files?

Updated Jun 27, 2024

Reported In

Software

  • RFIC Test Software

Issue Details

When trying to load an s2p file in the RFIC SFP, I receive the error shown below. Loading the s2p file directly into the RFSG or RFmx APIs produces a similar error message.

Error -1074135024 occurred at niRFSG Create De-embedding S-parameter Table (S2P file).vi

 

Possible reason(s):

IVI: (Hex 0xBFFA0010) Invalid value for parameter or property.

 

number of ports

Requested Value: 0

Supported Values: 2

Solution

This error is related to the encoding format of the S2P file. In the file it was used UTF-16 as the encoding format (likely caused from importing/exporting out of Excel). The Touchstone file format specs , specifies the encoding format should be ISO/IEC 8859-1. However, UTF-8 and ISO/IEC 8859-1 encode ASCII the same way, so either can be used. Changing the encoding option to either UTF-8 or ISO/IEC 8859-1 allowed the S2P file to be read properly by RFIC SFP, RFSG and RFmx. The encoding format can easily be changed through Notepad++.