/dn.vi.tcp

Primary LanguageC#Creative Commons Attribution 4.0 InternationalCC-BY-4.0

VI Tcp

TCP Socket-based control and communication library for LXI-based instruments.

*** WARNING: Work in progress ***

Objectives

Create a very rudimentary way to communicate with LXI instruments in mobile and desktop platforms.

Unlike VXI-11 and HiSlip, this will likely have no way of determining service request status.

This, I hope, will evolve to implementing VXI-11 and HiSlip protocols hopefully leading to production grade APIs.

Status

cc.isr.VI.Lite encountered delay issues. Code received from Keithley, which uses the same TCP client API encountered no such issues when using the synchronous API of the TCP client.

Taking advantage of the Keithley code, I aim at separating the instrument-specific (e.g., DMM) functions from then TCP client API. Thereafter, I will try to restore the Asynchronous calls aiming to identify the source of the delay issues.

To this end, I will use the user interface of the DMM7510 digitizer but with a single instrument.

Issues

The following issues have been observed thus far:

Read fails

Initially, the socket send and receive commands were used. This worked as long as a new session was instantiated for each query and the socket was closed after each read.

With the current, network stream, the instrument occasionally fails to send the response.

Temporary solution: Adding a 10 delay between queries seems to address these failures.

Obviously, this is a kludge.

Additional exploration

Test results for read after write and inter-query delays

Instrument Read after Write Delay [ms] Inter-query Delay [ms]
2450 2 0
2600 2 0
6510 2 1
7510 2 1

Table 1. Delay times are required between the write and read commands of the same queries (Read After Write Delay) and between the read and the next write command of two sequential queries to accomplish error free readings. The delays listed in this table were determined for 40 error free queries initiated by button clicks. Missing responses were observed when reducing the delays by 1 ms.

Work plan

  • Proof of concept: implement a .NET MAUI *IDN?
  • Minimal VI Lite message based socket session:
    • Define the minimal interface
    • Implement and test the minimal interface.
    • Implement a .NET MAUI Lite application.
  • Add device clear.

Supported .NET Releases

  • .NET 6.0
  • .NET MAUI

Runtime Pre-Requisites

Repository Owner

ATE Coder

Authors

Legal Notices

Integrated Scientific Resources, Inc., and any contributors grant you a license to the documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License and grant you a license to any code in the repository under the MIT License.

Integrated Scientific Resources, Inc., and/or other Integrated Scientific Resources, Inc., products and services referenced in the documentation may be either trademarks or registered trademarks of Integrated Scientific Resources, Inc., in the United States and/or other countries. The licenses for this project do not grant you rights to use any Integrated Scientific Resources, Inc., names, logos, or trademarks.

Integrated Scientific Resources, Inc., and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.