@@ -134,10 +134,6 @@ SiglentSCPIOscilloscope::SiglentSCPIOscilloscope(SCPITransport* transport)
134134 , m_digitalAcqPointsValid(false )
135135 , m_highDefinition(false )
136136{
137- // Enable command rate limiting
138- // TODO: only for some firmware versions or instrument SKUs?
139- transport->EnableRateLimiting (chrono::milliseconds (50 ));
140-
141137 // standard initialization
142138 FlushConfigCache ();
143139 IdentifyHardware ();
@@ -409,13 +405,23 @@ void SiglentSCPIOscilloscope::IdentifyHardware()
409405 // Native 12 bit resolution but supports 8 bit data transfer with higher refresh rate
410406 // This can be overriden by driver 16bits setting
411407 m_highDefinition = true ;
412- m_requireSizeWorkaround = true ;
408+ // No need for size workaround on SDS800X HD, at lease with fimware versions v1.1.3.3 and v1.1.3.8
409+ // m_requireSizeWorkaround = true;
413410 }
414411 else
415412 {
416413 LogWarning (" Model \" %s\" is unknown, available sample rates/memory depths may not be properly detected\n " ,
417414 m_model.c_str ());
418415 }
416+ if (m_protocolId != PROTOCOL_E11 || m_modelid == MODEL_SIGLENT_SDS2000XP)
417+ { // Enable command rate limiting => 50ms for older models
418+ m_transport->EnableRateLimiting (chrono::milliseconds (50 ));
419+ }
420+ else
421+ { // Only 5 ms for newer models
422+ m_transport->EnableRateLimiting (chrono::milliseconds (5 ));
423+ }
424+
419425 }
420426 else
421427 {
@@ -2114,7 +2120,8 @@ bool SiglentSCPIOscilloscope::AcquireData()
21142120 analogWaveformData[i] = new char [acqBytes];
21152121 if (!paginated)
21162122 { // All data fits one page
2117- m_transport->SendCommand (" :WAVEFORM:SOURCE C" + to_string (i + 1 ) + " ;:WAVEFORM:DATA?" );
2123+ m_transport->SendCommand (" :WAVEFORM:SOURCE C" + to_string (i + 1 ));
2124+ m_transport->SendCommand (" :WAVEFORM:DATA?" );
21182125 analogWaveformDataSize[i] = ReadWaveformBlock (acqBytes, analogWaveformData[i], hdWorkaround);
21192126 // This is the 0x0a0a at the end
21202127 m_transport->ReadRawData (2 , (unsigned char *)tmp);
@@ -2124,7 +2131,8 @@ bool SiglentSCPIOscilloscope::AcquireData()
21242131 m_transport->SendCommand (" :WAVEFORM:SOURCE C" + to_string (i + 1 ));
21252132 for (uint64_t page = 0 ; page < pages; page++)
21262133 {
2127- m_transport->SendCommand (" :WAVEFORM:START " + to_string (page*pageSize) + " ;:WAVEFORM:DATA?" );
2134+ m_transport->SendCommand (" :WAVEFORM:START " + to_string (page*pageSize));
2135+ m_transport->SendCommand (" :WAVEFORM:DATA?" );
21282136 analogWaveformDataSize[i] += ReadWaveformBlock (acqBytes-analogWaveformDataSize[i], analogWaveformData[i]+analogWaveformDataSize[i], hdWorkaround);
21292137 // This is the 0x0a0a at the end
21302138 m_transport->ReadRawData (2 , (unsigned char *)tmp);
@@ -2530,6 +2538,10 @@ float SiglentSCPIOscilloscope::GetChannelVoltageRange(size_t i, size_t /*stream*
25302538
25312539void SiglentSCPIOscilloscope::SetChannelVoltageRange (size_t i, size_t /* stream*/ , float range)
25322540{
2541+ // Only for analog channels
2542+ if (i >= m_analogChannelCount)
2543+ return ;
2544+
25332545 float vdiv = range / 8 ;
25342546 m_channelVoltageRanges[i] = range;
25352547
@@ -5497,7 +5509,7 @@ void SiglentSCPIOscilloscope::SetFunctionChannelOutputImpedance(int chan, Functi
54975509 */
54985510void SiglentSCPIOscilloscope::ForceHDMode (bool mode)
54995511{
5500- if ((m_modelid == MODEL_SIGLENT_SDS800X_HD || m_modelid == MODEL_SIGLENT_SDS2000X_HD ) && mode != m_highDefinition)
5512+ if ((m_protocolId == PROTOCOL_E11 ) && ( mode != m_highDefinition) )
55015513 {
55025514 m_highDefinition = mode;
55035515 sendOnly (" :WAVEFORM:WIDTH %s" , m_highDefinition ? " WORD" : " BYTE" );
0 commit comments