LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Consecutive VISA commands issue

Solved!
Go to solution

I have no experience using VISA. I've noticed that my OWON SDS1022 oscilloscope has trouble processing my STOP command if there's a time delay of less than 50 ms to a previous START command. Is this expectable

behavior? Conversely, querying the device's ID works immediately.
SDS1000_Oscilloscopes_SCPI_Protocol 

VISA.png

Actor Framework
0 Kudos
Message 1 of 10
(669 Views)

Hi Quiztus,

 


@Quiztus2 wrote:

I've noticed that my OWON SDS1022 oscilloscope has trouble processing my STOP command if there's a time delay of less than 50 ms to a previous START command. Is this expectable behavior?


Yes: I guess the scope is quite busy when starting to execute your START command!

 

(You should ask the scope manufacturer for such specific questions about behavious (aka "the firmware") of the scope…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(664 Views)

I had no luck with answes from the manufacturer so far. Do you have experience with 488.2 status register? Would this be usecase for this?

Actor Framework
0 Kudos
Message 3 of 10
(641 Views)

Hi Quiztus,

 


@Quiztus2 wrote:

Do you have experience with 488.2 status register? Would this be usecase for this?


This would only be useful for GPIB communication.

When I was using GPIB-connected devices I needed the status register very seldomly (or was it never?). Most often I could send a command and read the response.

 

And it most often helps (GPIB or other communication busses) to send commands at a limited rate (aka "delay between commands"). There are commands that take longer than others: a "device reset" may need several seconds, while a simple "set parameter" will be done within 2ms! And to "start acquisition" seems to be more demanding (apply all relevant parameters, arm triggers, enable inputs and amplifiers, …) than a "stop acquisition" (aka "break") in your specific use case…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 10
(624 Views)

@Quiztus2 wrote:

I have no experience using VISA. I've noticed that my OWON SDS1022 oscilloscope has trouble processing my STOP command if there's a time delay of less than 50 ms to a previous START command. Is this expectable behavior?


It is not unheard of.  It completely depends on the instrument.  Some instruments have a very limited communication buffer, so you cannot send too many commands at once or things will get dropped.  Others have limited processing capability and have trouble processing commands while still doing something due to the previous command, which is the situation I think you are running into.

 

Any good modern instrument nowadays will not have these issues, at least that I have ran into.  Go 10 years ago, these were more common issues.  I even had a situation with a Tektronix TDS3000 series scope where I had to put in a 500ms delay because the processing from one command what overwriting subsequent command settings.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 10
(587 Views)
Solution
Accepted by topic author Quiztus2

One alternative is to send the *OPC? query.  This will be loaded into the queue inside the instrument and will not return a response until the command prior to the *OPC? query is completed.  The response will always be "1" and as such is really irrelevant other than to create a delay for sending the next command.

 

Remember, some commands like self-test *TST might take several seconds and cause a timeout during the VISA Read part of the *OPC? query.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 6 of 10
(571 Views)

Although a complete set of 488.2 commands is listed in the documentation, only *RST and *IDN? work. I will now have to settle for a simple wait after the start.

Quiztus2_0-1717423349817.png

 

Actor Framework
0 Kudos
Message 7 of 10
(562 Views)

Typically you do a Write of a Command and then a Read of the result. After that you can send the next command. One common mistake is to not send the correct End, many manufacturers wants a newline '\n' in the end of each command, some wants semicolon ';', check what applies to your gear.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 8 of 10
(557 Views)

Generally speaking,  once a Data Acquisition Device. "Starts" an Acquisition that is what they do! Aquire data!

 

Your Oscilloscope is following that process. Interrupting data acquisition is "Rude"


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 10
(543 Views)

Personally, I find these Wait solutions ugly. Here a screenshot from a multiple channel fetch vi from Rigol DS1054 VISA driver. 

Quiztus2_0-1717492099348.png

200 ms delay between reading of channel 1 and 2.

 

Actor Framework
0 Kudos
Message 10 of 10
(495 Views)