Benchtop Measurement and Test
Distributed Measurement and Control
High-Performance Test
Systems Engineering Software
Perspectives showcases how NI sees what’s next in the world of test and technology.
You can request repair, RMA, schedule calibration, or get technical support. A valid service agreement may be required.
Provides support for NI data acquisition and signal conditioning devices.
Provides support for Ethernet, GPIB, serial, USB, and other types of instruments.
Provides support for NI GPIB controllers and NI embedded controllers with GPIB ports.
04-13-2021 05:42 AM
KeysightのN7745Aマルチポート光パワーメーターを制御しています。
・開発環境VisualStudio 2019 C#・Windows10 USB接続にて制御
NI-VISAにExamplesで入っていたSimpleReadWriteを元に8ポートのパワーの情報を順次読み出す制御をしています。
(次の読み出しまでの待ち時間は20~100msまで試しました)
40~50回に1回読み込みエラーが出るのでI/OトレースをしたところWriteの後にCloseが大量に発生してReadができない(?)ような状態です。
これを安定させる手法をアドバイス頂けると助かります。
Solved! Go to Solution.
04-14-2021 06:16 AM
自己解決しました。
SimpleReadWriteを元に、ReadとWriteを別のメソッドとして
書き込み時にはWriteを実行しThreadSleep(処理の遅延吸収)をして
次に読み込みが必要な時にReadメソッドを使用していました。
SimpleReadWriteのQueryを元にして、
WriteとReadを同じメソッド内で処理をしてから
ThreadSleepをするようにしたら安定しました。
お騒がせしました。
What do you need our team of experts to assist you with?
Thanks!
We'll be in touch soon!