Any recommended means to communicate with RDK

124 views
Skip to first unread message

Zhihao Tan

unread,
Oct 28, 2013, 3:21:55 AM10/28/13
to quonset-microw...@googlegroups.com
Hi,

I am currently using MATLAB with instrument control toolbox and Agilent IO library to communicate with RDK through SCPI/VISA. However, I met a problem of not able to read the data fast enough. It took nearly 0.5s to read 2048 samples using my method as shown in the Capture.jpg. Since most of the time is being used to extract the raw data by the MATLAB java script, my setup is not able to reliably capture the movement that i desired (e.g throwing of paper balls which this event usually lasts < 0.5s.)

Firstly, I would like to double check the correctness of my data extract program (FN_CAPTure_FRAMe.m).

Secondly, I would also like to know if there is any recommended software combination (Eg. python?)  to develop customized solutions to work with RDK.

Zhi Hao


Capture.JPG
Fn_CAPTure_FRAMe.m

RDK Support

unread,
Oct 28, 2013, 10:21:47 AM10/28/13
to quonset-microw...@googlegroups.com
Your data extraction program is correct.  Unfortunately you will not be able to read much faster than you are currently using USB/VISA.  If you have access to Bluetooth on your PC, that would be faster than USB. 

Python would be an excellent environment to develop in.  We have not tested the RDK with other software, but anything that can communicate through VISA or Bluetooth should work with the RDK.

Zhihao Tan

unread,
Oct 28, 2013, 10:35:14 AM10/28/13
to quonset-microw...@googlegroups.com
Would you mind sharing some of the codes that you have written for testing?

I guess it will be faster after trying pyVISA, however I didn't manage to make it work. The reply from command "CAPT:FRAM?" always shows "Not Ready".

RDK Support

unread,
Oct 28, 2013, 10:43:32 AM10/28/13
to quonset-microw...@googlegroups.com
I will try to get example code to you around noon today (my time, EDT).  Since pyVISA is probably faster, you may have to insert a delay between calling "CAPT:FRAM 2048" and "CAPT:FRAM?".  2048 samples is about 100ms of time, so there must be at least that amount of time between the two messages. 

RDK Support

unread,
Oct 28, 2013, 11:03:20 AM10/28/13
to quonset-microw...@googlegroups.com
See the attached python script.  Python differs from Matlab in that it does not terminate the data written to the Visa object.  You must terminate it manually (using "\n" for the RDK)

instead of:   rdkVisa.write("CAPT:FRAM 2048");

you must write: rdkVisa.write("CAPT:FRAM 2048\n");  <-- notice the "\n" 

I did a quick speed test and it IS faster, if only slightly. 
RDK_VISA.py
Reply all
Reply to author
Forward
0 new messages