./nugetz

#scpi

11 packages tagged with “scpi

SCPIPowerForLV

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: 2. OUTP 0 [Enter] there will be no response Set OVP (Over Voltage Protection), send: 3. VOLT:PROT 32.000 [Enter] there will be no response Set OCP (Over Current Protection), send: 4. CURR:PROT 5.000 [Enter] there will be no response Set Voltage, send: 5. VOLT 20.987 [Enter] there will be no response Set Current, send: 6. CURR 0.123 [Enter] there will be no response Measure the voltage, send: 7. 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: 7. 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 I am a professional with 26 years software RD experience. In 2005-2018, worked for Microsoft Windows Mobile and Windows Phone developing team, XBox One manufacturing automation team, and Surface imaging test team, after 2019, opened a small automation software corporation at the first strong manufacturing city - Suzhou, China. If you have some industry automation related software project to oursource, please send me email to contact. Published date October 30, 2023

v1.0.23.3K
PowerSCPILabVIEW

ScpiDevice

ScpiDevice SCPI protocol VISA based devices controller This is an updated version of another NuGET package: SCPIPowerForLV. Besides DC Power suppliers and DMM meters, there are also some other kind of devices using SCPI protocol, which are different, so this package updated the SCPI commands, especially the addition of Read Waveform Data. Now there is only 1 class ScpiVisaDevice exported with following methods: 1. static FindAllLocalDevices() 2. Open(string name, int openTimeout, bool reconnectOnceFailed, out string errorInfo) 3. Close() 4. ExecuteWithoutReconnect(string dataToSend, out bool communicationError, out string errorInfo) 5. Execute underlyingly call ExecuteWithoutReconnect with same parameter 6. QueryWithoutReconnect(string dataToSend, int countToRead, out string responseText, out bool communicationError, out string errorInfo) 7. Query underlying call QueryWithoutReconnect 8.bool QueryNumber(string dataToSend, int countToRead, out string responseText, out double responseValue, out bool communicationError, out string errorInfo) 9. bool QueryWaveData(string dataToSend, out byte[] responseByteArray, out bool communicationError, out string errorInfo) All are literally, so will not explain more, only QueryWaveData needs following comments: It takes some steps below: 1. send SCPI command :WAV:DATA? 2. read out 2 bytes, it should be like #9 3. according to the length of index 1 of above string, read out 9+ bytes, it should be like 000000120 4. read out all the waveform data with 120 bytes. There is the last step which is not implemented in this free version: each point (byte) should be converted to voltage. Also, the LabVIEW code is not provided. But 2 applications are enclosed under the sub folder assets, one is a self test app on ITech 6302 Tripple Channel DC Power, another is a self test app on RIGOL DS1102 oscillograph. The source code of oscillograph to have self test is provided in invocation.txt under sub folder assets. For technique support or business, please call the cell phone ++0086-18603016232, email: patrickgamp@hotmail.com, WeChat(A Chinese popular chat app) id is same to the cell phone number I am a professional with 26 years software RD experience. In 2005-2018, worked for Microsoft Windows Mobile and Windows Phone developing team, XBox One manufacturing automation team, and Surface imaging test team, after 2019, opened a small automation software corporation at the first strong manufacturing city in the world - Suzhou, China. If you have some industry automation related software project to oursource, or any Windows desktop based non-Web softare developing requirements, please send me email to contact. Author Patrick Gamp Published date January 11, 2024

v1.0.01.0K
SCPIVISADeviceHardwareCommunication