Please or Register to create posts and topics.

How to use the SPECTRAN V6 via Matlab

PreviousPage 5 of 9Next

I had asked one of our devs to look into this. I suspect it is an issue in the parser looking at the preview in the FileReader block, but as I'm not really sure how this should be processed in the first place really need to wait for a definitive statement.

Hello Abhijith,

there are multiple issue at play here:

  • First, the "start streaming" method will make the file source *stop* streaming in its current MATLAB implementation, and the easiest workaround there is to just start the file source once you've opened the mission in RTSA and not call that endpoint.
  • You're also seeing duplicated packets because of the /sample endpoint which was used in the provided script.

I've attached an updated AaroniaHTTP.m class to this post which includes a new method "getStreamPacket". How this method can be used to stream data is demonstrated in the spectranstreaming.m. Especially when you're just streaming from a file source, you can turn down the playback speed a little to help alleviate any remaining incontinuities ... MATLAB isn't the perfect choice to implement a streaming client like that.

See the attached screenshot for an exemplary capture, which, as you can see, is perfectly clean and doesn't have discontinuities.

Uploaded files:
abhijithbg has reacted to this post.

Hello all!

Using HTTP for lab engeneer, I think, it's not good, because everywhere and everyone use SCPI-command and also matlab has many examples with basic SCPI-commands.

Many lab engeneer already has many scripts for working with lab instrument(R&S, Rigol, Keysight etc.), and with SPECTRAN V6, they must write a lot of new fucntion to work with it by HTTP.

And for this I have one question: SPECTRAN V6 - it's not lab product? It's similiar to RedPitay (but RedPitaya already has support SCPI-commands).

Sorry for everyone, it's my opinion only.

If you want to use the old SCPI commands/driver simply use our HISLIP-SCPI block:

dhwlyinliang has reacted to this post.

Hi, where can I download the Programming handbook for V6? All SCPI commands for V6 functions.

Check the documentation in the associated forum thread:



I got the SpectranV6 RSA250X in the lab a few weeks ago. I try to control it with Matlab. However, I cannot access to the local host. I enter http://localhost:55442/sample into my web browser, but the connection is refused for both Chrome and Firefox.


Could you advice me how should I proceed? Thanks.

Note that the default port of the HTTP server block is 54664 if you haven't changed it, while you're trying to access port 55442.

If that isn't the problem, can you upload the RTSA mission file?

I try both 55442 and 54664, and they both lead to "localhost refused to connect." error message.

One thing I notice is that as I check the port address with XAMPP, it shows 55442 as shown in the attached pdf file. Is it normal?

My RTSA mission file is attached. Maybe I miss some blocks that should be installed?

Thank you.


Uploaded files:

There is no HTTP server block or any other option for remote-control in your mission, that is why you can't establish a connection. The port 55442 is used for different purposes.

PreviousPage 5 of 9Next