06-20-2022 11:36 PM
I installed NI VISA and the waveform generator driver “Agilent 3352X Series”. But when running the example "Agilent 3352X Series Arbitrary Waveform.vi, I found that there was something wrong with the Sample Rate. The value I set is 10133333.33, but when writing to the Keysight trueform 33600 Waveform Generator, the last three digits will become zero, and the fourth-to-last digit will be rounded off. Can anyone help me with this problem? Grateful!
我安装了NI VISA以及波形发生器的驱动Agilent 3352X Series,运行生成任意波范例“Agilent 3352X Series Arbitrary Waveform.vi”时,发现发送信号的Sample Rate写入有些问题,我设置的值是10133333.33,但是写入到信号发生器上时,最后三位数字会变成零,倒数第四位数字还会出现四舍五入的现象,有谁能帮我解决这个小问题吗?感激不尽!
Solved! Go to Solution.
06-21-2022 01:11 PM
07-04-2022 12:03 AM
Hi GerdW,
Thank you~
The problem is indeed inside the "Configure Arbitrary Waveform" subVI. I edited the format of string to %f.
02-13-2024 02:00 PM
Hello JINGCI,
Please can you share what you changed exactly, i have this now "SOUR%d:FUNC:ARB %s\n".
Best regards
02-13-2024 04:14 PM
JINGCI posted this 2 years ago and probably won't be back to answer questions.
In the string you post, "SOUR%d" is the selection of which channel to modify, and "FUNC:ARB %s" is just choosing the name of the waveform data saved on the device. Neither one can be changed to %f like the solution implies was needed.
It was more likely that what he changed was this:
"%.;SOUR%d" just sets the decimal separator to a period then selects the channel, but the second half, "FUNC:ARB:SRAT\s%g\n" has the "%g" setting the sample rate.
If you change that %g to a %f, it adds more precision onto the number: