04-04-2024 12:09 AM
using the viRead() i am not able to fetch the output from my rigol oscilloscope .
First i am giving the data using viWrite() to the oscilloscope to print sine wave with some frequency and voltage .This works properly .
After this i am calling viRead with SCPI command "WAVeform:data" to fetch data from the oscilloscope but getting some errors.
Can please someone help me in this .(by providing the steps to how to fetch data from instrument or which api's of ni-visa to use for fetching the data).
04-04-2024 03:07 AM - edited 04-04-2024 03:08 AM
What interface do you use? GPIB, RS-232, USB-VirtualComm, USB-TMC, TCP/IP?
If it is not GPIB or USB-TMC you almost certainly need to add a carriage-return and/or line feed to every single command in order for the instrument to know that it can now parse and interpret the command. Without that, most instruments will sit there until hell freezes over, waiting for the final indication that the command is complete.
04-04-2024 06:05 AM
I am using USB TMC interface.
04-04-2024 06:14 AM
"WAVEform:data" may or may not be a valid command for your device. But without a question mark at the end, the device will never respond at all if it is SCPI compliant. All query commands require a question mark at the end to tell a device that it needs to send something back. If that still doesn't work try to append \r, \n or \r\n to the string.