Page 1 of 1

6482 Communicating MatLab trouble

Posted: June 4th, 2015, 9:20 am
by iAmGeorge
I want to make 10 current measurements at 10Hz, store them, calculate their mean, and output to MatLab. Not too much of a tech savvy person and the SCPI dabbling I've done has been fairly ineffective. Any code help on the matter?

While I'm here, let's say I just want to output the 10 values to an array in Matlab, is there a way to :READ? in multiple values? I've been getting by with just reading within a while loop, but it would make my life easier to spit out 10x1 arrays. And after spending a few days on this, I'm really curious at to what I was doing wrong.

Thanks in advance for any help!

Re: 6482 Communicating MatLab trouble

Posted: June 4th, 2015, 11:24 am
by Vince W
Hello George,
We have specific examples of this in the 6482 Reference Manual. You should have received a copy on CD with the instrument, but you can also download it from our website in case that's tucked away:

There are a variety of ways of retrieving multiple values, including the :READ? query. The method is to set up a triggered sequence of source/measure operations which would fill the reading buffer with, say 10, measurements. In the Reference Manual, Appendix F, we give several examples of how to do this. I think the Data Store example is a good one for your request.


Re: 6482 Communicating MatLab trouble

Posted: June 4th, 2015, 11:28 am
by Dale C
I would suggest to set the TRIGGER:COUNT to how ever many you need. Up to 3,000.
That way when you send the :READ? , it will take how ever many trigger counts of measurements with one :READ? command.
Is that what you need to do?