Skip to content
Claude edited this page Dec 8, 2025 · 1 revision

SCPI Parameter Syntax

Hexadecimal #HFF
Octal #Q77
Binary #B11
String "text", 'text' String parameters with spaces must be enclosed in quotations. Example: SYSTem:COMMunicate:LAN:SSID "test me" NOTE: String parameters without spaces do not require quotations.

List of SCPI Commands

System Commands

SCPI Command Description Example Firmware Callback
SYSTem:REboot Reboots the device immediately. Returns "System reset initiated" before restarting SYSTem:REboot SCPI_Reset
help Display available SCPI commands help SCPI_Help
SYSTem:SYSInfoPB? Returns protobuf message with board information - actual message fields are listed below this section SYSTem:SYSInfoPB? SCPI_SysInfoGet
SYSTem:INFo? Get human-readable system information including detailed power state names (STANDBY, POWERED_UP, etc.), battery voltage, charge state, network config, and system status SYSTem:INFo? SCPI_SystemInfo
SYSTem:LOG? Get system log entries SYSTem:LOG? SCPI_SysLogGet
SYSTem:ECHO Set echo for use with terminal/human readable. Default = 1. SYSTem:ECHO -1 turns off all echoed characters. SYSTem:ECHO 0 turns off echo but leaves DAQiFi> prompt. SYSTem:ECHO 1 turns on echo. SCPI_SetEcho
SYSTem:FORceBoot Force device to enter bootloader mode for firmware updates SYSTem:FORceBoot SCPI_ForceBootloader
SYSTem:SERialNUMber? Get device serial number in SCPI hex format (#H prefix followed by 16 hex digits) SYSTem:SERialNUMber? SCPI_GetSerialNumber
SYSTem:USB:SetTransparentMode Set USB transparent mode for WINC1500 firmware updates (0=SCPI mode, 1=transparent mode) SYSTem:USB:SetTransparentMode 0 SCPI_UsbSetTransparentMode
STATus:OPERation? SCPI_NotImplemented
STATus:OPERation:EVENt? SCPI_NotImplemented
STATus:OPERation:CONDition? SCPI_NotImplemented
STATus:OPERation:ENABle SCPI_NotImplemented
STATus:OPERation:ENABle? SCPI_NotImplemented
STATus:QUEStionable:CONDition? SCPI_NotImplemented
SYSTem:COMMunication:TCPIP:CONTROL? SCPI_NotImplemented

Power Commands

SCPI Command Description Example Firmware Callback
SYSTem:POWer:SOURce? Get external power source type (0=none, 1=unknown, 2=1A charger, 3=2A charger, 4=USB 100mA, 5=USB 500mA) SYSTem:POWer:SOURce? SCPI_PowerSourceGet
SYSTem:BAT:LEVel? Get battery charge level percentage (0-100). Returns -1 when device is in STANDBY mode (battery monitoring inactive) SYSTem:BAT:LEVel? SCPI_BatteryLevelGet
SYSTem:POWer:STATe? Get power state. Returns binary values:
0 = STANDBY (device in low-power mode)
  - On USB power: MCU remains on, 3.3V rail enabled
  - On battery power: MCU powers off to save battery
1 = POWERED (device fully operational)
  - Maps to internal states POWERED_UP or POWERED_UP_EXT_DOWN
  - All systems operational, ADC readings valid

Device automatically manages 3.3V rail to prevent power loss on USB disconnect
SYSTem:POWer:STATe? SCPI_GetPowerState
SYSTem:POWer:STATe Set power state:
0 = STANDBY (low-power mode)
1 = POWERED (fully operational)
SYSTem:POWer:STATe 1 SCPI_SetPowerState
SYSTem:POWer:OTG? Get OTG boost mode status (0=off, 1=on) SYSTem:POWer:OTG? SCPI_GetOTGMode
SYSTem:POWer:OTG Set OTG boost mode:
0 = Disable OTG
1 = Enable battery boost operation

Notes:
• OTG provides 5V output from battery
• Cannot be enabled while USB is connected
• Disable when no longer needed to save battery
SYSTem:POWer:OTG 1 SCPI_SetOTGMode
SYSTem:FORce5V5POWer:STATe Force enable/disable external 5V supply (overrides automatic control) SYSTem:FORce5V5POWer:STATe 1 SCPI_Force5v5PowerStateSet

DIO Commands

SCPI Command Description Example Firmware Callback
DIO:PORt:DIRection Sets Digital Port Direction. First parameter is the DIO number. Second parameter is for Direction, '0' for input and '1' for output. DIO:PORt:DIRection 0,1 SCPI_GPIODirectionSet
DIO:PORt:DIRection? Gets Digital Port Direction. Parameter passed is the DIO number whose Direction needs to be checked. DIO:PORt:DIRection? 0 SCPI_GPIODirectionGet
DIO:PORt:STATe Sets Digital Port State. First parameter is the DIO number. Second parameter is for State, '0' for LOW State and '1' for HIGH State. DIO:PORt:STATe 0,1 SCPI_GPIOStateSet
DIO:PORt:STATe? Gets Digital Port State. Parameter passed is the DIO number whose State needs to be checked. DIO:PORt:STATe? 0 SCPI_GPIOStateGet
DIO:PORt:ENAble Enables Digital Port. This command should be used everytime a new DIO needs to be used, before using commands like DIO:PORt:DIRection, and DIO:PORt:STATe. The parameter passed should be '1' to Enable the DIO port. DIO:PORt:ENAble 1 SCPI_GPIOEnableSet
DIO:PORt:ENAble? Gets Digital Port Enabled State. DIO:PORt:ENAble? SCPI_GPIOEnableGet

PWM Commands

SCPI Command Description Example Firmware Callback
PWM:CHannel:FREQuency Sets the Frequency of a PWM channel (0,3,4,5,6,7) in Hz PWM:CHannel:FREQuency 0,10000 SCPI_PWMChannelFrequencySet
PWM:CHannel:FREQuency? Gets the PWM frequencty in Hz. Parameter passed is the PWM channel number. PWM:CHannel:FREQuency? 0 SCPI_PWMChannelFrequencyGet
PWM:CHannel:DUTY Sets the duty cycle of a PWM channel in percentage PWM:CHannel:DUTY 0,50 SCPI_PWMChannelDUTYSet
PWM:CHannel:DUTY? Gets the duty cycle of a PWM channel in percentage. Parameter passed is the PWM channel number. PWM:CHannel:DUTY? 0 SCPI_PWMChannelDUTYGet
PWM:CHannel:ENable Enable PWM in a particular channel. This command should be used everytime a new PWM channel needs to be used, before using commands like PWM:CHannel:FREQuency, and PWM:CHannel:DUTY. PWM:CHannel:ENable 0,1 (Enable PWM in channel 0)
PWM:CHannel:ENable 0,0 (Disable PWM in channel 0)
SCPI_PWMChannelEnableSet
PWM:CHannel:ENable? Check if PWM is enabled in a channel. Parameter passed is the PWM channel number that needs to be checked. PWM:CHannel:ENable? 0 SCPI_PWMChannelEnableGet

WiFi Commands

SCPI Command Description Example Firmware Callback
SYSTem:COMMunicate:LAN:ENAbled? Get WiFi enabled status (0=disabled, 1=enabled) SYSTem:COMMunicate:LAN:ENAbled? SCPI_LANEnabledGet
SYSTem:COMMunicate:LAN:ENAbled Enable or disable WiFi (0=disable, 1=enable) SYSTem:COMMunicate:LAN:ENAbled 1 SCPI_LANEnabledSet
SYSTem:COMMunicate:LAN:NETType? Get network type: 1 = NETWORK_TYPE_INFRASTRUCTURE
4 = NETWORK_TYPE_SOFT_AP
SYSTem:COMMunicate:LAN:NETType? SCPI_LANNetTypeGet
SYSTem:COMMunicate:LAN:NETType Set network type: 1 = Infrastructure (connect to router)
4 = Soft AP (device creates access point)
SYSTem:COMMunicate:LAN:NETType 1 SCPI_LANNetTypeSet
SYSTem:COMMunicate:LAN:ADDRess? Get device IP address SYSTem:COMMunicate:LAN:ADDRess? SCPI_LANAddrGet
SYSTem:COMMunicate:LAN:ADDRess Set device IP address SYSTem:COMMunicate:LAN:ADDRess "192.168.1.100" SCPI_LANAddrSet
SYSTem:COMMunicate:LAN:MASK? Get subnet mask SYSTem:COMMunicate:LAN:MASK? SCPI_LANMaskGet
SYSTem:COMMunicate:LAN:MASK Set subnet mask SYSTem:COMMunicate:LAN:MASK "255.255.255.0" SCPI_LANMaskSet
SYSTem:COMMunicate:LAN:GATEway? Get gateway IP address SYSTem:COMMunicate:LAN:GATEway? SCPI_LANGatewayGet
SYSTem:COMMunicate:LAN:GATEway Set gateway IP address SYSTem:COMMunicate:LAN:GATEway "192.168.1.1" SCPI_LANGatewaySet
SYSTem:COMMunicate:LAN:IPV6? Get IPv6 support status (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:IPV6 Set IPv6 support (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:DNS1? Get primary DNS server (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:DNS1 Set primary DNS server (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:DNS2? Get secondary DNS server (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:DNS2 Set secondary DNS server (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:MAC? Get device MAC address SYSTem:COMMunicate:LAN:MAC? SCPI_LANMacGet
SYSTem:COMMunicate:LAN:MAC Set custom MAC address (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:CONnected? Check if WiFi is connected (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:HOST? Get device hostname SYSTem:COMMunicate:LAN:HOST? SCPI_LANHostnameGet
SYSTem:COMMunicate:LAN:HOST Set device hostname (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:SSID? Get WiFi SSID SYSTem:COMMunicate:LAN:SSID? SCPI_LANSsidGet
SYSTem:COMMunicate:LAN:SSID Set WiFi SSID to connect to SYSTem:COMMunicate:LAN:SSID "MyNetwork" SCPI_LANSsidSet
SYSTem:COMMunicate:LAN:AvSSIDScan Scan for available WiFi networks (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:AvSSID? Get list of available WiFi networks from scan (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:SECurity? Get security type: 0 = OPEN, 3 = WPA_AUTO_WITH_PASS_PHRASE
(Other options deprecated or not implemented)
SYSTem:COMMunicate:LAN:SECurity? SCPI_LANSecurityGet
SYSTem:COMMunicate:LAN:SECurity Set security type: 0 = OPEN, 3 = WPA/WPA2 SYSTem:COMMunicate:LAN:SECurity 3 SCPI_LANSecuritySet
SYSTem:COMMunicate:LAN:PASs Set WiFi password/passphrase (requires non-open security mode) SYSTem:COMMunicate:LAN:PASs MyPassword123 SCPI_LANPasskeySet
SYSTem:COMMunicate:LAN:PASSCHECK? Check if given password matches stored password (returns 1 if match, 0 if not) SYSTem:COMMunicate:LAN:PASSCHECK? MyPassword123 SCPI_LANPasskeyGet
SYSTem:COMMunicate:LAN:DISPlay Display network settings (not implemented) - SCPI_NotImplemented
SYSTem:COMMunicate:LAN:APPLY Apply WiFi settings to device (required for network changes to take effect) SYSTem:COMMunicate:LAN:APPLY SCPI_LANSettingsApply
SYSTem:COMMunicate:LAN:LOAD Load WiFi settings from NVM SYSTem:COMMunicate:LAN:LOAD SCPI_LANSettingsLoad
SYSTem:COMMunicate:LAN:SAVE Save current WiFi settings to NVM (allow settings to persist after power-off) SYSTem:COMMunicate:LAN:SAVE SCPI_LANSettingsSave
SYSTem:COMMunicate:LAN:FACRESET Load factory default WiFi settings (SSID="DAQiFi", Open security, etc.) SYSTem:COMMunicate:LAN:FACRESET SCPI_LANSettingsFactoryLoad
SYSTem:COMMUnicate:LAN:FWUpdate Sets the serial interface to transparent mode for WINC1500 WiFi module firmware updates, bypassing the SCPI interface.

Command Sequence to enter WINC FW update mode:
1. SYSTem:POWer:STATe 1
2. SYSTem:COMMUnicate:LAN:FWUpdate
3. SYSTem:COMMUnicate:LAN:APPLY

Now, flash using the MCHP winc_flash_tool.cmd

Command Sequence to exit WINC FW update mode:
1. SYSTem:USB:SetTransparentMode 0
2. SYSTem:COMMunicate:LAN:ENabled 1
3. SYSTem:COMMUnicate:LAN:APPLY

Note: This uses the same transparent mode functionality as SYSTem:USB:SetTransparentMode

WiFi Command Notes

  • The device creates an open WiFi access point by default with SSID "DAQiFi"
  • WiFi must be enabled (ENAbled 1) and applied (APPLY) for changes to take effect
  • Settings must be saved (SAVE) to persist across power cycles
  • The device must be in POWERED_UP state (power state 1) for WiFi to operate

ADC Commands

SCPI Command Description Example Firmware Callback
MEASure:VOLTage:DC? Measure DC voltage on specified channel MEASure:VOLTage:DC? 0 SCPI_ADCVoltageGet
ENAble:VOLTage:DC Enable/disable ADC channels for voltage measurement Enable Ch0: ENAble:VOLTage:DC 0,1
Enable Ch1: ENAble:VOLTage:DC 1,1
Enable all: ENAble:VOLTage:DC 65535
SCPI_ADCChanEnableSet
ENAble:VOLTage:DC? Get channel enable status ENAble:VOLTage:DC? 0 SCPI_ADCChanEnableGet
SOURce:VOLTage:LEVel Set output voltage level (not implemented) SOURce:VOLTage:LEVel 5.0 SCPI_NotImplemented
CONFigure:ADC:SINGleend Set channel to single-ended (1) or differential (0) mode (if device supports it) CONFigure:ADC:SINGleend 0,1 SCPI_ADCChanSingleEndSet
CONFigure:ADC:SINGleend? Get channel single-ended/differential setting CONFigure:ADC:SINGleend? 0 SCPI_ADCChanSingleEndGet
CONFigure:ADC:RANGe Set ADC channel voltage range (if device supports it) CONFigure:ADC:RANGe 0,10 SCPI_ADCChanRangeSet
CONFigure:ADC:RANGe? Get ADC channel voltage range CONFigure:ADC:RANGe? 0 SCPI_ADCChanRangeGet
CONFigure:ADC:CHANnel Enable/disable ADC channel (alias for ENAble:VOLTage:DC for backwards compatibility) CONFigure:ADC:CHANnel 0,1 SCPI_ADCChanEnableSet
CONFigure:ADC:CHANnel? Get channel enable status (alias for ENAble:VOLTage:DC? for backwards compatibility) CONFigure:ADC:CHANnel? 0 SCPI_ADCChanEnableGet
CONFigure:ADC:chanCALM Sets the m (slope) calibration value on a single channel CONFigure:ADC:chanCALM 0 1.0023 SCPI_ADCChanCalmSet
CONFigure:ADC:chanCALB Sets the b (intercept) calibration value on a single channel CONFigure:ADC:chanCALB 0 0.0012 SCPI_ADCChanCalbSet
CONFigure:ADC:chanCALM? Gets the m (slope) calibration value for a channel CONFigure:ADC:chanCALM? 0 SCPI_ADCChanCalmGet
CONFigure:ADC:chanCALB? Gets the b (intercept) calibration value for a channel CONFigure:ADC:chanCALB? 0 SCPI_ADCChanCalbGet
CONFigure:ADC:SAVEcal Saves current user calibration values for all channels to NVM CONFigure:ADC:SAVEcal SCPI_ADCCalSave
CONFigure:ADC:SAVEFcal Saves current calibration as factory values (use with caution) CONFigure:ADC:SAVEFcal SCPI_ADCCalFSave
CONFigure:ADC:LOADcal Loads user calibration values from NVM CONFigure:ADC:LOADcal SCPI_ADCCalLoad
CONFigure:ADC:LOADFcal Loads factory calibration values from NVM CONFigure:ADC:LOADFcal SCPI_ADCCalFLoad
CONFigure:ADC:USECal Select factory (0) or user (1) calibration values CONFigure:ADC:USECal 1 SCPI_ADCUseCalSet
CONFigure:ADC:USECal? Get calibration mode: factory (0) or user (1) CONFigure:ADC:USECal? SCPI_ADCUseCalGet

SPI Commands

SCPI Command Description Example Firmware Callback
OUTPut:SPI:WRIte Write data to SPI bus (not implemented) OUTPut:SPI:WRIte 0xFF,0x00 SCPI_NotImplemented

Streaming Commands

SCPI Command Description Example Firmware Callback
SYSTem:StartStreamData Start streaming enabled channels at specified frequency SYSTem:StartStreamData 100 SCPI_StartStreaming
SYSTem:StopStreamData Stop data streaming SYSTem:StopStreamData SCPI_StopStreaming
SYSTem:StreamData? Check if streaming is active (0=stopped, 1=streaming) SYSTem:StreamData? SCPI_IsStreaming
SYSTem:STReam:FORmat
<format>,<TestData_Len>
Argument 1: <format>
  • 0 = Protobuf
  • 1 = JSON
  • 2 = TestData

Argument 2 (optional):<TestData_Len>
  • Specifies the length of TestData.
  • This field is applicable only when <format> is set to 2 (TestData).
  • By default the <TestData_Len> = 0 (dynamic length which varies during run-time). The length of the TestData will be equal to the number of bytes written to the buffer upon calling Nanopb_Encode().
Additional notes: TestData format is useful to run communication tests. In this mode, the program will first encode the stream data using Nanopb_Encode(), then fill up the write buffer with dummy data until it reaches the length specified by <TestData_Len>. The packet structure for TestData is demonstrated below:

Byte [0] - The first byte is always a '#', which indicates a header byte.

Byte [1] - Byte [4] - 32-bit tick in 1 millisecond resolution.

Byte [5] - Byte [6] - 16-bit cycle counter, increments every packet. Useful for packet loss detection.

Byte [7] - Byte [TestData_Len-5] - padded with Dummy Data.

Byte [TestData_Len-4] - Byte[TestData_Len-3] - 16-bit checksum using simple additive summation.

Byte [TestData_Len-2] - Byte[TestData_Len-1] - 2 bytes delimiter '\r\n'
SYSTem:STReam:FORmat 2,1000
Sets the stream format to TestData with fixed length at 1000 bytes (maximum length).
SCPI_SetStreamFormat
SYSTem:STReam:FORmat? Get current stream format (0=Protobuf, 1=JSON, 2=CSV) SYSTem:STReam:FORmat? SCPI_GetStreamFormat
SYSTem:STReam:INTerface Set streaming output interface:
• 0 = USB
• 1 = WiFi
• 2 = SD card
• 3 = All (legacy mode)
Auto-detects source interface if not explicitly set.
SYSTem:STReam:INTerface 2 SCPI_SetStreamInterface
SYSTem:STReam:INTerface? Get current streaming interface SYSTem:STReam:INTerface? SCPI_GetStreamInterface
SYSTem:STReam:Stats? Get streaming statistics: USB overflow, TCP overflow, sample list overflows SYSTem:STReam:Stats? SCPI_GetStreamStats
SYSTem:STReam:ClearStats Clear all streaming statistics counters SYSTem:STReam:ClearStats SCPI_ClearStreamStats

SD Logging Commands

SCPI Command Description Example Firmware Callback
SYSTem:STORage:SD:ENAble Enable (1) or disable (0) SD card. USB+SD streaming is automatic when SD logging configured. WiFi+SD streaming blocked (SPI bus conflict). SYSTem:STORage:SD:ENAble 1 SCPI_StorageSDEnableSet
SYSTem:STORage:SD:LOGging Set filename for SD card logging. File is opened in overwrite mode (not append). SYSTem:STORage:SD:LOGging "data.csv" SCPI_StorageSDLoggingSet
SYSTem:STORage:SD:LISt? List all files on SD card. Returns chunked output to handle large directories. Optional parameter: directory path. SYSTem:STORage:SD:LIST?
SYSTem:STORage:SD:LIST? "DAQiFi"
SCPI_StorageSDListDir
SYSTem:STORage:SD:GET Retrieve file contents from SD card. Parameter: filename in quotes. SYSTem:STORage:SD:GET "data.csv" SCPI_StorageSDGetData
SYSTem:STORage:SD:DELete Delete a file from SD card. Parameter: filename in quotes. SYSTem:STORage:SD:DEL "old.csv" SCPI_StorageSDDelete
SYSTem:STORage:SD:FORmat Format SD card (erase all files). WARNING: Destructive! Can take 5-30 seconds. SYSTem:STORage:SD:FOR SCPI_StorageSDFormat
SYSTem:STORage:SD:BENCHmark Run write speed benchmark. Parameter: size in KB (1-1024). SYSTem:STORage:SD:BENCH 1024 SCPI_StorageSDBenchmark
SYSTem:STORage:SD:BENCHmark? Query benchmark results. Returns CSV: bytes_written,time_ms,speed_bps SYSTem:STORage:SD:BENCH? SCPI_StorageSDBenchmarkQuery
SYSTem:STORage:SD:MAXSize Set maximum file size in bytes before auto-split. Prevents FAT32 4GB limit issues. Range: 1000 bytes to 4GB, or 0 for filesystem maximum. Default: 3.9GB (FAT32-safe). Setting 0 uses safe 3.9GB limit. Files split sequentially: data.csv → data-0001.csv, data-0002.csv, etc. SYSTem:STORage:SD:MAXSize 2000000000
SYSTem:STORage:SD:MAXSize 0
SCPI_StorageSDMaxSizeSet
SYSTem:STORage:SD:MAXSize? Query current maximum file size setting. Returns bytes. SYSTem:STORage:SD:MAXSize? SCPI_StorageSDMaxSizeGet

SD Card Logging Example:

SYSTem:POWer:STATe 1
SYSTem:STORage:SD:ENAble 1
SYSTem:STORage:SD:LOGging "test.csv"
SYSTem:STReam:FORmat 2
CONFigure:ADC:CHANnel 4,1
SYSTem:StartStreamData 100
// Data streams to USB AND logs to SD automatically
SYSTem:StopStreamData
SYSTem:STORage:SD:LIST?
// File appears in listing
SYSTem:STORage:SD:GET "test.csv"
// Retrieve file contents
SYSTem:STORage:SD:DEL "test.csv"
// Delete file

FreeRTOS Commands

SCPI Command Description Example Firmware Callback
SYSTem:OS:Stats? Get FreeRTOS task runtime statistics showing CPU usage per task SYSTem:OS:Stats? SCPI_GetOSStats

Common Usage Examples

Basic Power Control

# Power up the device
SYSTem:POWer:STATe 1

# Check power state
SYSTem:POWer:STATe?

# Get system info
SYSTem:INFo?

# Power down
SYSTem:POWer:STATe 0

WiFi Configuration

# Configure WiFi to connect to a network
SYSTem:COMMunicate:LAN:SSID "MyNetwork"
SYSTem:COMMunicate:LAN:SECurity 3
SYSTem:COMMunicate:LAN:PASs "MyPassword123"
SYSTem:COMMunicate:LAN:NETType 1
SYSTem:COMMunicate:LAN:APPLY

# Save settings to NVM
SYSTem:COMMunicate:LAN:SAVE

# Configure as Access Point
SYSTem:COMMunicate:LAN:NETType 4
SYSTem:COMMunicate:LAN:SSID "DAQiFi-AP"
SYSTem:COMMunicate:LAN:SECurity 0
SYSTem:COMMunicate:LAN:APPLY

ADC Data Acquisition

# Enable channel 0 for 10V range
ENAble:VOLTage:DC 0,1
CONFigure:ADC:RANGe 0,10

# Read single voltage
MEASure:VOLTage:DC? 0

# Start streaming at 100Hz
SYSTem:StartStreamData 100

# Stop streaming
SYSTem:StopStreamData

Digital I/O Control

# Enable DIO port
DIO:PORt:ENAble 1

# Set as output
DIO:PORt:DIRection 0,1

# Set high
DIO:PORt:STATe 0,1

# Read state
DIO:PORt:STATe? 0

PWM Output

# Enable PWM channel 0
PWM:CHannel:ENable 0,1

# Set 1kHz frequency
PWM:CHannel:FREQuency 0,1000

# Set 50% duty cycle
PWM:CHannel:DUTY 0,50

SD Card Logging

# Power up
SYSTem:POWer:STATe 1

# Disable WiFi (required for SD)
SYSTem:COMMunicate:LAN:ENAbled 0
SYSTem:COMMunicate:LAN:APPLY

# Enable SD logging
SYSTem:STORage:SD:ENAble 1
SYSTem:STORage:SD:LOGging "test_data.bin"

# Configure format and channels
SYSTem:STReam:FORmat 1
ENAble:VOLTage:DC 0,1

# Start logging
SYSTem:StartStreamData 10

# Stop and retrieve data
SYSTem:StopStreamData
SYSTem:STORage:SD:GET "test_data.bin"