Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5566

Captured Jpeg transfer from Instrumental by MMEmory:DATA

$
0
0

Jpeg File transfer from Instrumental to PC.

Hello, Please give your help regarding captured Jpeg file transferring from instrumental to PC via NI-VISA on VB.NET with followings.


DMM.WriteString("MMEMory:DATA? 'AAA.jpg'")
out_Msg = DMM.ReadString

returned message includes <header> and <Bindata>.
<headder> includes Len of Bindata(num of byte).

So I removed <headder> part and converted it to byte style by following.

Dim bs As Byte() = System.Text.Encoding.GetEncoding("shift_jis").GetBytes(remain_msg)

And wrote it as binary.

fs.Write(bs, 0, bs.Length)

After that, File was saved as Jpeg but can't open as pitcure.

I compared with original Jpeg got from instrumental.and I made via above. Actual File size is little bit different from original jpeg.
Also character corruption are seen.

Does someone has idea to fix it ? or any good sample program ?


Viewing all articles
Browse latest Browse all 5566

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>