SCPIPowerForLV 1.0.2

dotnet add package SCPIPowerForLV --version 1.0.2                
NuGet\Install-Package SCPIPowerForLV -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SCPIPowerForLV" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SCPIPowerForLV --version 1.0.2                
#r "nuget: SCPIPowerForLV, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SCPIPowerForLV as a Cake Addin
#addin nuget:?package=SCPIPowerForLV&version=1.0.2

// Install SCPIPowerForLV as a Cake Tool
#tool nuget:?package=SCPIPowerForLV&version=1.0.2                

A wrapper of the communication of the SCPI command based DC Power Supply module.

For some SCPI command based DC Power Supply module, we use SCPI commands to communicate/control the device, like some commonly used commands:

Enable output, send:

  1. OUTP 1 [Enter]
there will be no response

Disable output, send:

  1. OUTP 0 [Enter]
there will be no response

Set OVP (Over Voltage Protection), send:

  1. VOLT:PROT 32.000 [Enter]
there will be no response

Set OCP (Over Current Protection), send:

  1. CURR:PROT 5.000 [Enter]
there will be no response

Set Voltage, send:

  1. VOLT 20.987 [Enter]
there will be no response

Set Current, send:

  1. CURR 0.123 [Enter]
there will be no response

Measure the voltage, send:

  1. MEAS:VOLT? [Enter]
there will be response like this:

20.988 [Enter] That means the DC Power supply module is outputing voltage as 20.988 V

Measure the current, send:

  1. MEAS:CURR? [Enter]
there will be response like this:

0.456 [Enter] That means the DC Power supply module is outputing current as 0.456 A

The native NativeSCPI_v2.DLL and managed DHPowerSCPIWrapper.DLL export some functions like below:

  1. public static extern void SendSCPICommandEx(string hostAddress, ushort port, string command, int commandLength, bool askResponse,StringBuilder responseText, int responseLength, IntPtr convertedData, StringBuilder returnValue); you can use this API to connect, send your own commands and then disconnect
  2. ConnectToSCPIDevice_v2 and CloseSCPIDevice_v2, connect and close the device, note: since some old systems like Test Stand 2013 couldn't handle the pointer correctly, so use a string type handle instead, which is underlying the IP address
  3. SendSCPICommand_v2, this one will send SCPI command and might receive the response if the parameter askResponse=True
  4. SetOVP_OVC which wrappers ConnectToSCPIDevice_v2,SendSCPICommand_v2 and CloseSCPIDevice_v2 to set OVP and OCP, please ignore the wrong spelling at function's name
  5. SetVoltCurrAndTurnOffOutput which wrappers ConnectToSCPIDevice_v2,SendSCPICommand_v2 and CloseSCPIDevice_v2 to set voltage and current
  6. public static bool ReadVoltAndCurr(string hostAddress, ushort port, double[] volt_curr), connect and then measure voltage and current and finnaly disconnect

since it is too simple, so there will be no C# sample code provided. There is a Chinese version specification in DOCX format in the same sub folder.

The most important thing is the LabVIEW project with the source code which doesn't use any of my DLLs in native code or managed code, you can open it in LabVIEW 2020 or old 2015.

Author

Patrick Gamp

For technique support or business, please call the cell phone ++0086-18603016232, email: patrickgamp@hotmail.com, WeChat id is same to the cell phone number

Published date

October 30, 2023

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 1,121 10/30/2023
1.0.1 918 10/30/2023
1.0.0 909 10/30/2023

Initial commit.